public static final class TextSpan.Builder extends GeneratedMessageV3.Builder<TextSpan.Builder> implements TextSpanOrBuilder
Represents an output piece of text.
Protobuf type google.cloud.language.v1.TextSpan
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TextSpan.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public TextSpan buildPartial()
Returns
clear()
public TextSpan.Builder clear()
Returns
Overrides
clearBeginOffset()
public TextSpan.Builder clearBeginOffset()
The API calculates the beginning offset of the content in the original
document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
Returns
clearContent()
public TextSpan.Builder clearContent()
The content of the output text.
string content = 1;
Returns
clearField(Descriptors.FieldDescriptor field)
public TextSpan.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public TextSpan.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public TextSpan.Builder clone()
Returns
Overrides
getBeginOffset()
public int getBeginOffset()
The API calculates the beginning offset of the content in the original
document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
Returns
Type | Description |
int | The beginOffset.
|
getContent()
public String getContent()
The content of the output text.
string content = 1;
Returns
Type | Description |
String | The content.
|
getContentBytes()
public ByteString getContentBytes()
The content of the output text.
string content = 1;
Returns
getDefaultInstanceForType()
public TextSpan getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(TextSpan other)
public TextSpan.Builder mergeFrom(TextSpan other)
Parameter
Returns
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextSpan.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public TextSpan.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TextSpan.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setBeginOffset(int value)
public TextSpan.Builder setBeginOffset(int value)
The API calculates the beginning offset of the content in the original
document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
Parameter
Name | Description |
value | int
The beginOffset to set.
|
Returns
setContent(String value)
public TextSpan.Builder setContent(String value)
The content of the output text.
string content = 1;
Parameter
Name | Description |
value | String
The content to set.
|
Returns
setContentBytes(ByteString value)
public TextSpan.Builder setContentBytes(ByteString value)
The content of the output text.
string content = 1;
Parameter
Name | Description |
value | ByteString
The bytes for content to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public TextSpan.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TextSpan.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final TextSpan.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides