class ProjectsLocationsDocuments extends Resource (View source)

The "documents" collection of methods.

Typical usage is:

 $contentwarehouseService = new Google\Service\Contentwarehouse(...);
 $documents = $contentwarehouseService->projects_locations_documents;

Methods

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

Creates a document. (documents.create)

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

Deletes a document. Returns NOT_FOUND if the document does not exist.

fetchAcl(string $resource, GoogleCloudContentwarehouseV1FetchAclRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns NOT_FOUND error if the resource does not exist. Returns an empty policy if the resource exists but does not have a policy set. (documents.fetchAcl)

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

Gets a document. Returns NOT_FOUND if the document does not exist.

linkedSources(string $parent, GoogleCloudContentwarehouseV1ListLinkedSourcesRequest $postBody, array $optParams = [])

Return all source document-links from the document. (documents.linkedSources)

linkedTargets(string $parent, GoogleCloudContentwarehouseV1ListLinkedTargetsRequest $postBody, array $optParams = [])

Return all target document-links from the document. (documents.linkedTargets)

lock(string $name, GoogleCloudContentwarehouseV1LockDocumentRequest $postBody, array $optParams = [])

Lock the document so the document cannot be updated by other users.

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

Updates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name. (documents.patch)

search(string $parent, GoogleCloudContentwarehouseV1SearchDocumentsRequest $postBody, array $optParams = [])

Searches for documents using provided SearchDocumentsRequest. This call only returns documents that the caller has permission to search against.

setAcl(string $resource, GoogleCloudContentwarehouseV1SetAclRequest $postBody, array $optParams = [])

Sets the access control policy for a resource. Replaces any existing policy.

Details

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

Creates a document. (documents.create)

Parameters

string $parent

Required. The parent name. Format: projects/{project_number}/locations/{location}.

GoogleCloudContentwarehouseV1CreateDocumentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1CreateDocumentResponse

Exceptions

Exception

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

Deletes a document. Returns NOT_FOUND if the document does not exist.

(documents.delete)

Parameters

string $name

Required. The name of the document to delete. Format: projects/{project_number}/locations/{location}/documents/{document_id} or pro jects/{projectnumber}/locations/{location}/documents/referenceId/{reference id}.

GoogleCloudContentwarehouseV1DeleteDocumentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleCloudContentwarehouseV1FetchAclResponse fetchAcl(string $resource, GoogleCloudContentwarehouseV1FetchAclRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns NOT_FOUND error if the resource does not exist. Returns an empty policy if the resource exists but does not have a policy set. (documents.fetchAcl)

Parameters

string $resource

Required. REQUIRED: The resource for which the policy is being requested. Format for document: projects/{project_number}/locations/{location}/documents/{document_id}. Format for collection: projects/{project_number}/locations/{location}/collections/{collection_id}. Format for project: projects/{project_number}.

GoogleCloudContentwarehouseV1FetchAclRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1FetchAclResponse

Exceptions

Exception

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

Gets a document. Returns NOT_FOUND if the document does not exist.

(documents.get)

Parameters

string $name

Required. The name of the document to retrieve. Format: projects/{project_number}/locations/{location}/documents/{document_id} or pro jects/{projectnumber}/locations/{location}/documents/referenceId/{reference id}.

GoogleCloudContentwarehouseV1GetDocumentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1Document

Exceptions

Exception

GoogleCloudContentwarehouseV1ListLinkedSourcesResponse linkedSources(string $parent, GoogleCloudContentwarehouseV1ListLinkedSourcesRequest $postBody, array $optParams = [])

Return all source document-links from the document. (documents.linkedSources)

Parameters

string $parent

Required. The name of the document, for which all source links are returned. Format: projects/{project_number}/locations/{locat ion}/documents/{source_document_id}.

GoogleCloudContentwarehouseV1ListLinkedSourcesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1ListLinkedSourcesResponse

Exceptions

Exception

GoogleCloudContentwarehouseV1ListLinkedTargetsResponse linkedTargets(string $parent, GoogleCloudContentwarehouseV1ListLinkedTargetsRequest $postBody, array $optParams = [])

Return all target document-links from the document. (documents.linkedTargets)

Parameters

string $parent

Required. The name of the document, for which all target links are returned. Format: projects/{project_number}/locations/{locat ion}/documents/{target_document_id}.

GoogleCloudContentwarehouseV1ListLinkedTargetsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1ListLinkedTargetsResponse

Exceptions

Exception

GoogleCloudContentwarehouseV1Document lock(string $name, GoogleCloudContentwarehouseV1LockDocumentRequest $postBody, array $optParams = [])

Lock the document so the document cannot be updated by other users.

(documents.lock)

Parameters

string $name

Required. The name of the document to lock. Format: projects/{project_number}/locations/{location}/documents/{document}.

GoogleCloudContentwarehouseV1LockDocumentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1Document

Exceptions

Exception

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

Updates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name. (documents.patch)

Parameters

string $name

Required. The name of the document to update. Format: projects/{project_number}/locations/{location}/documents/{document_id} or pro jects/{projectnumber}/locations/{location}/documents/referenceId/{reference id}.

GoogleCloudContentwarehouseV1UpdateDocumentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1UpdateDocumentResponse

Exceptions

Exception

Searches for documents using provided SearchDocumentsRequest. This call only returns documents that the caller has permission to search against.

(documents.search)

Parameters

string $parent

Required. The parent, which owns this collection of documents. Format: projects/{project_number}/locations/{location}.

GoogleCloudContentwarehouseV1SearchDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1SearchDocumentsResponse

Exceptions

Exception

GoogleCloudContentwarehouseV1SetAclResponse setAcl(string $resource, GoogleCloudContentwarehouseV1SetAclRequest $postBody, array $optParams = [])

Sets the access control policy for a resource. Replaces any existing policy.

(documents.setAcl)

Parameters

string $resource

Required. REQUIRED: The resource for which the policy is being requested. Format for document: projects/{project_number}/locations/{location}/documents/{document_id}. Format for collection: projects/{project_number}/locations/{location}/collections/{collection_id}. Format for project: projects/{project_number}.

GoogleCloudContentwarehouseV1SetAclRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudContentwarehouseV1SetAclResponse

Exceptions

Exception