Class StudySpec.MetricSpec.Builder

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

public static final class StudySpec.MetricSpec.Builder extends com.google.protobuf.GeneratedMessage.Builder<StudySpec.MetricSpec.Builder> implements StudySpec.MetricSpecOrBuilder
 Represents a metric to optimize.
 
Protobuf type google.cloud.aiplatform.v1.StudySpec.MetricSpec
  • 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<StudySpec.MetricSpec.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<StudySpec.MetricSpec.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<StudySpec.MetricSpec.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public StudySpec.MetricSpec.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<StudySpec.MetricSpec.Builder>
      Throws:
      IOException
    • getMetricId

      public String getMetricId()
       Required. The ID of the metric. Must not contain whitespaces and must be
       unique amongst all MetricSpecs.
       
      string metric_id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricId in interface StudySpec.MetricSpecOrBuilder
      Returns:
      The metricId.
    • getMetricIdBytes

      public com.google.protobuf.ByteString getMetricIdBytes()
       Required. The ID of the metric. Must not contain whitespaces and must be
       unique amongst all MetricSpecs.
       
      string metric_id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricIdBytes in interface StudySpec.MetricSpecOrBuilder
      Returns:
      The bytes for metricId.
    • setMetricId

      public StudySpec.MetricSpec.Builder setMetricId(String value)
       Required. The ID of the metric. Must not contain whitespaces and must be
       unique amongst all MetricSpecs.
       
      string metric_id = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The metricId to set.
      Returns:
      This builder for chaining.
    • clearMetricId

      public StudySpec.MetricSpec.Builder clearMetricId()
       Required. The ID of the metric. Must not contain whitespaces and must be
       unique amongst all MetricSpecs.
       
      string metric_id = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setMetricIdBytes

      public StudySpec.MetricSpec.Builder setMetricIdBytes(com.google.protobuf.ByteString value)
       Required. The ID of the metric. Must not contain whitespaces and must be
       unique amongst all MetricSpecs.
       
      string metric_id = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for metricId to set.
      Returns:
      This builder for chaining.
    • getGoalValue

      public int getGoalValue()
       Required. The optimization goal of the metric.
       
      .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getGoalValue in interface StudySpec.MetricSpecOrBuilder
      Returns:
      The enum numeric value on the wire for goal.
    • setGoalValue

      public StudySpec.MetricSpec.Builder setGoalValue(int value)
       Required. The optimization goal of the metric.
       
      .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for goal to set.
      Returns:
      This builder for chaining.
    • getGoal

       Required. The optimization goal of the metric.
       
      .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getGoal in interface StudySpec.MetricSpecOrBuilder
      Returns:
      The goal.
    • setGoal

       Required. The optimization goal of the metric.
       
      .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The goal to set.
      Returns:
      This builder for chaining.
    • clearGoal

      public StudySpec.MetricSpec.Builder clearGoal()
       Required. The optimization goal of the metric.
       
      .google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • hasSafetyConfig

      public boolean hasSafetyConfig()
       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
      Specified by:
      hasSafetyConfig in interface StudySpec.MetricSpecOrBuilder
      Returns:
      Whether the safetyConfig field is set.
    • getSafetyConfig

      public StudySpec.MetricSpec.SafetyMetricConfig getSafetyConfig()
       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
      Specified by:
      getSafetyConfig in interface StudySpec.MetricSpecOrBuilder
      Returns:
      The safetyConfig.
    • setSafetyConfig

       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
    • setSafetyConfig

       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
    • mergeSafetyConfig

       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
    • clearSafetyConfig

      public StudySpec.MetricSpec.Builder clearSafetyConfig()
       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
    • getSafetyConfigBuilder

      public StudySpec.MetricSpec.SafetyMetricConfig.Builder getSafetyConfigBuilder()
       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
    • getSafetyConfigOrBuilder

      public StudySpec.MetricSpec.SafetyMetricConfigOrBuilder getSafetyConfigOrBuilder()
       Used for safe search. In the case, the metric will be a safety
       metric. You must provide a separate metric for objective metric.
       
      optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
      Specified by:
      getSafetyConfigOrBuilder in interface StudySpec.MetricSpecOrBuilder