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.config.model;
 

A list that contains the status of the delivery of the configuration stream notification to the Amazon SNS topic.

 
 public class ConfigStreamDeliveryInfo implements SerializableCloneable {

    
Status of the last attempted delivery.

Constraints:
Allowed Values: Success, Failure, Not_Applicable

 
     private String lastStatus;

    
The error code from the last attempted delivery.
 
     private String lastErrorCode;

    
The error message from the last attempted delivery.
 
     private String lastErrorMessage;

    
The time from the last status change.
 
     private java.util.Date lastStatusChangeTime;

    
Status of the last attempted delivery.

Constraints:
Allowed Values: Success, Failure, Not_Applicable

Returns:
Status of the last attempted delivery.
See also:
DeliveryStatus
 
     public String getLastStatus() {
         return ;
     }
    
    
Status of the last attempted delivery.

Constraints:
Allowed Values: Success, Failure, Not_Applicable

Parameters:
lastStatus Status of the last attempted delivery.
See also:
DeliveryStatus
 
     public void setLastStatus(String lastStatus) {
         this. = lastStatus;
     }
    
    
Status of the last attempted delivery.

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

Constraints:
Allowed Values: Success, Failure, Not_Applicable

Parameters:
lastStatus Status of the last attempted delivery.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DeliveryStatus
 
     public ConfigStreamDeliveryInfo withLastStatus(String lastStatus) {
         this. = lastStatus;
         return this;
     }

    
Status of the last attempted delivery.

Constraints:
Allowed Values: Success, Failure, Not_Applicable

Parameters:
lastStatus Status of the last attempted delivery.
See also:
DeliveryStatus
    public void setLastStatus(DeliveryStatus lastStatus) {
        this. = lastStatus.toString();
    }
    
    
Status of the last attempted delivery.

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

Constraints:
Allowed Values: Success, Failure, Not_Applicable

Parameters:
lastStatus Status of the last attempted delivery.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
DeliveryStatus
        this. = lastStatus.toString();
        return this;
    }

    
The error code from the last attempted delivery.

Returns:
The error code from the last attempted delivery.
    public String getLastErrorCode() {
        return ;
    }
    
    
The error code from the last attempted delivery.

Parameters:
lastErrorCode The error code from the last attempted delivery.
    public void setLastErrorCode(String lastErrorCode) {
        this. = lastErrorCode;
    }
    
    
The error code from the last attempted delivery.

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

Parameters:
lastErrorCode The error code from the last attempted delivery.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigStreamDeliveryInfo withLastErrorCode(String lastErrorCode) {
        this. = lastErrorCode;
        return this;
    }

    
The error message from the last attempted delivery.

Returns:
The error message from the last attempted delivery.
    public String getLastErrorMessage() {
        return ;
    }
    
    
The error message from the last attempted delivery.

Parameters:
lastErrorMessage The error message from the last attempted delivery.
    public void setLastErrorMessage(String lastErrorMessage) {
        this. = lastErrorMessage;
    }
    
    
The error message from the last attempted delivery.

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

Parameters:
lastErrorMessage The error message from the last attempted delivery.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigStreamDeliveryInfo withLastErrorMessage(String lastErrorMessage) {
        this. = lastErrorMessage;
        return this;
    }

    
The time from the last status change.

Returns:
The time from the last status change.
        return ;
    }
    
    
The time from the last status change.

Parameters:
lastStatusChangeTime The time from the last status change.
    public void setLastStatusChangeTime(java.util.Date lastStatusChangeTime) {
        this. = lastStatusChangeTime;
    }
    
    
The time from the last status change.

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

Parameters:
lastStatusChangeTime The time from the last status change.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigStreamDeliveryInfo withLastStatusChangeTime(java.util.Date lastStatusChangeTime) {
        this. = lastStatusChangeTime;
        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 (getLastStatus() != nullsb.append("LastStatus: " + getLastStatus() + ",");
        if (getLastErrorCode() != nullsb.append("LastErrorCode: " + getLastErrorCode() + ",");
        if (getLastErrorMessage() != nullsb.append("LastErrorMessage: " + getLastErrorMessage() + ",");
        if (getLastStatusChangeTime() != nullsb.append("LastStatusChangeTime: " + getLastStatusChangeTime() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLastStatus() == null) ? 0 : getLastStatus().hashCode()); 
        hashCode = prime * hashCode + ((getLastErrorCode() == null) ? 0 : getLastErrorCode().hashCode()); 
        hashCode = prime * hashCode + ((getLastErrorMessage() == null) ? 0 : getLastErrorMessage().hashCode()); 
        hashCode = prime * hashCode + ((getLastStatusChangeTime() == null) ? 0 : getLastStatusChangeTime().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ConfigStreamDeliveryInfo == falsereturn false;
        ConfigStreamDeliveryInfo other = (ConfigStreamDeliveryInfo)obj;
        
        if (other.getLastStatus() == null ^ this.getLastStatus() == nullreturn false;
        if (other.getLastStatus() != null && other.getLastStatus().equals(this.getLastStatus()) == falsereturn false
        if (other.getLastErrorCode() == null ^ this.getLastErrorCode() == nullreturn false;
        if (other.getLastErrorCode() != null && other.getLastErrorCode().equals(this.getLastErrorCode()) == falsereturn false
        if (other.getLastErrorMessage() == null ^ this.getLastErrorMessage() == nullreturn false;
        if (other.getLastErrorMessage() != null && other.getLastErrorMessage().equals(this.getLastErrorMessage()) == falsereturn false
        if (other.getLastStatusChangeTime() == null ^ this.getLastStatusChangeTime() == nullreturn false;
        if (other.getLastStatusChangeTime() != null && other.getLastStatusChangeTime().equals(this.getLastStatusChangeTime()) == falsereturn false
        return true;
    }
    
    @Override
    public ConfigStreamDeliveryInfo clone() {
        try {
            return (ConfigStreamDeliveryInfosuper.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