reference_id
Creates, updates, deletes, gets or lists a reference_id
resource.
Overview
Name | reference_id |
Type | Resource |
Id | google.contentwarehouse.reference_id |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document. |
cloudAiDocument | object | Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. |
contentCategory | string | Indicates the category (image, audio, video etc.) of the original content. |
createTime | string | Output only. The time when the document is created. |
creator | string | The user who creates the document. |
displayName | string | Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the 'title' field as 'title' is optional and stores the top heading in the document. |
displayUri | string | Uri to display the document, for example, in the UI. |
dispositionTime | string | Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable. |
documentSchemaName | string | The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}. |
inlineRawDocument | string | Raw document content. |
legalHold | boolean | Output only. Indicates if the document has a legal hold on it. |
plainText | string | Other document format, such as PPTX, XLXS |
properties | array | List of values that are user supplied metadata. |
rawDocumentFileType | string | This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF. |
rawDocumentPath | string | Raw document file in Cloud Storage path. |
referenceId | string | The reference ID set by customers. Must be unique per project and location. |
textExtractionDisabled | boolean | If true, text extraction will not be performed. |
textExtractionEnabled | boolean | If true, text extraction will be performed. |
title | string | Title that describes the document. This can be the top heading or text that describes the document. |
updateTime | string | Output only. The time when the document is last updated. |
updater | string | The user who lastly updates the document. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, referenceIdId | Gets a document. Returns NOT_FOUND if the document does not exist. |
delete | DELETE | locationsId, projectsId, referenceIdId | Deletes a document. Returns NOT_FOUND if the document does not exist. |
patch | UPDATE | locationsId, projectsId, referenceIdId | Updates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name. |
SELECT
examples
Gets a document. Returns NOT_FOUND if the document does not exist.
SELECT
name,
cloudAiDocument,
contentCategory,
createTime,
creator,
displayName,
displayUri,
dispositionTime,
documentSchemaName,
inlineRawDocument,
legalHold,
plainText,
properties,
rawDocumentFileType,
rawDocumentPath,
referenceId,
textExtractionDisabled,
textExtractionEnabled,
title,
updateTime,
updater
FROM google.contentwarehouse.reference_id
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND referenceIdId = '{{ referenceIdId }}';
UPDATE
example
Updates a reference_id
resource.
/*+ update */
UPDATE google.contentwarehouse.reference_id
SET
cloudAiDocumentOption = '{{ cloudAiDocumentOption }}',
requestMetadata = '{{ requestMetadata }}',
document = '{{ document }}',
updateOptions = '{{ updateOptions }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND referenceIdId = '{{ referenceIdId }}';
DELETE
example
Deletes the specified reference_id
resource.
/*+ delete */
DELETE FROM google.contentwarehouse.reference_id
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND referenceIdId = '{{ referenceIdId }}';