/* * 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 UpdateEndpointRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the endpoint whose configuration you want to update. *

*/ private String endpointName; /** *

* The name of the new endpoint configuration. *

*/ private String endpointConfigName; /** *

* When updating endpoint resources, enables or disables the retention of variant properties, * such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating * it, set RetainAllVariantProperties to true. To use the variant properties specified in * a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to * false. The default is false. *

*/ private Boolean retainAllVariantProperties; /** *

* When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to * true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to * override with the values provided by EndpointConfig. If you don't specify a value for * ExcludeRetainedVariantProperties, no variant properties are overridden. *

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

* The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. *

*/ private DeploymentConfig deploymentConfig; /** *

* Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is * not reused). *

*/ private Boolean retainDeploymentConfig; /** *

* The name of the endpoint whose configuration you want to update. *

* * @param endpointName * The name of the endpoint whose configuration you want to update. */ public void setEndpointName(String endpointName) { this.endpointName = endpointName; } /** *

* The name of the endpoint whose configuration you want to update. *

* * @return The name of the endpoint whose configuration you want to update. */ public String getEndpointName() { return this.endpointName; } /** *

* The name of the endpoint whose configuration you want to update. *

* * @param endpointName * The name of the endpoint whose configuration you want to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withEndpointName(String endpointName) { setEndpointName(endpointName); return this; } /** *

* The name of the new endpoint configuration. *

* * @param endpointConfigName * The name of the new endpoint configuration. */ public void setEndpointConfigName(String endpointConfigName) { this.endpointConfigName = endpointConfigName; } /** *

* The name of the new endpoint configuration. *

* * @return The name of the new endpoint configuration. */ public String getEndpointConfigName() { return this.endpointConfigName; } /** *

* The name of the new endpoint configuration. *

* * @param endpointConfigName * The name of the new endpoint configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withEndpointConfigName(String endpointConfigName) { setEndpointConfigName(endpointConfigName); return this; } /** *

* When updating endpoint resources, enables or disables the retention of variant properties, * such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating * it, set RetainAllVariantProperties to true. To use the variant properties specified in * a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to * false. The default is false. *

* * @param retainAllVariantProperties * When updating endpoint resources, enables or disables the retention of variant * properties, such as the instance count or the variant weight. To retain the variant properties of an * endpoint when updating it, set RetainAllVariantProperties to true. To use the * variant properties specified in a new EndpointConfig call when updating an endpoint, set * RetainAllVariantProperties to false. The default is false. */ public void setRetainAllVariantProperties(Boolean retainAllVariantProperties) { this.retainAllVariantProperties = retainAllVariantProperties; } /** *

* When updating endpoint resources, enables or disables the retention of variant properties, * such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating * it, set RetainAllVariantProperties to true. To use the variant properties specified in * a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to * false. The default is false. *

* * @return When updating endpoint resources, enables or disables the retention of variant * properties, such as the instance count or the variant weight. To retain the variant properties of an * endpoint when updating it, set RetainAllVariantProperties to true. To use the * variant properties specified in a new EndpointConfig call when updating an endpoint, set * RetainAllVariantProperties to false. The default is false. */ public Boolean getRetainAllVariantProperties() { return this.retainAllVariantProperties; } /** *

* When updating endpoint resources, enables or disables the retention of variant properties, * such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating * it, set RetainAllVariantProperties to true. To use the variant properties specified in * a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to * false. The default is false. *

* * @param retainAllVariantProperties * When updating endpoint resources, enables or disables the retention of variant * properties, such as the instance count or the variant weight. To retain the variant properties of an * endpoint when updating it, set RetainAllVariantProperties to true. To use the * variant properties specified in a new EndpointConfig call when updating an endpoint, set * RetainAllVariantProperties to false. The default is false. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withRetainAllVariantProperties(Boolean retainAllVariantProperties) { setRetainAllVariantProperties(retainAllVariantProperties); return this; } /** *

* When updating endpoint resources, enables or disables the retention of variant properties, * such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating * it, set RetainAllVariantProperties to true. To use the variant properties specified in * a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to * false. The default is false. *

* * @return When updating endpoint resources, enables or disables the retention of variant * properties, such as the instance count or the variant weight. To retain the variant properties of an * endpoint when updating it, set RetainAllVariantProperties to true. To use the * variant properties specified in a new EndpointConfig call when updating an endpoint, set * RetainAllVariantProperties to false. The default is false. */ public Boolean isRetainAllVariantProperties() { return this.retainAllVariantProperties; } /** *

* When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to * true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to * override with the values provided by EndpointConfig. If you don't specify a value for * ExcludeRetainedVariantProperties, no variant properties are overridden. *

* * @return When you are updating endpoint resources with RetainAllVariantProperties, whose value is set * to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't * specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. */ public java.util.List getExcludeRetainedVariantProperties() { return excludeRetainedVariantProperties; } /** *

* When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to * true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to * override with the values provided by EndpointConfig. If you don't specify a value for * ExcludeRetainedVariantProperties, no variant properties are overridden. *

* * @param excludeRetainedVariantProperties * When you are updating endpoint resources with RetainAllVariantProperties, whose value is set * to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't * specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. */ public void setExcludeRetainedVariantProperties(java.util.Collection excludeRetainedVariantProperties) { if (excludeRetainedVariantProperties == null) { this.excludeRetainedVariantProperties = null; return; } this.excludeRetainedVariantProperties = new java.util.ArrayList(excludeRetainedVariantProperties); } /** *

* When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to * true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to * override with the values provided by EndpointConfig. If you don't specify a value for * ExcludeRetainedVariantProperties, no variant properties are overridden. *

*

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

* * @param excludeRetainedVariantProperties * When you are updating endpoint resources with RetainAllVariantProperties, whose value is set * to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't * specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withExcludeRetainedVariantProperties(VariantProperty... excludeRetainedVariantProperties) { if (this.excludeRetainedVariantProperties == null) { setExcludeRetainedVariantProperties(new java.util.ArrayList(excludeRetainedVariantProperties.length)); } for (VariantProperty ele : excludeRetainedVariantProperties) { this.excludeRetainedVariantProperties.add(ele); } return this; } /** *

* When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to * true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to * override with the values provided by EndpointConfig. If you don't specify a value for * ExcludeRetainedVariantProperties, no variant properties are overridden. *

* * @param excludeRetainedVariantProperties * When you are updating endpoint resources with RetainAllVariantProperties, whose value is set * to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't * specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withExcludeRetainedVariantProperties(java.util.Collection excludeRetainedVariantProperties) { setExcludeRetainedVariantProperties(excludeRetainedVariantProperties); return this; } /** *

* The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. *

* * @param deploymentConfig * The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. */ public void setDeploymentConfig(DeploymentConfig deploymentConfig) { this.deploymentConfig = deploymentConfig; } /** *

* The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. *

* * @return The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. */ public DeploymentConfig getDeploymentConfig() { return this.deploymentConfig; } /** *

* The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. *

* * @param deploymentConfig * The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback * configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withDeploymentConfig(DeploymentConfig deploymentConfig) { setDeploymentConfig(deploymentConfig); return this; } /** *

* Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is * not reused). *

* * @param retainDeploymentConfig * Specifies whether to reuse the last deployment configuration. The default value is false (the * configuration is not reused). */ public void setRetainDeploymentConfig(Boolean retainDeploymentConfig) { this.retainDeploymentConfig = retainDeploymentConfig; } /** *

* Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is * not reused). *

* * @return Specifies whether to reuse the last deployment configuration. The default value is false (the * configuration is not reused). */ public Boolean getRetainDeploymentConfig() { return this.retainDeploymentConfig; } /** *

* Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is * not reused). *

* * @param retainDeploymentConfig * Specifies whether to reuse the last deployment configuration. The default value is false (the * configuration is not reused). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateEndpointRequest withRetainDeploymentConfig(Boolean retainDeploymentConfig) { setRetainDeploymentConfig(retainDeploymentConfig); return this; } /** *

* Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is * not reused). *

* * @return Specifies whether to reuse the last deployment configuration. The default value is false (the * configuration is not reused). */ public Boolean isRetainDeploymentConfig() { return this.retainDeploymentConfig; } /** * 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 (getEndpointName() != null) sb.append("EndpointName: ").append(getEndpointName()).append(","); if (getEndpointConfigName() != null) sb.append("EndpointConfigName: ").append(getEndpointConfigName()).append(","); if (getRetainAllVariantProperties() != null) sb.append("RetainAllVariantProperties: ").append(getRetainAllVariantProperties()).append(","); if (getExcludeRetainedVariantProperties() != null) sb.append("ExcludeRetainedVariantProperties: ").append(getExcludeRetainedVariantProperties()).append(","); if (getDeploymentConfig() != null) sb.append("DeploymentConfig: ").append(getDeploymentConfig()).append(","); if (getRetainDeploymentConfig() != null) sb.append("RetainDeploymentConfig: ").append(getRetainDeploymentConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateEndpointRequest == false) return false; UpdateEndpointRequest other = (UpdateEndpointRequest) obj; if (other.getEndpointName() == null ^ this.getEndpointName() == null) return false; if (other.getEndpointName() != null && other.getEndpointName().equals(this.getEndpointName()) == false) return false; if (other.getEndpointConfigName() == null ^ this.getEndpointConfigName() == null) return false; if (other.getEndpointConfigName() != null && other.getEndpointConfigName().equals(this.getEndpointConfigName()) == false) return false; if (other.getRetainAllVariantProperties() == null ^ this.getRetainAllVariantProperties() == null) return false; if (other.getRetainAllVariantProperties() != null && other.getRetainAllVariantProperties().equals(this.getRetainAllVariantProperties()) == false) return false; if (other.getExcludeRetainedVariantProperties() == null ^ this.getExcludeRetainedVariantProperties() == null) return false; if (other.getExcludeRetainedVariantProperties() != null && other.getExcludeRetainedVariantProperties().equals(this.getExcludeRetainedVariantProperties()) == false) return false; if (other.getDeploymentConfig() == null ^ this.getDeploymentConfig() == null) return false; if (other.getDeploymentConfig() != null && other.getDeploymentConfig().equals(this.getDeploymentConfig()) == false) return false; if (other.getRetainDeploymentConfig() == null ^ this.getRetainDeploymentConfig() == null) return false; if (other.getRetainDeploymentConfig() != null && other.getRetainDeploymentConfig().equals(this.getRetainDeploymentConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEndpointName() == null) ? 0 : getEndpointName().hashCode()); hashCode = prime * hashCode + ((getEndpointConfigName() == null) ? 0 : getEndpointConfigName().hashCode()); hashCode = prime * hashCode + ((getRetainAllVariantProperties() == null) ? 0 : getRetainAllVariantProperties().hashCode()); hashCode = prime * hashCode + ((getExcludeRetainedVariantProperties() == null) ? 0 : getExcludeRetainedVariantProperties().hashCode()); hashCode = prime * hashCode + ((getDeploymentConfig() == null) ? 0 : getDeploymentConfig().hashCode()); hashCode = prime * hashCode + ((getRetainDeploymentConfig() == null) ? 0 : getRetainDeploymentConfig().hashCode()); return hashCode; } @Override public UpdateEndpointRequest clone() { return (UpdateEndpointRequest) super.clone(); } }