Class Document.Builder (2.7.5)

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.v1.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.v1.Document.Entity entities = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.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.v1.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.Document.EntityRelation>
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.v1.Document.Page pages = 6;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.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.v1.Document.Revision revisions = 13;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.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.v1.Document.TextChange text_changes = 14;

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

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

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

Placeholder. Styles for the Document.text.

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

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.documentai.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Document.EntityRelation entity_relations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.EntityRelation.Builder

addPages(Document.Page value)

public Document.Builder addPages(Document.Page value)

Visual page layout for the Document.

repeated .google.cloud.documentai.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Document.TextChange text_changes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Document.TextChange.Builder

addTextStyles(Document.Style value)

public Document.Builder addTextStyles(Document.Style value)

Placeholder. Styles for the Document.text.

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

Parameter
NameDescription
valueDocument.Style
Returns
TypeDescription
Document.Builder

addTextStyles(Document.Style.Builder builderForValue)

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

Placeholder. Styles for the Document.text.

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

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

addTextStyles(int index, Document.Style value)

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

Placeholder. Styles for the Document.text.

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

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)

Placeholder. Styles for the Document.text.

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

Parameters
NameDescription
indexint
builderForValueDocument.Style.Builder
Returns