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()
Methods
build()
buildPartial()
public Sentence buildPartial()
clear()
public Sentence.Builder clear()
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;
clearText()
public Sentence.Builder clearText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
getDefaultInstanceForType()
public Sentence getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
---|
Type | Description |
Sentiment | The sentiment.
|
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;
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;
getText()
public TextSpan getText()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
getTextBuilder()
public TextSpan.Builder getTextBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
getTextOrBuilder()
public TextSpanOrBuilder getTextOrBuilder()
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Sentence other)
public Sentence.Builder mergeFrom(Sentence other)
public Sentence.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Sentence.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
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;
mergeText(TextSpan value)
public Sentence.Builder mergeText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Sentence.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
setText(TextSpan value)
public Sentence.Builder setText(TextSpan value)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
setText(TextSpan.Builder builderForValue)
public Sentence.Builder setText(TextSpan.Builder builderForValue)
The sentence text.
.google.cloud.language.v1.TextSpan text = 1;
setUnknownFields(UnknownFieldSet unknownFields)
public final Sentence.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides