public static final class AnalyzeSentimentResponse.Builder extends GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder> implements AnalyzeSentimentResponseOrBuilder
The sentiment analysis response message.
Protobuf type google.cloud.language.v1beta2.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()
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.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
values | Iterable<? extends com.google.cloud.language.v1beta2.Sentence>
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AnalyzeSentimentResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
addSentences(Sentence value)
public AnalyzeSentimentResponse.Builder addSentences(Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
addSentences(Sentence.Builder builderForValue)
public AnalyzeSentimentResponse.Builder addSentences(Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
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.v1beta2.Sentence sentences = 3;
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.v1beta2.Sentence sentences = 3;
addSentencesBuilder()
public Sentence.Builder addSentencesBuilder()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
addSentencesBuilder(int index)
public Sentence.Builder addSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
index | int
|
build()
public AnalyzeSentimentResponse build()
buildPartial()
public AnalyzeSentimentResponse buildPartial()
clear()
public AnalyzeSentimentResponse.Builder clear()
Overrides
clearDocumentSentiment()
public AnalyzeSentimentResponse.Builder clearDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
clearField(Descriptors.FieldDescriptor field)
public AnalyzeSentimentResponse.Builder clearField(Descriptors.FieldDescriptor field)
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public AnalyzeSentimentResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearSentences()
public AnalyzeSentimentResponse.Builder clearSentences()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
clone()
public AnalyzeSentimentResponse.Builder clone()
Overrides
getDefaultInstanceForType()
public AnalyzeSentimentResponse getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getDocumentSentiment()
public Sentiment getDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.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.v1beta2.Sentiment document_sentiment = 1;
getDocumentSentimentOrBuilder()
public SentimentOrBuilder getDocumentSentimentOrBuilder()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
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 |
---|
Type | Description |
ByteString | The bytes for language.
|
getSentences(int index)
public Sentence getSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
index | int
|
getSentencesBuilder(int index)
public Sentence.Builder getSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
index | int
|
getSentencesBuilderList()
public List<Sentence.Builder> getSentencesBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesCount()
public int getSentencesCount()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Returns |
---|
Type | Description |
int | |
getSentencesList()
public List<Sentence> getSentencesList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
getSentencesOrBuilder(int index)
public SentenceOrBuilder getSentencesOrBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
index | int
|
getSentencesOrBuilderList()
public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.language.v1beta2.SentenceOrBuilder> | |
hasDocumentSentiment()
public boolean hasDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
Returns |
---|
Type | Description |
boolean | Whether the documentSentiment field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeDocumentSentiment(Sentiment value)
public AnalyzeSentimentResponse.Builder mergeDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
mergeFrom(AnalyzeSentimentResponse other)
public AnalyzeSentimentResponse.Builder mergeFrom(AnalyzeSentimentResponse other)
public AnalyzeSentimentResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public AnalyzeSentimentResponse.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AnalyzeSentimentResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeSentences(int index)
public AnalyzeSentimentResponse.Builder removeSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1beta2.Sentence sentences = 3;
Parameter |
---|
Name | Description |
index | int
|
setDocumentSentiment(Sentiment value)
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
setDocumentSentiment(Sentiment.Builder builderForValue)
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment.Builder builderForValue)
The overall sentiment of the input document.
.google.cloud.language.v1beta2.Sentiment document_sentiment = 1;
setField(Descriptors.FieldDescriptor field, Object value)
public AnalyzeSentimentResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AnalyzeSentimentResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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.v1beta2.Sentence sentences = 3;
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.v1beta2.Sentence sentences = 3;
setUnknownFields(UnknownFieldSet unknownFields)
public final AnalyzeSentimentResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides