/* * 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.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateSolutionVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the solution version. *

*/ private String name; /** *

* The Amazon Resource Name (ARN) of the solution containing the training configuration information. *

*/ private String solutionArn; /** *

* The scope of training to be performed when creating the solution version. The FULL option trains the * solution version based on the entirety of the input solution's training data, while the UPDATE * option processes only the data that has changed in comparison to the input solution. Choose UPDATE * when you want to incrementally update your solution version instead of creating an entirely new one. *

* *

* The UPDATE option can only be used when you already have an active solution version created from the * input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the HRNN-Coldstart * recipe. *

*
*/ private String trainingMode; /** *

* A list of tags to apply to * the solution version. *

*/ private java.util.List tags; /** *

* The name of the solution version. *

* * @param name * The name of the solution version. */ public void setName(String name) { this.name = name; } /** *

* The name of the solution version. *

* * @return The name of the solution version. */ public String getName() { return this.name; } /** *

* The name of the solution version. *

* * @param name * The name of the solution version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSolutionVersionRequest withName(String name) { setName(name); return this; } /** *

* The Amazon Resource Name (ARN) of the solution containing the training configuration information. *

* * @param solutionArn * The Amazon Resource Name (ARN) of the solution containing the training configuration information. */ public void setSolutionArn(String solutionArn) { this.solutionArn = solutionArn; } /** *

* The Amazon Resource Name (ARN) of the solution containing the training configuration information. *

* * @return The Amazon Resource Name (ARN) of the solution containing the training configuration information. */ public String getSolutionArn() { return this.solutionArn; } /** *

* The Amazon Resource Name (ARN) of the solution containing the training configuration information. *

* * @param solutionArn * The Amazon Resource Name (ARN) of the solution containing the training configuration information. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSolutionVersionRequest withSolutionArn(String solutionArn) { setSolutionArn(solutionArn); return this; } /** *

* The scope of training to be performed when creating the solution version. The FULL option trains the * solution version based on the entirety of the input solution's training data, while the UPDATE * option processes only the data that has changed in comparison to the input solution. Choose UPDATE * when you want to incrementally update your solution version instead of creating an entirely new one. *

* *

* The UPDATE option can only be used when you already have an active solution version created from the * input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the HRNN-Coldstart * recipe. *

*
* * @param trainingMode * The scope of training to be performed when creating the solution version. The FULL option * trains the solution version based on the entirety of the input solution's training data, while the * UPDATE option processes only the data that has changed in comparison to the input solution. * Choose UPDATE when you want to incrementally update your solution version instead of creating * an entirely new one.

*

* The UPDATE option can only be used when you already have an active solution version created * from the input solution using the FULL option and the input solution was trained with the * User-Personalization recipe or the HRNN-Coldstart recipe. *

* @see TrainingMode */ public void setTrainingMode(String trainingMode) { this.trainingMode = trainingMode; } /** *

* The scope of training to be performed when creating the solution version. The FULL option trains the * solution version based on the entirety of the input solution's training data, while the UPDATE * option processes only the data that has changed in comparison to the input solution. Choose UPDATE * when you want to incrementally update your solution version instead of creating an entirely new one. *

* *

* The UPDATE option can only be used when you already have an active solution version created from the * input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the HRNN-Coldstart * recipe. *

*
* * @return The scope of training to be performed when creating the solution version. The FULL option * trains the solution version based on the entirety of the input solution's training data, while the * UPDATE option processes only the data that has changed in comparison to the input solution. * Choose UPDATE when you want to incrementally update your solution version instead of * creating an entirely new one.

*

* The UPDATE option can only be used when you already have an active solution version created * from the input solution using the FULL option and the input solution was trained with the * User-Personalization recipe or the HRNN-Coldstart recipe. *

* @see TrainingMode */ public String getTrainingMode() { return this.trainingMode; } /** *

* The scope of training to be performed when creating the solution version. The FULL option trains the * solution version based on the entirety of the input solution's training data, while the UPDATE * option processes only the data that has changed in comparison to the input solution. Choose UPDATE * when you want to incrementally update your solution version instead of creating an entirely new one. *

* *

* The UPDATE option can only be used when you already have an active solution version created from the * input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the HRNN-Coldstart * recipe. *

*
* * @param trainingMode * The scope of training to be performed when creating the solution version. The FULL option * trains the solution version based on the entirety of the input solution's training data, while the * UPDATE option processes only the data that has changed in comparison to the input solution. * Choose UPDATE when you want to incrementally update your solution version instead of creating * an entirely new one.

*

* The UPDATE option can only be used when you already have an active solution version created * from the input solution using the FULL option and the input solution was trained with the * User-Personalization recipe or the HRNN-Coldstart recipe. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TrainingMode */ public CreateSolutionVersionRequest withTrainingMode(String trainingMode) { setTrainingMode(trainingMode); return this; } /** *

* The scope of training to be performed when creating the solution version. The FULL option trains the * solution version based on the entirety of the input solution's training data, while the UPDATE * option processes only the data that has changed in comparison to the input solution. Choose UPDATE * when you want to incrementally update your solution version instead of creating an entirely new one. *

* *

* The UPDATE option can only be used when you already have an active solution version created from the * input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the HRNN-Coldstart * recipe. *

*
* * @param trainingMode * The scope of training to be performed when creating the solution version. The FULL option * trains the solution version based on the entirety of the input solution's training data, while the * UPDATE option processes only the data that has changed in comparison to the input solution. * Choose UPDATE when you want to incrementally update your solution version instead of creating * an entirely new one.

*

* The UPDATE option can only be used when you already have an active solution version created * from the input solution using the FULL option and the input solution was trained with the * User-Personalization recipe or the HRNN-Coldstart recipe. *

* @return Returns a reference to this object so that method calls can be chained together. * @see TrainingMode */ public CreateSolutionVersionRequest withTrainingMode(TrainingMode trainingMode) { this.trainingMode = trainingMode.toString(); return this; } /** *

* A list of tags to apply to * the solution version. *

* * @return A list of tags to * apply to the solution version. */ public java.util.List getTags() { return tags; } /** *

* A list of tags to apply to * the solution version. *

* * @param tags * A list of tags to * apply to the solution version. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of tags to apply to * the solution version. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * A list of tags to * apply to the solution version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSolutionVersionRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of tags to apply to * the solution version. *

* * @param tags * A list of tags to * apply to the solution version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSolutionVersionRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSolutionArn() != null) sb.append("SolutionArn: ").append(getSolutionArn()).append(","); if (getTrainingMode() != null) sb.append("TrainingMode: ").append(getTrainingMode()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateSolutionVersionRequest == false) return false; CreateSolutionVersionRequest other = (CreateSolutionVersionRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSolutionArn() == null ^ this.getSolutionArn() == null) return false; if (other.getSolutionArn() != null && other.getSolutionArn().equals(this.getSolutionArn()) == false) return false; if (other.getTrainingMode() == null ^ this.getTrainingMode() == null) return false; if (other.getTrainingMode() != null && other.getTrainingMode().equals(this.getTrainingMode()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSolutionArn() == null) ? 0 : getSolutionArn().hashCode()); hashCode = prime * hashCode + ((getTrainingMode() == null) ? 0 : getTrainingMode().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateSolutionVersionRequest clone() { return (CreateSolutionVersionRequest) super.clone(); } }