public static final class Sentence.Builder extends GeneratedMessageV3.Builder<Sentence.Builder> implements SentenceOrBuilder
Represents a sentence in the input document.
Protobuf type google.cloud.language.v1.Sentence
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Sentence.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Sentence buildPartial()
Returns
clear()
public Sentence.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Sentence.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Sentence.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearSentiment()
public Sentence.Builder clearSentiment()
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Returns
clearText()
public Sentence.Builder clearText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Returns
clone()
public Sentence.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public Sentence getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getSentiment()
public Sentiment getSentiment()
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Returns
getSentimentBuilder()
public Sentiment.Builder getSentimentBuilder()
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Returns
getSentimentOrBuilder()
public SentimentOrBuilder getSentimentOrBuilder()
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Returns
getText()
public TextSpan getText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Returns
getTextBuilder()
public TextSpan.Builder getTextBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Returns
getTextOrBuilder()
public TextSpanOrBuilder getTextOrBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Returns
hasSentiment()
public boolean hasSentiment()
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Returns
Type | Description |
boolean | Whether the sentiment field is set.
|
hasText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Returns
Type | Description |
boolean | Whether the text field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Sentence other)
public Sentence.Builder mergeFrom(Sentence other)
Parameter
Returns
public Sentence.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Sentence.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeSentiment(Sentiment value)
public Sentence.Builder mergeSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Parameter
Returns
mergeText(TextSpan value)
public Sentence.Builder mergeText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Sentence.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public Sentence.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Sentence.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setSentiment(Sentiment value)
public Sentence.Builder setSentiment(Sentiment value)
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Parameter
Returns
setSentiment(Sentiment.Builder builderForValue)
public Sentence.Builder setSentiment(Sentiment.Builder builderForValue)
For calls to [AnalyzeSentiment][] or if
AnnotateTextRequest.Features.extract_document_sentiment is set to
true, this field will contain the sentiment for the sentence.
.google.cloud.language.v1.Sentiment sentiment = 2;
Parameter
Returns
setText(TextSpan value)
public Sentence.Builder setText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Parameter
Returns
setText(TextSpan.Builder builderForValue)
public Sentence.Builder setText(TextSpan.Builder builderForValue)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
Parameter
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Sentence.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides