Class AnalyzeSentimentResponse.Builder

    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
      • getDefaultInstanceForType

        public AnalyzeSentimentResponse getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public AnalyzeSentimentResponse build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public AnalyzeSentimentResponse buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public AnalyzeSentimentResponse.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
      • addRepeatedField

        public AnalyzeSentimentResponse.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.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:
        hasDocumentSentiment in interface AnalyzeSentimentResponseOrBuilder
        Returns:
        Whether the documentSentiment field is set.
      • setDocumentSentiment

        public AnalyzeSentimentResponse.Builder setDocumentSentiment​(Sentiment value)
         The overall sentiment of the input document.
         
        .google.cloud.language.v1.Sentiment document_sentiment = 1;
      • mergeDocumentSentiment

        public AnalyzeSentimentResponse.Builder mergeDocumentSentiment​(Sentiment value)
         The overall sentiment of the input document.
         
        .google.cloud.language.v1.Sentiment document_sentiment = 1;
      • clearDocumentSentiment

        public AnalyzeSentimentResponse.Builder clearDocumentSentiment()
         The overall sentiment of the input document.
         
        .google.cloud.language.v1.Sentiment document_sentiment = 1;
      • getDocumentSentimentBuilder

        public Sentiment.Builder getDocumentSentimentBuilder()
         The overall sentiment of the input document.
         
        .google.cloud.language.v1.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][google.cloud.language.v1.Document.language] field
         for more details.
         
        string language = 2;
        Specified by:
        getLanguage in interface AnalyzeSentimentResponseOrBuilder
        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:
        getLanguageBytes in interface AnalyzeSentimentResponseOrBuilder
        Returns:
        The bytes for language.
      • setLanguage

        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][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

        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][google.cloud.language.v1.Document.language] field
         for more details.
         
        string language = 2;
        Returns:
        This builder for chaining.
      • setLanguageBytes

        public AnalyzeSentimentResponse.Builder 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.
         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.
      • setSentences

        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;
      • addSentences

        public AnalyzeSentimentResponse.Builder addSentences​(Sentence value)
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.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.v1.Sentence sentences = 3;
      • clearSentences

        public AnalyzeSentimentResponse.Builder clearSentences()
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • removeSentences

        public AnalyzeSentimentResponse.Builder removeSentences​(int index)
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • getSentencesBuilder

        public Sentence.Builder getSentencesBuilder​(int index)
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • addSentencesBuilder

        public Sentence.Builder addSentencesBuilder()
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • addSentencesBuilder

        public Sentence.Builder addSentencesBuilder​(int index)
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • getSentencesBuilderList

        public List<Sentence.Builder> getSentencesBuilderList()
         The sentiment for all the sentences in the document.
         
        repeated .google.cloud.language.v1.Sentence sentences = 3;
      • setUnknownFields

        public final AnalyzeSentimentResponse.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>
      • mergeUnknownFields

        public final AnalyzeSentimentResponse.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnalyzeSentimentResponse.Builder>