Class Document.Builder (0.37.0)

public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder

Defines the structure for content warehouse document proto.

Protobuf type google.cloud.contentwarehouse.v1.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllProperties(Iterable<? extends Property> values)

public Document.Builder addAllProperties(Iterable<? extends Property> values)

List of values that are user supplied metadata.

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

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.contentwarehouse.v1.Property>
Returns
TypeDescription
Document.Builder

addProperties(Property value)

public Document.Builder addProperties(Property value)

List of values that are user supplied metadata.

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

Parameter
NameDescription
valueProperty
Returns
TypeDescription
Document.Builder

addProperties(Property.Builder builderForValue)

public Document.Builder addProperties(Property.Builder builderForValue)

List of values that are user supplied metadata.

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

Parameter
NameDescription
builderForValueProperty.Builder
Returns
TypeDescription
Document.Builder

addProperties(int index, Property value)

public Document.Builder addProperties(int index, Property value)

List of values that are user supplied metadata.

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

Parameters
NameDescription
indexint
valueProperty
Returns
TypeDescription
Document.Builder

addProperties(int index, Property.Builder builderForValue)

public Document.Builder addProperties(int index, Property.Builder builderForValue)

List of values that are user supplied metadata.

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

Parameters
NameDescription
indexint
builderForValueProperty.Builder
Returns
TypeDescription
Document.Builder

addPropertiesBuilder()

public Property.Builder addPropertiesBuilder()

List of values that are user supplied metadata.

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

Returns
TypeDescription
Property.Builder

addPropertiesBuilder(int index)

public Property.Builder addPropertiesBuilder(int index)

List of values that are user supplied metadata.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Property.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

build()

public Document build()
Returns
TypeDescription
Document

buildPartial()

public Document buildPartial()
Returns
TypeDescription
Document

clear()

public Document.Builder clear()
Returns
TypeDescription
Document.Builder
Overrides

clearAsyncEnabled() (deprecated)

public Document.Builder clearAsyncEnabled()

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
TypeDescription
Document.Builder

This builder for chaining.

clearCloudAiDocument()

public Document.Builder clearCloudAiDocument()

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

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

Returns
TypeDescription
Document.Builder

clearContentCategory()

public Document.Builder clearContentCategory()

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

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

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearCreateTime()

public Document.Builder clearCreateTime()

Output only. The time when the document is created.

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

Returns
TypeDescription
Document.Builder

clearCreator()

public Document.Builder clearCreator()

The user who creates the document.

string creator = 13;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearDisplayName()

public Document.Builder clearDisplayName()

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
Document.Builder

This builder for chaining.

clearDisplayUri()

public Document.Builder clearDisplayUri()

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

string display_uri = 17;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearDispositionTime()

public Document.Builder clearDispositionTime()

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
TypeDescription
Document.Builder

clearDocumentSchemaName()

public Document.Builder clearDocumentSchemaName()

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
Document.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Document.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearInlineRawDocument()

public Document.Builder clearInlineRawDocument()

Raw document content.

bytes inline_raw_document = 6;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearLegalHold()

public Document.Builder clearLegalHold()

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

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

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearName()

public Document.Builder clearName()

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
Document.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearPlainText()

public Document.Builder clearPlainText()

Other document format, such as PPTX, XLXS

string plain_text = 15;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearProperties()

public Document.Builder clearProperties()

List of values that are user supplied metadata.

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

Returns
TypeDescription
Document.Builder

clearRawDocument()

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

clearRawDocumentFileType()

public Document.Builder clearRawDocumentFileType()

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
Document.Builder

This builder for chaining.

clearRawDocumentPath()

public Document.Builder clearRawDocumentPath()

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearReferenceId()

public Document.Builder clearReferenceId()

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

string reference_id = 11;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearStructuredContent()

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

clearStructuredContentUri() (deprecated)

public Document.Builder clearStructuredContentUri()

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
TypeDescription
Document.Builder

This builder for chaining.

clearTextExtractionDisabled() (deprecated)

public Document.Builder clearTextExtractionDisabled()

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
TypeDescription
Document.Builder

This builder for chaining.

clearTextExtractionEnabled()

public Document.Builder clearTextExtractionEnabled()

If true, text extraction will be performed.

bool text_extraction_enabled = 21;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearTitle()

public Document.Builder clearTitle()

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

string title = 18;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearUpdateTime()

public Document.Builder clearUpdateTime()

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

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

Returns
TypeDescription
Document.Builder

clearUpdater()

public Document.Builder clearUpdater()

The user who lastly updates the document.

string updater = 14;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clone()

public Document.Builder clone()
Returns
TypeDescription
Document.Builder
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
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.

getCloudAiDocumentBuilder()

public Document.Builder getCloudAiDocumentBuilder()

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.Builder

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

getContentCategory()

public ContentCategory getContentCategory()

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

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

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

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the document is created.

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

Returns
TypeDescription
Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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.

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

The dispositionTime.

getDispositionTimeBuilder()

public Timestamp.Builder getDispositionTimeBuilder()

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

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

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

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

getPropertiesBuilder(int index)

public Property.Builder getPropertiesBuilder(int index)

List of values that are user supplied metadata.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Property.Builder

getPropertiesBuilderList()

public List<Property.Builder> getPropertiesBuilderList()

List of values that are user supplied metadata.

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

Returns
TypeDescription
List<Builder>

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.

getStructuredContentCase()

public Document.StructuredContentCase getStructuredContentCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The textExtractionDisabled.

getTextExtractionEnabled()

public boolean getTextExtractionEnabled()

If true, text extraction will be performed.

bool text_extraction_enabled = 21;

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

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

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

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

Returns
TypeDescription
Builder

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.

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

Whether the dispositionTime 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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCloudAiDocument(Document value)

public Document.Builder mergeCloudAiDocument(Document value)

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

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

Parameter
NameDescription
valuecom.google.cloud.documentai.v1.Document
Returns
TypeDescription
Document.Builder

mergeCreateTime(Timestamp value)

public Document.Builder mergeCreateTime(Timestamp value)

Output only. The time when the document is created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

mergeDispositionTime(Timestamp value)

public Document.Builder mergeDispositionTime(Timestamp value)

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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

mergeFrom(Document other)

public Document.Builder mergeFrom(Document other)
Parameter
NameDescription
otherDocument
Returns
TypeDescription
Document.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Document.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Document.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Document.Builder mergeUpdateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

removeProperties(int index)

public Document.Builder removeProperties(int index)

List of values that are user supplied metadata.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

setAsyncEnabled(boolean value) (deprecated)

public Document.Builder setAsyncEnabled(boolean value)

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];

Parameter
NameDescription
valueboolean

The asyncEnabled to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setCloudAiDocument(Document value)

public Document.Builder setCloudAiDocument(Document value)

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

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

Parameter
NameDescription
valuecom.google.cloud.documentai.v1.Document
Returns
TypeDescription
Document.Builder

setCloudAiDocument(Document.Builder builderForValue)

public Document.Builder setCloudAiDocument(Document.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValuecom.google.cloud.documentai.v1.Document.Builder
Returns
TypeDescription
Document.Builder

setContentCategory(ContentCategory value)

public Document.Builder setContentCategory(ContentCategory value)

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

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

Parameter
NameDescription
valueContentCategory

The contentCategory to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setContentCategoryValue(int value)

public Document.Builder setContentCategoryValue(int value)

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

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for contentCategory to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Document.Builder setCreateTime(Timestamp value)

Output only. The time when the document is created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Document.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the document is created.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Document.Builder

setCreator(String value)

public Document.Builder setCreator(String value)

The user who creates the document.

string creator = 13;

Parameter
NameDescription
valueString

The creator to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setCreatorBytes(ByteString value)

public Document.Builder setCreatorBytes(ByteString value)

The user who creates the document.

string creator = 13;

Parameter
NameDescription
valueByteString

The bytes for creator to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDisplayName(String value)

public Document.Builder setDisplayName(String value)

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];

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Document.Builder setDisplayNameBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDisplayUri(String value)

public Document.Builder setDisplayUri(String value)

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

string display_uri = 17;

Parameter
NameDescription
valueString

The displayUri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDisplayUriBytes(ByteString value)

public Document.Builder setDisplayUriBytes(ByteString value)

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

string display_uri = 17;

Parameter
NameDescription
valueByteString

The bytes for displayUri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDispositionTime(Timestamp value)

public Document.Builder setDispositionTime(Timestamp value)

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];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

setDispositionTime(Timestamp.Builder builderForValue)

public Document.Builder setDispositionTime(Timestamp.Builder builderForValue)

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];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Document.Builder

setDocumentSchemaName(String value)

public Document.Builder setDocumentSchemaName(String value)

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

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

Parameter
NameDescription
valueString

The documentSchemaName to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setDocumentSchemaNameBytes(ByteString value)

public Document.Builder setDocumentSchemaNameBytes(ByteString value)

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

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

Parameter
NameDescription
valueByteString

The bytes for documentSchemaName to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setInlineRawDocument(ByteString value)

public Document.Builder setInlineRawDocument(ByteString value)

Raw document content.

bytes inline_raw_document = 6;

Parameter
NameDescription
valueByteString

The inlineRawDocument to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setLegalHold(boolean value)

public Document.Builder setLegalHold(boolean value)

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

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

Parameter
NameDescription
valueboolean

The legalHold to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setName(String value)

public Document.Builder setName(String value)

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;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Document.Builder setNameBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setPlainText(String value)

public Document.Builder setPlainText(String value)

Other document format, such as PPTX, XLXS

string plain_text = 15;

Parameter
NameDescription
valueString

The plainText to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setPlainTextBytes(ByteString value)

public Document.Builder setPlainTextBytes(ByteString value)

Other document format, such as PPTX, XLXS

string plain_text = 15;

Parameter
NameDescription
valueByteString

The bytes for plainText to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setProperties(int index, Property value)

public Document.Builder setProperties(int index, Property value)

List of values that are user supplied metadata.

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

Parameters
NameDescription
indexint
valueProperty
Returns
TypeDescription
Document.Builder

setProperties(int index, Property.Builder builderForValue)

public Document.Builder setProperties(int index, Property.Builder builderForValue)

List of values that are user supplied metadata.

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

Parameters
NameDescription
indexint
builderForValueProperty.Builder
Returns
TypeDescription
Document.Builder

setRawDocumentFileType(RawDocumentFileType value)

public Document.Builder setRawDocumentFileType(RawDocumentFileType value)

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;

Parameter
NameDescription
valueRawDocumentFileType

The rawDocumentFileType to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRawDocumentFileTypeValue(int value)

public Document.Builder setRawDocumentFileTypeValue(int value)

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;

Parameter
NameDescription
valueint

The enum numeric value on the wire for rawDocumentFileType to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRawDocumentPath(String value)

public Document.Builder setRawDocumentPath(String value)

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Parameter
NameDescription
valueString

The rawDocumentPath to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRawDocumentPathBytes(ByteString value)

public Document.Builder setRawDocumentPathBytes(ByteString value)

Raw document file in Cloud Storage path.

string raw_document_path = 5;

Parameter
NameDescription
valueByteString

The bytes for rawDocumentPath to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setReferenceId(String value)

public Document.Builder setReferenceId(String value)

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

string reference_id = 11;

Parameter
NameDescription
valueString

The referenceId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setReferenceIdBytes(ByteString value)

public Document.Builder setReferenceIdBytes(ByteString value)

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

string reference_id = 11;

Parameter
NameDescription
valueByteString

The bytes for referenceId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setStructuredContentUri(String value) (deprecated)

public Document.Builder setStructuredContentUri(String value)

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];

Parameter
NameDescription
valueString

The structuredContentUri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setStructuredContentUriBytes(ByteString value) (deprecated)

public Document.Builder setStructuredContentUriBytes(ByteString value)

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];

Parameter
NameDescription
valueByteString

The bytes for structuredContentUri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTextExtractionDisabled(boolean value) (deprecated)

public Document.Builder setTextExtractionDisabled(boolean value)

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];

Parameter
NameDescription
valueboolean

The textExtractionDisabled to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTextExtractionEnabled(boolean value)

public Document.Builder setTextExtractionEnabled(boolean value)

If true, text extraction will be performed.

bool text_extraction_enabled = 21;

Parameter
NameDescription
valueboolean

The textExtractionEnabled to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTitle(String value)

public Document.Builder setTitle(String value)

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

string title = 18;

Parameter
NameDescription
valueString

The title to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Document.Builder setTitleBytes(ByteString value)

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

string title = 18;

Parameter
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides

setUpdateTime(Timestamp value)

public Document.Builder setUpdateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Document.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Document.Builder setUpdateTime(Timestamp.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Document.Builder

setUpdater(String value)

public Document.Builder setUpdater(String value)

The user who lastly updates the document.

string updater = 14;

Parameter
NameDescription
valueString

The updater to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setUpdaterBytes(ByteString value)

public Document.Builder setUpdaterBytes(ByteString value)

The user who lastly updates the document.

string updater = 14;

Parameter
NameDescription
valueByteString

The bytes for updater to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.