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

Describes the status of logging for a cluster.

 
 public class EnableLoggingResult implements SerializableCloneable {

    
true if logging is on, false if logging is off.
 
     private Boolean loggingEnabled;

    
The name of the S3 bucket where the log files are stored.
 
     private String bucketName;

    
The prefix applied to the log file names.
 
     private String s3KeyPrefix;

    
The last time when logs were delivered.
 
     private java.util.Date lastSuccessfulDeliveryTime;

    
The last time when logs failed to be delivered.
 
     private java.util.Date lastFailureTime;

    
The message indicating that logs failed to be delivered.
 
     private String lastFailureMessage;

    
true if logging is on, false if logging is off.

Returns:
true if logging is on, false if logging is off.
 
     public Boolean isLoggingEnabled() {
         return ;
     }
    
    
true if logging is on, false if logging is off.

Parameters:
loggingEnabled true if logging is on, false if logging is off.
 
     public void setLoggingEnabled(Boolean loggingEnabled) {
         this. = loggingEnabled;
     }
    
    
true if logging is on, false if logging is off.

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

Parameters:
loggingEnabled true if logging is on, false if logging is off.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public EnableLoggingResult withLoggingEnabled(Boolean loggingEnabled) {
         this. = loggingEnabled;
         return this;
     }

    
true if logging is on, false if logging is off.

Returns:
true if logging is on, false if logging is off.
    public Boolean getLoggingEnabled() {
        return ;
    }

    
The name of the S3 bucket where the log files are stored.

Returns:
The name of the S3 bucket where the log files are stored.
    public String getBucketName() {
        return ;
    }
    
    
The name of the S3 bucket where the log files are stored.

Parameters:
bucketName The name of the S3 bucket where the log files are stored.
    public void setBucketName(String bucketName) {
        this. = bucketName;
    }
    
    
The name of the S3 bucket where the log files are stored.

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

Parameters:
bucketName The name of the S3 bucket where the log files are stored.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingResult withBucketName(String bucketName) {
        this. = bucketName;
        return this;
    }

    
The prefix applied to the log file names.

Returns:
The prefix applied to the log file names.
    public String getS3KeyPrefix() {
        return ;
    }
    
    
The prefix applied to the log file names.

Parameters:
s3KeyPrefix The prefix applied to the log file names.
    public void setS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
    }
    
    
The prefix applied to the log file names.

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

Parameters:
s3KeyPrefix The prefix applied to the log file names.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingResult withS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
        return this;
    }

    
The last time when logs were delivered.

Returns:
The last time when logs were delivered.
        return ;
    }
    
    
The last time when logs were delivered.

Parameters:
lastSuccessfulDeliveryTime The last time when logs were delivered.
    public void setLastSuccessfulDeliveryTime(java.util.Date lastSuccessfulDeliveryTime) {
        this. = lastSuccessfulDeliveryTime;
    }
    
    
The last time when logs were delivered.

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

Parameters:
lastSuccessfulDeliveryTime The last time when logs were delivered.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingResult withLastSuccessfulDeliveryTime(java.util.Date lastSuccessfulDeliveryTime) {
        this. = lastSuccessfulDeliveryTime;
        return this;
    }

    
The last time when logs failed to be delivered.

Returns:
The last time when logs failed to be delivered.
    public java.util.Date getLastFailureTime() {
        return ;
    }
    
    
The last time when logs failed to be delivered.

Parameters:
lastFailureTime The last time when logs failed to be delivered.
    public void setLastFailureTime(java.util.Date lastFailureTime) {
        this. = lastFailureTime;
    }
    
    
The last time when logs failed to be delivered.

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

Parameters:
lastFailureTime The last time when logs failed to be delivered.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingResult withLastFailureTime(java.util.Date lastFailureTime) {
        this. = lastFailureTime;
        return this;
    }

    
The message indicating that logs failed to be delivered.

Returns:
The message indicating that logs failed to be delivered.
    public String getLastFailureMessage() {
        return ;
    }
    
    
The message indicating that logs failed to be delivered.

Parameters:
lastFailureMessage The message indicating that logs failed to be delivered.
    public void setLastFailureMessage(String lastFailureMessage) {
        this. = lastFailureMessage;
    }
    
    
The message indicating that logs failed to be delivered.

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

Parameters:
lastFailureMessage The message indicating that logs failed to be delivered.
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingResult withLastFailureMessage(String lastFailureMessage) {
        this. = lastFailureMessage;
        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 (isLoggingEnabled() != nullsb.append("LoggingEnabled: " + isLoggingEnabled() + ",");
        if (getBucketName() != nullsb.append("BucketName: " + getBucketName() + ",");
        if (getS3KeyPrefix() != nullsb.append("S3KeyPrefix: " + getS3KeyPrefix() + ",");
        if (getLastSuccessfulDeliveryTime() != nullsb.append("LastSuccessfulDeliveryTime: " + getLastSuccessfulDeliveryTime() + ",");
        if (getLastFailureTime() != nullsb.append("LastFailureTime: " + getLastFailureTime() + ",");
        if (getLastFailureMessage() != nullsb.append("LastFailureMessage: " + getLastFailureMessage() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((isLoggingEnabled() == null) ? 0 : isLoggingEnabled().hashCode()); 
        hashCode = prime * hashCode + ((getBucketName() == null) ? 0 : getBucketName().hashCode()); 
        hashCode = prime * hashCode + ((getS3KeyPrefix() == null) ? 0 : getS3KeyPrefix().hashCode()); 
        hashCode = prime * hashCode + ((getLastSuccessfulDeliveryTime() == null) ? 0 : getLastSuccessfulDeliveryTime().hashCode()); 
        hashCode = prime * hashCode + ((getLastFailureTime() == null) ? 0 : getLastFailureTime().hashCode()); 
        hashCode = prime * hashCode + ((getLastFailureMessage() == null) ? 0 : getLastFailureMessage().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof EnableLoggingResult == falsereturn false;
        EnableLoggingResult other = (EnableLoggingResult)obj;
        
        if (other.isLoggingEnabled() == null ^ this.isLoggingEnabled() == nullreturn false;
        if (other.isLoggingEnabled() != null && other.isLoggingEnabled().equals(this.isLoggingEnabled()) == falsereturn false
        if (other.getBucketName() == null ^ this.getBucketName() == nullreturn false;
        if (other.getBucketName() != null && other.getBucketName().equals(this.getBucketName()) == falsereturn false
        if (other.getS3KeyPrefix() == null ^ this.getS3KeyPrefix() == nullreturn false;
        if (other.getS3KeyPrefix() != null && other.getS3KeyPrefix().equals(this.getS3KeyPrefix()) == falsereturn false
        if (other.getLastSuccessfulDeliveryTime() == null ^ this.getLastSuccessfulDeliveryTime() == nullreturn false;
        if (other.getLastSuccessfulDeliveryTime() != null && other.getLastSuccessfulDeliveryTime().equals(this.getLastSuccessfulDeliveryTime()) == falsereturn false
        if (other.getLastFailureTime() == null ^ this.getLastFailureTime() == nullreturn false;
        if (other.getLastFailureTime() != null && other.getLastFailureTime().equals(this.getLastFailureTime()) == falsereturn false
        if (other.getLastFailureMessage() == null ^ this.getLastFailureMessage() == nullreturn false;
        if (other.getLastFailureMessage() != null && other.getLastFailureMessage().equals(this.getLastFailureMessage()) == falsereturn false
        return true;
    }
    
    @Override
    public EnableLoggingResult clone() {
        try {
            return (EnableLoggingResultsuper.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