Class TextSentimentProto.TextSentimentAnnotation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder
All Implemented Interfaces:
TextSentimentProto.TextSentimentAnnotationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TextSentimentProto.TextSentimentAnnotation

public static final class TextSentimentProto.TextSentimentAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextSentimentProto.TextSentimentAnnotation.Builder> implements TextSentimentProto.TextSentimentAnnotationOrBuilder
 Contains annotation details specific to text sentiment.
 
Protobuf type google.cloud.automl.v1beta1.TextSentimentAnnotation
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TextSentimentProto.TextSentimentAnnotation.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.GeneratedMessage.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TextSentimentProto.TextSentimentAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextSentimentProto.TextSentimentAnnotation.Builder>
    • mergeFrom

    • isInitialized

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

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

      public int getSentiment()
       Output only. The sentiment with the semantic, as given to the
       [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
       for the prediction had been trained.
       The sentiment values are between 0 and
       Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
       with higher value meaning more positive sentiment. They are completely
       relative, i.e. 0 means least positive sentiment and sentiment_max means
       the most positive from the sentiments present in the train data. Therefore
       e.g. if train data had only negative sentiment, then sentiment_max, would
       be still negative (although least negative).
       The sentiment shouldn't be confused with "score" or "magnitude"
       from the previous Natural Language Sentiment Analysis API.
       
      int32 sentiment = 1;
      Specified by:
      getSentiment in interface TextSentimentProto.TextSentimentAnnotationOrBuilder
      Returns:
      The sentiment.
    • setSentiment

      public TextSentimentProto.TextSentimentAnnotation.Builder setSentiment(int value)
       Output only. The sentiment with the semantic, as given to the
       [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
       for the prediction had been trained.
       The sentiment values are between 0 and
       Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
       with higher value meaning more positive sentiment. They are completely
       relative, i.e. 0 means least positive sentiment and sentiment_max means
       the most positive from the sentiments present in the train data. Therefore
       e.g. if train data had only negative sentiment, then sentiment_max, would
       be still negative (although least negative).
       The sentiment shouldn't be confused with "score" or "magnitude"
       from the previous Natural Language Sentiment Analysis API.
       
      int32 sentiment = 1;
      Parameters:
      value - The sentiment to set.
      Returns:
      This builder for chaining.
    • clearSentiment

       Output only. The sentiment with the semantic, as given to the
       [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
       for the prediction had been trained.
       The sentiment values are between 0 and
       Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
       with higher value meaning more positive sentiment. They are completely
       relative, i.e. 0 means least positive sentiment and sentiment_max means
       the most positive from the sentiments present in the train data. Therefore
       e.g. if train data had only negative sentiment, then sentiment_max, would
       be still negative (although least negative).
       The sentiment shouldn't be confused with "score" or "magnitude"
       from the previous Natural Language Sentiment Analysis API.
       
      int32 sentiment = 1;
      Returns:
      This builder for chaining.