Class Document.TextAnchor.TextSegment.Builder (2.20.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.v1beta2.Document.TextAnchor.TextSegment

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Document.TextAnchor.TextSegment build()
Returns
TypeDescription
Document.TextAnchor.TextSegment

buildPartial()

public Document.TextAnchor.TextSegment buildPartial()
Returns
TypeDescription
Document.TextAnchor.TextSegment

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public Document.TextAnchor.TextSegment.Builder clone()
Returns
TypeDescription
Document.TextAnchor.TextSegment.Builder
Overrides

getDefaultInstanceForType()

public Document.TextAnchor.TextSegment getDefaultInstanceForType()
Returns
TypeDescription
Document.TextAnchor.TextSegment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEndIndex()

public long getEndIndex()

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

int64 end_index = 2;

Returns
TypeDescription
long

The endIndex.

getStartIndex()

public long getStartIndex()

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

int64 start_index = 1;

Returns
TypeDescription
long

The startIndex.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Document.TextAnchor.TextSegment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Document.TextAnchor.TextSegment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Document.TextAnchor.TextSegment.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.TextAnchor.TextSegment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuelong

The endIndex to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The startIndex to set.

Returns
TypeDescription
Document.TextAnchor.TextSegment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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