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.v1beta1.TextSegment
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
END_OFFSET_FIELD_NUMBER
public static final int END_OFFSET_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
START_OFFSET_FIELD_NUMBER
public static final int START_OFFSET_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static TextSegment getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static TextSegment.Builder newBuilder()
newBuilder(TextSegment prototype)
public static TextSegment.Builder newBuilder(TextSegment prototype)
parseDelimitedFrom(InputStream input)
public static TextSegment parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static TextSegment parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static TextSegment parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static TextSegment parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static TextSegment parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static TextSegment parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static TextSegment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<TextSegment> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
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 |
---|
Type | Description |
ByteString | The bytes for content.
|
getDefaultInstanceForType()
public TextSegment getDefaultInstanceForType()
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()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
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()
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public TextSegment.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected TextSegment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public TextSegment.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides