Package com.google.cloud.language.v1
Class AnalyzeSentimentResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
com.google.cloud.language.v1.AnalyzeSentimentResponse.Builder
- All Implemented Interfaces:
AnalyzeSentimentResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AnalyzeSentimentResponse
public static final class AnalyzeSentimentResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
implements AnalyzeSentimentResponseOrBuilder
The sentiment analysis response message.Protobuf type
google.cloud.language.v1.AnalyzeSentimentResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllSentences(Iterable<? extends Sentence> values) The sentiment for all the sentences in the document.addSentences(int index, Sentence value) The sentiment for all the sentences in the document.addSentences(int index, Sentence.Builder builderForValue) The sentiment for all the sentences in the document.addSentences(Sentence value) The sentiment for all the sentences in the document.addSentences(Sentence.Builder builderForValue) The sentiment for all the sentences in the document.The sentiment for all the sentences in the document.addSentencesBuilder(int index) The sentiment for all the sentences in the document.build()clear()The overall sentiment of the input document.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.The sentiment for all the sentences in the document.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe overall sentiment of the input document.The overall sentiment of the input document.The overall sentiment of the input document.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.com.google.protobuf.ByteStringThe language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.getSentences(int index) The sentiment for all the sentences in the document.getSentencesBuilder(int index) The sentiment for all the sentences in the document.The sentiment for all the sentences in the document.intThe sentiment for all the sentences in the document.The sentiment for all the sentences in the document.getSentencesOrBuilder(int index) The sentiment for all the sentences in the document.List<? extends SentenceOrBuilder>The sentiment for all the sentences in the document.booleanThe overall sentiment of the input document.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeDocumentSentiment(Sentiment value) The overall sentiment of the input document.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeSentences(int index) The sentiment for all the sentences in the document.setDocumentSentiment(Sentiment value) The overall sentiment of the input document.setDocumentSentiment(Sentiment.Builder builderForValue) The overall sentiment of the input document.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.setLanguageBytes(com.google.protobuf.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.setSentences(int index, Sentence value) The sentiment for all the sentences in the document.setSentences(int index, Sentence.Builder builderForValue) The sentiment for all the sentences in the document.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnalyzeSentimentResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AnalyzeSentimentResponse.Builder>
-
mergeFrom
public AnalyzeSentimentResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnalyzeSentimentResponse.Builder>- Throws:
IOException
-
hasDocumentSentiment
public boolean hasDocumentSentiment()The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;- Specified by:
hasDocumentSentimentin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- Whether the documentSentiment field is set.
-
getDocumentSentiment
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;- Specified by:
getDocumentSentimentin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The documentSentiment.
-
setDocumentSentiment
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1; -
setDocumentSentiment
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1; -
mergeDocumentSentiment
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1; -
clearDocumentSentiment
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1; -
getDocumentSentimentBuilder
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1; -
getDocumentSentimentOrBuilder
The overall sentiment of the input document.
.google.cloud.language.v1.Sentiment document_sentiment = 1;- Specified by:
getDocumentSentimentOrBuilderin interfaceAnalyzeSentimentResponseOrBuilder
-
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][google.cloud.language.v1.Document.language] field for more details.
string language = 2;- Specified by:
getLanguagein interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The language.
-
getLanguageBytes
public com.google.protobuf.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][google.cloud.language.v1.Document.language] field for more details.
string language = 2;- Specified by:
getLanguageBytesin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The bytes for language.
-
setLanguage
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][google.cloud.language.v1.Document.language] field for more details.
string language = 2;- Parameters:
value- The language to set.- Returns:
- This builder for chaining.
-
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][google.cloud.language.v1.Document.language] field for more details.
string language = 2;- Returns:
- This builder for chaining.
-
setLanguageBytes
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][google.cloud.language.v1.Document.language] field for more details.
string language = 2;- Parameters:
value- The bytes for language to set.- Returns:
- This builder for chaining.
-
getSentencesList
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;- Specified by:
getSentencesListin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentencesCount
public int getSentencesCount()The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;- Specified by:
getSentencesCountin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;- Specified by:
getSentencesin interfaceAnalyzeSentimentResponseOrBuilder
-
setSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
setSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addAllSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
clearSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
removeSentences
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
getSentencesBuilder
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
getSentencesOrBuilder
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;- Specified by:
getSentencesOrBuilderin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentencesOrBuilderList
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;- Specified by:
getSentencesOrBuilderListin interfaceAnalyzeSentimentResponseOrBuilder
-
addSentencesBuilder
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
addSentencesBuilder
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3; -
getSentencesBuilderList
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v1.Sentence sentences = 3;
-