public final class TextSegment extends GeneratedMessageV3 implements TextSegmentOrBuilder
A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
Protobuf type google.cloud.automl.v1.TextSegment
Static Fields
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value
END_OFFSET_FIELD_NUMBER
public static final int END_OFFSET_FIELD_NUMBER
Field Value
START_OFFSET_FIELD_NUMBER
public static final int START_OFFSET_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static TextSegment getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static TextSegment.Builder newBuilder()
Returns
newBuilder(TextSegment prototype)
public static TextSegment.Builder newBuilder(TextSegment prototype)
Parameter
Returns
parseDelimitedFrom(InputStream input)
public static TextSegment parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static TextSegment parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static TextSegment parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(CodedInputStream input)
public static TextSegment parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(InputStream input)
public static TextSegment parseFrom(InputStream input)
Parameter
Returns
Exceptions
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static TextSegment parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<TextSegment> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getContent()
public String getContent()
Output only. The content of the TextSegment.
string content = 3;
Returns
Type | Description |
String | The content.
|
getContentBytes()
public ByteString getContentBytes()
Output only. The content of the TextSegment.
string content = 3;
Returns
getDefaultInstanceForType()
public TextSegment getDefaultInstanceForType()
Returns
getEndOffset()
public long getEndOffset()
Required. Zero-based character index of the first character past the end of
the text segment (counting character from the beginning of the text).
The character at the end_offset is NOT included in the text segment.
int64 end_offset = 2;
Returns
Type | Description |
long | The endOffset.
|
getParserForType()
public Parser<TextSegment> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getStartOffset()
public long getStartOffset()
Required. Zero-based character index of the first character of the text
segment (counting characters from the beginning of the text).
int64 start_offset = 1;
Returns
Type | Description |
long | The startOffset.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public TextSegment.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected TextSegment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public TextSegment.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions