Class Document.Layout.Builder (2.44.0)

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

Describes the layout information of a text_segment in the document.

Protobuf type google.cloud.automl.v1.Document.Layout

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

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

clearBoundingPoly()

public Document.Layout.Builder clearBoundingPoly()

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Returns
Type Description
Document.Layout.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPageNumber()

public Document.Layout.Builder clearPageNumber()

Page number of the text_segment in the original document, starts from 1.

int32 page_number = 2;

Returns
Type Description
Document.Layout.Builder

This builder for chaining.

clearTextSegment()

public Document.Layout.Builder clearTextSegment()

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Returns
Type Description
Document.Layout.Builder

clearTextSegmentType()

public Document.Layout.Builder clearTextSegmentType()

The type of the text_segment in document.

.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;

Returns
Type Description
Document.Layout.Builder

This builder for chaining.

clone()

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

getBoundingPoly()

public BoundingPoly getBoundingPoly()

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Returns
Type Description
BoundingPoly

The boundingPoly.

getBoundingPolyBuilder()

public BoundingPoly.Builder getBoundingPolyBuilder()

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Returns
Type Description
BoundingPoly.Builder

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Returns
Type Description
BoundingPolyOrBuilder

getDefaultInstanceForType()

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

getDescriptorForType()

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

getPageNumber()

public int getPageNumber()

Page number of the text_segment in the original document, starts from 1.

int32 page_number = 2;

Returns
Type Description
int

The pageNumber.

getTextSegment()

public TextSegment getTextSegment()

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Returns
Type Description
TextSegment

The textSegment.

getTextSegmentBuilder()

public TextSegment.Builder getTextSegmentBuilder()

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Returns
Type Description
TextSegment.Builder

getTextSegmentOrBuilder()

public TextSegmentOrBuilder getTextSegmentOrBuilder()

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Returns
Type Description
TextSegmentOrBuilder

getTextSegmentType()

public Document.Layout.TextSegmentType getTextSegmentType()

The type of the text_segment in document.

.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;

Returns
Type Description
Document.Layout.TextSegmentType

The textSegmentType.

getTextSegmentTypeValue()

public int getTextSegmentTypeValue()

The type of the text_segment in document.

.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;

Returns
Type Description
int

The enum numeric value on the wire for textSegmentType.

hasBoundingPoly()

public boolean hasBoundingPoly()

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Returns
Type Description
boolean

Whether the boundingPoly field is set.

hasTextSegment()

public boolean hasTextSegment()

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Returns
Type Description
boolean

Whether the textSegment field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBoundingPoly(BoundingPoly value)

public Document.Layout.Builder mergeBoundingPoly(BoundingPoly value)

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
Document.Layout.Builder

mergeFrom(Document.Layout other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTextSegment(TextSegment value)

public Document.Layout.Builder mergeTextSegment(TextSegment value)

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Parameter
Name Description
value TextSegment
Returns
Type Description
Document.Layout.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBoundingPoly(BoundingPoly value)

public Document.Layout.Builder setBoundingPoly(BoundingPoly value)

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Parameter
Name Description
value BoundingPoly
Returns
Type Description
Document.Layout.Builder

setBoundingPoly(BoundingPoly.Builder builderForValue)

public Document.Layout.Builder setBoundingPoly(BoundingPoly.Builder builderForValue)

The position of the text_segment in the page. Contains exactly 4 normalized_vertices and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The NormalizedVertex-s are relative to the page. Coordinates are based on top-left as point (0,0).

.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;

Parameter
Name Description
builderForValue BoundingPoly.Builder
Returns
Type Description
Document.Layout.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPageNumber(int value)

public Document.Layout.Builder setPageNumber(int value)

Page number of the text_segment in the original document, starts from 1.

int32 page_number = 2;

Parameter
Name Description
value int

The pageNumber to set.

Returns
Type Description
Document.Layout.Builder

This builder for chaining.

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

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

setTextSegment(TextSegment value)

public Document.Layout.Builder setTextSegment(TextSegment value)

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Parameter
Name Description
value TextSegment
Returns
Type Description
Document.Layout.Builder

setTextSegment(TextSegment.Builder builderForValue)

public Document.Layout.Builder setTextSegment(TextSegment.Builder builderForValue)

Text Segment that represents a segment in document_text.

.google.cloud.automl.v1.TextSegment text_segment = 1;

Parameter
Name Description
builderForValue TextSegment.Builder
Returns
Type Description
Document.Layout.Builder

setTextSegmentType(Document.Layout.TextSegmentType value)

public Document.Layout.Builder setTextSegmentType(Document.Layout.TextSegmentType value)

The type of the text_segment in document.

.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;

Parameter
Name Description
value Document.Layout.TextSegmentType

The textSegmentType to set.

Returns
Type Description
Document.Layout.Builder

This builder for chaining.

setTextSegmentTypeValue(int value)

public Document.Layout.Builder setTextSegmentTypeValue(int value)

The type of the text_segment in document.

.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;

Parameter
Name Description
value int

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

Returns
Type Description
Document.Layout.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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