All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.sagemaker.model.ProductionVariantSummary Maven / Gradle / Ivy

/*
 * Copyright 2015-2020 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes weight and capacities for a production variant associated with an endpoint. If you sent a request to the * UpdateEndpointWeightsAndCapacities API and the endpoint status is Updating, you get * different desired and current values. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProductionVariantSummary implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the variant. *

*/ private String variantName; /** *

* An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. *

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

* The weight associated with the variant. *

*/ private Float currentWeight; /** *

* The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. *

*/ private Float desiredWeight; /** *

* The number of instances associated with the variant. *

*/ private Integer currentInstanceCount; /** *

* The number of instances requested in the UpdateEndpointWeightsAndCapacities request. *

*/ private Integer desiredInstanceCount; /** *

* The name of the variant. *

* * @param variantName * The name of the variant. */ public void setVariantName(String variantName) { this.variantName = variantName; } /** *

* The name of the variant. *

* * @return The name of the variant. */ public String getVariantName() { return this.variantName; } /** *

* The name of the variant. *

* * @param variantName * The name of the variant. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withVariantName(String variantName) { setVariantName(variantName); return this; } /** *

* An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. *

* * @return An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of * the inference images deployed on instances of this ProductionVariant. */ public java.util.List getDeployedImages() { return deployedImages; } /** *

* An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. *

* * @param deployedImages * An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. */ public void setDeployedImages(java.util.Collection deployedImages) { if (deployedImages == null) { this.deployedImages = null; return; } this.deployedImages = new java.util.ArrayList(deployedImages); } /** *

* An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. *

*

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

* * @param deployedImages * An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withDeployedImages(DeployedImage... deployedImages) { if (this.deployedImages == null) { setDeployedImages(new java.util.ArrayList(deployedImages.length)); } for (DeployedImage ele : deployedImages) { this.deployedImages.add(ele); } return this; } /** *

* An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. *

* * @param deployedImages * An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the * inference images deployed on instances of this ProductionVariant. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withDeployedImages(java.util.Collection deployedImages) { setDeployedImages(deployedImages); return this; } /** *

* The weight associated with the variant. *

* * @param currentWeight * The weight associated with the variant. */ public void setCurrentWeight(Float currentWeight) { this.currentWeight = currentWeight; } /** *

* The weight associated with the variant. *

* * @return The weight associated with the variant. */ public Float getCurrentWeight() { return this.currentWeight; } /** *

* The weight associated with the variant. *

* * @param currentWeight * The weight associated with the variant. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withCurrentWeight(Float currentWeight) { setCurrentWeight(currentWeight); return this; } /** *

* The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. *

* * @param desiredWeight * The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. */ public void setDesiredWeight(Float desiredWeight) { this.desiredWeight = desiredWeight; } /** *

* The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. *

* * @return The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. */ public Float getDesiredWeight() { return this.desiredWeight; } /** *

* The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. *

* * @param desiredWeight * The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withDesiredWeight(Float desiredWeight) { setDesiredWeight(desiredWeight); return this; } /** *

* The number of instances associated with the variant. *

* * @param currentInstanceCount * The number of instances associated with the variant. */ public void setCurrentInstanceCount(Integer currentInstanceCount) { this.currentInstanceCount = currentInstanceCount; } /** *

* The number of instances associated with the variant. *

* * @return The number of instances associated with the variant. */ public Integer getCurrentInstanceCount() { return this.currentInstanceCount; } /** *

* The number of instances associated with the variant. *

* * @param currentInstanceCount * The number of instances associated with the variant. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withCurrentInstanceCount(Integer currentInstanceCount) { setCurrentInstanceCount(currentInstanceCount); return this; } /** *

* The number of instances requested in the UpdateEndpointWeightsAndCapacities request. *

* * @param desiredInstanceCount * The number of instances requested in the UpdateEndpointWeightsAndCapacities request. */ public void setDesiredInstanceCount(Integer desiredInstanceCount) { this.desiredInstanceCount = desiredInstanceCount; } /** *

* The number of instances requested in the UpdateEndpointWeightsAndCapacities request. *

* * @return The number of instances requested in the UpdateEndpointWeightsAndCapacities request. */ public Integer getDesiredInstanceCount() { return this.desiredInstanceCount; } /** *

* The number of instances requested in the UpdateEndpointWeightsAndCapacities request. *

* * @param desiredInstanceCount * The number of instances requested in the UpdateEndpointWeightsAndCapacities request. * @return Returns a reference to this object so that method calls can be chained together. */ public ProductionVariantSummary withDesiredInstanceCount(Integer desiredInstanceCount) { setDesiredInstanceCount(desiredInstanceCount); 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 (getVariantName() != null) sb.append("VariantName: ").append(getVariantName()).append(","); if (getDeployedImages() != null) sb.append("DeployedImages: ").append(getDeployedImages()).append(","); if (getCurrentWeight() != null) sb.append("CurrentWeight: ").append(getCurrentWeight()).append(","); if (getDesiredWeight() != null) sb.append("DesiredWeight: ").append(getDesiredWeight()).append(","); if (getCurrentInstanceCount() != null) sb.append("CurrentInstanceCount: ").append(getCurrentInstanceCount()).append(","); if (getDesiredInstanceCount() != null) sb.append("DesiredInstanceCount: ").append(getDesiredInstanceCount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProductionVariantSummary == false) return false; ProductionVariantSummary other = (ProductionVariantSummary) obj; if (other.getVariantName() == null ^ this.getVariantName() == null) return false; if (other.getVariantName() != null && other.getVariantName().equals(this.getVariantName()) == false) return false; if (other.getDeployedImages() == null ^ this.getDeployedImages() == null) return false; if (other.getDeployedImages() != null && other.getDeployedImages().equals(this.getDeployedImages()) == false) return false; if (other.getCurrentWeight() == null ^ this.getCurrentWeight() == null) return false; if (other.getCurrentWeight() != null && other.getCurrentWeight().equals(this.getCurrentWeight()) == false) return false; if (other.getDesiredWeight() == null ^ this.getDesiredWeight() == null) return false; if (other.getDesiredWeight() != null && other.getDesiredWeight().equals(this.getDesiredWeight()) == false) return false; if (other.getCurrentInstanceCount() == null ^ this.getCurrentInstanceCount() == null) return false; if (other.getCurrentInstanceCount() != null && other.getCurrentInstanceCount().equals(this.getCurrentInstanceCount()) == false) return false; if (other.getDesiredInstanceCount() == null ^ this.getDesiredInstanceCount() == null) return false; if (other.getDesiredInstanceCount() != null && other.getDesiredInstanceCount().equals(this.getDesiredInstanceCount()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVariantName() == null) ? 0 : getVariantName().hashCode()); hashCode = prime * hashCode + ((getDeployedImages() == null) ? 0 : getDeployedImages().hashCode()); hashCode = prime * hashCode + ((getCurrentWeight() == null) ? 0 : getCurrentWeight().hashCode()); hashCode = prime * hashCode + ((getDesiredWeight() == null) ? 0 : getDesiredWeight().hashCode()); hashCode = prime * hashCode + ((getCurrentInstanceCount() == null) ? 0 : getCurrentInstanceCount().hashCode()); hashCode = prime * hashCode + ((getDesiredInstanceCount() == null) ? 0 : getDesiredInstanceCount().hashCode()); return hashCode; } @Override public ProductionVariantSummary clone() { try { return (ProductionVariantSummary) 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.sagemaker.model.transform.ProductionVariantSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy