* $contentwarehouseService = new Google\Service\Contentwarehouse(...); * $referenceId = $contentwarehouseService->projects_locations_documents_referenceId; * */ class ProjectsLocationsDocumentsReferenceId extends \Google\Service\Resource { /** * Deletes a document. Returns NOT_FOUND if the document does not exist. * (referenceId.delete) * * @param string $name Required. The name of the document to delete. Format: * projects/{project_number}/locations/{location}/documents/{document_id} or pro * jects/{project_number}/locations/{location}/documents/referenceId/{reference_ * id}. * @param GoogleCloudContentwarehouseV1DeleteDocumentRequest $postBody * @param array $optParams Optional parameters. * @return GoogleProtobufEmpty * @throws \Google\Service\Exception */ public function delete($name, GoogleCloudContentwarehouseV1DeleteDocumentRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], GoogleProtobufEmpty::class); } /** * Gets a document. Returns NOT_FOUND if the document does not exist. * (referenceId.get) * * @param string $name Required. The name of the document to retrieve. Format: * projects/{project_number}/locations/{location}/documents/{document_id} or pro * jects/{project_number}/locations/{location}/documents/referenceId/{reference_ * id}. * @param GoogleCloudContentwarehouseV1GetDocumentRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudContentwarehouseV1Document * @throws \Google\Service\Exception */ public function get($name, GoogleCloudContentwarehouseV1GetDocumentRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('get', [$params], GoogleCloudContentwarehouseV1Document::class); } /** * Updates a document. Returns INVALID_ARGUMENT if the name of the document is * non-empty and does not equal the existing name. (referenceId.patch) * * @param string $name Required. The name of the document to update. Format: * projects/{project_number}/locations/{location}/documents/{document_id} or pro * jects/{project_number}/locations/{location}/documents/referenceId/{reference_ * id}. * @param GoogleCloudContentwarehouseV1UpdateDocumentRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudContentwarehouseV1UpdateDocumentResponse * @throws \Google\Service\Exception */ public function patch($name, GoogleCloudContentwarehouseV1UpdateDocumentRequest $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], GoogleCloudContentwarehouseV1UpdateDocumentResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsDocumentsReferenceId::class, 'Google_Service_Contentwarehouse_Resource_ProjectsLocationsDocumentsReferenceId');