Class Document (0.50.0)

public final class Document extends GeneratedMessageV3 implements DocumentOrBuilder

Defines the structure for content warehouse document proto.

Protobuf type google.cloud.contentwarehouse.v1.Document

Implements

DocumentOrBuilder

Static Fields

ASYNC_ENABLED_FIELD_NUMBER

public static final int ASYNC_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

CLOUD_AI_DOCUMENT_FIELD_NUMBER

public static final int CLOUD_AI_DOCUMENT_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_CATEGORY_FIELD_NUMBER

public static final int CONTENT_CATEGORY_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

CREATOR_FIELD_NUMBER

public static final int CREATOR_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_URI_FIELD_NUMBER

public static final int DISPLAY_URI_FIELD_NUMBER
Field Value
Type Description
int

DISPOSITION_TIME_FIELD_NUMBER

public static final int DISPOSITION_TIME_FIELD_NUMBER
Field Value
Type Description
int

DOCUMENT_SCHEMA_NAME_FIELD_NUMBER

public static final int DOCUMENT_SCHEMA_NAME_FIELD_NUMBER
Field Value
Type Description
int

INLINE_RAW_DOCUMENT_FIELD_NUMBER

public static final int INLINE_RAW_DOCUMENT_FIELD_NUMBER
Field Value
Type Description
int
public static final int LEGAL_HOLD_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PLAIN_TEXT_FIELD_NUMBER

public static final int PLAIN_TEXT_FIELD_NUMBER
Field Value
Type Description
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
Type Description
int

RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER

public static final int RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

RAW_DOCUMENT_PATH_FIELD_NUMBER

public static final int RAW_DOCUMENT_PATH_FIELD_NUMBER
Field Value
Type Description
int

REFERENCE_ID_FIELD_NUMBER

public static final int REFERENCE_ID_FIELD_NUMBER
Field Value
Type Description
int

STRUCTURED_CONTENT_URI_FIELD_NUMBER

public static final int STRUCTURED_CONTENT_URI_FIELD_NUMBER
Field Value
Type Description
int

TEXT_EXTRACTION_DISABLED_FIELD_NUMBER

public static final int TEXT_EXTRACTION_DISABLED_FIELD_NUMBER
Field Value
Type Description
int

TEXT_EXTRACTION_ENABLED_FIELD_NUMBER

public static final int TEXT_EXTRACTION_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
Type Description
int

UPDATER_FIELD_NUMBER

public static final int UPDATER_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Document getDefaultInstance()
Returns
Type Description
Document

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Document.Builder newBuilder()
Returns
Type Description
Document.Builder

newBuilder(Document prototype)

public static Document.Builder newBuilder(Document prototype)
Parameter
Name Description
prototype Document
Returns
Type Description
Document.Builder

parseDelimitedFrom(InputStream input)

public static Document parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Document parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Document parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Document parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Document> parser()
Returns
Type Description
Parser<Document>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAsyncEnabled() (deprecated)

public boolean getAsyncEnabled()

Deprecated. google.cloud.contentwarehouse.v1.Document.async_enabled is deprecated. See google/cloud/contentwarehouse/v1/document.proto;l=108

If true, makes the document visible to asynchronous policies and rules.

bool async_enabled = 12 [deprecated = true];

Returns
Type Description
boolean

The asyncEnabled.

getCloudAiDocument()

public Document getCloudAiDocument()

Document AI format to save the structured content, including OCR.

.google.cloud.documentai.v1.Document cloud_ai_document = 4;

Returns
Type Description
com.google.cloud.documentai.v1.Document

The cloudAiDocument.

getCloudAiDocumentOrBuilder()

public DocumentOrBuilder getCloudAiDocumentOrBuilder()

Document AI format to save the structured content, including OCR.

.google.cloud.documentai.v1.Document cloud_ai_document = 4;

Returns
Type Description
com.google.cloud.documentai.v1.DocumentOrBuilder

getContentCategory()

public ContentCategory getContentCategory()

Indicates the category (image, audio, video etc.) of the original content.

.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;

Returns
Type Description
ContentCategory

The contentCategory.

getContentCategoryValue()

public int getContentCategoryValue()

Indicates the category (image, audio, video etc.) of the original content.

.google.cloud.contentwarehouse.v1.ContentCategory content_category = 20;

Returns
Type Description
int

The enum numeric value on the wire for contentCategory.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the document is created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the document is created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getCreator()

public String getCreator()

The user who creates the document.

string creator = 13;

Returns
Type Description
String

The creator.

getCreatorBytes()

public ByteString getCreatorBytes()

The user who creates the document.

string creator = 13;

Returns
Type Description
ByteString

The bytes for creator.

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
Type Description
Document

getDisplayName()

public String getDisplayName()

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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getDisplayUri()

public String getDisplayUri()

Uri to display the document, for example, in the UI.

string display_uri = 17;

Returns
Type Description
String

The displayUri.

getDisplayUriBytes()

public ByteString getDisplayUriBytes()

Uri to display the document, for example, in the UI.

string display_uri = 17;

Returns
Type Description
ByteString

The bytes for displayUri.

getDispositionTime()

public Timestamp getDispositionTime()

Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.

.google.protobuf.Timestamp disposition_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The dispositionTime.

getDispositionTimeOrBuilder()

public TimestampOrBuilder getDispositionTimeOrBuilder()

Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.

.google.protobuf.Timestamp disposition_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDocumentSchemaName()

public String getDocumentSchemaName()

The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

string document_schema_name = 3 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The documentSchemaName.

getDocumentSchemaNameBytes()

public ByteString getDocumentSchemaNameBytes()

The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

string document_schema_name = 3 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for documentSchemaName.

getInlineRawDocument()

public ByteString getInlineRawDocument()

Raw document content.

bytes inline_raw_document = 6;

Returns
Type Description
ByteString

The inlineRawDocument.

getLegalHold()

public boolean getLegalHold()

Output only. Indicates if the document has a legal hold on it.

bool legal_hold = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The legalHold.

getName()

public String getName()

The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

The name is ignored when creating a document.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}.

The name is ignored when creating a document.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Document> getParserForType()
Returns
Type Description
Parser<Document>
Overrides

getPlainText()

public String getPlainText()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
Type Description
String

The plainText.

getPlainTextBytes()

public ByteString getPlainTextBytes()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
Type Description
ByteString

The bytes for plainText.

getProperties(int index)

public Property getProperties(int index)

List of values that are user supplied metadata.

repeated .google.cloud.contentwarehouse.v1.Property properties = 7;

Parameter
Name Description
index int
Returns
Type Description
Property

getPropertiesCount()

public int getPropertiesCount()

List of values that are user supplied metadata.

repeated .google.cloud.contentwarehouse.v1.Property properties = 7;

Returns
Type Description
int

getPropertiesList()

public List<Property> getPropertiesList()

List of values that are user supplied metadata.

repeated .google.cloud.contentwarehouse.v1.Property properties = 7;

Returns
Type Description
List<Property>

getPropertiesOrBuilder(int index)

public PropertyOrBuilder getPropertiesOrBuilder(int index)

List of values that are user supplied metadata.

repeated .google.cloud.contentwarehouse.v1.Property properties = 7;

Parameter
Name Description
index int
Returns
Type Description
PropertyOrBuilder

getPropertiesOrBuilderList()

public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()

List of values that are user supplied metadata.

repeated .google.cloud.contentwarehouse.v1.Property properties = 7;

Returns
Type Description
List<? extends com.google.cloud.contentwarehouse.v1.PropertyOrBuilder>

getRawDocumentCase()

public Document.RawDocumentCase getRawDocumentCase()
Returns
Type Description
Document.RawDocumentCase

getRawDocumentFileType()

public RawDocumentFileType getRawDocumentFileType()

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.

.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;

Returns
Type Description
RawDocumentFileType

The rawDocumentFileType.

getRawDocumentFileTypeValue()

public int getRawDocumentFileTypeValue()

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.

.google.cloud.contentwarehouse.v1.RawDocumentFileType raw_document_file_type = 10;

Returns
Type Description
int

The enum numeric value on the wire for rawDocumentFileType.

getRawDocumentPath()

public String getRawDocumentPath()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
Type Description
String

The rawDocumentPath.

getRawDocumentPathBytes()

public ByteString getRawDocumentPathBytes()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
Type Description
ByteString

The bytes for rawDocumentPath.

getReferenceId()

public String getReferenceId()

The reference ID set by customers. Must be unique per project and location.

string reference_id = 11;

Returns
Type Description
String

The referenceId.

getReferenceIdBytes()

public ByteString getReferenceIdBytes()

The reference ID set by customers. Must be unique per project and location.

string reference_id = 11;

Returns
Type Description
ByteString

The bytes for referenceId.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStructuredContentCase()

public Document.StructuredContentCase getStructuredContentCase()
Returns
Type Description
Document.StructuredContentCase

getStructuredContentUri() (deprecated)

public String getStructuredContentUri()

Deprecated. google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated. See google/cloud/contentwarehouse/v1/document.proto;l=79

A path linked to structured content file.

string structured_content_uri = 16 [deprecated = true];

Returns
Type Description
String

The structuredContentUri.

getStructuredContentUriBytes() (deprecated)

public ByteString getStructuredContentUriBytes()

Deprecated. google.cloud.contentwarehouse.v1.Document.structured_content_uri is deprecated. See google/cloud/contentwarehouse/v1/document.proto;l=79

A path linked to structured content file.

string structured_content_uri = 16 [deprecated = true];

Returns
Type Description
ByteString

The bytes for structuredContentUri.

getTextExtractionDisabled() (deprecated)

public boolean getTextExtractionDisabled()

Deprecated. google.cloud.contentwarehouse.v1.Document.text_extraction_disabled is deprecated. See google/cloud/contentwarehouse/v1/document.proto;l=114

If true, text extraction will not be performed.

bool text_extraction_disabled = 19 [deprecated = true];

Returns
Type Description
boolean

The textExtractionDisabled.

getTextExtractionEnabled()

public boolean getTextExtractionEnabled()

If true, text extraction will be performed.

bool text_extraction_enabled = 21;

Returns
Type Description
boolean

The textExtractionEnabled.

getTitle()

public String getTitle()

Title that describes the document. This can be the top heading or text that describes the document.

string title = 18;

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Title that describes the document. This can be the top heading or text that describes the document.

string title = 18;

Returns
Type Description
ByteString

The bytes for title.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the document is last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the document is last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getUpdater()

public String getUpdater()

The user who lastly updates the document.

string updater = 14;

Returns
Type Description
String

The updater.

getUpdaterBytes()

public ByteString getUpdaterBytes()

The user who lastly updates the document.

string updater = 14;

Returns
Type Description
ByteString

The bytes for updater.

hasCloudAiDocument()

public boolean hasCloudAiDocument()

Document AI format to save the structured content, including OCR.

.google.cloud.documentai.v1.Document cloud_ai_document = 4;

Returns
Type Description
boolean

Whether the cloudAiDocument field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the document is created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDispositionTime()

public boolean hasDispositionTime()

Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.

.google.protobuf.Timestamp disposition_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the dispositionTime field is set.

hasInlineRawDocument()

public boolean hasInlineRawDocument()

Raw document content.

bytes inline_raw_document = 6;

Returns
Type Description
boolean

Whether the inlineRawDocument field is set.

hasPlainText()

public boolean hasPlainText()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
Type Description
boolean

Whether the plainText field is set.

hasRawDocumentPath()

public boolean hasRawDocumentPath()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
Type Description
boolean

Whether the rawDocumentPath field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the document is last updated.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Document.Builder newBuilderForType()
Returns
Type Description
Document.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Document.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Document.Builder toBuilder()
Returns
Type Description
Document.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException