Class Document.Builder (2.53.0)

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

Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality.

Protobuf type google.cloud.documentai.v1beta1.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
values Iterable<? extends com.google.cloud.documentai.v1beta1.Document.Entity>
Returns
Type Description
Document.Builder

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

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

Relationship among Document.entities.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.documentai.v1beta1.Document.EntityRelation>
Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameter
Name Description
values Iterable<? extends com.google.cloud.documentai.v1beta1.Document.Page>
Returns
Type Description
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.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.documentai.v1beta1.Document.Style>
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
value Document.Entity
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
builderForValue Document.Entity.Builder
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameters
Name Description
index int
value Document.Entity
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameters
Name Description
index int
builderForValue Document.Entity.Builder
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
index int
Returns
Type Description
Document.Entity.Builder

addEntityRelations(Document.EntityRelation value)

public Document.Builder addEntityRelations(Document.EntityRelation value)

Relationship among Document.entities.

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

Parameter
Name Description
value Document.EntityRelation
Returns
Type Description
Document.Builder

addEntityRelations(Document.EntityRelation.Builder builderForValue)

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

Relationship among Document.entities.

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

Parameter
Name Description
builderForValue Document.EntityRelation.Builder
Returns
Type Description
Document.Builder

addEntityRelations(int index, Document.EntityRelation value)

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

Relationship among Document.entities.

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

Parameters
Name Description
index int
value Document.EntityRelation
Returns
Type Description
Document.Builder

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

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

Relationship among Document.entities.

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

Parameters
Name Description
index int
builderForValue Document.EntityRelation.Builder
Returns
Type Description
Document.Builder

addEntityRelationsBuilder()

public Document.EntityRelation.Builder addEntityRelationsBuilder()

Relationship among Document.entities.

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

Returns
Type Description
Document.EntityRelation.Builder

addEntityRelationsBuilder(int index)

public Document.EntityRelation.Builder addEntityRelationsBuilder(int index)

Relationship among Document.entities.

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

Parameter
Name Description
index int
Returns
Type Description
Document.EntityRelation.Builder

addPages(Document.Page value)

public Document.Builder addPages(Document.Page value)

Visual page layout for the Document.

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

Parameter
Name Description
value Document.Page
Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameter
Name Description
builderForValue Document.Page.Builder
Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameters
Name Description
index int
value Document.Page
Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameters
Name Description
index int
builderForValue Document.Page.Builder
Returns
Type Description
Document.Builder

addPagesBuilder()

public Document.Page.Builder addPagesBuilder()

Visual page layout for the Document.

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

Returns
Type Description
Document.Page.Builder

addPagesBuilder(int index)

public Document.Page.Builder addPagesBuilder(int index)

Visual page layout for the Document.

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

Parameter
Name Description
index int
Returns
Type Description
Document.Page.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.Builder
Overrides

addTextStyles(Document.Style value)

public Document.Builder addTextStyles(Document.Style value)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
value Document.Style
Returns
Type Description
Document.Builder

addTextStyles(Document.Style.Builder builderForValue)

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

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
builderForValue Document.Style.Builder
Returns
Type Description
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.v1beta1.Document.Style text_styles = 5;

Parameters
Name Description
index int
value Document.Style
Returns
Type Description
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.v1beta1.Document.Style text_styles = 5;

Parameters
Name Description
index int
builderForValue Document.Style.Builder
Returns
Type Description
Document.Builder

addTextStylesBuilder()

public Document.Style.Builder addTextStylesBuilder()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
Document.Style.Builder

addTextStylesBuilder(int index)

public Document.Style.Builder addTextStylesBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
index int
Returns
Type Description
Document.Style.Builder

build()

public Document build()
Returns
Type Description
Document

buildPartial()

public Document buildPartial()
Returns
Type Description
Document

clear()

public Document.Builder clear()
Returns
Type Description
Document.Builder
Overrides

clearContent()

public Document.Builder clearContent()

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;

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
Document.Builder

clearEntityRelations()

public Document.Builder clearEntityRelations()

Relationship among Document.entities.

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

Returns
Type Description
Document.Builder

clearError()

public Document.Builder clearError()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
Type Description
Document.Builder

clearField(Descriptors.FieldDescriptor field)

public Document.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Document.Builder
Overrides

clearMimeType()

public Document.Builder clearMimeType()

An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
Document.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Document.Builder
Overrides

clearPages()

public Document.Builder clearPages()

Visual page layout for the Document.

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

Returns
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Returns
Type Description
Document.Builder

clearSource()

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

clearText()

public Document.Builder clearText()

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

string text = 4;

Returns
Type Description
Document.Builder

This builder for chaining.

clearTextStyles()

public Document.Builder clearTextStyles()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
Document.Builder

clearUri()

public Document.Builder clearUri()

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Returns
Type Description
Document.Builder

This builder for chaining.

clone()

public Document.Builder clone()
Returns
Type Description
Document.Builder
Overrides

getContent()

public ByteString getContent()

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;

Returns
Type Description
ByteString

The content.

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
Type Description
Document

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
index int
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
index int
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
index int
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Returns
Type Description
List<? extends com.google.cloud.documentai.v1beta1.Document.EntityOrBuilder>

getEntityRelations(int index)

public Document.EntityRelation getEntityRelations(int index)

Relationship among Document.entities.

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

Parameter
Name Description
index int
Returns
Type Description
Document.EntityRelation

getEntityRelationsBuilder(int index)

public Document.EntityRelation.Builder getEntityRelationsBuilder(int index)

Relationship among Document.entities.

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

Parameter
Name Description
index int
Returns
Type Description
Document.EntityRelation.Builder

getEntityRelationsBuilderList()

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

Relationship among Document.entities.

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

Returns
Type Description
List<Builder>

getEntityRelationsCount()

public int getEntityRelationsCount()

Relationship among Document.entities.

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

Returns
Type Description
int

getEntityRelationsList()

public List<Document.EntityRelation> getEntityRelationsList()

Relationship among Document.entities.

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

Returns
Type Description
List<EntityRelation>

getEntityRelationsOrBuilder(int index)

public Document.EntityRelationOrBuilder getEntityRelationsOrBuilder(int index)

Relationship among Document.entities.

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

Parameter
Name Description
index int
Returns
Type Description
Document.EntityRelationOrBuilder

getEntityRelationsOrBuilderList()

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

Relationship among Document.entities.

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

Returns
Type Description
List<? extends com.google.cloud.documentai.v1beta1.Document.EntityRelationOrBuilder>

getError()

public Status getError()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
Type Description
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
Type Description
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

Any error that occurred while processing this document.

.google.rpc.Status error = 10;

Returns
Type Description
com.google.rpc.StatusOrBuilder

getMimeType()

public String getMimeType()

An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Returns
Type Description
ByteString

The bytes for mimeType.

getPages(int index)

public Document.Page getPages(int index)

Visual page layout for the Document.

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

Parameter
Name Description
index int
Returns
Type Description
Document.Page

getPagesBuilder(int index)

public Document.Page.Builder getPagesBuilder(int index)

Visual page layout for the Document.

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

Parameter
Name Description
index int
Returns
Type Description
Document.Page.Builder

getPagesBuilderList()

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

Visual page layout for the Document.

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

Returns
Type Description
List<Builder>

getPagesCount()

public int getPagesCount()

Visual page layout for the Document.

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

Returns
Type Description
int

getPagesList()

public List<Document.Page> getPagesList()

Visual page layout for the Document.

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

Returns
Type Description
List<Page>

getPagesOrBuilder(int index)

public Document.PageOrBuilder getPagesOrBuilder(int index)

Visual page layout for the Document.

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

Parameter
Name Description
index int
Returns
Type Description
Document.PageOrBuilder

getPagesOrBuilderList()

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

Visual page layout for the Document.

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

Returns
Type Description
List<? extends com.google.cloud.documentai.v1beta1.Document.PageOrBuilder>

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.v1beta1.Document.ShardInfo shard_info = 9;

Returns
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Returns
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Returns
Type Description
Document.ShardInfoOrBuilder

getSourceCase()

public Document.SourceCase getSourceCase()
Returns
Type Description
Document.SourceCase

getText()

public String getText()

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

string text = 4;

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

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

string text = 4;

Returns
Type Description
ByteString

The bytes for text.

getTextStyles(int index)

public Document.Style getTextStyles(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
index int
Returns
Type Description
Document.Style

getTextStylesBuilder(int index)

public Document.Style.Builder getTextStylesBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
index int
Returns
Type Description
Document.Style.Builder

getTextStylesBuilderList()

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

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
List<Builder>

getTextStylesCount()

public int getTextStylesCount()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
int

getTextStylesList()

public List<Document.Style> getTextStylesList()

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
List<Style>

getTextStylesOrBuilder(int index)

public Document.StyleOrBuilder getTextStylesOrBuilder(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
index int
Returns
Type Description
Document.StyleOrBuilder

getTextStylesOrBuilderList()

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

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Returns
Type Description
List<? extends com.google.cloud.documentai.v1beta1.Document.StyleOrBuilder>

getUri()

public String getUri()

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Returns
Type Description
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Returns
Type Description
ByteString

The bytes for uri.

hasContent()

public boolean hasContent()

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;

Returns
Type Description
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
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Returns
Type Description
boolean

Whether the shardInfo field is set.

hasUri()

public boolean hasUri()

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Returns
Type Description
boolean

Whether the uri field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value com.google.rpc.Status
Returns
Type Description
Document.Builder

mergeFrom(Document other)

public Document.Builder mergeFrom(Document other)
Parameter
Name Description
other Document
Returns
Type Description
Document.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Document.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Document.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Parameter
Name Description
value Document.ShardInfo
Returns
Type Description
Document.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameter
Name Description
index int
Returns
Type Description
Document.Builder

removeEntityRelations(int index)

public Document.Builder removeEntityRelations(int index)

Relationship among Document.entities.

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

Parameter
Name Description
index int
Returns
Type Description
Document.Builder

removePages(int index)

public Document.Builder removePages(int index)

Visual page layout for the Document.

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

Parameter
Name Description
index int
Returns
Type Description
Document.Builder

removeTextStyles(int index)

public Document.Builder removeTextStyles(int index)

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameter
Name Description
index int
Returns
Type Description
Document.Builder

setContent(ByteString value)

public Document.Builder setContent(ByteString value)

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;

Parameter
Name Description
value ByteString

The content to set.

Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameters
Name Description
index int
value Document.Entity
Returns
Type Description
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.v1beta1.Document.Entity entities = 7;

Parameters
Name Description
index int
builderForValue Document.Entity.Builder
Returns
Type Description
Document.Builder

setEntityRelations(int index, Document.EntityRelation value)

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

Relationship among Document.entities.

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

Parameters
Name Description
index int
value Document.EntityRelation
Returns
Type Description
Document.Builder

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

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

Relationship among Document.entities.

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

Parameters
Name Description
index int
builderForValue Document.EntityRelation.Builder
Returns
Type Description
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
Name Description
value com.google.rpc.Status
Returns
Type Description
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
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
Document.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Document.Builder
Overrides

setMimeType(String value)

public Document.Builder setMimeType(String value)

An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public Document.Builder setMimeTypeBytes(ByteString value)

An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml.

string mime_type = 3;

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameters
Name Description
index int
value Document.Page
Returns
Type Description
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.v1beta1.Document.Page pages = 6;

Parameters
Name Description
index int
builderForValue Document.Page.Builder
Returns
Type Description
Document.Builder

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

public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Document.Builder
Overrides

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.v1beta1.Document.ShardInfo shard_info = 9;

Parameter
Name Description
value Document.ShardInfo
Returns
Type Description
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.v1beta1.Document.ShardInfo shard_info = 9;

Parameter
Name Description
builderForValue Document.ShardInfo.Builder
Returns
Type Description
Document.Builder

setText(String value)

public Document.Builder setText(String value)

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

string text = 4;

Parameter
Name Description
value String

The text to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setTextBytes(ByteString value)

public Document.Builder setTextBytes(ByteString value)

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

string text = 4;

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setTextStyles(int index, Document.Style value)

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

Styles for the Document.text.

repeated .google.cloud.documentai.v1beta1.Document.Style text_styles = 5;

Parameters
Name Description
index int
value Document.Style
Returns
Type Description
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.v1beta1.Document.Style text_styles = 5;

Parameters
Name Description
index int
builderForValue Document.Style.Builder
Returns
Type Description
Document.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Document.Builder
Overrides

setUri(String value)

public Document.Builder setUri(String value)

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
Document.Builder

This builder for chaining.

setUriBytes(ByteString value)

public Document.Builder setUriBytes(ByteString value)

Currently supports Google Cloud Storage URI of the form gs://bucket_name/object_name. Object versioning is not supported. See Google Cloud Storage Request URIs for more info.

string uri = 1;

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
Document.Builder

This builder for chaining.