com.amazonaws.services.cloudformation.model.StackSummary Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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 StackSummary Data Type
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StackSummary implements Serializable, Cloneable {
/**
*
* Unique stack identifier.
*
*/
private String stackId;
/**
*
* The name associated with the stack.
*
*/
private String stackName;
/**
*
* The template description of the template used to create the stack.
*
*/
private String templateDescription;
/**
*
* The time the stack was created.
*
*/
private java.util.Date creationTime;
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*/
private java.util.Date lastUpdatedTime;
/**
*
* The time the stack was deleted.
*
*/
private java.util.Date deletionTime;
/**
*
* The current status of the stack.
*
*/
private String stackStatus;
/**
*
* Success/Failure message associated with the stack status.
*
*/
private String stackStatusReason;
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*/
private String parentId;
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which
* the nested stack ultimately belongs.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*/
private String rootId;
/**
*
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from it's
* expected configuration, as defined in the stack template and any values specified as template parameters. For
* more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*/
private StackDriftInformationSummary driftInformation;
/**
*
* Unique stack identifier.
*
*
* @param stackId
* Unique stack identifier.
*/
public void setStackId(String stackId) {
this.stackId = stackId;
}
/**
*
* Unique stack identifier.
*
*
* @return Unique stack identifier.
*/
public String getStackId() {
return this.stackId;
}
/**
*
* Unique stack identifier.
*
*
* @param stackId
* Unique stack identifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withStackId(String stackId) {
setStackId(stackId);
return this;
}
/**
*
* The name associated with the stack.
*
*
* @param stackName
* The name associated with the stack.
*/
public void setStackName(String stackName) {
this.stackName = stackName;
}
/**
*
* The name associated with the stack.
*
*
* @return The name associated with the stack.
*/
public String getStackName() {
return this.stackName;
}
/**
*
* The name associated with the stack.
*
*
* @param stackName
* The name associated with the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withStackName(String stackName) {
setStackName(stackName);
return this;
}
/**
*
* The template description of the template used to create the stack.
*
*
* @param templateDescription
* The template description of the template used to create the stack.
*/
public void setTemplateDescription(String templateDescription) {
this.templateDescription = templateDescription;
}
/**
*
* The template description of the template used to create the stack.
*
*
* @return The template description of the template used to create the stack.
*/
public String getTemplateDescription() {
return this.templateDescription;
}
/**
*
* The template description of the template used to create the stack.
*
*
* @param templateDescription
* The template description of the template used to create the stack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withTemplateDescription(String templateDescription) {
setTemplateDescription(templateDescription);
return this;
}
/**
*
* The time the stack was created.
*
*
* @param creationTime
* The time the stack was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time the stack was created.
*
*
* @return The time the stack was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time the stack was created.
*
*
* @param creationTime
* The time the stack was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*
* @param lastUpdatedTime
* The time the stack was last updated. This field will only be returned if the stack has been updated at
* least once.
*/
public void setLastUpdatedTime(java.util.Date lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*
* @return The time the stack was last updated. This field will only be returned if the stack has been updated at
* least once.
*/
public java.util.Date getLastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
*
* The time the stack was last updated. This field will only be returned if the stack has been updated at least
* once.
*
*
* @param lastUpdatedTime
* The time the stack was last updated. This field will only be returned if the stack has been updated at
* least once.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withLastUpdatedTime(java.util.Date lastUpdatedTime) {
setLastUpdatedTime(lastUpdatedTime);
return this;
}
/**
*
* The time the stack was deleted.
*
*
* @param deletionTime
* The time the stack was deleted.
*/
public void setDeletionTime(java.util.Date deletionTime) {
this.deletionTime = deletionTime;
}
/**
*
* The time the stack was deleted.
*
*
* @return The time the stack was deleted.
*/
public java.util.Date getDeletionTime() {
return this.deletionTime;
}
/**
*
* The time the stack was deleted.
*
*
* @param deletionTime
* The time the stack was deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withDeletionTime(java.util.Date deletionTime) {
setDeletionTime(deletionTime);
return this;
}
/**
*
* The current status of the stack.
*
*
* @param stackStatus
* The current status of the stack.
* @see StackStatus
*/
public void setStackStatus(String stackStatus) {
this.stackStatus = stackStatus;
}
/**
*
* The current status of the stack.
*
*
* @return The current status of the stack.
* @see StackStatus
*/
public String getStackStatus() {
return this.stackStatus;
}
/**
*
* The current status of the stack.
*
*
* @param stackStatus
* The current status of the stack.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StackStatus
*/
public StackSummary withStackStatus(String stackStatus) {
setStackStatus(stackStatus);
return this;
}
/**
*
* The current status of the stack.
*
*
* @param stackStatus
* The current status of the stack.
* @see StackStatus
*/
public void setStackStatus(StackStatus stackStatus) {
withStackStatus(stackStatus);
}
/**
*
* The current status of the stack.
*
*
* @param stackStatus
* The current status of the stack.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StackStatus
*/
public StackSummary withStackStatus(StackStatus stackStatus) {
this.stackStatus = stackStatus.toString();
return this;
}
/**
*
* Success/Failure message associated with the stack status.
*
*
* @param stackStatusReason
* Success/Failure message associated with the stack status.
*/
public void setStackStatusReason(String stackStatusReason) {
this.stackStatusReason = stackStatusReason;
}
/**
*
* Success/Failure message associated with the stack status.
*
*
* @return Success/Failure message associated with the stack status.
*/
public String getStackStatusReason() {
return this.stackStatusReason;
}
/**
*
* Success/Failure message associated with the stack status.
*
*
* @param stackStatusReason
* Success/Failure message associated with the stack status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withStackStatusReason(String stackStatusReason) {
setStackStatusReason(stackStatusReason);
return this;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @param parentId
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
* this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
*/
public void setParentId(String parentId) {
this.parentId = parentId;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @return For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
* this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
*/
public String getParentId() {
return this.parentId;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this
* stack. For the first level of nested stacks, the root stack is also the parent stack.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @param parentId
* For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of
* this stack. For the first level of nested stacks, the root stack is also the parent stack.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withParentId(String parentId) {
setParentId(parentId);
return this;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which
* the nested stack ultimately belongs.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @param rootId
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
* which the nested stack ultimately belongs.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
*/
public void setRootId(String rootId) {
this.rootId = rootId;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which
* the nested stack ultimately belongs.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @return For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
* which the nested stack ultimately belongs.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
*/
public String getRootId() {
return this.rootId;
}
/**
*
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which
* the nested stack ultimately belongs.
*
*
* For more information, see Working with
* Nested Stacks in the CloudFormation User Guide.
*
*
* @param rootId
* For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to
* which the nested stack ultimately belongs.
*
* For more information, see Working
* with Nested Stacks in the CloudFormation User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withRootId(String rootId) {
setRootId(rootId);
return this;
}
/**
*
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from it's
* expected configuration, as defined in the stack template and any values specified as template parameters. For
* more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* @param driftInformation
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from
* it's expected configuration, as defined in the stack template and any values specified as template
* parameters. For more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*/
public void setDriftInformation(StackDriftInformationSummary driftInformation) {
this.driftInformation = driftInformation;
}
/**
*
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from it's
* expected configuration, as defined in the stack template and any values specified as template parameters. For
* more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* @return Summarizes information about whether a stack's actual configuration differs, or has drifted, from
* it's expected configuration, as defined in the stack template and any values specified as template
* parameters. For more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*/
public StackDriftInformationSummary getDriftInformation() {
return this.driftInformation;
}
/**
*
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from it's
* expected configuration, as defined in the stack template and any values specified as template parameters. For
* more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* @param driftInformation
* Summarizes information about whether a stack's actual configuration differs, or has drifted, from
* it's expected configuration, as defined in the stack template and any values specified as template
* parameters. For more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StackSummary withDriftInformation(StackDriftInformationSummary driftInformation) {
setDriftInformation(driftInformation);
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 (getStackId() != null)
sb.append("StackId: ").append(getStackId()).append(",");
if (getStackName() != null)
sb.append("StackName: ").append(getStackName()).append(",");
if (getTemplateDescription() != null)
sb.append("TemplateDescription: ").append(getTemplateDescription()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(",");
if (getDeletionTime() != null)
sb.append("DeletionTime: ").append(getDeletionTime()).append(",");
if (getStackStatus() != null)
sb.append("StackStatus: ").append(getStackStatus()).append(",");
if (getStackStatusReason() != null)
sb.append("StackStatusReason: ").append(getStackStatusReason()).append(",");
if (getParentId() != null)
sb.append("ParentId: ").append(getParentId()).append(",");
if (getRootId() != null)
sb.append("RootId: ").append(getRootId()).append(",");
if (getDriftInformation() != null)
sb.append("DriftInformation: ").append(getDriftInformation());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StackSummary == false)
return false;
StackSummary other = (StackSummary) 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.getTemplateDescription() == null ^ this.getTemplateDescription() == null)
return false;
if (other.getTemplateDescription() != null && other.getTemplateDescription().equals(this.getTemplateDescription()) == 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.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null)
return false;
if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false)
return false;
if (other.getDeletionTime() == null ^ this.getDeletionTime() == null)
return false;
if (other.getDeletionTime() != null && other.getDeletionTime().equals(this.getDeletionTime()) == false)
return false;
if (other.getStackStatus() == null ^ this.getStackStatus() == null)
return false;
if (other.getStackStatus() != null && other.getStackStatus().equals(this.getStackStatus()) == false)
return false;
if (other.getStackStatusReason() == null ^ this.getStackStatusReason() == null)
return false;
if (other.getStackStatusReason() != null && other.getStackStatusReason().equals(this.getStackStatusReason()) == false)
return false;
if (other.getParentId() == null ^ this.getParentId() == null)
return false;
if (other.getParentId() != null && other.getParentId().equals(this.getParentId()) == false)
return false;
if (other.getRootId() == null ^ this.getRootId() == null)
return false;
if (other.getRootId() != null && other.getRootId().equals(this.getRootId()) == false)
return false;
if (other.getDriftInformation() == null ^ this.getDriftInformation() == null)
return false;
if (other.getDriftInformation() != null && other.getDriftInformation().equals(this.getDriftInformation()) == 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 + ((getTemplateDescription() == null) ? 0 : getTemplateDescription().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode());
hashCode = prime * hashCode + ((getDeletionTime() == null) ? 0 : getDeletionTime().hashCode());
hashCode = prime * hashCode + ((getStackStatus() == null) ? 0 : getStackStatus().hashCode());
hashCode = prime * hashCode + ((getStackStatusReason() == null) ? 0 : getStackStatusReason().hashCode());
hashCode = prime * hashCode + ((getParentId() == null) ? 0 : getParentId().hashCode());
hashCode = prime * hashCode + ((getRootId() == null) ? 0 : getRootId().hashCode());
hashCode = prime * hashCode + ((getDriftInformation() == null) ? 0 : getDriftInformation().hashCode());
return hashCode;
}
@Override
public StackSummary clone() {
try {
return (StackSummary) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}