public static final class AnalyzeSentimentResponse.Builder extends GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder> implements AnalyzeSentimentResponseOrBuilder
The sentiment analysis response message.
Protobuf type google.cloud.language.v1.AnalyzeSentimentResponse
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
addAllSentences(Iterable<? extends Sentence> values)
public AnalyzeSentimentResponse.Builder addAllSentences(Iterable<? extends Sentence> values)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.language.v1.Sentence>
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AnalyzeSentimentResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
addSentences(Sentence value)
public AnalyzeSentimentResponse.Builder addSentences(Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
addSentences(Sentence.Builder builderForValue)
public AnalyzeSentimentResponse.Builder addSentences(Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
addSentences(int index, Sentence value)
public AnalyzeSentimentResponse.Builder addSentences(int index, Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameters
Returns
addSentences(int index, Sentence.Builder builderForValue)
public AnalyzeSentimentResponse.Builder addSentences(int index, Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameters
Returns
addSentencesBuilder()
public Sentence.Builder addSentencesBuilder()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
addSentencesBuilder(int index)
public Sentence.Builder addSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
build()
public AnalyzeSentimentResponse build()
Returns
buildPartial()
public AnalyzeSentimentResponse buildPartial()
Returns
clear()
public AnalyzeSentimentResponse.Builder clear()
Returns
Overrides
clearDocumentSentiment()
public AnalyzeSentimentResponse.Builder clearDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Returns
clearField(Descriptors.FieldDescriptor field)
public AnalyzeSentimentResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLanguage()
public AnalyzeSentimentResponse.Builder clearLanguage()
The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language field for more details.
string language = 2;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public AnalyzeSentimentResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearSentences()
public AnalyzeSentimentResponse.Builder clearSentences()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
clone()
public AnalyzeSentimentResponse.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public AnalyzeSentimentResponse getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getDocumentSentiment()
public Sentiment getDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Returns
Type | Description |
Sentiment | The documentSentiment.
|
getDocumentSentimentBuilder()
public Sentiment.Builder getDocumentSentimentBuilder()
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Returns
getDocumentSentimentOrBuilder()
public SentimentOrBuilder getDocumentSentimentOrBuilder()
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Returns
getLanguage()
public String getLanguage()
The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language field for more details.
string language = 2;
Returns
Type | Description |
String | The language.
|
getLanguageBytes()
public ByteString getLanguageBytes()
The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language field for more details.
string language = 2;
Returns
getSentences(int index)
public Sentence getSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
getSentencesBuilder(int index)
public Sentence.Builder getSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
getSentencesBuilderList()
public List<Sentence.Builder> getSentencesBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
getSentencesCount()
public int getSentencesCount()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
getSentencesList()
public List<Sentence> getSentencesList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
getSentencesOrBuilder(int index)
public SentenceOrBuilder getSentencesOrBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
getSentencesOrBuilderList()
public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Returns
Type | Description |
List<? extends com.google.cloud.language.v1.SentenceOrBuilder> | |
hasDocumentSentiment()
public boolean hasDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Returns
Type | Description |
boolean | Whether the documentSentiment field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeDocumentSentiment(Sentiment value)
public AnalyzeSentimentResponse.Builder mergeDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Parameter
Returns
mergeFrom(AnalyzeSentimentResponse other)
public AnalyzeSentimentResponse.Builder mergeFrom(AnalyzeSentimentResponse other)
Parameter
Returns
public AnalyzeSentimentResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public AnalyzeSentimentResponse.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AnalyzeSentimentResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeSentences(int index)
public AnalyzeSentimentResponse.Builder removeSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameter
Returns
setDocumentSentiment(Sentiment value)
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Parameter
Returns
setDocumentSentiment(Sentiment.Builder builderForValue)
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment.Builder builderForValue)
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public AnalyzeSentimentResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setLanguage(String value)
public AnalyzeSentimentResponse.Builder setLanguage(String value)
The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language field for more details.
string language = 2;
Parameter
Name | Description |
value | String
The language to set.
|
Returns
setLanguageBytes(ByteString value)
public AnalyzeSentimentResponse.Builder setLanguageBytes(ByteString value)
The language of the text, which will be the same as the language specified
in the request or, if not specified, the automatically-detected language.
See Document.language field for more details.
string language = 2;
Parameter
Name | Description |
value | ByteString
The bytes for language to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AnalyzeSentimentResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setSentences(int index, Sentence value)
public AnalyzeSentimentResponse.Builder setSentences(int index, Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameters
Returns
setSentences(int index, Sentence.Builder builderForValue)
public AnalyzeSentimentResponse.Builder setSentences(int index, Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
Parameters
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final AnalyzeSentimentResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides