Package com.google.cloud.language.v2
Class AnalyzeSentimentResponse.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
- com.google.cloud.language.v2.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.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder> implements AnalyzeSentimentResponseOrBuilder
The sentiment analysis response message.
Protobuf typegoogle.cloud.language.v2.AnalyzeSentimentResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyzeSentimentResponse.BuilderaddAllSentences(Iterable<? extends Sentence> values)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AnalyzeSentimentResponse.BuilderaddSentences(int index, Sentence value)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuilderaddSentences(int index, Sentence.Builder builderForValue)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuilderaddSentences(Sentence value)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuilderaddSentences(Sentence.Builder builderForValue)The sentiment for all the sentences in the document.Sentence.BuilderaddSentencesBuilder()The sentiment for all the sentences in the document.Sentence.BuilderaddSentencesBuilder(int index)The sentiment for all the sentences in the document.AnalyzeSentimentResponsebuild()AnalyzeSentimentResponsebuildPartial()AnalyzeSentimentResponse.Builderclear()AnalyzeSentimentResponse.BuilderclearDocumentSentiment()The overall sentiment of the input document.AnalyzeSentimentResponse.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)AnalyzeSentimentResponse.BuilderclearLanguageCode()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.AnalyzeSentimentResponse.BuilderclearLanguageSupported()Whether the language is officially supported.AnalyzeSentimentResponse.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)AnalyzeSentimentResponse.BuilderclearSentences()The sentiment for all the sentences in the document.AnalyzeSentimentResponse.Builderclone()AnalyzeSentimentResponsegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()SentimentgetDocumentSentiment()The overall sentiment of the input document.Sentiment.BuildergetDocumentSentimentBuilder()The overall sentiment of the input document.SentimentOrBuildergetDocumentSentimentOrBuilder()The overall sentiment of the input document.StringgetLanguageCode()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.ByteStringgetLanguageCodeBytes()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.booleangetLanguageSupported()Whether the language is officially supported.SentencegetSentences(int index)The sentiment for all the sentences in the document.Sentence.BuildergetSentencesBuilder(int index)The sentiment for all the sentences in the document.List<Sentence.Builder>getSentencesBuilderList()The sentiment for all the sentences in the document.intgetSentencesCount()The sentiment for all the sentences in the document.List<Sentence>getSentencesList()The sentiment for all the sentences in the document.SentenceOrBuildergetSentencesOrBuilder(int index)The sentiment for all the sentences in the document.List<? extends SentenceOrBuilder>getSentencesOrBuilderList()The sentiment for all the sentences in the document.booleanhasDocumentSentiment()The overall sentiment of the input document.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()AnalyzeSentimentResponse.BuildermergeDocumentSentiment(Sentiment value)The overall sentiment of the input document.AnalyzeSentimentResponse.BuildermergeFrom(AnalyzeSentimentResponse other)AnalyzeSentimentResponse.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)AnalyzeSentimentResponse.BuildermergeFrom(com.google.protobuf.Message other)AnalyzeSentimentResponse.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)AnalyzeSentimentResponse.BuilderremoveSentences(int index)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuildersetDocumentSentiment(Sentiment value)The overall sentiment of the input document.AnalyzeSentimentResponse.BuildersetDocumentSentiment(Sentiment.Builder builderForValue)The overall sentiment of the input document.AnalyzeSentimentResponse.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AnalyzeSentimentResponse.BuildersetLanguageCode(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.AnalyzeSentimentResponse.BuildersetLanguageCodeBytes(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.AnalyzeSentimentResponse.BuildersetLanguageSupported(boolean value)Whether the language is officially supported.AnalyzeSentimentResponse.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)AnalyzeSentimentResponse.BuildersetSentences(int index, Sentence value)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuildersetSentences(int index, Sentence.Builder builderForValue)The sentiment for all the sentences in the document.AnalyzeSentimentResponse.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
clear
public AnalyzeSentimentResponse.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
getDefaultInstanceForType
public AnalyzeSentimentResponse getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public AnalyzeSentimentResponse build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AnalyzeSentimentResponse buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AnalyzeSentimentResponse.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
setField
public AnalyzeSentimentResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
clearField
public AnalyzeSentimentResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
clearOneof
public AnalyzeSentimentResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
setRepeatedField
public AnalyzeSentimentResponse.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
addRepeatedField
public AnalyzeSentimentResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
mergeFrom
public AnalyzeSentimentResponse.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AnalyzeSentimentResponse.Builder>
-
mergeFrom
public AnalyzeSentimentResponse.Builder mergeFrom(AnalyzeSentimentResponse other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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.v2.Sentiment document_sentiment = 1;- Specified by:
hasDocumentSentimentin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- Whether the documentSentiment field is set.
-
getDocumentSentiment
public Sentiment getDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;- Specified by:
getDocumentSentimentin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The documentSentiment.
-
setDocumentSentiment
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;
-
setDocumentSentiment
public AnalyzeSentimentResponse.Builder setDocumentSentiment(Sentiment.Builder builderForValue)
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;
-
mergeDocumentSentiment
public AnalyzeSentimentResponse.Builder mergeDocumentSentiment(Sentiment value)
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;
-
clearDocumentSentiment
public AnalyzeSentimentResponse.Builder clearDocumentSentiment()
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;
-
getDocumentSentimentBuilder
public Sentiment.Builder getDocumentSentimentBuilder()
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;
-
getDocumentSentimentOrBuilder
public SentimentOrBuilder getDocumentSentimentOrBuilder()
The overall sentiment of the input document.
.google.cloud.language.v2.Sentiment document_sentiment = 1;- Specified by:
getDocumentSentimentOrBuilderin interfaceAnalyzeSentimentResponseOrBuilder
-
getLanguageCode
public String getLanguageCode()
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_code = 2;- Specified by:
getLanguageCodein interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The languageCode.
-
getLanguageCodeBytes
public com.google.protobuf.ByteString getLanguageCodeBytes()
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_code = 2;- Specified by:
getLanguageCodeBytesin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The bytes for languageCode.
-
setLanguageCode
public AnalyzeSentimentResponse.Builder setLanguageCode(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_code = 2;- Parameters:
value- The languageCode to set.- Returns:
- This builder for chaining.
-
clearLanguageCode
public AnalyzeSentimentResponse.Builder clearLanguageCode()
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_code = 2;- Returns:
- This builder for chaining.
-
setLanguageCodeBytes
public AnalyzeSentimentResponse.Builder setLanguageCodeBytes(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. See [Document.language][] field for more details.
string language_code = 2;- Parameters:
value- The bytes for languageCode to set.- Returns:
- This builder for chaining.
-
getSentencesList
public List<Sentence> getSentencesList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;- Specified by:
getSentencesListin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentencesCount
public int getSentencesCount()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;- Specified by:
getSentencesCountin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentences
public Sentence getSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;- Specified by:
getSentencesin interfaceAnalyzeSentimentResponseOrBuilder
-
setSentences
public AnalyzeSentimentResponse.Builder setSentences(int index, Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
setSentences
public AnalyzeSentimentResponse.Builder setSentences(int index, Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addSentences
public AnalyzeSentimentResponse.Builder addSentences(Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addSentences
public AnalyzeSentimentResponse.Builder addSentences(int index, Sentence value)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addSentences
public AnalyzeSentimentResponse.Builder addSentences(Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addSentences
public AnalyzeSentimentResponse.Builder addSentences(int index, Sentence.Builder builderForValue)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addAllSentences
public AnalyzeSentimentResponse.Builder addAllSentences(Iterable<? extends Sentence> values)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
clearSentences
public AnalyzeSentimentResponse.Builder clearSentences()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
removeSentences
public AnalyzeSentimentResponse.Builder removeSentences(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
getSentencesBuilder
public Sentence.Builder getSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
getSentencesOrBuilder
public SentenceOrBuilder getSentencesOrBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;- Specified by:
getSentencesOrBuilderin interfaceAnalyzeSentimentResponseOrBuilder
-
getSentencesOrBuilderList
public List<? extends SentenceOrBuilder> getSentencesOrBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;- Specified by:
getSentencesOrBuilderListin interfaceAnalyzeSentimentResponseOrBuilder
-
addSentencesBuilder
public Sentence.Builder addSentencesBuilder()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
addSentencesBuilder
public Sentence.Builder addSentencesBuilder(int index)
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
getSentencesBuilderList
public List<Sentence.Builder> getSentencesBuilderList()
The sentiment for all the sentences in the document.
repeated .google.cloud.language.v2.Sentence sentences = 3;
-
getLanguageSupported
public boolean getLanguageSupported()
Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
bool language_supported = 4;- Specified by:
getLanguageSupportedin interfaceAnalyzeSentimentResponseOrBuilder- Returns:
- The languageSupported.
-
setLanguageSupported
public AnalyzeSentimentResponse.Builder setLanguageSupported(boolean value)
Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
bool language_supported = 4;- Parameters:
value- The languageSupported to set.- Returns:
- This builder for chaining.
-
clearLanguageSupported
public AnalyzeSentimentResponse.Builder clearLanguageSupported()
Whether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
bool language_supported = 4;- Returns:
- This builder for chaining.
-
setUnknownFields
public final AnalyzeSentimentResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
mergeUnknownFields
public final AnalyzeSentimentResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
-
-