Class Document.TextAnchor.TextSegment.Builder (2.46.0)

public static final class Document.TextAnchor.TextSegment.Builder extends GeneratedMessageV3.Builder<Document.TextAnchor.TextSegment.Builder> implements Document.TextAnchor.TextSegmentOrBuilder

A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset

Protobuf type google.cloud.documentai.v1beta3.Document.TextAnchor.TextSegment

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.TextAnchor.TextSegment build()
Returns
Type Description
Document.TextAnchor.TextSegment

buildPartial()

public Document.TextAnchor.TextSegment buildPartial()
Returns
Type Description
Document.TextAnchor.TextSegment

clear()

public Document.TextAnchor.TextSegment.Builder clear()
Returns
Type Description
Document.TextAnchor.TextSegment.Builder
Overrides

clearEndIndex()

public Document.TextAnchor.TextSegment.Builder clearEndIndex()

TextSegment half open end UTF-8 char index in the Document.text.

int64 end_index = 2;

Returns
Type Description
Document.TextAnchor.TextSegment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearStartIndex()

public Document.TextAnchor.TextSegment.Builder clearStartIndex()

TextSegment start UTF-8 char index in the Document.text.

int64 start_index = 1;

Returns
Type Description
Document.TextAnchor.TextSegment.Builder

This builder for chaining.

clone()

public Document.TextAnchor.TextSegment.Builder clone()
Returns
Type Description
Document.TextAnchor.TextSegment.Builder
Overrides

getDefaultInstanceForType()

public Document.TextAnchor.TextSegment getDefaultInstanceForType()
Returns
Type Description
Document.TextAnchor.TextSegment

getDescriptorForType()

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

getEndIndex()

public long getEndIndex()

TextSegment half open end UTF-8 char index in the Document.text.

int64 end_index = 2;

Returns
Type Description
long

The endIndex.

getStartIndex()

public long getStartIndex()

TextSegment start UTF-8 char index in the Document.text.

int64 start_index = 1;

Returns
Type Description
long

The startIndex.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Document.TextAnchor.TextSegment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setEndIndex(long value)

public Document.TextAnchor.TextSegment.Builder setEndIndex(long value)

TextSegment half open end UTF-8 char index in the Document.text.

int64 end_index = 2;

Parameter
Name Description
value long

The endIndex to set.

Returns
Type Description
Document.TextAnchor.TextSegment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setStartIndex(long value)

public Document.TextAnchor.TextSegment.Builder setStartIndex(long value)

TextSegment start UTF-8 char index in the Document.text.

int64 start_index = 1;

Parameter
Name Description
value long

The startIndex to set.

Returns
Type Description
Document.TextAnchor.TextSegment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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