Class StudySpec.MetricSpec (3.24.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 3.24.0keyboard_arrow_down
public static final class StudySpec . MetricSpec extends GeneratedMessageV3 implements StudySpec . MetricSpecOrBuilder
Represents a metric to optimize.
Protobuf type google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
public static final int GOAL_FIELD_NUMBER
Field Value
Type
Description
int
public static final int METRIC_ID_FIELD_NUMBER
Field Value
Type
Description
int
public static final int SAFETY_CONFIG_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
public static StudySpec . MetricSpec getDefaultInstance ()
public static final Descriptors . Descriptor getDescriptor ()
public static StudySpec . MetricSpec . Builder newBuilder ()
public static StudySpec . MetricSpec . Builder newBuilder ( StudySpec . MetricSpec prototype )
public static StudySpec . MetricSpec parseDelimitedFrom ( InputStream input )
public static StudySpec . MetricSpec parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static StudySpec . MetricSpec parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
public static StudySpec . MetricSpec parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
public static StudySpec . MetricSpec parseFrom ( ByteString data )
public static StudySpec . MetricSpec parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static StudySpec . MetricSpec parseFrom ( CodedInputStream input )
public static StudySpec . MetricSpec parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static StudySpec . MetricSpec parseFrom ( InputStream input )
public static StudySpec . MetricSpec parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static StudySpec . MetricSpec parseFrom ( ByteBuffer data )
public static StudySpec . MetricSpec parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
public static Parser<StudySpec . MetricSpec > parser ()
Methods
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
public StudySpec . MetricSpec getDefaultInstanceForType ()
public StudySpec . MetricSpec . GoalType getGoal ()
Required. The optimization goal of the metric.
.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
public int getGoalValue ()
Required. The optimization goal of the metric.
.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
int
The enum numeric value on the wire for goal.
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];
Returns
Type
Description
String
The metricId.
public 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];
Returns
Type
Description
ByteString
The bytes for metricId.
public Parser<StudySpec . MetricSpec > getParserForType ()
Overrides
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.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
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.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
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.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3;
Returns
Type
Description
boolean
Whether the safetyConfig field is set.
Returns
Type
Description
int
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
public final boolean isInitialized ()
Overrides
public StudySpec . MetricSpec . Builder newBuilderForType ()
protected StudySpec . MetricSpec . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
public StudySpec . MetricSpec . Builder toBuilder ()
public void writeTo ( CodedOutputStream output )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]