/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information summarizing the deployment stage results. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EdgeDeploymentStatus implements Serializable, Cloneable, StructuredPojo { /** ** The general status of the current stage. *
*/ private String stageStatus; /** ** The number of edge devices with the successful deployment in the current stage. *
*/ private Integer edgeDeploymentSuccessInStage; /** ** The number of edge devices yet to pick up the deployment in current stage, or in progress. *
*/ private Integer edgeDeploymentPendingInStage; /** ** The number of edge devices that failed the deployment in current stage. *
*/ private Integer edgeDeploymentFailedInStage; /** ** A detailed message about deployment status in current stage. *
*/ private String edgeDeploymentStatusMessage; /** ** The time when the deployment API started. *
*/ private java.util.Date edgeDeploymentStageStartTime; /** ** The general status of the current stage. *
* * @param stageStatus * The general status of the current stage. * @see StageStatus */ public void setStageStatus(String stageStatus) { this.stageStatus = stageStatus; } /** ** The general status of the current stage. *
* * @return The general status of the current stage. * @see StageStatus */ public String getStageStatus() { return this.stageStatus; } /** ** The general status of the current stage. *
* * @param stageStatus * The general status of the current stage. * @return Returns a reference to this object so that method calls can be chained together. * @see StageStatus */ public EdgeDeploymentStatus withStageStatus(String stageStatus) { setStageStatus(stageStatus); return this; } /** ** The general status of the current stage. *
* * @param stageStatus * The general status of the current stage. * @return Returns a reference to this object so that method calls can be chained together. * @see StageStatus */ public EdgeDeploymentStatus withStageStatus(StageStatus stageStatus) { this.stageStatus = stageStatus.toString(); return this; } /** ** The number of edge devices with the successful deployment in the current stage. *
* * @param edgeDeploymentSuccessInStage * The number of edge devices with the successful deployment in the current stage. */ public void setEdgeDeploymentSuccessInStage(Integer edgeDeploymentSuccessInStage) { this.edgeDeploymentSuccessInStage = edgeDeploymentSuccessInStage; } /** ** The number of edge devices with the successful deployment in the current stage. *
* * @return The number of edge devices with the successful deployment in the current stage. */ public Integer getEdgeDeploymentSuccessInStage() { return this.edgeDeploymentSuccessInStage; } /** ** The number of edge devices with the successful deployment in the current stage. *
* * @param edgeDeploymentSuccessInStage * The number of edge devices with the successful deployment in the current stage. * @return Returns a reference to this object so that method calls can be chained together. */ public EdgeDeploymentStatus withEdgeDeploymentSuccessInStage(Integer edgeDeploymentSuccessInStage) { setEdgeDeploymentSuccessInStage(edgeDeploymentSuccessInStage); return this; } /** ** The number of edge devices yet to pick up the deployment in current stage, or in progress. *
* * @param edgeDeploymentPendingInStage * The number of edge devices yet to pick up the deployment in current stage, or in progress. */ public void setEdgeDeploymentPendingInStage(Integer edgeDeploymentPendingInStage) { this.edgeDeploymentPendingInStage = edgeDeploymentPendingInStage; } /** ** The number of edge devices yet to pick up the deployment in current stage, or in progress. *
* * @return The number of edge devices yet to pick up the deployment in current stage, or in progress. */ public Integer getEdgeDeploymentPendingInStage() { return this.edgeDeploymentPendingInStage; } /** ** The number of edge devices yet to pick up the deployment in current stage, or in progress. *
* * @param edgeDeploymentPendingInStage * The number of edge devices yet to pick up the deployment in current stage, or in progress. * @return Returns a reference to this object so that method calls can be chained together. */ public EdgeDeploymentStatus withEdgeDeploymentPendingInStage(Integer edgeDeploymentPendingInStage) { setEdgeDeploymentPendingInStage(edgeDeploymentPendingInStage); return this; } /** ** The number of edge devices that failed the deployment in current stage. *
* * @param edgeDeploymentFailedInStage * The number of edge devices that failed the deployment in current stage. */ public void setEdgeDeploymentFailedInStage(Integer edgeDeploymentFailedInStage) { this.edgeDeploymentFailedInStage = edgeDeploymentFailedInStage; } /** ** The number of edge devices that failed the deployment in current stage. *
* * @return The number of edge devices that failed the deployment in current stage. */ public Integer getEdgeDeploymentFailedInStage() { return this.edgeDeploymentFailedInStage; } /** ** The number of edge devices that failed the deployment in current stage. *
* * @param edgeDeploymentFailedInStage * The number of edge devices that failed the deployment in current stage. * @return Returns a reference to this object so that method calls can be chained together. */ public EdgeDeploymentStatus withEdgeDeploymentFailedInStage(Integer edgeDeploymentFailedInStage) { setEdgeDeploymentFailedInStage(edgeDeploymentFailedInStage); return this; } /** ** A detailed message about deployment status in current stage. *
* * @param edgeDeploymentStatusMessage * A detailed message about deployment status in current stage. */ public void setEdgeDeploymentStatusMessage(String edgeDeploymentStatusMessage) { this.edgeDeploymentStatusMessage = edgeDeploymentStatusMessage; } /** ** A detailed message about deployment status in current stage. *
* * @return A detailed message about deployment status in current stage. */ public String getEdgeDeploymentStatusMessage() { return this.edgeDeploymentStatusMessage; } /** ** A detailed message about deployment status in current stage. *
* * @param edgeDeploymentStatusMessage * A detailed message about deployment status in current stage. * @return Returns a reference to this object so that method calls can be chained together. */ public EdgeDeploymentStatus withEdgeDeploymentStatusMessage(String edgeDeploymentStatusMessage) { setEdgeDeploymentStatusMessage(edgeDeploymentStatusMessage); return this; } /** ** The time when the deployment API started. *
* * @param edgeDeploymentStageStartTime * The time when the deployment API started. */ public void setEdgeDeploymentStageStartTime(java.util.Date edgeDeploymentStageStartTime) { this.edgeDeploymentStageStartTime = edgeDeploymentStageStartTime; } /** ** The time when the deployment API started. *
* * @return The time when the deployment API started. */ public java.util.Date getEdgeDeploymentStageStartTime() { return this.edgeDeploymentStageStartTime; } /** ** The time when the deployment API started. *
* * @param edgeDeploymentStageStartTime * The time when the deployment API started. * @return Returns a reference to this object so that method calls can be chained together. */ public EdgeDeploymentStatus withEdgeDeploymentStageStartTime(java.util.Date edgeDeploymentStageStartTime) { setEdgeDeploymentStageStartTime(edgeDeploymentStageStartTime); 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 (getStageStatus() != null) sb.append("StageStatus: ").append(getStageStatus()).append(","); if (getEdgeDeploymentSuccessInStage() != null) sb.append("EdgeDeploymentSuccessInStage: ").append(getEdgeDeploymentSuccessInStage()).append(","); if (getEdgeDeploymentPendingInStage() != null) sb.append("EdgeDeploymentPendingInStage: ").append(getEdgeDeploymentPendingInStage()).append(","); if (getEdgeDeploymentFailedInStage() != null) sb.append("EdgeDeploymentFailedInStage: ").append(getEdgeDeploymentFailedInStage()).append(","); if (getEdgeDeploymentStatusMessage() != null) sb.append("EdgeDeploymentStatusMessage: ").append(getEdgeDeploymentStatusMessage()).append(","); if (getEdgeDeploymentStageStartTime() != null) sb.append("EdgeDeploymentStageStartTime: ").append(getEdgeDeploymentStageStartTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EdgeDeploymentStatus == false) return false; EdgeDeploymentStatus other = (EdgeDeploymentStatus) obj; if (other.getStageStatus() == null ^ this.getStageStatus() == null) return false; if (other.getStageStatus() != null && other.getStageStatus().equals(this.getStageStatus()) == false) return false; if (other.getEdgeDeploymentSuccessInStage() == null ^ this.getEdgeDeploymentSuccessInStage() == null) return false; if (other.getEdgeDeploymentSuccessInStage() != null && other.getEdgeDeploymentSuccessInStage().equals(this.getEdgeDeploymentSuccessInStage()) == false) return false; if (other.getEdgeDeploymentPendingInStage() == null ^ this.getEdgeDeploymentPendingInStage() == null) return false; if (other.getEdgeDeploymentPendingInStage() != null && other.getEdgeDeploymentPendingInStage().equals(this.getEdgeDeploymentPendingInStage()) == false) return false; if (other.getEdgeDeploymentFailedInStage() == null ^ this.getEdgeDeploymentFailedInStage() == null) return false; if (other.getEdgeDeploymentFailedInStage() != null && other.getEdgeDeploymentFailedInStage().equals(this.getEdgeDeploymentFailedInStage()) == false) return false; if (other.getEdgeDeploymentStatusMessage() == null ^ this.getEdgeDeploymentStatusMessage() == null) return false; if (other.getEdgeDeploymentStatusMessage() != null && other.getEdgeDeploymentStatusMessage().equals(this.getEdgeDeploymentStatusMessage()) == false) return false; if (other.getEdgeDeploymentStageStartTime() == null ^ this.getEdgeDeploymentStageStartTime() == null) return false; if (other.getEdgeDeploymentStageStartTime() != null && other.getEdgeDeploymentStageStartTime().equals(this.getEdgeDeploymentStageStartTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStageStatus() == null) ? 0 : getStageStatus().hashCode()); hashCode = prime * hashCode + ((getEdgeDeploymentSuccessInStage() == null) ? 0 : getEdgeDeploymentSuccessInStage().hashCode()); hashCode = prime * hashCode + ((getEdgeDeploymentPendingInStage() == null) ? 0 : getEdgeDeploymentPendingInStage().hashCode()); hashCode = prime * hashCode + ((getEdgeDeploymentFailedInStage() == null) ? 0 : getEdgeDeploymentFailedInStage().hashCode()); hashCode = prime * hashCode + ((getEdgeDeploymentStatusMessage() == null) ? 0 : getEdgeDeploymentStatusMessage().hashCode()); hashCode = prime * hashCode + ((getEdgeDeploymentStageStartTime() == null) ? 0 : getEdgeDeploymentStageStartTime().hashCode()); return hashCode; } @Override public EdgeDeploymentStatus clone() { try { return (EdgeDeploymentStatus) 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.EdgeDeploymentStatusMarshaller.getInstance().marshall(this, protocolMarshaller); } }