com.amazonaws.services.personalize.model.HPOConfig Maven / Gradle / Ivy
Show all versions of aws-java-sdk-personalize Show documentation
/*
* Copyright 2019-2024 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 com.amazonaws.services.personalize.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes the properties for hyperparameter optimization (HPO).
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class HPOConfig implements Serializable, Cloneable, StructuredPojo {
/**
*
* The metric to optimize during HPO.
*
*
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*
*/
private HPOObjective hpoObjective;
/**
*
* Describes the resource configuration for HPO.
*
*/
private HPOResourceConfig hpoResourceConfig;
/**
*
* The hyperparameters and their allowable ranges.
*
*/
private HyperParameterRanges algorithmHyperParameterRanges;
/**
*
* The metric to optimize during HPO.
*
*
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*
*
* @param hpoObjective
* The metric to optimize during HPO.
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*/
public void setHpoObjective(HPOObjective hpoObjective) {
this.hpoObjective = hpoObjective;
}
/**
*
* The metric to optimize during HPO.
*
*
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*
*
* @return The metric to optimize during HPO.
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*/
public HPOObjective getHpoObjective() {
return this.hpoObjective;
}
/**
*
* The metric to optimize during HPO.
*
*
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
*
*
* @param hpoObjective
* The metric to optimize during HPO.
*
* Amazon Personalize doesn't support configuring the hpoObjective
at this time.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HPOConfig withHpoObjective(HPOObjective hpoObjective) {
setHpoObjective(hpoObjective);
return this;
}
/**
*
* Describes the resource configuration for HPO.
*
*
* @param hpoResourceConfig
* Describes the resource configuration for HPO.
*/
public void setHpoResourceConfig(HPOResourceConfig hpoResourceConfig) {
this.hpoResourceConfig = hpoResourceConfig;
}
/**
*
* Describes the resource configuration for HPO.
*
*
* @return Describes the resource configuration for HPO.
*/
public HPOResourceConfig getHpoResourceConfig() {
return this.hpoResourceConfig;
}
/**
*
* Describes the resource configuration for HPO.
*
*
* @param hpoResourceConfig
* Describes the resource configuration for HPO.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HPOConfig withHpoResourceConfig(HPOResourceConfig hpoResourceConfig) {
setHpoResourceConfig(hpoResourceConfig);
return this;
}
/**
*
* The hyperparameters and their allowable ranges.
*
*
* @param algorithmHyperParameterRanges
* The hyperparameters and their allowable ranges.
*/
public void setAlgorithmHyperParameterRanges(HyperParameterRanges algorithmHyperParameterRanges) {
this.algorithmHyperParameterRanges = algorithmHyperParameterRanges;
}
/**
*
* The hyperparameters and their allowable ranges.
*
*
* @return The hyperparameters and their allowable ranges.
*/
public HyperParameterRanges getAlgorithmHyperParameterRanges() {
return this.algorithmHyperParameterRanges;
}
/**
*
* The hyperparameters and their allowable ranges.
*
*
* @param algorithmHyperParameterRanges
* The hyperparameters and their allowable ranges.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HPOConfig withAlgorithmHyperParameterRanges(HyperParameterRanges algorithmHyperParameterRanges) {
setAlgorithmHyperParameterRanges(algorithmHyperParameterRanges);
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getHpoObjective() != null)
sb.append("HpoObjective: ").append(getHpoObjective()).append(",");
if (getHpoResourceConfig() != null)
sb.append("HpoResourceConfig: ").append(getHpoResourceConfig()).append(",");
if (getAlgorithmHyperParameterRanges() != null)
sb.append("AlgorithmHyperParameterRanges: ").append(getAlgorithmHyperParameterRanges());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof HPOConfig == false)
return false;
HPOConfig other = (HPOConfig) obj;
if (other.getHpoObjective() == null ^ this.getHpoObjective() == null)
return false;
if (other.getHpoObjective() != null && other.getHpoObjective().equals(this.getHpoObjective()) == false)
return false;
if (other.getHpoResourceConfig() == null ^ this.getHpoResourceConfig() == null)
return false;
if (other.getHpoResourceConfig() != null && other.getHpoResourceConfig().equals(this.getHpoResourceConfig()) == false)
return false;
if (other.getAlgorithmHyperParameterRanges() == null ^ this.getAlgorithmHyperParameterRanges() == null)
return false;
if (other.getAlgorithmHyperParameterRanges() != null
&& other.getAlgorithmHyperParameterRanges().equals(this.getAlgorithmHyperParameterRanges()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getHpoObjective() == null) ? 0 : getHpoObjective().hashCode());
hashCode = prime * hashCode + ((getHpoResourceConfig() == null) ? 0 : getHpoResourceConfig().hashCode());
hashCode = prime * hashCode + ((getAlgorithmHyperParameterRanges() == null) ? 0 : getAlgorithmHyperParameterRanges().hashCode());
return hashCode;
}
@Override
public HPOConfig clone() {
try {
return (HPOConfig) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.personalize.model.transform.HPOConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}