Package com.google.cloud.automl.v1
Class Document.Layout.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
com.google.cloud.automl.v1.Document.Layout.Builder
- All Implemented Interfaces:
Document.LayoutOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Document.Layout
public static final class Document.Layout.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
implements Document.LayoutOrBuilder
Describes the layout information of a [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the document.Protobuf type
google.cloud.automl.v1.Document.Layout-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintPage number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.intThe type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.booleanThe position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.booleanText Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeBoundingPoly(BoundingPoly value) The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.mergeFrom(Document.Layout other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeTextSegment(TextSegment value) Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].setBoundingPoly(BoundingPoly value) The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.setBoundingPoly(BoundingPoly.Builder builderForValue) The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page.setPageNumber(int value) Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.setTextSegment(TextSegment value) Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].setTextSegment(TextSegment.Builder builderForValue) Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.setTextSegmentTypeValue(int value) The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.Layout.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Document.Layout.Builder>
-
mergeFrom
public Document.Layout.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.Layout.Builder>- Throws:
IOException
-
hasTextSegment
public boolean hasTextSegment()Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1;- Specified by:
hasTextSegmentin interfaceDocument.LayoutOrBuilder- Returns:
- Whether the textSegment field is set.
-
getTextSegment
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1;- Specified by:
getTextSegmentin interfaceDocument.LayoutOrBuilder- Returns:
- The textSegment.
-
setTextSegment
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1; -
setTextSegment
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1; -
mergeTextSegment
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1; -
clearTextSegment
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1; -
getTextSegmentBuilder
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1; -
getTextSegmentOrBuilder
Text Segment that represents a segment in [document_text][google.cloud.automl.v1p1beta.Document.document_text].
.google.cloud.automl.v1.TextSegment text_segment = 1;- Specified by:
getTextSegmentOrBuilderin interfaceDocument.LayoutOrBuilder
-
getPageNumber
public int getPageNumber()Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.
int32 page_number = 2;- Specified by:
getPageNumberin interfaceDocument.LayoutOrBuilder- Returns:
- The pageNumber.
-
setPageNumber
Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.
int32 page_number = 2;- Parameters:
value- The pageNumber to set.- Returns:
- This builder for chaining.
-
clearPageNumber
Page number of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the original document, starts from 1.
int32 page_number = 2;- Returns:
- This builder for chaining.
-
hasBoundingPoly
public boolean hasBoundingPoly()The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;- Specified by:
hasBoundingPolyin interfaceDocument.LayoutOrBuilder- Returns:
- Whether the boundingPoly field is set.
-
getBoundingPoly
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;- Specified by:
getBoundingPolyin interfaceDocument.LayoutOrBuilder- Returns:
- The boundingPoly.
-
setBoundingPoly
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3; -
setBoundingPoly
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3; -
mergeBoundingPoly
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3; -
clearBoundingPoly
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3; -
getBoundingPolyBuilder
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3; -
getBoundingPolyOrBuilder
The position of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in the page. Contains exactly 4 [normalized_vertices][google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The [NormalizedVertex-s][google.cloud.automl.v1p1beta.NormalizedVertex] are relative to the page. Coordinates are based on top-left as point (0,0).
.google.cloud.automl.v1.BoundingPoly bounding_poly = 3;- Specified by:
getBoundingPolyOrBuilderin interfaceDocument.LayoutOrBuilder
-
getTextSegmentTypeValue
public int getTextSegmentTypeValue()The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.
.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;- Specified by:
getTextSegmentTypeValuein interfaceDocument.LayoutOrBuilder- Returns:
- The enum numeric value on the wire for textSegmentType.
-
setTextSegmentTypeValue
The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.
.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;- Parameters:
value- The enum numeric value on the wire for textSegmentType to set.- Returns:
- This builder for chaining.
-
getTextSegmentType
The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.
.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;- Specified by:
getTextSegmentTypein interfaceDocument.LayoutOrBuilder- Returns:
- The textSegmentType.
-
setTextSegmentType
The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.
.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;- Parameters:
value- The textSegmentType to set.- Returns:
- This builder for chaining.
-
clearTextSegmentType
The type of the [text_segment][google.cloud.automl.v1.Document.Layout.text_segment] in document.
.google.cloud.automl.v1.Document.Layout.TextSegmentType text_segment_type = 4;- Returns:
- This builder for chaining.
-