Class Document.Builder (2.32.0)

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

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.

Protobuf type google.cloud.documentai.v1beta2.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllEntities(Iterable<? extends Document.Entity> values)

public Document.Builder addAllEntities(Iterable<? extends Document.Entity> values)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.Entity>
Returns
TypeDescription
Document.Builder

addAllEntityRelations(Iterable<? extends Document.EntityRelation> values)

public Document.Builder addAllEntityRelations(Iterable<? extends Document.EntityRelation> values)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.EntityRelation>
Returns
TypeDescription
Document.Builder

addAllLabels(Iterable<? extends Document.Label> values)

public Document.Builder addAllLabels(Iterable<? extends Document.Label> values)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.Label>
Returns
TypeDescription
Document.Builder

addAllPages(Iterable<? extends Document.Page> values)

public Document.Builder addAllPages(Iterable<? extends Document.Page> values)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.Page>
Returns
TypeDescription
Document.Builder

addAllRevisions(Iterable<? extends Document.Revision> values)

public Document.Builder addAllRevisions(Iterable<? extends Document.Revision> values)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.Revision>
Returns
TypeDescription
Document.Builder

addAllTextChanges(Iterable<? extends Document.TextChange> values)

public Document.Builder addAllTextChanges(Iterable<? extends Document.TextChange> values)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.TextChange>
Returns
TypeDescription
Document.Builder

addAllTextStyles(Iterable<? extends Document.Style> values)

public Document.Builder addAllTextStyles(Iterable<? extends Document.Style> values)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1beta2.Document.Style>
Returns
TypeDescription
Document.Builder

addEntities(Document.Entity value)

public Document.Builder addEntities(Document.Entity value)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
valueDocument.Entity
Returns
TypeDescription
Document.Builder

addEntities(Document.Entity.Builder builderForValue)

public Document.Builder addEntities(Document.Entity.Builder builderForValue)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
builderForValueDocument.Entity.Builder
Returns
TypeDescription
Document.Builder

addEntities(int index, Document.Entity value)

public Document.Builder addEntities(int index, Document.Entity value)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameters
NameDescription
indexint
valueDocument.Entity
Returns
TypeDescription
Document.Builder

addEntities(int index, Document.Entity.Builder builderForValue)

public Document.Builder addEntities(int index, Document.Entity.Builder builderForValue)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameters
NameDescription
indexint
builderForValueDocument.Entity.Builder
Returns
TypeDescription
Document.Builder

addEntitiesBuilder()

public Document.Entity.Builder addEntitiesBuilder()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
Document.Entity.Builder

addEntitiesBuilder(int index)

public Document.Entity.Builder addEntitiesBuilder(int index)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Entity.Builder

addEntityRelations(Document.EntityRelation value)

public Document.Builder addEntityRelations(Document.EntityRelation value)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
valueDocument.EntityRelation
Returns
TypeDescription
Document.Builder

addEntityRelations(Document.EntityRelation.Builder builderForValue)

public Document.Builder addEntityRelations(Document.EntityRelation.Builder builderForValue)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
builderForValueDocument.EntityRelation.Builder
Returns
TypeDescription
Document.Builder

addEntityRelations(int index, Document.EntityRelation value)

public Document.Builder addEntityRelations(int index, Document.EntityRelation value)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameters
NameDescription
indexint
valueDocument.EntityRelation
Returns
TypeDescription
Document.Builder

addEntityRelations(int index, Document.EntityRelation.Builder builderForValue)

public Document.Builder addEntityRelations(int index, Document.EntityRelation.Builder builderForValue)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameters
NameDescription
indexint
builderForValueDocument.EntityRelation.Builder
Returns
TypeDescription
Document.Builder

addEntityRelationsBuilder()

public Document.EntityRelation.Builder addEntityRelationsBuilder()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
Document.EntityRelation.Builder

addEntityRelationsBuilder(int index)

public Document.EntityRelation.Builder addEntityRelationsBuilder(int index)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityRelation.Builder

addLabels(Document.Label value)

public Document.Builder addLabels(Document.Label value)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
valueDocument.Label
Returns
TypeDescription
Document.Builder

addLabels(Document.Label.Builder builderForValue)

public Document.Builder addLabels(Document.Label.Builder builderForValue)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
builderForValueDocument.Label.Builder
Returns
TypeDescription
Document.Builder

addLabels(int index, Document.Label value)

public Document.Builder addLabels(int index, Document.Label value)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameters
NameDescription
indexint
valueDocument.Label
Returns
TypeDescription
Document.Builder

addLabels(int index, Document.Label.Builder builderForValue)

public Document.Builder addLabels(int index, Document.Label.Builder builderForValue)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameters
NameDescription
indexint
builderForValueDocument.Label.Builder
Returns
TypeDescription
Document.Builder

addLabelsBuilder()

public Document.Label.Builder addLabelsBuilder()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
Document.Label.Builder

addLabelsBuilder(int index)

public Document.Label.Builder addLabelsBuilder(int index)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Label.Builder

addPages(Document.Page value)

public Document.Builder addPages(Document.Page value)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
valueDocument.Page
Returns
TypeDescription
Document.Builder

addPages(Document.Page.Builder builderForValue)

public Document.Builder addPages(Document.Page.Builder builderForValue)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
builderForValueDocument.Page.Builder
Returns
TypeDescription
Document.Builder

addPages(int index, Document.Page value)

public Document.Builder addPages(int index, Document.Page value)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameters
NameDescription
indexint
valueDocument.Page
Returns
TypeDescription
Document.Builder

addPages(int index, Document.Page.Builder builderForValue)

public Document.Builder addPages(int index, Document.Page.Builder builderForValue)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameters
NameDescription
indexint
builderForValueDocument.Page.Builder
Returns
TypeDescription
Document.Builder

addPagesBuilder()

public Document.Page.Builder addPagesBuilder()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
Document.Page.Builder

addPagesBuilder(int index)

public Document.Page.Builder addPagesBuilder(int index)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Page.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

addRevisions(Document.Revision value)

public Document.Builder addRevisions(Document.Revision value)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
valueDocument.Revision
Returns
TypeDescription
Document.Builder

addRevisions(Document.Revision.Builder builderForValue)

public Document.Builder addRevisions(Document.Revision.Builder builderForValue)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
builderForValueDocument.Revision.Builder
Returns
TypeDescription
Document.Builder

addRevisions(int index, Document.Revision value)

public Document.Builder addRevisions(int index, Document.Revision value)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameters
NameDescription
indexint
valueDocument.Revision
Returns
TypeDescription
Document.Builder

addRevisions(int index, Document.Revision.Builder builderForValue)

public Document.Builder addRevisions(int index, Document.Revision.Builder builderForValue)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameters
NameDescription
indexint
builderForValueDocument.Revision.Builder
Returns
TypeDescription
Document.Builder

addRevisionsBuilder()

public Document.Revision.Builder addRevisionsBuilder()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
Document.Revision.Builder

addRevisionsBuilder(int index)

public Document.Revision.Builder addRevisionsBuilder(int index)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Revision.Builder

addTextChanges(Document.TextChange value)

public Document.Builder addTextChanges(Document.TextChange value)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
valueDocument.TextChange
Returns
TypeDescription
Document.Builder

addTextChanges(Document.TextChange.Builder builderForValue)

public Document.Builder addTextChanges(Document.TextChange.Builder builderForValue)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
builderForValueDocument.TextChange.Builder
Returns
TypeDescription
Document.Builder

addTextChanges(int index, Document.TextChange value)

public Document.Builder addTextChanges(int index, Document.TextChange value)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameters
NameDescription
indexint
valueDocument.TextChange
Returns
TypeDescription
Document.Builder

addTextChanges(int index, Document.TextChange.Builder builderForValue)

public Document.Builder addTextChanges(int index, Document.TextChange.Builder builderForValue)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameters
NameDescription
indexint
builderForValueDocument.TextChange.Builder
Returns
TypeDescription
Document.Builder

addTextChangesBuilder()

public Document.TextChange.Builder addTextChangesBuilder()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
Document.TextChange.Builder

addTextChangesBuilder(int index)

public Document.TextChange.Builder addTextChangesBuilder(int index)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.TextChange.Builder

addTextStyles(Document.Style value)

public Document.Builder addTextStyles(Document.Style value)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
valueDocument.Style
Returns
TypeDescription
Document.Builder

addTextStyles(Document.Style.Builder builderForValue)

public Document.Builder addTextStyles(Document.Style.Builder builderForValue)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
builderForValueDocument.Style.Builder
Returns
TypeDescription
Document.Builder

addTextStyles(int index, Document.Style value)

public Document.Builder addTextStyles(int index, Document.Style value)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameters
NameDescription
indexint
valueDocument.Style
Returns
TypeDescription
Document.Builder

addTextStyles(int index, Document.Style.Builder builderForValue)

public Document.Builder addTextStyles(int index, Document.Style.Builder builderForValue)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameters
NameDescription
indexint
builderForValueDocument.Style.Builder
Returns
TypeDescription
Document.Builder

addTextStylesBuilder()

public Document.Style.Builder addTextStylesBuilder()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
Document.Style.Builder

addTextStylesBuilder(int index)

public Document.Style.Builder addTextStylesBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Style.Builder

build()

public Document build()
Returns
TypeDescription
Document

buildPartial()

public Document buildPartial()
Returns
TypeDescription
Document

clear()

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

clearContent()

public Document.Builder clearContent()

Optional. Inline document content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearEntities()

public Document.Builder clearEntities()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
Document.Builder

clearEntityRelations()

public Document.Builder clearEntityRelations()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
Document.Builder

clearError()

public Document.Builder clearError()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
TypeDescription
Document.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Document.Builder clearLabels()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
Document.Builder

clearMimeType()

public Document.Builder clearMimeType()

An IANA published media type (MIME type).

string mime_type = 3;

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

clearPages()

public Document.Builder clearPages()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
Document.Builder

clearRevisions()

public Document.Builder clearRevisions()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
Document.Builder

clearShardInfo()

public Document.Builder clearShardInfo()

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Returns
TypeDescription
Document.Builder

clearSource()

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

clearText()

public Document.Builder clearText()

Optional. UTF-8 encoded text in reading order from the document.

string text = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearTextChanges()

public Document.Builder clearTextChanges()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
Document.Builder

clearTextStyles()

public Document.Builder clearTextStyles()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
Document.Builder

clearUri()

public Document.Builder clearUri()

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Document.Builder

This builder for chaining.

clone()

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

getContent()

public ByteString getContent()

Optional. Inline document content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The content.

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
Document

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEntities(int index)

public Document.Entity getEntities(int index)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Entity

getEntitiesBuilder(int index)

public Document.Entity.Builder getEntitiesBuilder(int index)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Entity.Builder

getEntitiesBuilderList()

public List<Document.Entity.Builder> getEntitiesBuilderList()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
List<Builder>

getEntitiesCount()

public int getEntitiesCount()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
int

getEntitiesList()

public List<Document.Entity> getEntitiesList()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
List<Entity>

getEntitiesOrBuilder(int index)

public Document.EntityOrBuilder getEntitiesOrBuilder(int index)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityOrBuilder

getEntitiesOrBuilderList()

public List<? extends Document.EntityOrBuilder> getEntitiesOrBuilderList()

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.EntityOrBuilder>

getEntityRelations(int index)

public Document.EntityRelation getEntityRelations(int index)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityRelation

getEntityRelationsBuilder(int index)

public Document.EntityRelation.Builder getEntityRelationsBuilder(int index)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityRelation.Builder

getEntityRelationsBuilderList()

public List<Document.EntityRelation.Builder> getEntityRelationsBuilderList()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
List<Builder>

getEntityRelationsCount()

public int getEntityRelationsCount()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
int

getEntityRelationsList()

public List<Document.EntityRelation> getEntityRelationsList()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
List<EntityRelation>

getEntityRelationsOrBuilder(int index)

public Document.EntityRelationOrBuilder getEntityRelationsOrBuilder(int index)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityRelationOrBuilder

getEntityRelationsOrBuilderList()

public List<? extends Document.EntityRelationOrBuilder> getEntityRelationsOrBuilderList()

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.EntityRelationOrBuilder>

getError()

public Status getError()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
TypeDescription
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
TypeDescription
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getLabels(int index)

public Document.Label getLabels(int index)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Label

getLabelsBuilder(int index)

public Document.Label.Builder getLabelsBuilder(int index)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Label.Builder

getLabelsBuilderList()

public List<Document.Label.Builder> getLabelsBuilderList()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
List<Builder>

getLabelsCount()

public int getLabelsCount()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
int

getLabelsList()

public List<Document.Label> getLabelsList()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
List<Label>

getLabelsOrBuilder(int index)

public Document.LabelOrBuilder getLabelsOrBuilder(int index)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.LabelOrBuilder

getLabelsOrBuilderList()

public List<? extends Document.LabelOrBuilder> getLabelsOrBuilderList()

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.LabelOrBuilder>

getMimeType()

public String getMimeType()

An IANA published media type (MIME type).

string mime_type = 3;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

An IANA published media type (MIME type).

string mime_type = 3;

Returns
TypeDescription
ByteString

The bytes for mimeType.

getPages(int index)

public Document.Page getPages(int index)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Page

getPagesBuilder(int index)

public Document.Page.Builder getPagesBuilder(int index)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Page.Builder

getPagesBuilderList()

public List<Document.Page.Builder> getPagesBuilderList()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
List<Builder>

getPagesCount()

public int getPagesCount()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
int

getPagesList()

public List<Document.Page> getPagesList()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
List<Page>

getPagesOrBuilder(int index)

public Document.PageOrBuilder getPagesOrBuilder(int index)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.PageOrBuilder

getPagesOrBuilderList()

public List<? extends Document.PageOrBuilder> getPagesOrBuilderList()

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.PageOrBuilder>

getRevisions(int index)

public Document.Revision getRevisions(int index)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Revision

getRevisionsBuilder(int index)

public Document.Revision.Builder getRevisionsBuilder(int index)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Revision.Builder

getRevisionsBuilderList()

public List<Document.Revision.Builder> getRevisionsBuilderList()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
List<Builder>

getRevisionsCount()

public int getRevisionsCount()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
int

getRevisionsList()

public List<Document.Revision> getRevisionsList()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
List<Revision>

getRevisionsOrBuilder(int index)

public Document.RevisionOrBuilder getRevisionsOrBuilder(int index)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.RevisionOrBuilder

getRevisionsOrBuilderList()

public List<? extends Document.RevisionOrBuilder> getRevisionsOrBuilderList()

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.RevisionOrBuilder>

getShardInfo()

public Document.ShardInfo getShardInfo()

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Returns
TypeDescription
Document.ShardInfo

The shardInfo.

getShardInfoBuilder()

public Document.ShardInfo.Builder getShardInfoBuilder()

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Returns
TypeDescription
Document.ShardInfo.Builder

getShardInfoOrBuilder()

public Document.ShardInfoOrBuilder getShardInfoOrBuilder()

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Returns
TypeDescription
Document.ShardInfoOrBuilder

getSourceCase()

public Document.SourceCase getSourceCase()
Returns
TypeDescription
Document.SourceCase

getText()

public String getText()

Optional. UTF-8 encoded text in reading order from the document.

string text = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

Optional. UTF-8 encoded text in reading order from the document.

string text = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for text.

getTextChanges(int index)

public Document.TextChange getTextChanges(int index)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.TextChange

getTextChangesBuilder(int index)

public Document.TextChange.Builder getTextChangesBuilder(int index)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.TextChange.Builder

getTextChangesBuilderList()

public List<Document.TextChange.Builder> getTextChangesBuilderList()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
List<Builder>

getTextChangesCount()

public int getTextChangesCount()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
int

getTextChangesList()

public List<Document.TextChange> getTextChangesList()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
List<TextChange>

getTextChangesOrBuilder(int index)

public Document.TextChangeOrBuilder getTextChangesOrBuilder(int index)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.TextChangeOrBuilder

getTextChangesOrBuilderList()

public List<? extends Document.TextChangeOrBuilder> getTextChangesOrBuilderList()

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.TextChangeOrBuilder>

getTextStyles(int index)

public Document.Style getTextStyles(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Style

getTextStylesBuilder(int index)

public Document.Style.Builder getTextStylesBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Style.Builder

getTextStylesBuilderList()

public List<Document.Style.Builder> getTextStylesBuilderList()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
List<Builder>

getTextStylesCount()

public int getTextStylesCount()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
int

getTextStylesList()

public List<Document.Style> getTextStylesList()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
List<Style>

getTextStylesOrBuilder(int index)

public Document.StyleOrBuilder getTextStylesOrBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.StyleOrBuilder

getTextStylesOrBuilderList()

public List<? extends Document.StyleOrBuilder> getTextStylesOrBuilderList()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Returns
TypeDescription
List<? extends com.google.cloud.documentai.v1beta2.Document.StyleOrBuilder>

getUri()

public String getUri()

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for uri.

hasContent()

public boolean hasContent()

Optional. Inline document content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the content field is set.

hasError()

public boolean hasError()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
TypeDescription
boolean

Whether the error field is set.

hasShardInfo()

public boolean hasShardInfo()

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Returns
TypeDescription
boolean

Whether the shardInfo field is set.

hasUri()

public boolean hasUri()

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the uri field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeError(Status value)

public Document.Builder mergeError(Status value)

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Parameter
NameDescription
valuecom.google.rpc.Status
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

mergeShardInfo(Document.ShardInfo value)

public Document.Builder mergeShardInfo(Document.ShardInfo value)

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Parameter
NameDescription
valueDocument.ShardInfo
Returns
TypeDescription
Document.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeEntities(int index)

public Document.Builder removeEntities(int index)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removeEntityRelations(int index)

public Document.Builder removeEntityRelations(int index)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removeLabels(int index)

public Document.Builder removeLabels(int index)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removePages(int index)

public Document.Builder removePages(int index)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removeRevisions(int index)

public Document.Builder removeRevisions(int index)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removeTextChanges(int index)

public Document.Builder removeTextChanges(int index)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

removeTextStyles(int index)

public Document.Builder removeTextStyles(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.Builder

setContent(ByteString value)

public Document.Builder setContent(ByteString value)

Optional. Inline document content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The content to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setEntities(int index, Document.Entity value)

public Document.Builder setEntities(int index, Document.Entity value)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameters
NameDescription
indexint
valueDocument.Entity
Returns
TypeDescription
Document.Builder

setEntities(int index, Document.Entity.Builder builderForValue)

public Document.Builder setEntities(int index, Document.Entity.Builder builderForValue)

A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.

repeated .google.cloud.documentai.v1beta2.Document.Entity entities = 7;

Parameters
NameDescription
indexint
builderForValueDocument.Entity.Builder
Returns
TypeDescription
Document.Builder

setEntityRelations(int index, Document.EntityRelation value)

public Document.Builder setEntityRelations(int index, Document.EntityRelation value)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameters
NameDescription
indexint
valueDocument.EntityRelation
Returns
TypeDescription
Document.Builder

setEntityRelations(int index, Document.EntityRelation.Builder builderForValue)

public Document.Builder setEntityRelations(int index, Document.EntityRelation.Builder builderForValue)

Placeholder. Relationship among Document.entities.

repeated .google.cloud.documentai.v1beta2.Document.EntityRelation entity_relations = 8;

Parameters
NameDescription
indexint
builderForValueDocument.EntityRelation.Builder
Returns
TypeDescription
Document.Builder

setError(Status value)

public Document.Builder setError(Status value)

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Parameter
NameDescription
valuecom.google.rpc.Status
Returns
TypeDescription
Document.Builder

setError(Status.Builder builderForValue)

public Document.Builder setError(Status.Builder builderForValue)

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Parameter
NameDescription
builderForValuecom.google.rpc.Status.Builder
Returns
TypeDescription
Document.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setLabels(int index, Document.Label value)

public Document.Builder setLabels(int index, Document.Label value)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameters
NameDescription
indexint
valueDocument.Label
Returns
TypeDescription
Document.Builder

setLabels(int index, Document.Label.Builder builderForValue)

public Document.Builder setLabels(int index, Document.Label.Builder builderForValue)

Labels for this document.

repeated .google.cloud.documentai.v1beta2.Document.Label labels = 11;

Parameters
NameDescription
indexint
builderForValueDocument.Label.Builder
Returns
TypeDescription
Document.Builder

setMimeType(String value)

public Document.Builder setMimeType(String value)

An IANA published media type (MIME type).

string mime_type = 3;

Parameter
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public Document.Builder setMimeTypeBytes(ByteString value)

An IANA published media type (MIME type).

string mime_type = 3;

Parameter
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setPages(int index, Document.Page value)

public Document.Builder setPages(int index, Document.Page value)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameters
NameDescription
indexint
valueDocument.Page
Returns
TypeDescription
Document.Builder

setPages(int index, Document.Page.Builder builderForValue)

public Document.Builder setPages(int index, Document.Page.Builder builderForValue)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1beta2.Document.Page pages = 6;

Parameters
NameDescription
indexint
builderForValueDocument.Page.Builder
Returns
TypeDescription
Document.Builder

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

setRevisions(int index, Document.Revision value)

public Document.Builder setRevisions(int index, Document.Revision value)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameters
NameDescription
indexint
valueDocument.Revision
Returns
TypeDescription
Document.Builder

setRevisions(int index, Document.Revision.Builder builderForValue)

public Document.Builder setRevisions(int index, Document.Revision.Builder builderForValue)

Placeholder. Revision history of this document.

repeated .google.cloud.documentai.v1beta2.Document.Revision revisions = 13;

Parameters
NameDescription
indexint
builderForValueDocument.Revision.Builder
Returns
TypeDescription
Document.Builder

setShardInfo(Document.ShardInfo value)

public Document.Builder setShardInfo(Document.ShardInfo value)

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Parameter
NameDescription
valueDocument.ShardInfo
Returns
TypeDescription
Document.Builder

setShardInfo(Document.ShardInfo.Builder builderForValue)

public Document.Builder setShardInfo(Document.ShardInfo.Builder builderForValue)

Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.

.google.cloud.documentai.v1beta2.Document.ShardInfo shard_info = 9;

Parameter
NameDescription
builderForValueDocument.ShardInfo.Builder
Returns
TypeDescription
Document.Builder

setText(String value)

public Document.Builder setText(String value)

Optional. UTF-8 encoded text in reading order from the document.

string text = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The text to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTextBytes(ByteString value)

public Document.Builder setTextBytes(ByteString value)

Optional. UTF-8 encoded text in reading order from the document.

string text = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for text to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setTextChanges(int index, Document.TextChange value)

public Document.Builder setTextChanges(int index, Document.TextChange value)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameters
NameDescription
indexint
valueDocument.TextChange
Returns
TypeDescription
Document.Builder

setTextChanges(int index, Document.TextChange.Builder builderForValue)

public Document.Builder setTextChanges(int index, Document.TextChange.Builder builderForValue)

Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.

repeated .google.cloud.documentai.v1beta2.Document.TextChange text_changes = 14;

Parameters
NameDescription
indexint
builderForValueDocument.TextChange.Builder
Returns
TypeDescription
Document.Builder

setTextStyles(int index, Document.Style value)

public Document.Builder setTextStyles(int index, Document.Style value)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameters
NameDescription
indexint
valueDocument.Style
Returns
TypeDescription
Document.Builder

setTextStyles(int index, Document.Style.Builder builderForValue)

public Document.Builder setTextStyles(int index, Document.Style.Builder builderForValue)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta2.Document.Style text_styles = 5 [deprecated = true];

Parameters
NameDescription
indexint
builderForValueDocument.Style.Builder
Returns
TypeDescription
Document.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setUri(String value)

public Document.Builder setUri(String value)

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setUriBytes(ByteString value)

public Document.Builder setUriBytes(ByteString value)

Optional. Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. For more information, refer to Google Cloud Storage Request URIs.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.