/* * Copyright 2018-2023 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 configuration properties for the solution. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SolutionConfig implements Serializable, Cloneable, StructuredPojo { /** ** Only events with a value greater than or equal to this threshold are used for training a model. *
*/ private String eventValueThreshold; /** ** Describes the properties for hyperparameter optimization (HPO). *
*/ private HPOConfig hpoConfig; /** ** Lists the hyperparameter names and ranges. *
*/ private java.util.Map* Lists the feature transformation parameters. *
*/ private java.util.Map* The AutoMLConfig object * containing a list of recipes to search when AutoML is performed. *
*/ private AutoMLConfig autoMLConfig; /** ** Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. * For more information see Optimizing a * solution. *
*/ private OptimizationObjective optimizationObjective; /** ** Specifies the training data configuration to use when creating a custom solution version (trained model). *
*/ private TrainingDataConfig trainingDataConfig; /** ** Only events with a value greater than or equal to this threshold are used for training a model. *
* * @param eventValueThreshold * Only events with a value greater than or equal to this threshold are used for training a model. */ public void setEventValueThreshold(String eventValueThreshold) { this.eventValueThreshold = eventValueThreshold; } /** ** Only events with a value greater than or equal to this threshold are used for training a model. *
* * @return Only events with a value greater than or equal to this threshold are used for training a model. */ public String getEventValueThreshold() { return this.eventValueThreshold; } /** ** Only events with a value greater than or equal to this threshold are used for training a model. *
* * @param eventValueThreshold * Only events with a value greater than or equal to this threshold are used for training a model. * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withEventValueThreshold(String eventValueThreshold) { setEventValueThreshold(eventValueThreshold); return this; } /** ** Describes the properties for hyperparameter optimization (HPO). *
* * @param hpoConfig * Describes the properties for hyperparameter optimization (HPO). */ public void setHpoConfig(HPOConfig hpoConfig) { this.hpoConfig = hpoConfig; } /** ** Describes the properties for hyperparameter optimization (HPO). *
* * @return Describes the properties for hyperparameter optimization (HPO). */ public HPOConfig getHpoConfig() { return this.hpoConfig; } /** ** Describes the properties for hyperparameter optimization (HPO). *
* * @param hpoConfig * Describes the properties for hyperparameter optimization (HPO). * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withHpoConfig(HPOConfig hpoConfig) { setHpoConfig(hpoConfig); return this; } /** ** Lists the hyperparameter names and ranges. *
* * @return Lists the hyperparameter names and ranges. */ public java.util.Map* Lists the hyperparameter names and ranges. *
* * @param algorithmHyperParameters * Lists the hyperparameter names and ranges. */ public void setAlgorithmHyperParameters(java.util.Map* Lists the hyperparameter names and ranges. *
* * @param algorithmHyperParameters * Lists the hyperparameter names and ranges. * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withAlgorithmHyperParameters(java.util.Map* Lists the feature transformation parameters. *
* * @return Lists the feature transformation parameters. */ public java.util.Map* Lists the feature transformation parameters. *
* * @param featureTransformationParameters * Lists the feature transformation parameters. */ public void setFeatureTransformationParameters(java.util.Map* Lists the feature transformation parameters. *
* * @param featureTransformationParameters * Lists the feature transformation parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withFeatureTransformationParameters(java.util.Map* The AutoMLConfig object * containing a list of recipes to search when AutoML is performed. *
* * @param autoMLConfig * The AutoMLConfig * object containing a list of recipes to search when AutoML is performed. */ public void setAutoMLConfig(AutoMLConfig autoMLConfig) { this.autoMLConfig = autoMLConfig; } /** ** The AutoMLConfig object * containing a list of recipes to search when AutoML is performed. *
* * @return The AutoMLConfig * object containing a list of recipes to search when AutoML is performed. */ public AutoMLConfig getAutoMLConfig() { return this.autoMLConfig; } /** ** The AutoMLConfig object * containing a list of recipes to search when AutoML is performed. *
* * @param autoMLConfig * The AutoMLConfig * object containing a list of recipes to search when AutoML is performed. * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withAutoMLConfig(AutoMLConfig autoMLConfig) { setAutoMLConfig(autoMLConfig); return this; } /** ** Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. * For more information see Optimizing a * solution. *
* * @param optimizationObjective * Describes the additional objective for the solution, such as maximizing streaming minutes or increasing * revenue. For more information see Optimizing * a solution. */ public void setOptimizationObjective(OptimizationObjective optimizationObjective) { this.optimizationObjective = optimizationObjective; } /** ** Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. * For more information see Optimizing a * solution. *
* * @return Describes the additional objective for the solution, such as maximizing streaming minutes or increasing * revenue. For more information see Optimizing a solution. */ public OptimizationObjective getOptimizationObjective() { return this.optimizationObjective; } /** ** Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. * For more information see Optimizing a * solution. *
* * @param optimizationObjective * Describes the additional objective for the solution, such as maximizing streaming minutes or increasing * revenue. For more information see Optimizing * a solution. * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withOptimizationObjective(OptimizationObjective optimizationObjective) { setOptimizationObjective(optimizationObjective); return this; } /** ** Specifies the training data configuration to use when creating a custom solution version (trained model). *
* * @param trainingDataConfig * Specifies the training data configuration to use when creating a custom solution version (trained model). */ public void setTrainingDataConfig(TrainingDataConfig trainingDataConfig) { this.trainingDataConfig = trainingDataConfig; } /** ** Specifies the training data configuration to use when creating a custom solution version (trained model). *
* * @return Specifies the training data configuration to use when creating a custom solution version (trained model). */ public TrainingDataConfig getTrainingDataConfig() { return this.trainingDataConfig; } /** ** Specifies the training data configuration to use when creating a custom solution version (trained model). *
* * @param trainingDataConfig * Specifies the training data configuration to use when creating a custom solution version (trained model). * @return Returns a reference to this object so that method calls can be chained together. */ public SolutionConfig withTrainingDataConfig(TrainingDataConfig trainingDataConfig) { setTrainingDataConfig(trainingDataConfig); 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 (getEventValueThreshold() != null) sb.append("EventValueThreshold: ").append(getEventValueThreshold()).append(","); if (getHpoConfig() != null) sb.append("HpoConfig: ").append(getHpoConfig()).append(","); if (getAlgorithmHyperParameters() != null) sb.append("AlgorithmHyperParameters: ").append(getAlgorithmHyperParameters()).append(","); if (getFeatureTransformationParameters() != null) sb.append("FeatureTransformationParameters: ").append(getFeatureTransformationParameters()).append(","); if (getAutoMLConfig() != null) sb.append("AutoMLConfig: ").append(getAutoMLConfig()).append(","); if (getOptimizationObjective() != null) sb.append("OptimizationObjective: ").append(getOptimizationObjective()).append(","); if (getTrainingDataConfig() != null) sb.append("TrainingDataConfig: ").append(getTrainingDataConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SolutionConfig == false) return false; SolutionConfig other = (SolutionConfig) obj; if (other.getEventValueThreshold() == null ^ this.getEventValueThreshold() == null) return false; if (other.getEventValueThreshold() != null && other.getEventValueThreshold().equals(this.getEventValueThreshold()) == false) return false; if (other.getHpoConfig() == null ^ this.getHpoConfig() == null) return false; if (other.getHpoConfig() != null && other.getHpoConfig().equals(this.getHpoConfig()) == false) return false; if (other.getAlgorithmHyperParameters() == null ^ this.getAlgorithmHyperParameters() == null) return false; if (other.getAlgorithmHyperParameters() != null && other.getAlgorithmHyperParameters().equals(this.getAlgorithmHyperParameters()) == false) return false; if (other.getFeatureTransformationParameters() == null ^ this.getFeatureTransformationParameters() == null) return false; if (other.getFeatureTransformationParameters() != null && other.getFeatureTransformationParameters().equals(this.getFeatureTransformationParameters()) == false) return false; if (other.getAutoMLConfig() == null ^ this.getAutoMLConfig() == null) return false; if (other.getAutoMLConfig() != null && other.getAutoMLConfig().equals(this.getAutoMLConfig()) == false) return false; if (other.getOptimizationObjective() == null ^ this.getOptimizationObjective() == null) return false; if (other.getOptimizationObjective() != null && other.getOptimizationObjective().equals(this.getOptimizationObjective()) == false) return false; if (other.getTrainingDataConfig() == null ^ this.getTrainingDataConfig() == null) return false; if (other.getTrainingDataConfig() != null && other.getTrainingDataConfig().equals(this.getTrainingDataConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEventValueThreshold() == null) ? 0 : getEventValueThreshold().hashCode()); hashCode = prime * hashCode + ((getHpoConfig() == null) ? 0 : getHpoConfig().hashCode()); hashCode = prime * hashCode + ((getAlgorithmHyperParameters() == null) ? 0 : getAlgorithmHyperParameters().hashCode()); hashCode = prime * hashCode + ((getFeatureTransformationParameters() == null) ? 0 : getFeatureTransformationParameters().hashCode()); hashCode = prime * hashCode + ((getAutoMLConfig() == null) ? 0 : getAutoMLConfig().hashCode()); hashCode = prime * hashCode + ((getOptimizationObjective() == null) ? 0 : getOptimizationObjective().hashCode()); hashCode = prime * hashCode + ((getTrainingDataConfig() == null) ? 0 : getTrainingDataConfig().hashCode()); return hashCode; } @Override public SolutionConfig clone() { try { return (SolutionConfig) 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.SolutionConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }