com.amazonaws.services.forecast.model.ParameterRanges Maven / Gradle / Ivy
Show all versions of aws-java-sdk-forecast 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.forecast.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies the categorical, continuous, and integer hyperparameters, and their ranges of tunable values. The range of
* tunable values determines which values that a hyperparameter tuning job can choose for the specified hyperparameter.
* This object is part of the HyperParameterTuningJobConfig object.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ParameterRanges implements Serializable, Cloneable, StructuredPojo {
/**
*
* Specifies the tunable range for each categorical hyperparameter.
*
*/
private java.util.List categoricalParameterRanges;
/**
*
* Specifies the tunable range for each continuous hyperparameter.
*
*/
private java.util.List continuousParameterRanges;
/**
*
* Specifies the tunable range for each integer hyperparameter.
*
*/
private java.util.List integerParameterRanges;
/**
*
* Specifies the tunable range for each categorical hyperparameter.
*
*
* @return Specifies the tunable range for each categorical hyperparameter.
*/
public java.util.List getCategoricalParameterRanges() {
return categoricalParameterRanges;
}
/**
*
* Specifies the tunable range for each categorical hyperparameter.
*
*
* @param categoricalParameterRanges
* Specifies the tunable range for each categorical hyperparameter.
*/
public void setCategoricalParameterRanges(java.util.Collection categoricalParameterRanges) {
if (categoricalParameterRanges == null) {
this.categoricalParameterRanges = null;
return;
}
this.categoricalParameterRanges = new java.util.ArrayList(categoricalParameterRanges);
}
/**
*
* Specifies the tunable range for each categorical hyperparameter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCategoricalParameterRanges(java.util.Collection)} or
* {@link #withCategoricalParameterRanges(java.util.Collection)} if you want to override the existing values.
*
*
* @param categoricalParameterRanges
* Specifies the tunable range for each categorical hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withCategoricalParameterRanges(CategoricalParameterRange... categoricalParameterRanges) {
if (this.categoricalParameterRanges == null) {
setCategoricalParameterRanges(new java.util.ArrayList(categoricalParameterRanges.length));
}
for (CategoricalParameterRange ele : categoricalParameterRanges) {
this.categoricalParameterRanges.add(ele);
}
return this;
}
/**
*
* Specifies the tunable range for each categorical hyperparameter.
*
*
* @param categoricalParameterRanges
* Specifies the tunable range for each categorical hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withCategoricalParameterRanges(java.util.Collection categoricalParameterRanges) {
setCategoricalParameterRanges(categoricalParameterRanges);
return this;
}
/**
*
* Specifies the tunable range for each continuous hyperparameter.
*
*
* @return Specifies the tunable range for each continuous hyperparameter.
*/
public java.util.List getContinuousParameterRanges() {
return continuousParameterRanges;
}
/**
*
* Specifies the tunable range for each continuous hyperparameter.
*
*
* @param continuousParameterRanges
* Specifies the tunable range for each continuous hyperparameter.
*/
public void setContinuousParameterRanges(java.util.Collection continuousParameterRanges) {
if (continuousParameterRanges == null) {
this.continuousParameterRanges = null;
return;
}
this.continuousParameterRanges = new java.util.ArrayList(continuousParameterRanges);
}
/**
*
* Specifies the tunable range for each continuous hyperparameter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContinuousParameterRanges(java.util.Collection)} or
* {@link #withContinuousParameterRanges(java.util.Collection)} if you want to override the existing values.
*
*
* @param continuousParameterRanges
* Specifies the tunable range for each continuous hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withContinuousParameterRanges(ContinuousParameterRange... continuousParameterRanges) {
if (this.continuousParameterRanges == null) {
setContinuousParameterRanges(new java.util.ArrayList(continuousParameterRanges.length));
}
for (ContinuousParameterRange ele : continuousParameterRanges) {
this.continuousParameterRanges.add(ele);
}
return this;
}
/**
*
* Specifies the tunable range for each continuous hyperparameter.
*
*
* @param continuousParameterRanges
* Specifies the tunable range for each continuous hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withContinuousParameterRanges(java.util.Collection continuousParameterRanges) {
setContinuousParameterRanges(continuousParameterRanges);
return this;
}
/**
*
* Specifies the tunable range for each integer hyperparameter.
*
*
* @return Specifies the tunable range for each integer hyperparameter.
*/
public java.util.List getIntegerParameterRanges() {
return integerParameterRanges;
}
/**
*
* Specifies the tunable range for each integer hyperparameter.
*
*
* @param integerParameterRanges
* Specifies the tunable range for each integer hyperparameter.
*/
public void setIntegerParameterRanges(java.util.Collection integerParameterRanges) {
if (integerParameterRanges == null) {
this.integerParameterRanges = null;
return;
}
this.integerParameterRanges = new java.util.ArrayList(integerParameterRanges);
}
/**
*
* Specifies the tunable range for each integer hyperparameter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIntegerParameterRanges(java.util.Collection)} or
* {@link #withIntegerParameterRanges(java.util.Collection)} if you want to override the existing values.
*
*
* @param integerParameterRanges
* Specifies the tunable range for each integer hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withIntegerParameterRanges(IntegerParameterRange... integerParameterRanges) {
if (this.integerParameterRanges == null) {
setIntegerParameterRanges(new java.util.ArrayList(integerParameterRanges.length));
}
for (IntegerParameterRange ele : integerParameterRanges) {
this.integerParameterRanges.add(ele);
}
return this;
}
/**
*
* Specifies the tunable range for each integer hyperparameter.
*
*
* @param integerParameterRanges
* Specifies the tunable range for each integer hyperparameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ParameterRanges withIntegerParameterRanges(java.util.Collection integerParameterRanges) {
setIntegerParameterRanges(integerParameterRanges);
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 (getCategoricalParameterRanges() != null)
sb.append("CategoricalParameterRanges: ").append(getCategoricalParameterRanges()).append(",");
if (getContinuousParameterRanges() != null)
sb.append("ContinuousParameterRanges: ").append(getContinuousParameterRanges()).append(",");
if (getIntegerParameterRanges() != null)
sb.append("IntegerParameterRanges: ").append(getIntegerParameterRanges());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ParameterRanges == false)
return false;
ParameterRanges other = (ParameterRanges) obj;
if (other.getCategoricalParameterRanges() == null ^ this.getCategoricalParameterRanges() == null)
return false;
if (other.getCategoricalParameterRanges() != null && other.getCategoricalParameterRanges().equals(this.getCategoricalParameterRanges()) == false)
return false;
if (other.getContinuousParameterRanges() == null ^ this.getContinuousParameterRanges() == null)
return false;
if (other.getContinuousParameterRanges() != null && other.getContinuousParameterRanges().equals(this.getContinuousParameterRanges()) == false)
return false;
if (other.getIntegerParameterRanges() == null ^ this.getIntegerParameterRanges() == null)
return false;
if (other.getIntegerParameterRanges() != null && other.getIntegerParameterRanges().equals(this.getIntegerParameterRanges()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCategoricalParameterRanges() == null) ? 0 : getCategoricalParameterRanges().hashCode());
hashCode = prime * hashCode + ((getContinuousParameterRanges() == null) ? 0 : getContinuousParameterRanges().hashCode());
hashCode = prime * hashCode + ((getIntegerParameterRanges() == null) ? 0 : getIntegerParameterRanges().hashCode());
return hashCode;
}
@Override
public ParameterRanges clone() {
try {
return (ParameterRanges) 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.forecast.model.transform.ParameterRangesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}