Class TextClassificationConfig.Builder

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

public static final class TextClassificationConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextClassificationConfig.Builder> implements TextClassificationConfigOrBuilder
 Config for text classification human labeling task.
 
Protobuf type google.cloud.datalabeling.v1beta1.TextClassificationConfig
  • 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<TextClassificationConfig.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<TextClassificationConfig.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<TextClassificationConfig.Builder>
    • getDefaultInstanceForType

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

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

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

      public TextClassificationConfig.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<TextClassificationConfig.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<TextClassificationConfig.Builder>
    • mergeFrom

      public TextClassificationConfig.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<TextClassificationConfig.Builder>
      Throws:
      IOException
    • getAllowMultiLabel

      public boolean getAllowMultiLabel()
       Optional. If allow_multi_label is true, contributors are able to choose
       multiple labels for one text segment.
       
      bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowMultiLabel in interface TextClassificationConfigOrBuilder
      Returns:
      The allowMultiLabel.
    • setAllowMultiLabel

      public TextClassificationConfig.Builder setAllowMultiLabel(boolean value)
       Optional. If allow_multi_label is true, contributors are able to choose
       multiple labels for one text segment.
       
      bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The allowMultiLabel to set.
      Returns:
      This builder for chaining.
    • clearAllowMultiLabel

      public TextClassificationConfig.Builder clearAllowMultiLabel()
       Optional. If allow_multi_label is true, contributors are able to choose
       multiple labels for one text segment.
       
      bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getAnnotationSpecSet

      public String getAnnotationSpecSet()
       Required. Annotation spec set resource name.
       
      string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAnnotationSpecSet in interface TextClassificationConfigOrBuilder
      Returns:
      The annotationSpecSet.
    • getAnnotationSpecSetBytes

      public com.google.protobuf.ByteString getAnnotationSpecSetBytes()
       Required. Annotation spec set resource name.
       
      string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAnnotationSpecSetBytes in interface TextClassificationConfigOrBuilder
      Returns:
      The bytes for annotationSpecSet.
    • setAnnotationSpecSet

      public TextClassificationConfig.Builder setAnnotationSpecSet(String value)
       Required. Annotation spec set resource name.
       
      string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The annotationSpecSet to set.
      Returns:
      This builder for chaining.
    • clearAnnotationSpecSet

      public TextClassificationConfig.Builder clearAnnotationSpecSet()
       Required. Annotation spec set resource name.
       
      string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setAnnotationSpecSetBytes

      public TextClassificationConfig.Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value)
       Required. Annotation spec set resource name.
       
      string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for annotationSpecSet to set.
      Returns:
      This builder for chaining.
    • hasSentimentConfig

      public boolean hasSentimentConfig()
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasSentimentConfig in interface TextClassificationConfigOrBuilder
      Returns:
      Whether the sentimentConfig field is set.
    • getSentimentConfig

      public SentimentConfig getSentimentConfig()
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSentimentConfig in interface TextClassificationConfigOrBuilder
      Returns:
      The sentimentConfig.
    • setSentimentConfig

      public TextClassificationConfig.Builder setSentimentConfig(SentimentConfig value)
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setSentimentConfig

      public TextClassificationConfig.Builder setSentimentConfig(SentimentConfig.Builder builderForValue)
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
    • mergeSentimentConfig

      public TextClassificationConfig.Builder mergeSentimentConfig(SentimentConfig value)
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearSentimentConfig

      public TextClassificationConfig.Builder clearSentimentConfig()
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getSentimentConfigBuilder

      public SentimentConfig.Builder getSentimentConfigBuilder()
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getSentimentConfigOrBuilder

      public SentimentConfigOrBuilder getSentimentConfigOrBuilder()
       Optional. Configs for sentiment selection.
       
      .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSentimentConfigOrBuilder in interface TextClassificationConfigOrBuilder