/* * 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.opensearch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Information about the progress of a pre-upgrade dry run analysis. *

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

* The unique identifier of the dry run. *

*/ private String dryRunId; /** *

* The current status of the dry run. *

*/ private String dryRunStatus; /** *

* The timestamp when the dry run was initiated. *

*/ private String creationDate; /** *

* The timestamp when the dry run was last updated. *

*/ private String updateDate; /** *

* Any validation failures that occurred as a result of the dry run. *

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

* The unique identifier of the dry run. *

* * @param dryRunId * The unique identifier of the dry run. */ public void setDryRunId(String dryRunId) { this.dryRunId = dryRunId; } /** *

* The unique identifier of the dry run. *

* * @return The unique identifier of the dry run. */ public String getDryRunId() { return this.dryRunId; } /** *

* The unique identifier of the dry run. *

* * @param dryRunId * The unique identifier of the dry run. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withDryRunId(String dryRunId) { setDryRunId(dryRunId); return this; } /** *

* The current status of the dry run. *

* * @param dryRunStatus * The current status of the dry run. */ public void setDryRunStatus(String dryRunStatus) { this.dryRunStatus = dryRunStatus; } /** *

* The current status of the dry run. *

* * @return The current status of the dry run. */ public String getDryRunStatus() { return this.dryRunStatus; } /** *

* The current status of the dry run. *

* * @param dryRunStatus * The current status of the dry run. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withDryRunStatus(String dryRunStatus) { setDryRunStatus(dryRunStatus); return this; } /** *

* The timestamp when the dry run was initiated. *

* * @param creationDate * The timestamp when the dry run was initiated. */ public void setCreationDate(String creationDate) { this.creationDate = creationDate; } /** *

* The timestamp when the dry run was initiated. *

* * @return The timestamp when the dry run was initiated. */ public String getCreationDate() { return this.creationDate; } /** *

* The timestamp when the dry run was initiated. *

* * @param creationDate * The timestamp when the dry run was initiated. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withCreationDate(String creationDate) { setCreationDate(creationDate); return this; } /** *

* The timestamp when the dry run was last updated. *

* * @param updateDate * The timestamp when the dry run was last updated. */ public void setUpdateDate(String updateDate) { this.updateDate = updateDate; } /** *

* The timestamp when the dry run was last updated. *

* * @return The timestamp when the dry run was last updated. */ public String getUpdateDate() { return this.updateDate; } /** *

* The timestamp when the dry run was last updated. *

* * @param updateDate * The timestamp when the dry run was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withUpdateDate(String updateDate) { setUpdateDate(updateDate); return this; } /** *

* Any validation failures that occurred as a result of the dry run. *

* * @return Any validation failures that occurred as a result of the dry run. */ public java.util.List getValidationFailures() { return validationFailures; } /** *

* Any validation failures that occurred as a result of the dry run. *

* * @param validationFailures * Any validation failures that occurred as a result of the dry run. */ public void setValidationFailures(java.util.Collection validationFailures) { if (validationFailures == null) { this.validationFailures = null; return; } this.validationFailures = new java.util.ArrayList(validationFailures); } /** *

* Any validation failures that occurred as a result of the dry run. *

*

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

* * @param validationFailures * Any validation failures that occurred as a result of the dry run. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withValidationFailures(ValidationFailure... validationFailures) { if (this.validationFailures == null) { setValidationFailures(new java.util.ArrayList(validationFailures.length)); } for (ValidationFailure ele : validationFailures) { this.validationFailures.add(ele); } return this; } /** *

* Any validation failures that occurred as a result of the dry run. *

* * @param validationFailures * Any validation failures that occurred as a result of the dry run. * @return Returns a reference to this object so that method calls can be chained together. */ public DryRunProgressStatus withValidationFailures(java.util.Collection validationFailures) { setValidationFailures(validationFailures); 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 (getDryRunId() != null) sb.append("DryRunId: ").append(getDryRunId()).append(","); if (getDryRunStatus() != null) sb.append("DryRunStatus: ").append(getDryRunStatus()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getUpdateDate() != null) sb.append("UpdateDate: ").append(getUpdateDate()).append(","); if (getValidationFailures() != null) sb.append("ValidationFailures: ").append(getValidationFailures()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DryRunProgressStatus == false) return false; DryRunProgressStatus other = (DryRunProgressStatus) obj; if (other.getDryRunId() == null ^ this.getDryRunId() == null) return false; if (other.getDryRunId() != null && other.getDryRunId().equals(this.getDryRunId()) == false) return false; if (other.getDryRunStatus() == null ^ this.getDryRunStatus() == null) return false; if (other.getDryRunStatus() != null && other.getDryRunStatus().equals(this.getDryRunStatus()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getUpdateDate() == null ^ this.getUpdateDate() == null) return false; if (other.getUpdateDate() != null && other.getUpdateDate().equals(this.getUpdateDate()) == false) return false; if (other.getValidationFailures() == null ^ this.getValidationFailures() == null) return false; if (other.getValidationFailures() != null && other.getValidationFailures().equals(this.getValidationFailures()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDryRunId() == null) ? 0 : getDryRunId().hashCode()); hashCode = prime * hashCode + ((getDryRunStatus() == null) ? 0 : getDryRunStatus().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode()); hashCode = prime * hashCode + ((getValidationFailures() == null) ? 0 : getValidationFailures().hashCode()); return hashCode; } @Override public DryRunProgressStatus clone() { try { return (DryRunProgressStatus) 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.opensearch.model.transform.DryRunProgressStatusMarshaller.getInstance().marshall(this, protocolMarshaller); } }