Class Document (0.1.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
TypeDescription
int

CLOUD_AI_DOCUMENT_FIELD_NUMBER

public static final int CLOUD_AI_DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

CREATOR_FIELD_NUMBER

public static final int CREATOR_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_URI_FIELD_NUMBER

public static final int DISPLAY_URI_FIELD_NUMBER
Field Value
TypeDescription
int

DOCUMENT_SCHEMA_NAME_FIELD_NUMBER

public static final int DOCUMENT_SCHEMA_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

INLINE_RAW_DOCUMENT_FIELD_NUMBER

public static final int INLINE_RAW_DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PLAIN_TEXT_FIELD_NUMBER

public static final int PLAIN_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

PROPERTIES_FIELD_NUMBER

public static final int PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER

public static final int RAW_DOCUMENT_FILE_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

RAW_DOCUMENT_PATH_FIELD_NUMBER

public static final int RAW_DOCUMENT_PATH_FIELD_NUMBER
Field Value
TypeDescription
int

REFERENCE_ID_FIELD_NUMBER

public static final int REFERENCE_ID_FIELD_NUMBER
Field Value
TypeDescription
int

STRUCTURED_CONTENT_URI_FIELD_NUMBER

public static final int STRUCTURED_CONTENT_URI_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_EXTRACTION_DISABLED_FIELD_NUMBER

public static final int TEXT_EXTRACTION_DISABLED_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATER_FIELD_NUMBER

public static final int UPDATER_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Document getDefaultInstance()
Returns
TypeDescription
Document

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Document.Builder newBuilder()
Returns
TypeDescription
Document.Builder

newBuilder(Document prototype)

public static Document.Builder newBuilder(Document prototype)
Parameter
NameDescription
prototypeDocument
Returns
TypeDescription
Document.Builder

parseDelimitedFrom(InputStream input)

public static Document parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Document parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Document parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Document parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Document> parser()
Returns
TypeDescription
Parser<Document>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAsyncEnabled()

public boolean getAsyncEnabled()

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

bool async_enabled = 12;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
com.google.cloud.documentai.v1.DocumentOrBuilder

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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getCreator()

public String getCreator()

The user who creates the document.

string creator = 13;

Returns
TypeDescription
String

The creator.

getCreatorBytes()

public ByteString getCreatorBytes()

The user who creates the document.

string creator = 13;

Returns
TypeDescription
ByteString

The bytes for creator.

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for displayName.

getDisplayUri()

public String getDisplayUri()

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

string display_uri = 17;

Returns
TypeDescription
String

The displayUri.

getDisplayUriBytes()

public ByteString getDisplayUriBytes()

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

string display_uri = 17;

Returns
TypeDescription
ByteString

The bytes for displayUri.

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
TypeDescription
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
TypeDescription
ByteString

The bytes for documentSchemaName.

getInlineRawDocument()

public ByteString getInlineRawDocument()

Raw document content.

bytes inline_raw_document = 6;

Returns
TypeDescription
ByteString

The inlineRawDocument.

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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Document> getParserForType()
Returns
TypeDescription
Parser<Document>
Overrides

getPlainText()

public String getPlainText()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
TypeDescription
String

The plainText.

getPlainTextBytes()

public ByteString getPlainTextBytes()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Property

getPropertiesCount()

public int getPropertiesCount()

List of values that are user supplied metadata.

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

Returns
TypeDescription
int

getPropertiesList()

public List<Property> getPropertiesList()

List of values that are user supplied metadata.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PropertyOrBuilder

getPropertiesOrBuilderList()

public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()

List of values that are user supplied metadata.

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

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

getRawDocumentCase()

public Document.RawDocumentCase getRawDocumentCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The rawDocumentPath.

getRawDocumentPathBytes()

public ByteString getRawDocumentPathBytes()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for referenceId.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStructuredContentCase()

public Document.StructuredContentCase getStructuredContentCase()
Returns
TypeDescription
Document.StructuredContentCase

getStructuredContentUri()

public String getStructuredContentUri()

A path linked to structured content file.

string structured_content_uri = 16;

Returns
TypeDescription
String

The structuredContentUri.

getStructuredContentUriBytes()

public ByteString getStructuredContentUriBytes()

A path linked to structured content file.

string structured_content_uri = 16;

Returns
TypeDescription
ByteString

The bytes for structuredContentUri.

getTextExtractionDisabled()

public boolean getTextExtractionDisabled()

If true, text extraction will not be performed.

bool text_extraction_disabled = 19;

Returns
TypeDescription
boolean

The textExtractionDisabled.

getTitle()

public String getTitle()

Title that describes the document. This is usually present in the top section of the document, and is a mandatory field for the question-answering feature.

string title = 18;

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Title that describes the document. This is usually present in the top section of the document, and is a mandatory field for the question-answering feature.

string title = 18;

Returns
TypeDescription
ByteString

The bytes for title.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getUpdater()

public String getUpdater()

The user who lastly updates the document.

string updater = 14;

Returns
TypeDescription
String

The updater.

getUpdaterBytes()

public ByteString getUpdaterBytes()

The user who lastly updates the document.

string updater = 14;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the createTime field is set.

hasInlineRawDocument()

public boolean hasInlineRawDocument()

Raw document content.

bytes inline_raw_document = 6;

Returns
TypeDescription
boolean

Whether the inlineRawDocument field is set.

hasPlainText()

public boolean hasPlainText()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
TypeDescription
boolean

Whether the plainText field is set.

hasRawDocumentPath()

public boolean hasRawDocumentPath()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Document.Builder newBuilderForType()
Returns
TypeDescription
Document.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Document.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Document.Builder toBuilder()
Returns
TypeDescription
Document.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException