public static final class TextSpan.Builder extends GeneratedMessageV3.Builder<TextSpan.Builder> implements TextSpanOrBuilder
Represents an output piece of text.Protobuf type
google.cloud.language.v1beta2.TextSpan
Modifier and Type | Method and Description |
---|---|
TextSpan.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
TextSpan |
build() |
TextSpan |
buildPartial() |
TextSpan.Builder |
clear() |
TextSpan.Builder |
clearBeginOffset()
The API calculates the beginning offset of the content in the original
document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
|
TextSpan.Builder |
clearContent()
The content of the output text.
|
TextSpan.Builder |
clearField(Descriptors.FieldDescriptor field) |
TextSpan.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
TextSpan.Builder |
clone() |
int |
getBeginOffset()
The API calculates the beginning offset of the content in the original
document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
|
String |
getContent()
The content of the output text.
|
ByteString |
getContentBytes()
The content of the output text.
|
TextSpan |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TextSpan.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
TextSpan.Builder |
mergeFrom(Message other) |
TextSpan.Builder |
mergeFrom(TextSpan other) |
TextSpan.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
TextSpan.Builder |
setBeginOffset(int value)
The API calculates the beginning offset of the content in the original
document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
|
TextSpan.Builder |
setContent(String value)
The content of the output text.
|
TextSpan.Builder |
setContentBytes(ByteString value)
The content of the output text.
|
TextSpan.Builder |
setField(Descriptors.FieldDescriptor field,
Object value) |
TextSpan.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value) |
TextSpan.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public TextSpan build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public TextSpan buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public TextSpan.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<TextSpan.Builder>
public TextSpan.Builder mergeFrom(TextSpan other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public TextSpan.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<TextSpan.Builder>
IOException
public String getContent()
The content of the output text.
string content = 1;
getContent
in interface TextSpanOrBuilder
public ByteString getContentBytes()
The content of the output text.
string content = 1;
getContentBytes
in interface TextSpanOrBuilder
public TextSpan.Builder setContent(String value)
The content of the output text.
string content = 1;
value
- The content to set.public TextSpan.Builder clearContent()
The content of the output text.
string content = 1;
public TextSpan.Builder setContentBytes(ByteString value)
The content of the output text.
string content = 1;
value
- The bytes for content to set.public int getBeginOffset()
The API calculates the beginning offset of the content in the original document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
int32 begin_offset = 2;
getBeginOffset
in interface TextSpanOrBuilder
public TextSpan.Builder setBeginOffset(int value)
The API calculates the beginning offset of the content in the original document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
int32 begin_offset = 2;
value
- The beginOffset to set.public TextSpan.Builder clearBeginOffset()
The API calculates the beginning offset of the content in the original document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
int32 begin_offset = 2;
public final TextSpan.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<TextSpan.Builder>
public final TextSpan.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<TextSpan.Builder>
Copyright © 2022 Google LLC. All rights reserved.