tags) {
setTags(tags);
return this;
}
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
* For more information, see Protecting a
* Stack From Being Deleted in the CloudFormation User Guide.
*
*
* @param enableTerminationProtection
* Whether termination protection is enabled for the stack.
*
* For
* nested stacks, termination protection is set on the root stack and can't be changed directly on the
* nested stack. For more information, see Protecting a Stack From Being Deleted in the CloudFormation User Guide.
*/
public void setEnableTerminationProtection(Boolean enableTerminationProtection) {
this.enableTerminationProtection = enableTerminationProtection;
}
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
* For more information, see Protecting a
* Stack From Being Deleted in the CloudFormation User Guide.
*
*
* @return Whether termination protection is enabled for the stack.
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested
* stack. For more information, see Protecting a Stack From Being Deleted in the CloudFormation User Guide.
*/
public Boolean getEnableTerminationProtection() {
return this.enableTerminationProtection;
}
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
* For more information, see Protecting a
* Stack From Being Deleted in the CloudFormation User Guide.
*
*
* @param enableTerminationProtection
* Whether termination protection is enabled for the stack.
*
* For
* nested stacks, termination protection is set on the root stack and can't be changed directly on the
* nested stack. For more information, see Protecting a Stack From Being Deleted in the CloudFormation User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Stack withEnableTerminationProtection(Boolean enableTerminationProtection) {
setEnableTerminationProtection(enableTerminationProtection);
return this;
}
/**
*
* Whether termination protection is enabled for the stack.
*
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
* For more information, see Protecting a
* Stack From Being Deleted in the CloudFormation User Guide.
*
*
* @return Whether termination protection is enabled for the stack.
*
* For nested
* stacks, termination protection is set on the root stack and can't be changed directly on the nested
* stack. For more information, see Protecting a Stack From Being Deleted in the CloudFormation User Guide.
*/
public Boolean isEnableTerminationProtection() {
return this.enableTerminationProtection;
}
/**
*
* 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 Stack 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 Stack withRootId(String rootId) {
setRootId(rootId);
return this;
}
/**
*
* Information about whether a stack's actual configuration differs, or has drifted, from its 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
* Information about whether a stack's actual configuration differs, or has drifted, from its 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(StackDriftInformation driftInformation) {
this.driftInformation = driftInformation;
}
/**
*
* Information about whether a stack's actual configuration differs, or has drifted, from its 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 Information about whether a stack's actual configuration differs, or has drifted, from its
* 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 StackDriftInformation getDriftInformation() {
return this.driftInformation;
}
/**
*
* Information about whether a stack's actual configuration differs, or has drifted, from its 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
* Information about whether a stack's actual configuration differs, or has drifted, from its 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 Stack withDriftInformation(StackDriftInformation driftInformation) {
setDriftInformation(driftInformation);
return this;
}
/**
*
* When set to true
, newly created resources are deleted when the operation rolls back. This includes
* newly created resources marked with a deletion policy of Retain
.
*
*
* Default: false
*
*
* @param retainExceptOnCreate
* When set to true
, newly created resources are deleted when the operation rolls back. This
* includes newly created resources marked with a deletion policy of Retain
.
*
* Default: false
*/
public void setRetainExceptOnCreate(Boolean retainExceptOnCreate) {
this.retainExceptOnCreate = retainExceptOnCreate;
}
/**
*
* When set to true
, newly created resources are deleted when the operation rolls back. This includes
* newly created resources marked with a deletion policy of Retain
.
*
*
* Default: false
*
*
* @return When set to true
, newly created resources are deleted when the operation rolls back. This
* includes newly created resources marked with a deletion policy of Retain
.
*
* Default: false
*/
public Boolean getRetainExceptOnCreate() {
return this.retainExceptOnCreate;
}
/**
*
* When set to true
, newly created resources are deleted when the operation rolls back. This includes
* newly created resources marked with a deletion policy of Retain
.
*
*
* Default: false
*
*
* @param retainExceptOnCreate
* When set to true
, newly created resources are deleted when the operation rolls back. This
* includes newly created resources marked with a deletion policy of Retain
.
*
* Default: false
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Stack withRetainExceptOnCreate(Boolean retainExceptOnCreate) {
setRetainExceptOnCreate(retainExceptOnCreate);
return this;
}
/**
*
* When set to true
, newly created resources are deleted when the operation rolls back. This includes
* newly created resources marked with a deletion policy of Retain
.
*
*
* Default: false
*
*
* @return When set to true
, newly created resources are deleted when the operation rolls back. This
* includes newly created resources marked with a deletion policy of Retain
.
*
* Default: false
*/
public Boolean isRetainExceptOnCreate() {
return this.retainExceptOnCreate;
}
/**
* 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 (getChangeSetId() != null)
sb.append("ChangeSetId: ").append(getChangeSetId()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getDeletionTime() != null)
sb.append("DeletionTime: ").append(getDeletionTime()).append(",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(",");
if (getRollbackConfiguration() != null)
sb.append("RollbackConfiguration: ").append(getRollbackConfiguration()).append(",");
if (getStackStatus() != null)
sb.append("StackStatus: ").append(getStackStatus()).append(",");
if (getStackStatusReason() != null)
sb.append("StackStatusReason: ").append(getStackStatusReason()).append(",");
if (getDisableRollback() != null)
sb.append("DisableRollback: ").append(getDisableRollback()).append(",");
if (getNotificationARNs() != null)
sb.append("NotificationARNs: ").append(getNotificationARNs()).append(",");
if (getTimeoutInMinutes() != null)
sb.append("TimeoutInMinutes: ").append(getTimeoutInMinutes()).append(",");
if (getCapabilities() != null)
sb.append("Capabilities: ").append(getCapabilities()).append(",");
if (getOutputs() != null)
sb.append("Outputs: ").append(getOutputs()).append(",");
if (getRoleARN() != null)
sb.append("RoleARN: ").append(getRoleARN()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getEnableTerminationProtection() != null)
sb.append("EnableTerminationProtection: ").append(getEnableTerminationProtection()).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()).append(",");
if (getRetainExceptOnCreate() != null)
sb.append("RetainExceptOnCreate: ").append(getRetainExceptOnCreate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Stack == false)
return false;
Stack other = (Stack) 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.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == 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.getDeletionTime() == null ^ this.getDeletionTime() == null)
return false;
if (other.getDeletionTime() != null && other.getDeletionTime().equals(this.getDeletionTime()) == 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.getRollbackConfiguration() == null ^ this.getRollbackConfiguration() == null)
return false;
if (other.getRollbackConfiguration() != null && other.getRollbackConfiguration().equals(this.getRollbackConfiguration()) == 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.getDisableRollback() == null ^ this.getDisableRollback() == null)
return false;
if (other.getDisableRollback() != null && other.getDisableRollback().equals(this.getDisableRollback()) == false)
return false;
if (other.getNotificationARNs() == null ^ this.getNotificationARNs() == null)
return false;
if (other.getNotificationARNs() != null && other.getNotificationARNs().equals(this.getNotificationARNs()) == false)
return false;
if (other.getTimeoutInMinutes() == null ^ this.getTimeoutInMinutes() == null)
return false;
if (other.getTimeoutInMinutes() != null && other.getTimeoutInMinutes().equals(this.getTimeoutInMinutes()) == false)
return false;
if (other.getCapabilities() == null ^ this.getCapabilities() == null)
return false;
if (other.getCapabilities() != null && other.getCapabilities().equals(this.getCapabilities()) == false)
return false;
if (other.getOutputs() == null ^ this.getOutputs() == null)
return false;
if (other.getOutputs() != null && other.getOutputs().equals(this.getOutputs()) == false)
return false;
if (other.getRoleARN() == null ^ this.getRoleARN() == null)
return false;
if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getEnableTerminationProtection() == null ^ this.getEnableTerminationProtection() == null)
return false;
if (other.getEnableTerminationProtection() != null && other.getEnableTerminationProtection().equals(this.getEnableTerminationProtection()) == 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;
if (other.getRetainExceptOnCreate() == null ^ this.getRetainExceptOnCreate() == null)
return false;
if (other.getRetainExceptOnCreate() != null && other.getRetainExceptOnCreate().equals(this.getRetainExceptOnCreate()) == 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 + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getDeletionTime() == null) ? 0 : getDeletionTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode());
hashCode = prime * hashCode + ((getRollbackConfiguration() == null) ? 0 : getRollbackConfiguration().hashCode());
hashCode = prime * hashCode + ((getStackStatus() == null) ? 0 : getStackStatus().hashCode());
hashCode = prime * hashCode + ((getStackStatusReason() == null) ? 0 : getStackStatusReason().hashCode());
hashCode = prime * hashCode + ((getDisableRollback() == null) ? 0 : getDisableRollback().hashCode());
hashCode = prime * hashCode + ((getNotificationARNs() == null) ? 0 : getNotificationARNs().hashCode());
hashCode = prime * hashCode + ((getTimeoutInMinutes() == null) ? 0 : getTimeoutInMinutes().hashCode());
hashCode = prime * hashCode + ((getCapabilities() == null) ? 0 : getCapabilities().hashCode());
hashCode = prime * hashCode + ((getOutputs() == null) ? 0 : getOutputs().hashCode());
hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getEnableTerminationProtection() == null) ? 0 : getEnableTerminationProtection().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());
hashCode = prime * hashCode + ((getRetainExceptOnCreate() == null) ? 0 : getRetainExceptOnCreate().hashCode());
return hashCode;
}
@Override
public Stack clone() {
try {
return (Stack) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}