Class Document.DocumentLayout.Builder (2.51.0)

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

Represents the parsed layout of a document as a collection of blocks that the document is divided into.

Protobuf type google.cloud.documentai.v1.Document.DocumentLayout

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBlocks(Iterable<? extends Document.DocumentLayout.DocumentLayoutBlock> values)

public Document.DocumentLayout.Builder addAllBlocks(Iterable<? extends Document.DocumentLayout.DocumentLayoutBlock> values)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock>
Returns
Type Description
Document.DocumentLayout.Builder

addBlocks(Document.DocumentLayout.DocumentLayoutBlock value)

public Document.DocumentLayout.Builder addBlocks(Document.DocumentLayout.DocumentLayoutBlock value)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
value Document.DocumentLayout.DocumentLayoutBlock
Returns
Type Description
Document.DocumentLayout.Builder

addBlocks(Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

public Document.DocumentLayout.Builder addBlocks(Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
builderForValue Document.DocumentLayout.DocumentLayoutBlock.Builder
Returns
Type Description
Document.DocumentLayout.Builder

addBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock value)

public Document.DocumentLayout.Builder addBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock value)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameters
Name Description
index int
value Document.DocumentLayout.DocumentLayoutBlock
Returns
Type Description
Document.DocumentLayout.Builder

addBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

public Document.DocumentLayout.Builder addBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameters
Name Description
index int
builderForValue Document.DocumentLayout.DocumentLayoutBlock.Builder
Returns
Type Description
Document.DocumentLayout.Builder

addBlocksBuilder()

public Document.DocumentLayout.DocumentLayoutBlock.Builder addBlocksBuilder()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
Document.DocumentLayout.DocumentLayoutBlock.Builder

addBlocksBuilder(int index)

public Document.DocumentLayout.DocumentLayoutBlock.Builder addBlocksBuilder(int index)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
index int
Returns
Type Description
Document.DocumentLayout.DocumentLayoutBlock.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.DocumentLayout build()
Returns
Type Description
Document.DocumentLayout

buildPartial()

public Document.DocumentLayout buildPartial()
Returns
Type Description
Document.DocumentLayout

clear()

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

clearBlocks()

public Document.DocumentLayout.Builder clearBlocks()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
Document.DocumentLayout.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getBlocks(int index)

public Document.DocumentLayout.DocumentLayoutBlock getBlocks(int index)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
index int
Returns
Type Description
Document.DocumentLayout.DocumentLayoutBlock

getBlocksBuilder(int index)

public Document.DocumentLayout.DocumentLayoutBlock.Builder getBlocksBuilder(int index)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
index int
Returns
Type Description
Document.DocumentLayout.DocumentLayoutBlock.Builder

getBlocksBuilderList()

public List<Document.DocumentLayout.DocumentLayoutBlock.Builder> getBlocksBuilderList()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
List<Builder>

getBlocksCount()

public int getBlocksCount()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
int

getBlocksList()

public List<Document.DocumentLayout.DocumentLayoutBlock> getBlocksList()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
List<DocumentLayoutBlock>

getBlocksOrBuilder(int index)

public Document.DocumentLayout.DocumentLayoutBlockOrBuilder getBlocksOrBuilder(int index)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameter
Name Description
index int
Returns
Type Description
Document.DocumentLayout.DocumentLayoutBlockOrBuilder

getBlocksOrBuilderList()

public List<? extends Document.DocumentLayout.DocumentLayoutBlockOrBuilder> getBlocksOrBuilderList()

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Returns
Type Description
List<? extends com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlockOrBuilder>

getDefaultInstanceForType()

public Document.DocumentLayout getDefaultInstanceForType()
Returns
Type Description
Document.DocumentLayout

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Document.DocumentLayout other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeBlocks(int index)

public Document.DocumentLayout.Builder removeBlocks(int index)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

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

setBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock value)

public Document.DocumentLayout.Builder setBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock value)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameters
Name Description
index int
value Document.DocumentLayout.DocumentLayoutBlock
Returns
Type Description
Document.DocumentLayout.Builder

setBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

public Document.DocumentLayout.Builder setBlocks(int index, Document.DocumentLayout.DocumentLayoutBlock.Builder builderForValue)

List of blocks in the document.

repeated .google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock blocks = 1;

Parameters
Name Description
index int
builderForValue Document.DocumentLayout.DocumentLayoutBlock.Builder
Returns
Type Description
Document.DocumentLayout.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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