- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.52.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.1
- 2.3.4
- 2.2.0
- 2.1.10
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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > TextSpan.BuilderImplements
TextSpanOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TextSpan.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
build()
public TextSpan build()
Returns | |
---|---|
Type | Description |
TextSpan |
buildPartial()
public TextSpan buildPartial()
Returns | |
---|---|
Type | Description |
TextSpan |
clear()
public TextSpan.Builder clear()
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
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 | |
---|---|
Type | Description |
TextSpan.Builder |
This builder for chaining. |
clearContent()
public TextSpan.Builder clearContent()
The content of the output text.
string content = 1;
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public TextSpan.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public TextSpan.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
clone()
public TextSpan.Builder clone()
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
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 | |
---|---|
Type | Description |
ByteString |
The bytes for content. |
getDefaultInstanceForType()
public TextSpan getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
TextSpan |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(TextSpan other)
public TextSpan.Builder mergeFrom(TextSpan other)
Parameter | |
---|---|
Name | Description |
other |
TextSpan |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextSpan.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public TextSpan.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TextSpan.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
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 | |
---|---|
Type | Description |
TextSpan.Builder |
This builder for chaining. |
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 | |
---|---|
Type | Description |
TextSpan.Builder |
This builder for chaining. |
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 | |
---|---|
Type | Description |
TextSpan.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public TextSpan.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TextSpan.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final TextSpan.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
TextSpan.Builder |