Class Document.Layout.Builder (2.3.9)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.Layout build()
Returns
TypeDescription
Document.Layout

buildPartial()

public Document.Layout buildPartial()
Returns
TypeDescription
Document.Layout

clear()

public Document.Layout.Builder clear()
Returns
TypeDescription
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
TypeDescription
Document.Layout.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Layout.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Document.Layout.Builder

This builder for chaining.

clone()

public Document.Layout.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
BoundingPolyOrBuilder

getDefaultInstanceForType()

public Document.Layout getDefaultInstanceForType()
Returns
TypeDescription
Document.Layout

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPageNumber()

public int getPageNumber()

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

int32 page_number = 2;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TextSegment.Builder

getTextSegmentOrBuilder()

public TextSegmentOrBuilder getTextSegmentOrBuilder()

Text Segment that represents a segment in document_text.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the textSegment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueBoundingPoly
Returns
TypeDescription
Document.Layout.Builder

mergeFrom(Document.Layout other)

public Document.Layout.Builder mergeFrom(Document.Layout other)
Parameter
NameDescription
otherDocument.Layout
Returns
TypeDescription
Document.Layout.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Layout.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Layout.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Document.Layout.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTextSegment
Returns
TypeDescription
Document.Layout.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Layout.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueBoundingPoly
Returns
TypeDescription
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
NameDescription
builderForValueBoundingPoly.Builder
Returns
TypeDescription
Document.Layout.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Layout.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The pageNumber to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTextSegment
Returns
TypeDescription
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
NameDescription
builderForValueTextSegment.Builder
Returns
TypeDescription
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
NameDescription
valueDocument.Layout.TextSegmentType

The textSegmentType to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Document.Layout.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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