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 StackEvent data type.

 
 public class StackEvent implements SerializableCloneable {

    
The unique ID name of the instance of the stack.
 
     private String stackId;

    
The unique ID of this event.
 
     private String eventId;

    
The name associated with a stack.
 
     private String stackName;

    
The logical name of the resource specified in the template.
 
     private String logicalResourceId;

    
The name or unique identifier associated with the physical instance of the resource.
 
     private String physicalResourceId;

    
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
 
     private String resourceType;

    
Time the status was updated.
 
     private java.util.Date timestamp;

    
Current status of the resource.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

 
     private String resourceStatus;

    
Success/failure message associated with the resource.
 
     private String resourceStatusReason;

    
BLOB of the properties used to create the resource.
 
     private String resourceProperties;

    
The unique ID name of the instance of the stack.

Returns:
The unique ID name of the instance of the stack.
 
     public String getStackId() {
         return ;
     }
    
    
The unique ID name of the instance of the stack.

Parameters:
stackId The unique ID name of the instance of the stack.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
The unique ID name of the instance of the stack.

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

Parameters:
stackId The unique ID name of the instance of the stack.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withStackId(String stackId) {
        this. = stackId;
        return this;
    }

    
The unique ID of this event.

Returns:
The unique ID of this event.
    public String getEventId() {
        return ;
    }
    
    
The unique ID of this event.

Parameters:
eventId The unique ID of this event.
    public void setEventId(String eventId) {
        this. = eventId;
    }
    
    
The unique ID of this event.

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

Parameters:
eventId The unique ID of this event.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withEventId(String eventId) {
        this. = eventId;
        return this;
    }

    
The name associated with a stack.

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

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

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

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

    
The logical name of the resource specified in the template.

Returns:
The logical name of the resource specified in the template.
    public String getLogicalResourceId() {
        return ;
    }
    
    
The logical name of the resource specified in the template.

Parameters:
logicalResourceId The logical name of the resource specified in the template.
    public void setLogicalResourceId(String logicalResourceId) {
        this. = logicalResourceId;
    }
    
    
The logical name of the resource specified in the template.

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

Parameters:
logicalResourceId The logical name of the resource specified in the template.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withLogicalResourceId(String logicalResourceId) {
        this. = logicalResourceId;
        return this;
    }

    
The name or unique identifier associated with the physical instance of the resource.

Returns:
The name or unique identifier associated with the physical instance of the resource.
    public String getPhysicalResourceId() {
        return ;
    }
    
    
The name or unique identifier associated with the physical instance of the resource.

Parameters:
physicalResourceId The name or unique identifier associated with the physical instance of the resource.
    public void setPhysicalResourceId(String physicalResourceId) {
        this. = physicalResourceId;
    }
    
    
The name or unique identifier associated with the physical instance of the resource.

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

Parameters:
physicalResourceId The name or unique identifier associated with the physical instance of the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withPhysicalResourceId(String physicalResourceId) {
        this. = physicalResourceId;
        return this;
    }

    
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)

Returns:
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
    public String getResourceType() {
        return ;
    }
    
    
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)

Parameters:
resourceType Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
    public void setResourceType(String resourceType) {
        this. = resourceType;
    }
    
    
Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)

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

Parameters:
resourceType Type of resource. (For more information, go to AWS Resource Types Reference in the AWS CloudFormation User Guide.)
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withResourceType(String resourceType) {
        this. = resourceType;
        return this;
    }

    
Time the status was updated.

Returns:
Time the status was updated.
    public java.util.Date getTimestamp() {
        return ;
    }
    
    
Time the status was updated.

Parameters:
timestamp Time the status was updated.
    public void setTimestamp(java.util.Date timestamp) {
        this. = timestamp;
    }
    
    
Time the status was updated.

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

Parameters:
timestamp Time the status was updated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withTimestamp(java.util.Date timestamp) {
        this. = timestamp;
        return this;
    }

    
Current status of the resource.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

Returns:
Current status of the resource.
See also:
ResourceStatus
    public String getResourceStatus() {
        return ;
    }
    
    
Current status of the resource.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

Parameters:
resourceStatus Current status of the resource.
See also:
ResourceStatus
    public void setResourceStatus(String resourceStatus) {
        this. = resourceStatus;
    }
    
    
Current status of the resource.

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

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

Parameters:
resourceStatus Current status of the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ResourceStatus
    public StackEvent withResourceStatus(String resourceStatus) {
        this. = resourceStatus;
        return this;
    }

    
Current status of the resource.

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

Parameters:
resourceStatus Current status of the resource.
See also:
ResourceStatus
    public void setResourceStatus(ResourceStatus resourceStatus) {
        this. = resourceStatus.toString();
    }
    
    
Current status of the resource.

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

Constraints:
Allowed Values: CREATE_IN_PROGRESS, CREATE_FAILED, CREATE_COMPLETE, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, DELETE_SKIPPED, UPDATE_IN_PROGRESS, UPDATE_FAILED, UPDATE_COMPLETE

Parameters:
resourceStatus Current status of the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ResourceStatus
    public StackEvent withResourceStatus(ResourceStatus resourceStatus) {
        this. = resourceStatus.toString();
        return this;
    }

    
Success/failure message associated with the resource.

Returns:
Success/failure message associated with the resource.
    public String getResourceStatusReason() {
        return ;
    }
    
    
Success/failure message associated with the resource.

Parameters:
resourceStatusReason Success/failure message associated with the resource.
    public void setResourceStatusReason(String resourceStatusReason) {
        this. = resourceStatusReason;
    }
    
    
Success/failure message associated with the resource.

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

Parameters:
resourceStatusReason Success/failure message associated with the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withResourceStatusReason(String resourceStatusReason) {
        this. = resourceStatusReason;
        return this;
    }

    
BLOB of the properties used to create the resource.

Returns:
BLOB of the properties used to create the resource.
    public String getResourceProperties() {
        return ;
    }
    
    
BLOB of the properties used to create the resource.

Parameters:
resourceProperties BLOB of the properties used to create the resource.
    public void setResourceProperties(String resourceProperties) {
        this. = resourceProperties;
    }
    
    
BLOB of the properties used to create the resource.

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

Parameters:
resourceProperties BLOB of the properties used to create the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public StackEvent withResourceProperties(String resourceProperties) {
        this. = resourceProperties;
        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 (getEventId() != nullsb.append("EventId: " + getEventId() + ",");
        if (getStackName() != nullsb.append("StackName: " + getStackName() + ",");
        if (getLogicalResourceId() != nullsb.append("LogicalResourceId: " + getLogicalResourceId() + ",");
        if (getPhysicalResourceId() != nullsb.append("PhysicalResourceId: " + getPhysicalResourceId() + ",");
        if (getResourceType() != nullsb.append("ResourceType: " + getResourceType() + ",");
        if (getTimestamp() != nullsb.append("Timestamp: " + getTimestamp() + ",");
        if (getResourceStatus() != nullsb.append("ResourceStatus: " + getResourceStatus() + ",");
        if (getResourceStatusReason() != nullsb.append("ResourceStatusReason: " + getResourceStatusReason() + ",");
        if (getResourceProperties() != nullsb.append("ResourceProperties: " + getResourceProperties() );
        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 + ((getEventId() == null) ? 0 : getEventId().hashCode()); 
        hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); 
        hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); 
        hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); 
        hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); 
        hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getResourceStatus() == null) ? 0 : getResourceStatus().hashCode()); 
        hashCode = prime * hashCode + ((getResourceStatusReason() == null) ? 0 : getResourceStatusReason().hashCode()); 
        hashCode = prime * hashCode + ((getResourceProperties() == null) ? 0 : getResourceProperties().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof StackEvent == falsereturn false;
        StackEvent other = (StackEvent)obj;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getEventId() == null ^ this.getEventId() == nullreturn false;
        if (other.getEventId() != null && other.getEventId().equals(this.getEventId()) == falsereturn false
        if (other.getStackName() == null ^ this.getStackName() == nullreturn false;
        if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == falsereturn false
        if (other.getLogicalResourceId() == null ^ this.getLogicalResourceId() == nullreturn false;
        if (other.getLogicalResourceId() != null && other.getLogicalResourceId().equals(this.getLogicalResourceId()) == falsereturn false
        if (other.getPhysicalResourceId() == null ^ this.getPhysicalResourceId() == nullreturn false;
        if (other.getPhysicalResourceId() != null && other.getPhysicalResourceId().equals(this.getPhysicalResourceId()) == falsereturn false
        if (other.getResourceType() == null ^ this.getResourceType() == nullreturn false;
        if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == falsereturn false
        if (other.getTimestamp() == null ^ this.getTimestamp() == nullreturn false;
        if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == falsereturn false
        if (other.getResourceStatus() == null ^ this.getResourceStatus() == nullreturn false;
        if (other.getResourceStatus() != null && other.getResourceStatus().equals(this.getResourceStatus()) == falsereturn false
        if (other.getResourceStatusReason() == null ^ this.getResourceStatusReason() == nullreturn false;
        if (other.getResourceStatusReason() != null && other.getResourceStatusReason().equals(this.getResourceStatusReason()) == falsereturn false
        if (other.getResourceProperties() == null ^ this.getResourceProperties() == nullreturn false;
        if (other.getResourceProperties() != null && other.getResourceProperties().equals(this.getResourceProperties()) == falsereturn false
        return true;
    }
    
    @Override
    public StackEvent clone() {
        try {
            return (StackEventsuper.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