Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

The StackSummary Data Type

 
 public class StackSummary implements SerializableCloneable {

    
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.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

 
     private String stackStatus;

    
Success/Failure message associated with the stack status.
 
     private String stackStatusReason;

    
Unique stack identifier.

Returns:
Unique stack identifier.
 
     public String getStackId() {
         return ;
     }
    
    
Unique stack identifier.

Parameters:
stackId Unique stack identifier.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
Unique stack identifier.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackId Unique stack identifier.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public StackSummary withStackId(String stackId) {
         this. = stackId;
        return this;
    }

    
The name associated with the stack.

Returns:
The name associated with the stack.
    public String getStackName() {
        return ;
    }
    
    
The name associated with the stack.

Parameters:
stackName The name associated with the stack.
    public void setStackName(String stackName) {
        this. = stackName;
    }
    
    
The name associated with the stack.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackName The name associated with the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withStackName(String stackName) {
        this. = stackName;
        return this;
    }

    
The template description of the template used to create the stack.

Returns:
The template description of the template used to create the stack.
    public String getTemplateDescription() {
        return ;
    }
    
    
The template description of the template used to create the stack.

Parameters:
templateDescription The template description of the template used to create the stack.
    public void setTemplateDescription(String templateDescription) {
        this. = templateDescription;
    }
    
    
The template description of the template used to create the stack.

Returns a reference to this object so that method calls can be chained together.

Parameters:
templateDescription The template description of the template used to create the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withTemplateDescription(String templateDescription) {
        this. = templateDescription;
        return this;
    }

    
The time the stack was created.

Returns:
The time the stack was created.
    public java.util.Date getCreationTime() {
        return ;
    }
    
    
The time the stack was created.

Parameters:
creationTime The time the stack was created.
    public void setCreationTime(java.util.Date creationTime) {
        this. = creationTime;
    }
    
    
The time the stack was created.

Returns a reference to this object so that method calls can be chained together.

Parameters:
creationTime The time the stack was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withCreationTime(java.util.Date creationTime) {
        this. = 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.

Returns:
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 ;
    }
    
    
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.

Parameters:
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;
    }
    
    
The time the stack was last updated. This field will only be returned if the stack has been updated at least once.

Returns a reference to this object so that method calls can be chained together.

Parameters:
lastUpdatedTime The time the stack was last updated. This field will only be returned if the stack has been updated at least once.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withLastUpdatedTime(java.util.Date lastUpdatedTime) {
        this. = lastUpdatedTime;
        return this;
    }

    
The time the stack was deleted.

Returns:
The time the stack was deleted.
    public java.util.Date getDeletionTime() {
        return ;
    }
    
    
The time the stack was deleted.

Parameters:
deletionTime The time the stack was deleted.
    public void setDeletionTime(java.util.Date deletionTime) {
        this. = deletionTime;
    }
    
    
The time the stack was deleted.

Returns a reference to this object so that method calls can be chained together.

Parameters:
deletionTime The time the stack was deleted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withDeletionTime(java.util.Date deletionTime) {
        this. = deletionTime;
        return this;
    }

    
The current status of the stack.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

Returns:
The current status of the stack.
See also:
StackStatus
    public String getStackStatus() {
        return ;
    }
    
    
The current status of the stack.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

Parameters:
stackStatus The current status of the stack.
See also:
StackStatus
    public void setStackStatus(String stackStatus) {
        this. = stackStatus;
    }
    
    
The current status of the stack.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

Parameters:
stackStatus The current status of the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StackStatus
    public StackSummary withStackStatus(String stackStatus) {
        this. = stackStatus;
        return this;
    }

    
The current status of the stack.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

Parameters:
stackStatus The current status of the stack.
See also:
StackStatus
    public void setStackStatus(StackStatus stackStatus) {
        this. = stackStatus.toString();
    }
    
    
The current status of the stack.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, ROLLBACK_IN_PROGRESS, ROLLBACK_FAILED, ROLLBACK_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, UPDATE_IN_PROGRESS, UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_ROLLBACK_IN_PROGRESS, UPDATE_ROLLBACK_FAILED, UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS, UPDATE_ROLLBACK_COMPLETE

Parameters:
stackStatus The current status of the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
StackStatus
    public StackSummary withStackStatus(StackStatus stackStatus) {
        this. = stackStatus.toString();
        return this;
    }

    
Success/Failure message associated with the stack status.

Returns:
Success/Failure message associated with the stack status.
    public String getStackStatusReason() {
        return ;
    }
    
    
Success/Failure message associated with the stack status.

Parameters:
stackStatusReason Success/Failure message associated with the stack status.
    public void setStackStatusReason(String stackStatusReason) {
        this. = stackStatusReason;
    }
    
    
Success/Failure message associated with the stack status.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackStatusReason Success/Failure message associated with the stack status.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackSummary withStackStatusReason(String stackStatusReason) {
        this. = stackStatusReason;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getStackName() != nullsb.append("StackName: " + getStackName() + ",");
        if (getTemplateDescription() != nullsb.append("TemplateDescription: " + getTemplateDescription() + ",");
        if (getCreationTime() != nullsb.append("CreationTime: " + getCreationTime() + ",");
        if (getLastUpdatedTime() != nullsb.append("LastUpdatedTime: " + getLastUpdatedTime() + ",");
        if (getDeletionTime() != nullsb.append("DeletionTime: " + getDeletionTime() + ",");
        if (getStackStatus() != nullsb.append("StackStatus: " + getStackStatus() + ",");
        if (getStackStatusReason() != nullsb.append("StackStatusReason: " + getStackStatusReason() );
        sb.append("}");
        return sb.toString();
    }
    
    @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()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof StackSummary == falsereturn false;
        StackSummary other = (StackSummary)obj;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getStackName() == null ^ this.getStackName() == nullreturn false;
        if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == falsereturn false
        if (other.getTemplateDescription() == null ^ this.getTemplateDescription() == nullreturn false;
        if (other.getTemplateDescription() != null && other.getTemplateDescription().equals(this.getTemplateDescription()) == falsereturn false
        if (other.getCreationTime() == null ^ this.getCreationTime() == nullreturn false;
        if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == falsereturn false
        if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == nullreturn false;
        if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == falsereturn false
        if (other.getDeletionTime() == null ^ this.getDeletionTime() == nullreturn false;
        if (other.getDeletionTime() != null && other.getDeletionTime().equals(this.getDeletionTime()) == falsereturn false
        if (other.getStackStatus() == null ^ this.getStackStatus() == nullreturn false;
        if (other.getStackStatus() != null && other.getStackStatus().equals(this.getStackStatus()) == falsereturn false
        if (other.getStackStatusReason() == null ^ this.getStackStatusReason() == nullreturn false;
        if (other.getStackStatusReason() != null && other.getStackStatusReason().equals(this.getStackStatusReason()) == falsereturn false
        return true;
    }
    
    @Override
    public StackSummary clone() {
        try {
            return (StackSummarysuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X