com.amazonaws.services.cloudformation.model.ChangeSetSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudformation Show documentation
/*
* Copyright 2013-2018 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.cloudformation.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The ChangeSetSummary
structure describes a change set, its status, and the stack with which it's
* associated.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ChangeSetSummary implements Serializable, Cloneable {
/**
*
* The ID of the stack with which the change set is associated.
*
*/
private String stackId;
/**
*
* The name of the stack with which the change set is associated.
*
*/
private String stackName;
/**
*
* The ID of the change set.
*
*/
private String changeSetId;
/**
*
* The name of the change set.
*
*/
private String changeSetName;
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*/
private String executionStatus;
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*/
private String status;
/**
*
* A description of the change set's status. For example, if your change set is in the FAILED
state,
* AWS CloudFormation shows the error message.
*
*/
private String statusReason;
/**
*
* The start time when the change set was created, in UTC.
*
*/
private java.util.Date creationTime;
/**
*
* Descriptive information about the change set.
*
*/
private String description;
/**
*
* The ID of the stack with which the change set is associated.
*
*
* @param stackId
* The ID of the stack with which the change set is associated.
*/
public void setStackId(String stackId) {
this.stackId = stackId;
}
/**
*
* The ID of the stack with which the change set is associated.
*
*
* @return The ID of the stack with which the change set is associated.
*/
public String getStackId() {
return this.stackId;
}
/**
*
* The ID of the stack with which the change set is associated.
*
*
* @param stackId
* The ID of the stack with which the change set is associated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withStackId(String stackId) {
setStackId(stackId);
return this;
}
/**
*
* The name of the stack with which the change set is associated.
*
*
* @param stackName
* The name of the stack with which the change set is associated.
*/
public void setStackName(String stackName) {
this.stackName = stackName;
}
/**
*
* The name of the stack with which the change set is associated.
*
*
* @return The name of the stack with which the change set is associated.
*/
public String getStackName() {
return this.stackName;
}
/**
*
* The name of the stack with which the change set is associated.
*
*
* @param stackName
* The name of the stack with which the change set is associated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withStackName(String stackName) {
setStackName(stackName);
return this;
}
/**
*
* The ID of the change set.
*
*
* @param changeSetId
* The ID of the change set.
*/
public void setChangeSetId(String changeSetId) {
this.changeSetId = changeSetId;
}
/**
*
* The ID of the change set.
*
*
* @return The ID of the change set.
*/
public String getChangeSetId() {
return this.changeSetId;
}
/**
*
* The ID of the change set.
*
*
* @param changeSetId
* The ID of the change set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withChangeSetId(String changeSetId) {
setChangeSetId(changeSetId);
return this;
}
/**
*
* The name of the change set.
*
*
* @param changeSetName
* The name of the change set.
*/
public void setChangeSetName(String changeSetName) {
this.changeSetName = changeSetName;
}
/**
*
* The name of the change set.
*
*
* @return The name of the change set.
*/
public String getChangeSetName() {
return this.changeSetName;
}
/**
*
* The name of the change set.
*
*
* @param changeSetName
* The name of the change set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withChangeSetName(String changeSetName) {
setChangeSetName(changeSetName);
return this;
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*
* @param executionStatus
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an
* OBSOLETE
state because the stack was already updated.
* @see ExecutionStatus
*/
public void setExecutionStatus(String executionStatus) {
this.executionStatus = executionStatus;
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*
* @return If the change set execution status is AVAILABLE
, you can execute the change set. If you
* can’t execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an
* OBSOLETE
state because the stack was already updated.
* @see ExecutionStatus
*/
public String getExecutionStatus() {
return this.executionStatus;
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*
* @param executionStatus
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an
* OBSOLETE
state because the stack was already updated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExecutionStatus
*/
public ChangeSetSummary withExecutionStatus(String executionStatus) {
setExecutionStatus(executionStatus);
return this;
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*
* @param executionStatus
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an
* OBSOLETE
state because the stack was already updated.
* @see ExecutionStatus
*/
public void setExecutionStatus(ExecutionStatus executionStatus) {
withExecutionStatus(executionStatus);
}
/**
*
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an OBSOLETE
* state because the stack was already updated.
*
*
* @param executionStatus
* If the change set execution status is AVAILABLE
, you can execute the change set. If you can’t
* execute the change set, the status indicates why. For example, a change set might be in an
* UNAVAILABLE
state because AWS CloudFormation is still creating it or in an
* OBSOLETE
state because the stack was already updated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExecutionStatus
*/
public ChangeSetSummary withExecutionStatus(ExecutionStatus executionStatus) {
this.executionStatus = executionStatus.toString();
return this;
}
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* @param status
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
* @see ChangeSetStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* @return The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
* @see ChangeSetStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* @param status
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeSetStatus
*/
public ChangeSetSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* @param status
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
* @see ChangeSetStatus
*/
public void setStatus(ChangeSetStatus status) {
withStatus(status);
}
/**
*
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
*
*
* @param status
* The state of the change set, such as CREATE_IN_PROGRESS
, CREATE_COMPLETE
, or
* FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ChangeSetStatus
*/
public ChangeSetSummary withStatus(ChangeSetStatus status) {
this.status = status.toString();
return this;
}
/**
*
* A description of the change set's status. For example, if your change set is in the FAILED
state,
* AWS CloudFormation shows the error message.
*
*
* @param statusReason
* A description of the change set's status. For example, if your change set is in the FAILED
* state, AWS CloudFormation shows the error message.
*/
public void setStatusReason(String statusReason) {
this.statusReason = statusReason;
}
/**
*
* A description of the change set's status. For example, if your change set is in the FAILED
state,
* AWS CloudFormation shows the error message.
*
*
* @return A description of the change set's status. For example, if your change set is in the FAILED
* state, AWS CloudFormation shows the error message.
*/
public String getStatusReason() {
return this.statusReason;
}
/**
*
* A description of the change set's status. For example, if your change set is in the FAILED
state,
* AWS CloudFormation shows the error message.
*
*
* @param statusReason
* A description of the change set's status. For example, if your change set is in the FAILED
* state, AWS CloudFormation shows the error message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withStatusReason(String statusReason) {
setStatusReason(statusReason);
return this;
}
/**
*
* The start time when the change set was created, in UTC.
*
*
* @param creationTime
* The start time when the change set was created, in UTC.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The start time when the change set was created, in UTC.
*
*
* @return The start time when the change set was created, in UTC.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The start time when the change set was created, in UTC.
*
*
* @param creationTime
* The start time when the change set was created, in UTC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* Descriptive information about the change set.
*
*
* @param description
* Descriptive information about the change set.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* Descriptive information about the change set.
*
*
* @return Descriptive information about the change set.
*/
public String getDescription() {
return this.description;
}
/**
*
* Descriptive information about the change set.
*
*
* @param description
* Descriptive information about the change set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetSummary withDescription(String description) {
setDescription(description);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getStackId() != null)
sb.append("StackId: ").append(getStackId()).append(",");
if (getStackName() != null)
sb.append("StackName: ").append(getStackName()).append(",");
if (getChangeSetId() != null)
sb.append("ChangeSetId: ").append(getChangeSetId()).append(",");
if (getChangeSetName() != null)
sb.append("ChangeSetName: ").append(getChangeSetName()).append(",");
if (getExecutionStatus() != null)
sb.append("ExecutionStatus: ").append(getExecutionStatus()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getStatusReason() != null)
sb.append("StatusReason: ").append(getStatusReason()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ChangeSetSummary == false)
return false;
ChangeSetSummary other = (ChangeSetSummary) obj;
if (other.getStackId() == null ^ this.getStackId() == null)
return false;
if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false)
return false;
if (other.getStackName() == null ^ this.getStackName() == null)
return false;
if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false)
return false;
if (other.getChangeSetId() == null ^ this.getChangeSetId() == null)
return false;
if (other.getChangeSetId() != null && other.getChangeSetId().equals(this.getChangeSetId()) == false)
return false;
if (other.getChangeSetName() == null ^ this.getChangeSetName() == null)
return false;
if (other.getChangeSetName() != null && other.getChangeSetName().equals(this.getChangeSetName()) == false)
return false;
if (other.getExecutionStatus() == null ^ this.getExecutionStatus() == null)
return false;
if (other.getExecutionStatus() != null && other.getExecutionStatus().equals(this.getExecutionStatus()) == 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.getStatusReason() == null ^ this.getStatusReason() == null)
return false;
if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode());
hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode());
hashCode = prime * hashCode + ((getChangeSetId() == null) ? 0 : getChangeSetId().hashCode());
hashCode = prime * hashCode + ((getChangeSetName() == null) ? 0 : getChangeSetName().hashCode());
hashCode = prime * hashCode + ((getExecutionStatus() == null) ? 0 : getExecutionStatus().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
return hashCode;
}
@Override
public ChangeSetSummary clone() {
try {
return (ChangeSetSummary) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}