software.amazon.awssdk.services.sagemaker.model.DescribeHyperParameterTuningJobResponse Maven / Gradle / Ivy
Show all versions of sagemaker Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.sagemaker.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class DescribeHyperParameterTuningJobResponse extends SageMakerResponse implements
ToCopyableBuilder {
private static final SdkField HYPER_PARAMETER_TUNING_JOB_NAME_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("HyperParameterTuningJobName")
.getter(getter(DescribeHyperParameterTuningJobResponse::hyperParameterTuningJobName))
.setter(setter(Builder::hyperParameterTuningJobName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HyperParameterTuningJobName")
.build()).build();
private static final SdkField HYPER_PARAMETER_TUNING_JOB_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("HyperParameterTuningJobArn")
.getter(getter(DescribeHyperParameterTuningJobResponse::hyperParameterTuningJobArn))
.setter(setter(Builder::hyperParameterTuningJobArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HyperParameterTuningJobArn").build())
.build();
private static final SdkField HYPER_PARAMETER_TUNING_JOB_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("HyperParameterTuningJobConfig")
.getter(getter(DescribeHyperParameterTuningJobResponse::hyperParameterTuningJobConfig))
.setter(setter(Builder::hyperParameterTuningJobConfig))
.constructor(HyperParameterTuningJobConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HyperParameterTuningJobConfig")
.build()).build();
private static final SdkField TRAINING_JOB_DEFINITION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("TrainingJobDefinition")
.getter(getter(DescribeHyperParameterTuningJobResponse::trainingJobDefinition))
.setter(setter(Builder::trainingJobDefinition)).constructor(HyperParameterTrainingJobDefinition::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrainingJobDefinition").build())
.build();
private static final SdkField> TRAINING_JOB_DEFINITIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("TrainingJobDefinitions")
.getter(getter(DescribeHyperParameterTuningJobResponse::trainingJobDefinitions))
.setter(setter(Builder::trainingJobDefinitions))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrainingJobDefinitions").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(HyperParameterTrainingJobDefinition::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField HYPER_PARAMETER_TUNING_JOB_STATUS_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("HyperParameterTuningJobStatus")
.getter(getter(DescribeHyperParameterTuningJobResponse::hyperParameterTuningJobStatusAsString))
.setter(setter(Builder::hyperParameterTuningJobStatus))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HyperParameterTuningJobStatus")
.build()).build();
private static final SdkField CREATION_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("CreationTime").getter(getter(DescribeHyperParameterTuningJobResponse::creationTime))
.setter(setter(Builder::creationTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreationTime").build()).build();
private static final SdkField HYPER_PARAMETER_TUNING_END_TIME_FIELD = SdkField
. builder(MarshallingType.INSTANT)
.memberName("HyperParameterTuningEndTime")
.getter(getter(DescribeHyperParameterTuningJobResponse::hyperParameterTuningEndTime))
.setter(setter(Builder::hyperParameterTuningEndTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HyperParameterTuningEndTime")
.build()).build();
private static final SdkField LAST_MODIFIED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("LastModifiedTime").getter(getter(DescribeHyperParameterTuningJobResponse::lastModifiedTime))
.setter(setter(Builder::lastModifiedTime))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedTime").build()).build();
private static final SdkField TRAINING_JOB_STATUS_COUNTERS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("TrainingJobStatusCounters")
.getter(getter(DescribeHyperParameterTuningJobResponse::trainingJobStatusCounters))
.setter(setter(Builder::trainingJobStatusCounters)).constructor(TrainingJobStatusCounters::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrainingJobStatusCounters").build())
.build();
private static final SdkField OBJECTIVE_STATUS_COUNTERS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ObjectiveStatusCounters")
.getter(getter(DescribeHyperParameterTuningJobResponse::objectiveStatusCounters))
.setter(setter(Builder::objectiveStatusCounters)).constructor(ObjectiveStatusCounters::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ObjectiveStatusCounters").build())
.build();
private static final SdkField BEST_TRAINING_JOB_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("BestTrainingJob")
.getter(getter(DescribeHyperParameterTuningJobResponse::bestTrainingJob)).setter(setter(Builder::bestTrainingJob))
.constructor(HyperParameterTrainingJobSummary::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BestTrainingJob").build()).build();
private static final SdkField OVERALL_BEST_TRAINING_JOB_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("OverallBestTrainingJob")
.getter(getter(DescribeHyperParameterTuningJobResponse::overallBestTrainingJob))
.setter(setter(Builder::overallBestTrainingJob)).constructor(HyperParameterTrainingJobSummary::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OverallBestTrainingJob").build())
.build();
private static final SdkField WARM_START_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("WarmStartConfig")
.getter(getter(DescribeHyperParameterTuningJobResponse::warmStartConfig)).setter(setter(Builder::warmStartConfig))
.constructor(HyperParameterTuningJobWarmStartConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WarmStartConfig").build()).build();
private static final SdkField AUTOTUNE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Autotune").getter(getter(DescribeHyperParameterTuningJobResponse::autotune))
.setter(setter(Builder::autotune)).constructor(Autotune::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Autotune").build()).build();
private static final SdkField FAILURE_REASON_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FailureReason").getter(getter(DescribeHyperParameterTuningJobResponse::failureReason))
.setter(setter(Builder::failureReason))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FailureReason").build()).build();
private static final SdkField TUNING_JOB_COMPLETION_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("TuningJobCompletionDetails")
.getter(getter(DescribeHyperParameterTuningJobResponse::tuningJobCompletionDetails))
.setter(setter(Builder::tuningJobCompletionDetails))
.constructor(HyperParameterTuningJobCompletionDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TuningJobCompletionDetails").build())
.build();
private static final SdkField CONSUMED_RESOURCES_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ConsumedResources")
.getter(getter(DescribeHyperParameterTuningJobResponse::consumedResources))
.setter(setter(Builder::consumedResources)).constructor(HyperParameterTuningJobConsumedResources::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConsumedResources").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
HYPER_PARAMETER_TUNING_JOB_NAME_FIELD, HYPER_PARAMETER_TUNING_JOB_ARN_FIELD, HYPER_PARAMETER_TUNING_JOB_CONFIG_FIELD,
TRAINING_JOB_DEFINITION_FIELD, TRAINING_JOB_DEFINITIONS_FIELD, HYPER_PARAMETER_TUNING_JOB_STATUS_FIELD,
CREATION_TIME_FIELD, HYPER_PARAMETER_TUNING_END_TIME_FIELD, LAST_MODIFIED_TIME_FIELD,
TRAINING_JOB_STATUS_COUNTERS_FIELD, OBJECTIVE_STATUS_COUNTERS_FIELD, BEST_TRAINING_JOB_FIELD,
OVERALL_BEST_TRAINING_JOB_FIELD, WARM_START_CONFIG_FIELD, AUTOTUNE_FIELD, FAILURE_REASON_FIELD,
TUNING_JOB_COMPLETION_DETAILS_FIELD, CONSUMED_RESOURCES_FIELD));
private final String hyperParameterTuningJobName;
private final String hyperParameterTuningJobArn;
private final HyperParameterTuningJobConfig hyperParameterTuningJobConfig;
private final HyperParameterTrainingJobDefinition trainingJobDefinition;
private final List trainingJobDefinitions;
private final String hyperParameterTuningJobStatus;
private final Instant creationTime;
private final Instant hyperParameterTuningEndTime;
private final Instant lastModifiedTime;
private final TrainingJobStatusCounters trainingJobStatusCounters;
private final ObjectiveStatusCounters objectiveStatusCounters;
private final HyperParameterTrainingJobSummary bestTrainingJob;
private final HyperParameterTrainingJobSummary overallBestTrainingJob;
private final HyperParameterTuningJobWarmStartConfig warmStartConfig;
private final Autotune autotune;
private final String failureReason;
private final HyperParameterTuningJobCompletionDetails tuningJobCompletionDetails;
private final HyperParameterTuningJobConsumedResources consumedResources;
private DescribeHyperParameterTuningJobResponse(BuilderImpl builder) {
super(builder);
this.hyperParameterTuningJobName = builder.hyperParameterTuningJobName;
this.hyperParameterTuningJobArn = builder.hyperParameterTuningJobArn;
this.hyperParameterTuningJobConfig = builder.hyperParameterTuningJobConfig;
this.trainingJobDefinition = builder.trainingJobDefinition;
this.trainingJobDefinitions = builder.trainingJobDefinitions;
this.hyperParameterTuningJobStatus = builder.hyperParameterTuningJobStatus;
this.creationTime = builder.creationTime;
this.hyperParameterTuningEndTime = builder.hyperParameterTuningEndTime;
this.lastModifiedTime = builder.lastModifiedTime;
this.trainingJobStatusCounters = builder.trainingJobStatusCounters;
this.objectiveStatusCounters = builder.objectiveStatusCounters;
this.bestTrainingJob = builder.bestTrainingJob;
this.overallBestTrainingJob = builder.overallBestTrainingJob;
this.warmStartConfig = builder.warmStartConfig;
this.autotune = builder.autotune;
this.failureReason = builder.failureReason;
this.tuningJobCompletionDetails = builder.tuningJobCompletionDetails;
this.consumedResources = builder.consumedResources;
}
/**
*
* The name of the hyperparameter tuning job.
*
*
* @return The name of the hyperparameter tuning job.
*/
public final String hyperParameterTuningJobName() {
return hyperParameterTuningJobName;
}
/**
*
* The Amazon Resource Name (ARN) of the tuning job.
*
*
* @return The Amazon Resource Name (ARN) of the tuning job.
*/
public final String hyperParameterTuningJobArn() {
return hyperParameterTuningJobArn;
}
/**
*
* The
* HyperParameterTuningJobConfig object that specifies the configuration of the tuning job.
*
*
* @return The HyperParameterTuningJobConfig object that specifies the configuration of the tuning job.
*/
public final HyperParameterTuningJobConfig hyperParameterTuningJobConfig() {
return hyperParameterTuningJobConfig;
}
/**
*
* The HyperParameterTrainingJobDefinition object that specifies the definition of the training jobs that this
* tuning job launches.
*
*
* @return The HyperParameterTrainingJobDefinition object that specifies the definition of the training jobs that
* this tuning job launches.
*/
public final HyperParameterTrainingJobDefinition trainingJobDefinition() {
return trainingJobDefinition;
}
/**
* For responses, this returns true if the service returned a value for the TrainingJobDefinitions property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasTrainingJobDefinitions() {
return trainingJobDefinitions != null && !(trainingJobDefinitions instanceof SdkAutoConstructList);
}
/**
*
* A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTrainingJobDefinitions} method.
*
*
* @return A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job.
*/
public final List trainingJobDefinitions() {
return trainingJobDefinitions;
}
/**
*
* The status of the tuning job.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #hyperParameterTuningJobStatus} will return {@link HyperParameterTuningJobStatus#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #hyperParameterTuningJobStatusAsString}.
*
*
* @return The status of the tuning job.
* @see HyperParameterTuningJobStatus
*/
public final HyperParameterTuningJobStatus hyperParameterTuningJobStatus() {
return HyperParameterTuningJobStatus.fromValue(hyperParameterTuningJobStatus);
}
/**
*
* The status of the tuning job.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #hyperParameterTuningJobStatus} will return {@link HyperParameterTuningJobStatus#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #hyperParameterTuningJobStatusAsString}.
*
*
* @return The status of the tuning job.
* @see HyperParameterTuningJobStatus
*/
public final String hyperParameterTuningJobStatusAsString() {
return hyperParameterTuningJobStatus;
}
/**
*
* The date and time that the tuning job started.
*
*
* @return The date and time that the tuning job started.
*/
public final Instant creationTime() {
return creationTime;
}
/**
*
* The date and time that the tuning job ended.
*
*
* @return The date and time that the tuning job ended.
*/
public final Instant hyperParameterTuningEndTime() {
return hyperParameterTuningEndTime;
}
/**
*
* The date and time that the status of the tuning job was modified.
*
*
* @return The date and time that the status of the tuning job was modified.
*/
public final Instant lastModifiedTime() {
return lastModifiedTime;
}
/**
*
* The
* TrainingJobStatusCounters object that specifies the number of training jobs, categorized by status, that this
* tuning job launched.
*
*
* @return The TrainingJobStatusCounters object that specifies the number of training jobs, categorized by status,
* that this tuning job launched.
*/
public final TrainingJobStatusCounters trainingJobStatusCounters() {
return trainingJobStatusCounters;
}
/**
*
* The
* ObjectiveStatusCounters object that specifies the number of training jobs, categorized by the status of their
* final objective metric, that this tuning job launched.
*
*
* @return The
* ObjectiveStatusCounters object that specifies the number of training jobs, categorized by the status
* of their final objective metric, that this tuning job launched.
*/
public final ObjectiveStatusCounters objectiveStatusCounters() {
return objectiveStatusCounters;
}
/**
*
* A TrainingJobSummary
* object that describes the training job that completed with the best current HyperParameterTuningJobObjective.
*
*
* @return A TrainingJobSummary
* object that describes the training job that completed with the best current HyperParameterTuningJobObjective.
*/
public final HyperParameterTrainingJobSummary bestTrainingJob() {
return bestTrainingJob;
}
/**
*
* If the hyperparameter tuning job is an warm start tuning job with a WarmStartType
of
* IDENTICAL_DATA_AND_ALGORITHM
, this is the TrainingJobSummary for the training job with the best objective metric value of all training jobs launched
* by this tuning job and all parent jobs specified for the warm start tuning job.
*
*
* @return If the hyperparameter tuning job is an warm start tuning job with a WarmStartType
of
* IDENTICAL_DATA_AND_ALGORITHM
, this is the TrainingJobSummary for the training job with the best objective metric value of all training jobs
* launched by this tuning job and all parent jobs specified for the warm start tuning job.
*/
public final HyperParameterTrainingJobSummary overallBestTrainingJob() {
return overallBestTrainingJob;
}
/**
*
* The configuration for starting the hyperparameter parameter tuning job using one or more previous tuning jobs as
* a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to
* search over in the new tuning job.
*
*
* @return The configuration for starting the hyperparameter parameter tuning job using one or more previous tuning
* jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of
* hyperparameters to search over in the new tuning job.
*/
public final HyperParameterTuningJobWarmStartConfig warmStartConfig() {
return warmStartConfig;
}
/**
*
* A flag to indicate if autotune is enabled for the hyperparameter tuning job.
*
*
* @return A flag to indicate if autotune is enabled for the hyperparameter tuning job.
*/
public final Autotune autotune() {
return autotune;
}
/**
*
* If the tuning job failed, the reason it failed.
*
*
* @return If the tuning job failed, the reason it failed.
*/
public final String failureReason() {
return failureReason;
}
/**
*
* Tuning job completion information returned as the response from a hyperparameter tuning job. This information
* tells if your tuning job has or has not converged. It also includes the number of training jobs that have not
* improved model performance as evaluated against the objective function.
*
*
* @return Tuning job completion information returned as the response from a hyperparameter tuning job. This
* information tells if your tuning job has or has not converged. It also includes the number of training
* jobs that have not improved model performance as evaluated against the objective function.
*/
public final HyperParameterTuningJobCompletionDetails tuningJobCompletionDetails() {
return tuningJobCompletionDetails;
}
/**
* Returns the value of the ConsumedResources property for this object.
*
* @return The value of the ConsumedResources property for this object.
*/
public final HyperParameterTuningJobConsumedResources consumedResources() {
return consumedResources;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(hyperParameterTuningJobName());
hashCode = 31 * hashCode + Objects.hashCode(hyperParameterTuningJobArn());
hashCode = 31 * hashCode + Objects.hashCode(hyperParameterTuningJobConfig());
hashCode = 31 * hashCode + Objects.hashCode(trainingJobDefinition());
hashCode = 31 * hashCode + Objects.hashCode(hasTrainingJobDefinitions() ? trainingJobDefinitions() : null);
hashCode = 31 * hashCode + Objects.hashCode(hyperParameterTuningJobStatusAsString());
hashCode = 31 * hashCode + Objects.hashCode(creationTime());
hashCode = 31 * hashCode + Objects.hashCode(hyperParameterTuningEndTime());
hashCode = 31 * hashCode + Objects.hashCode(lastModifiedTime());
hashCode = 31 * hashCode + Objects.hashCode(trainingJobStatusCounters());
hashCode = 31 * hashCode + Objects.hashCode(objectiveStatusCounters());
hashCode = 31 * hashCode + Objects.hashCode(bestTrainingJob());
hashCode = 31 * hashCode + Objects.hashCode(overallBestTrainingJob());
hashCode = 31 * hashCode + Objects.hashCode(warmStartConfig());
hashCode = 31 * hashCode + Objects.hashCode(autotune());
hashCode = 31 * hashCode + Objects.hashCode(failureReason());
hashCode = 31 * hashCode + Objects.hashCode(tuningJobCompletionDetails());
hashCode = 31 * hashCode + Objects.hashCode(consumedResources());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof DescribeHyperParameterTuningJobResponse)) {
return false;
}
DescribeHyperParameterTuningJobResponse other = (DescribeHyperParameterTuningJobResponse) obj;
return Objects.equals(hyperParameterTuningJobName(), other.hyperParameterTuningJobName())
&& Objects.equals(hyperParameterTuningJobArn(), other.hyperParameterTuningJobArn())
&& Objects.equals(hyperParameterTuningJobConfig(), other.hyperParameterTuningJobConfig())
&& Objects.equals(trainingJobDefinition(), other.trainingJobDefinition())
&& hasTrainingJobDefinitions() == other.hasTrainingJobDefinitions()
&& Objects.equals(trainingJobDefinitions(), other.trainingJobDefinitions())
&& Objects.equals(hyperParameterTuningJobStatusAsString(), other.hyperParameterTuningJobStatusAsString())
&& Objects.equals(creationTime(), other.creationTime())
&& Objects.equals(hyperParameterTuningEndTime(), other.hyperParameterTuningEndTime())
&& Objects.equals(lastModifiedTime(), other.lastModifiedTime())
&& Objects.equals(trainingJobStatusCounters(), other.trainingJobStatusCounters())
&& Objects.equals(objectiveStatusCounters(), other.objectiveStatusCounters())
&& Objects.equals(bestTrainingJob(), other.bestTrainingJob())
&& Objects.equals(overallBestTrainingJob(), other.overallBestTrainingJob())
&& Objects.equals(warmStartConfig(), other.warmStartConfig()) && Objects.equals(autotune(), other.autotune())
&& Objects.equals(failureReason(), other.failureReason())
&& Objects.equals(tuningJobCompletionDetails(), other.tuningJobCompletionDetails())
&& Objects.equals(consumedResources(), other.consumedResources());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("DescribeHyperParameterTuningJobResponse")
.add("HyperParameterTuningJobName", hyperParameterTuningJobName())
.add("HyperParameterTuningJobArn", hyperParameterTuningJobArn())
.add("HyperParameterTuningJobConfig", hyperParameterTuningJobConfig())
.add("TrainingJobDefinition", trainingJobDefinition())
.add("TrainingJobDefinitions", hasTrainingJobDefinitions() ? trainingJobDefinitions() : null)
.add("HyperParameterTuningJobStatus", hyperParameterTuningJobStatusAsString())
.add("CreationTime", creationTime()).add("HyperParameterTuningEndTime", hyperParameterTuningEndTime())
.add("LastModifiedTime", lastModifiedTime()).add("TrainingJobStatusCounters", trainingJobStatusCounters())
.add("ObjectiveStatusCounters", objectiveStatusCounters()).add("BestTrainingJob", bestTrainingJob())
.add("OverallBestTrainingJob", overallBestTrainingJob()).add("WarmStartConfig", warmStartConfig())
.add("Autotune", autotune()).add("FailureReason", failureReason())
.add("TuningJobCompletionDetails", tuningJobCompletionDetails()).add("ConsumedResources", consumedResources())
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "HyperParameterTuningJobName":
return Optional.ofNullable(clazz.cast(hyperParameterTuningJobName()));
case "HyperParameterTuningJobArn":
return Optional.ofNullable(clazz.cast(hyperParameterTuningJobArn()));
case "HyperParameterTuningJobConfig":
return Optional.ofNullable(clazz.cast(hyperParameterTuningJobConfig()));
case "TrainingJobDefinition":
return Optional.ofNullable(clazz.cast(trainingJobDefinition()));
case "TrainingJobDefinitions":
return Optional.ofNullable(clazz.cast(trainingJobDefinitions()));
case "HyperParameterTuningJobStatus":
return Optional.ofNullable(clazz.cast(hyperParameterTuningJobStatusAsString()));
case "CreationTime":
return Optional.ofNullable(clazz.cast(creationTime()));
case "HyperParameterTuningEndTime":
return Optional.ofNullable(clazz.cast(hyperParameterTuningEndTime()));
case "LastModifiedTime":
return Optional.ofNullable(clazz.cast(lastModifiedTime()));
case "TrainingJobStatusCounters":
return Optional.ofNullable(clazz.cast(trainingJobStatusCounters()));
case "ObjectiveStatusCounters":
return Optional.ofNullable(clazz.cast(objectiveStatusCounters()));
case "BestTrainingJob":
return Optional.ofNullable(clazz.cast(bestTrainingJob()));
case "OverallBestTrainingJob":
return Optional.ofNullable(clazz.cast(overallBestTrainingJob()));
case "WarmStartConfig":
return Optional.ofNullable(clazz.cast(warmStartConfig()));
case "Autotune":
return Optional.ofNullable(clazz.cast(autotune()));
case "FailureReason":
return Optional.ofNullable(clazz.cast(failureReason()));
case "TuningJobCompletionDetails":
return Optional.ofNullable(clazz.cast(tuningJobCompletionDetails()));
case "ConsumedResources":
return Optional.ofNullable(clazz.cast(consumedResources()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function