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;
 

The current status of the configuration recorder.

 
 public class ConfigurationRecorderStatus implements SerializableCloneable {

    
The name of the configuration recorder.
 
     private String name;

    
The time the recorder was last started.
 
     private java.util.Date lastStartTime;

    
The time the recorder was last stopped.
 
     private java.util.Date lastStopTime;

    
Specifies whether the recorder is currently recording or not.
 
     private Boolean recording;

    
The last (previous) status of the recorder.

Constraints:
Allowed Values: Pending, Success, Failure

 
     private String lastStatus;

    
The error code indicating that the recording failed.
 
     private String lastErrorCode;

    
The message indicating that the recording failed due to an error.
 
     private String lastErrorMessage;

    
The time when the status was last changed.
 
     private java.util.Date lastStatusChangeTime;

    
The name of the configuration recorder.

Returns:
The name of the configuration recorder.
 
     public String getName() {
         return ;
     }
    
    
The name of the configuration recorder.

Parameters:
name The name of the configuration recorder.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The name of the configuration recorder.

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

Parameters:
name The name of the configuration recorder.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ConfigurationRecorderStatus withName(String name) {
         this. = name;
         return this;
    }

    
The time the recorder was last started.

Returns:
The time the recorder was last started.
    public java.util.Date getLastStartTime() {
        return ;
    }
    
    
The time the recorder was last started.

Parameters:
lastStartTime The time the recorder was last started.
    public void setLastStartTime(java.util.Date lastStartTime) {
        this. = lastStartTime;
    }
    
    
The time the recorder was last started.

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

Parameters:
lastStartTime The time the recorder was last started.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus withLastStartTime(java.util.Date lastStartTime) {
        this. = lastStartTime;
        return this;
    }

    
The time the recorder was last stopped.

Returns:
The time the recorder was last stopped.
    public java.util.Date getLastStopTime() {
        return ;
    }
    
    
The time the recorder was last stopped.

Parameters:
lastStopTime The time the recorder was last stopped.
    public void setLastStopTime(java.util.Date lastStopTime) {
        this. = lastStopTime;
    }
    
    
The time the recorder was last stopped.

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

Parameters:
lastStopTime The time the recorder was last stopped.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus withLastStopTime(java.util.Date lastStopTime) {
        this. = lastStopTime;
        return this;
    }

    
Specifies whether the recorder is currently recording or not.

Returns:
Specifies whether the recorder is currently recording or not.
    public Boolean isRecording() {
        return ;
    }
    
    
Specifies whether the recorder is currently recording or not.

Parameters:
recording Specifies whether the recorder is currently recording or not.
    public void setRecording(Boolean recording) {
        this. = recording;
    }
    
    
Specifies whether the recorder is currently recording or not.

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

Parameters:
recording Specifies whether the recorder is currently recording or not.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus withRecording(Boolean recording) {
        this. = recording;
        return this;
    }

    
Specifies whether the recorder is currently recording or not.

Returns:
Specifies whether the recorder is currently recording or not.
    public Boolean getRecording() {
        return ;
    }

    
The last (previous) status of the recorder.

Constraints:
Allowed Values: Pending, Success, Failure

Returns:
The last (previous) status of the recorder.
See also:
RecorderStatus
    public String getLastStatus() {
        return ;
    }
    
    
The last (previous) status of the recorder.

Constraints:
Allowed Values: Pending, Success, Failure

Parameters:
lastStatus The last (previous) status of the recorder.
See also:
RecorderStatus
    public void setLastStatus(String lastStatus) {
        this. = lastStatus;
    }
    
    
The last (previous) status of the recorder.

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

Constraints:
Allowed Values: Pending, Success, Failure

Parameters:
lastStatus The last (previous) status of the recorder.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RecorderStatus
    public ConfigurationRecorderStatus withLastStatus(String lastStatus) {
        this. = lastStatus;
        return this;
    }

    
The last (previous) status of the recorder.

Constraints:
Allowed Values: Pending, Success, Failure

Parameters:
lastStatus The last (previous) status of the recorder.
See also:
RecorderStatus
    public void setLastStatus(RecorderStatus lastStatus) {
        this. = lastStatus.toString();
    }
    
    
The last (previous) status of the recorder.

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

Constraints:
Allowed Values: Pending, Success, Failure

Parameters:
lastStatus The last (previous) status of the recorder.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
RecorderStatus
        this. = lastStatus.toString();
        return this;
    }

    
The error code indicating that the recording failed.

Returns:
The error code indicating that the recording failed.
    public String getLastErrorCode() {
        return ;
    }
    
    
The error code indicating that the recording failed.

Parameters:
lastErrorCode The error code indicating that the recording failed.
    public void setLastErrorCode(String lastErrorCode) {
        this. = lastErrorCode;
    }
    
    
The error code indicating that the recording failed.

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

Parameters:
lastErrorCode The error code indicating that the recording failed.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus withLastErrorCode(String lastErrorCode) {
        this. = lastErrorCode;
        return this;
    }

    
The message indicating that the recording failed due to an error.

Returns:
The message indicating that the recording failed due to an error.
    public String getLastErrorMessage() {
        return ;
    }
    
    
The message indicating that the recording failed due to an error.

Parameters:
lastErrorMessage The message indicating that the recording failed due to an error.
    public void setLastErrorMessage(String lastErrorMessage) {
        this. = lastErrorMessage;
    }
    
    
The message indicating that the recording failed due to an error.

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

Parameters:
lastErrorMessage The message indicating that the recording failed due to an error.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus withLastErrorMessage(String lastErrorMessage) {
        this. = lastErrorMessage;
        return this;
    }

    
The time when the status was last changed.

Returns:
The time when the status was last changed.
        return ;
    }
    
    
The time when the status was last changed.

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

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

Parameters:
lastStatusChangeTime The time when the status was last changed.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ConfigurationRecorderStatus 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 (getName() != nullsb.append("Name: " + getName() + ",");
        if (getLastStartTime() != nullsb.append("LastStartTime: " + getLastStartTime() + ",");
        if (getLastStopTime() != nullsb.append("LastStopTime: " + getLastStopTime() + ",");
        if (isRecording() != nullsb.append("Recording: " + isRecording() + ",");
        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 + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getLastStartTime() == null) ? 0 : getLastStartTime().hashCode()); 
        hashCode = prime * hashCode + ((getLastStopTime() == null) ? 0 : getLastStopTime().hashCode()); 
        hashCode = prime * hashCode + ((isRecording() == null) ? 0 : isRecording().hashCode()); 
        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 ConfigurationRecorderStatus == falsereturn false;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getLastStartTime() == null ^ this.getLastStartTime() == nullreturn false;
        if (other.getLastStartTime() != null && other.getLastStartTime().equals(this.getLastStartTime()) == falsereturn false
        if (other.getLastStopTime() == null ^ this.getLastStopTime() == nullreturn false;
        if (other.getLastStopTime() != null && other.getLastStopTime().equals(this.getLastStopTime()) == falsereturn false
        if (other.isRecording() == null ^ this.isRecording() == nullreturn false;
        if (other.isRecording() != null && other.isRecording().equals(this.isRecording()) == falsereturn false
        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
        try {
            return (ConfigurationRecorderStatussuper.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