Class SafetySetting.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder>
com.google.cloud.aiplatform.v1.SafetySetting.Builder
All Implemented Interfaces:
SafetySettingOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SafetySetting

public static final class SafetySetting.Builder extends com.google.protobuf.GeneratedMessage.Builder<SafetySetting.Builder> implements SafetySettingOrBuilder
 Safety settings.
 
Protobuf type google.cloud.aiplatform.v1.SafetySetting
  • 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<SafetySetting.Builder>
    • clear

      public SafetySetting.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<SafetySetting.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<SafetySetting.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public SafetySetting.Builder mergeFrom(SafetySetting other)
    • isInitialized

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

      public SafetySetting.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<SafetySetting.Builder>
      Throws:
      IOException
    • getCategoryValue

      public int getCategoryValue()
       Required. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategoryValue in interface SafetySettingOrBuilder
      Returns:
      The enum numeric value on the wire for category.
    • setCategoryValue

      public SafetySetting.Builder setCategoryValue(int value)
       Required. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for category to set.
      Returns:
      This builder for chaining.
    • getCategory

      public HarmCategory getCategory()
       Required. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategory in interface SafetySettingOrBuilder
      Returns:
      The category.
    • setCategory

      public SafetySetting.Builder setCategory(HarmCategory value)
       Required. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The category to set.
      Returns:
      This builder for chaining.
    • clearCategory

      public SafetySetting.Builder clearCategory()
       Required. Harm category.
       
      .google.cloud.aiplatform.v1.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getThresholdValue

      public int getThresholdValue()
       Required. The harm block threshold.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThresholdValue in interface SafetySettingOrBuilder
      Returns:
      The enum numeric value on the wire for threshold.
    • setThresholdValue

      public SafetySetting.Builder setThresholdValue(int value)
       Required. The harm block threshold.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for threshold to set.
      Returns:
      This builder for chaining.
    • getThreshold

      public SafetySetting.HarmBlockThreshold getThreshold()
       Required. The harm block threshold.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreshold in interface SafetySettingOrBuilder
      Returns:
      The threshold.
    • setThreshold

       Required. The harm block threshold.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The threshold to set.
      Returns:
      This builder for chaining.
    • clearThreshold

      public SafetySetting.Builder clearThreshold()
       Required. The harm block threshold.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getMethodValue

      public int getMethodValue()
       Optional. Specify if the threshold is used for probability or severity
       score. If not specified, the threshold is used for probability score.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMethodValue in interface SafetySettingOrBuilder
      Returns:
      The enum numeric value on the wire for method.
    • setMethodValue

      public SafetySetting.Builder setMethodValue(int value)
       Optional. Specify if the threshold is used for probability or severity
       score. If not specified, the threshold is used for probability score.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for method to set.
      Returns:
      This builder for chaining.
    • getMethod

      public SafetySetting.HarmBlockMethod getMethod()
       Optional. Specify if the threshold is used for probability or severity
       score. If not specified, the threshold is used for probability score.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMethod in interface SafetySettingOrBuilder
      Returns:
      The method.
    • setMethod

       Optional. Specify if the threshold is used for probability or severity
       score. If not specified, the threshold is used for probability score.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The method to set.
      Returns:
      This builder for chaining.
    • clearMethod

      public SafetySetting.Builder clearMethod()
       Optional. Specify if the threshold is used for probability or severity
       score. If not specified, the threshold is used for probability score.
       
      .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.