com.amazonaws.services.osis.model.ChangeProgressStatus Maven / Gradle / Ivy
Show all versions of aws-java-sdk-osis Show documentation
/*
* Copyright 2019-2024 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.osis.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The progress details of a pipeline configuration change.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ChangeProgressStatus implements Serializable, Cloneable, StructuredPojo {
/**
*
* The time at which the configuration change is made on the pipeline.
*
*/
private java.util.Date startTime;
/**
*
* The overall status of the pipeline configuration change.
*
*/
private String status;
/**
*
* The total number of stages required for the pipeline configuration change.
*
*/
private Integer totalNumberOfStages;
/**
*
* Information about the stages that the pipeline is going through to perform the configuration change.
*
*/
private java.util.List changeProgressStages;
/**
*
* The time at which the configuration change is made on the pipeline.
*
*
* @param startTime
* The time at which the configuration change is made on the pipeline.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The time at which the configuration change is made on the pipeline.
*
*
* @return The time at which the configuration change is made on the pipeline.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The time at which the configuration change is made on the pipeline.
*
*
* @param startTime
* The time at which the configuration change is made on the pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeProgressStatus withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The overall status of the pipeline configuration change.
*
*
* @param status
* The overall status of the pipeline configuration change.
* @see ChangeProgressStatuses
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The overall status of the pipeline configuration change.
*
*
* @return The overall status of the pipeline configuration change.
* @see ChangeProgressStatuses
*/
public String getStatus() {
return this.status;
}
/**
*
* The overall status of the pipeline configuration change.
*
*
* @param status
* The overall status of the pipeline configuration change.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeProgressStatuses
*/
public ChangeProgressStatus withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The overall status of the pipeline configuration change.
*
*
* @param status
* The overall status of the pipeline configuration change.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeProgressStatuses
*/
public ChangeProgressStatus withStatus(ChangeProgressStatuses status) {
this.status = status.toString();
return this;
}
/**
*
* The total number of stages required for the pipeline configuration change.
*
*
* @param totalNumberOfStages
* The total number of stages required for the pipeline configuration change.
*/
public void setTotalNumberOfStages(Integer totalNumberOfStages) {
this.totalNumberOfStages = totalNumberOfStages;
}
/**
*
* The total number of stages required for the pipeline configuration change.
*
*
* @return The total number of stages required for the pipeline configuration change.
*/
public Integer getTotalNumberOfStages() {
return this.totalNumberOfStages;
}
/**
*
* The total number of stages required for the pipeline configuration change.
*
*
* @param totalNumberOfStages
* The total number of stages required for the pipeline configuration change.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeProgressStatus withTotalNumberOfStages(Integer totalNumberOfStages) {
setTotalNumberOfStages(totalNumberOfStages);
return this;
}
/**
*
* Information about the stages that the pipeline is going through to perform the configuration change.
*
*
* @return Information about the stages that the pipeline is going through to perform the configuration change.
*/
public java.util.List getChangeProgressStages() {
return changeProgressStages;
}
/**
*
* Information about the stages that the pipeline is going through to perform the configuration change.
*
*
* @param changeProgressStages
* Information about the stages that the pipeline is going through to perform the configuration change.
*/
public void setChangeProgressStages(java.util.Collection changeProgressStages) {
if (changeProgressStages == null) {
this.changeProgressStages = null;
return;
}
this.changeProgressStages = new java.util.ArrayList(changeProgressStages);
}
/**
*
* Information about the stages that the pipeline is going through to perform the configuration change.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setChangeProgressStages(java.util.Collection)} or {@link #withChangeProgressStages(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param changeProgressStages
* Information about the stages that the pipeline is going through to perform the configuration change.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeProgressStatus withChangeProgressStages(ChangeProgressStage... changeProgressStages) {
if (this.changeProgressStages == null) {
setChangeProgressStages(new java.util.ArrayList(changeProgressStages.length));
}
for (ChangeProgressStage ele : changeProgressStages) {
this.changeProgressStages.add(ele);
}
return this;
}
/**
*
* Information about the stages that the pipeline is going through to perform the configuration change.
*
*
* @param changeProgressStages
* Information about the stages that the pipeline is going through to perform the configuration change.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeProgressStatus withChangeProgressStages(java.util.Collection changeProgressStages) {
setChangeProgressStages(changeProgressStages);
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 (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getTotalNumberOfStages() != null)
sb.append("TotalNumberOfStages: ").append(getTotalNumberOfStages()).append(",");
if (getChangeProgressStages() != null)
sb.append("ChangeProgressStages: ").append(getChangeProgressStages());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ChangeProgressStatus == false)
return false;
ChangeProgressStatus other = (ChangeProgressStatus) obj;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getTotalNumberOfStages() == null ^ this.getTotalNumberOfStages() == null)
return false;
if (other.getTotalNumberOfStages() != null && other.getTotalNumberOfStages().equals(this.getTotalNumberOfStages()) == false)
return false;
if (other.getChangeProgressStages() == null ^ this.getChangeProgressStages() == null)
return false;
if (other.getChangeProgressStages() != null && other.getChangeProgressStages().equals(this.getChangeProgressStages()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getTotalNumberOfStages() == null) ? 0 : getTotalNumberOfStages().hashCode());
hashCode = prime * hashCode + ((getChangeProgressStages() == null) ? 0 : getChangeProgressStages().hashCode());
return hashCode;
}
@Override
public ChangeProgressStatus clone() {
try {
return (ChangeProgressStatus) 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.osis.model.transform.ChangeProgressStatusMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}