/* * 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.sagemaker.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 StopInferenceExperimentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the inference experiment to stop. *
*/ private String name; /** ** Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following: *
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* An array of ModelVariantConfig
objects. There is one for each variant that you want to deploy after
* the inference experiment stops. Each ModelVariantConfig
describes the infrastructure configuration
* for deploying the corresponding variant.
*
* The desired state of the experiment after stopping. The possible states are the following: *
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* The reason for stopping the experiment. *
*/ private String reason; /** ** The name of the inference experiment to stop. *
* * @param name * The name of the inference experiment to stop. */ public void setName(String name) { this.name = name; } /** ** The name of the inference experiment to stop. *
* * @return The name of the inference experiment to stop. */ public String getName() { return this.name; } /** ** The name of the inference experiment to stop. *
* * @param name * The name of the inference experiment to stop. * @return Returns a reference to this object so that method calls can be chained together. */ public StopInferenceExperimentRequest withName(String name) { setName(name); return this; } /** ** Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following: *
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following: *
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following: *
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* Promote
- Promote the shadow variant to a production variant
*
* Remove
- Delete the variant
*
* Retain
- Keep the variant as it is
*
* An array of ModelVariantConfig
objects. There is one for each variant that you want to deploy after
* the inference experiment stops. Each ModelVariantConfig
describes the infrastructure configuration
* for deploying the corresponding variant.
*
ModelVariantConfig
objects. There is one for each variant that you want to
* deploy after the inference experiment stops. Each ModelVariantConfig
describes the
* infrastructure configuration for deploying the corresponding variant.
*/
public java.util.List
* An array of ModelVariantConfig
objects. There is one for each variant that you want to deploy after
* the inference experiment stops. Each ModelVariantConfig
describes the infrastructure configuration
* for deploying the corresponding variant.
*
ModelVariantConfig
objects. There is one for each variant that you want to deploy
* after the inference experiment stops. Each ModelVariantConfig
describes the infrastructure
* configuration for deploying the corresponding variant.
*/
public void setDesiredModelVariants(java.util.Collection
* An array of ModelVariantConfig
objects. There is one for each variant that you want to deploy after
* the inference experiment stops. Each ModelVariantConfig
describes the infrastructure configuration
* for deploying the corresponding variant.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDesiredModelVariants(java.util.Collection)} or {@link #withDesiredModelVariants(java.util.Collection)} * if you want to override the existing values. *
* * @param desiredModelVariants * An array ofModelVariantConfig
objects. There is one for each variant that you want to deploy
* after the inference experiment stops. Each ModelVariantConfig
describes the infrastructure
* configuration for deploying the corresponding variant.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StopInferenceExperimentRequest withDesiredModelVariants(ModelVariantConfig... desiredModelVariants) {
if (this.desiredModelVariants == null) {
setDesiredModelVariants(new java.util.ArrayList
* An array of ModelVariantConfig
objects. There is one for each variant that you want to deploy after
* the inference experiment stops. Each ModelVariantConfig
describes the infrastructure configuration
* for deploying the corresponding variant.
*
ModelVariantConfig
objects. There is one for each variant that you want to deploy
* after the inference experiment stops. Each ModelVariantConfig
describes the infrastructure
* configuration for deploying the corresponding variant.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StopInferenceExperimentRequest withDesiredModelVariants(java.util.Collection* The desired state of the experiment after stopping. The possible states are the following: *
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* The desired state of the experiment after stopping. The possible states are the following: *
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* The desired state of the experiment after stopping. The possible states are the following: *
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* The desired state of the experiment after stopping. The possible states are the following: *
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* Completed
: The experiment completed successfully
*
* Cancelled
: The experiment was canceled
*
* The reason for stopping the experiment. *
* * @param reason * The reason for stopping the experiment. */ public void setReason(String reason) { this.reason = reason; } /** ** The reason for stopping the experiment. *
* * @return The reason for stopping the experiment. */ public String getReason() { return this.reason; } /** ** The reason for stopping the experiment. *
* * @param reason * The reason for stopping the experiment. * @return Returns a reference to this object so that method calls can be chained together. */ public StopInferenceExperimentRequest withReason(String reason) { setReason(reason); 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 (getModelVariantActions() != null) sb.append("ModelVariantActions: ").append(getModelVariantActions()).append(","); if (getDesiredModelVariants() != null) sb.append("DesiredModelVariants: ").append(getDesiredModelVariants()).append(","); if (getDesiredState() != null) sb.append("DesiredState: ").append(getDesiredState()).append(","); if (getReason() != null) sb.append("Reason: ").append(getReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StopInferenceExperimentRequest == false) return false; StopInferenceExperimentRequest other = (StopInferenceExperimentRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getModelVariantActions() == null ^ this.getModelVariantActions() == null) return false; if (other.getModelVariantActions() != null && other.getModelVariantActions().equals(this.getModelVariantActions()) == false) return false; if (other.getDesiredModelVariants() == null ^ this.getDesiredModelVariants() == null) return false; if (other.getDesiredModelVariants() != null && other.getDesiredModelVariants().equals(this.getDesiredModelVariants()) == false) return false; if (other.getDesiredState() == null ^ this.getDesiredState() == null) return false; if (other.getDesiredState() != null && other.getDesiredState().equals(this.getDesiredState()) == false) return false; if (other.getReason() == null ^ this.getReason() == null) return false; if (other.getReason() != null && other.getReason().equals(this.getReason()) == 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 + ((getModelVariantActions() == null) ? 0 : getModelVariantActions().hashCode()); hashCode = prime * hashCode + ((getDesiredModelVariants() == null) ? 0 : getDesiredModelVariants().hashCode()); hashCode = prime * hashCode + ((getDesiredState() == null) ? 0 : getDesiredState().hashCode()); hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); return hashCode; } @Override public StopInferenceExperimentRequest clone() { return (StopInferenceExperimentRequest) super.clone(); } }