class ProjectsLocationsCollectionsDataStoresBranchesDocuments extends Resource (View source)

The "documents" collection of methods.

Typical usage is:

 $discoveryengineService = new Google\Service\DiscoveryEngine(...);
 $documents = $discoveryengineService->projects_locations_collections_dataStores_branches_documents;

Methods

create(string $parent, GoogleCloudDiscoveryengineV1Document $postBody, array $optParams = [])

Creates a Document. (documents.create)

delete(string $name, array $optParams = [])

Deletes a Document. (documents.delete)

get(string $name, array $optParams = [])

Gets a Document. (documents.get)

import(string $parent, GoogleCloudDiscoveryengineV1ImportDocumentsRequest $postBody, array $optParams = [])

Bulk import of multiple Documents. Request processing may be synchronous.

patch(string $name, GoogleCloudDiscoveryengineV1Document $postBody, array $optParams = [])

Updates a Document. (documents.patch)

purge(string $parent, GoogleCloudDiscoveryengineV1PurgeDocumentsRequest $postBody, array $optParams = [])

Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. (documents.purge)

Details

GoogleCloudDiscoveryengineV1Document create(string $parent, GoogleCloudDiscoveryengineV1Document $postBody, array $optParams = [])

Creates a Document. (documents.create)

Parameters

string $parent

Required. The parent resource name, such as projects/{ project}/locations/{location}/collections/{collection}/dataStores/{data_store }/branches/{branch}.

GoogleCloudDiscoveryengineV1Document $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDiscoveryengineV1Document

Exceptions

Exception

GoogleProtobufEmpty delete(string $name, array $optParams = [])

Deletes a Document. (documents.delete)

Parameters

string $name

Required. Full resource name of Document, such as projec ts/{project}/locations/{location}/collections/{collection}/dataStores/{data_s tore}/branches/{branch}/documents/{document}. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Document to delete does not exist, a NOT_FOUND error is returned.

array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleCloudDiscoveryengineV1Document get(string $name, array $optParams = [])

Gets a Document. (documents.get)

Parameters

string $name

Required. Full resource name of Document, such as projec ts/{project}/locations/{location}/collections/{collection}/dataStores/{data_s tore}/branches/{branch}/documents/{document}. If the caller does not have permission to access the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Document does not exist, a NOT_FOUND error is returned.

array $optParams

Optional parameters.

Return Value

GoogleCloudDiscoveryengineV1Document

Exceptions

Exception

GoogleLongrunningOperation import(string $parent, GoogleCloudDiscoveryengineV1ImportDocumentsRequest $postBody, array $optParams = [])

Bulk import of multiple Documents. Request processing may be synchronous.

Non-existing items are created. Note: It is possible for a subset of the Documents to be successfully updated. (documents.import)

Parameters

string $parent

Required. The parent branch resource name, such as pro jects/{project}/locations/{location}/collections/{collection}/dataStores/{dat a_store}/branches/{branch}. Requires create/update permission.

GoogleCloudDiscoveryengineV1ImportDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDiscoveryengineV1ListDocumentsResponse listProjectsLocationsCollectionsDataStoresBranchesDocuments(string $parent, array $optParams = [])

Gets a list of Documents.

(documents.listProjectsLocationsCollectionsDataStoresBranchesDocuments)

Parameters

string $parent

Required. The parent branch resource name, such as pro jects/{project}/locations/{location}/collections/{collection}/dataStores/{dat a_store}/branches/{branch}. Use default_branch as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

array $optParams

Optional parameters.

Return Value

GoogleCloudDiscoveryengineV1ListDocumentsResponse

Exceptions

Exception

GoogleCloudDiscoveryengineV1Document patch(string $name, GoogleCloudDiscoveryengineV1Document $postBody, array $optParams = [])

Updates a Document. (documents.patch)

Parameters

string $name

Immutable. The full resource name of the document. Format: projects/{project}/locations/{location}/collections/{collection}/dat aStores/{data_store}/branches/{branch}/documents/{document_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.

GoogleCloudDiscoveryengineV1Document $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDiscoveryengineV1Document

Exceptions

Exception

GoogleLongrunningOperation purge(string $parent, GoogleCloudDiscoveryengineV1PurgeDocumentsRequest $postBody, array $optParams = [])

Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. (documents.purge)

Parameters

string $parent

Required. The parent resource name, such as projects/{ project}/locations/{location}/collections/{collection}/dataStores/{data_store }/branches/{branch}.

GoogleCloudDiscoveryengineV1PurgeDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception