Class TextSentimentPredictionResult.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<TextSentimentPredictionResult.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<TextSentimentPredictionResult.Builder>
      • getDefaultInstanceForType

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextSentimentPredictionResult.Builder>
      • mergeFrom

        public TextSentimentPredictionResult.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<TextSentimentPredictionResult.Builder>
        Throws:
        IOException
      • getSentiment

        public int getSentiment()
         The integer sentiment labels between 0 (inclusive) and sentimentMax label
         (inclusive), while 0 maps to the least positive sentiment and
         sentimentMax maps to the most positive one. The higher the score is, the
         more positive the sentiment in the text snippet is. Note: sentimentMax is
         an integer value between 1 (inclusive) and 10 (inclusive).
         
        int32 sentiment = 1;
        Specified by:
        getSentiment in interface TextSentimentPredictionResultOrBuilder
        Returns:
        The sentiment.
      • setSentiment

        public TextSentimentPredictionResult.Builder setSentiment​(int value)
         The integer sentiment labels between 0 (inclusive) and sentimentMax label
         (inclusive), while 0 maps to the least positive sentiment and
         sentimentMax maps to the most positive one. The higher the score is, the
         more positive the sentiment in the text snippet is. Note: sentimentMax is
         an integer value between 1 (inclusive) and 10 (inclusive).
         
        int32 sentiment = 1;
        Parameters:
        value - The sentiment to set.
        Returns:
        This builder for chaining.
      • clearSentiment

        public TextSentimentPredictionResult.Builder clearSentiment()
         The integer sentiment labels between 0 (inclusive) and sentimentMax label
         (inclusive), while 0 maps to the least positive sentiment and
         sentimentMax maps to the most positive one. The higher the score is, the
         more positive the sentiment in the text snippet is. Note: sentimentMax is
         an integer value between 1 (inclusive) and 10 (inclusive).
         
        int32 sentiment = 1;
        Returns:
        This builder for chaining.