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;
 
 
Container for the parameters to the EnableLogging operation.

Starts logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster.

 
 public class EnableLoggingRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identifier of the cluster on which logging is to be started.

Example: examplecluster

 
     private String clusterIdentifier;

    
The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions
 
     private String bucketName;

    
The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger
 
     private String s3KeyPrefix;

    
The identifier of the cluster on which logging is to be started.

Example: examplecluster

Returns:
The identifier of the cluster on which logging is to be started.

Example: examplecluster

 
     public String getClusterIdentifier() {
         return ;
     }
    
    
The identifier of the cluster on which logging is to be started.

Example: examplecluster

Parameters:
clusterIdentifier The identifier of the cluster on which logging is to be started.

Example: examplecluster

 
     public void setClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
     }
    
    
The identifier of the cluster on which logging is to be started.

Example: examplecluster

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

Parameters:
clusterIdentifier The identifier of the cluster on which logging is to be started.

Example: examplecluster

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public EnableLoggingRequest withClusterIdentifier(String clusterIdentifier) {
         this. = clusterIdentifier;
         return this;
     }

    
The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions

Returns:
The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions
    public String getBucketName() {
        return ;
    }
    
    
The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions

Parameters:
bucketName The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions
    public void setBucketName(String bucketName) {
        this. = bucketName;
    }
    
    
The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions

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

Parameters:
bucketName The name of an existing S3 bucket where the log files are to be stored.

Constraints:

  • Must be in the same region as the cluster
  • The cluster must have read bucket and put object permissions
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingRequest withBucketName(String bucketName) {
        this. = bucketName;
        return this;
    }

    
The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger

Returns:
The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger
    public String getS3KeyPrefix() {
        return ;
    }
    
    
The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger

Parameters:
s3KeyPrefix The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger
    public void setS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
    }
    
    
The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger

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

Parameters:
s3KeyPrefix The prefix applied to the log file names.

Constraints:

  • Cannot exceed 512 characters
  • Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or control characters. The hexadecimal codes for invalid characters are:
    • x00 to x20
    • x22
    • x27
    • x5c
    • x7f or larger
Returns:
A reference to this updated object so that method calls can be chained together.
    public EnableLoggingRequest withS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
        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 (getClusterIdentifier() != nullsb.append("ClusterIdentifier: " + getClusterIdentifier() + ",");
        if (getBucketName() != nullsb.append("BucketName: " + getBucketName() + ",");
        if (getS3KeyPrefix() != nullsb.append("S3KeyPrefix: " + getS3KeyPrefix() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getBucketName() == null) ? 0 : getBucketName().hashCode()); 
        hashCode = prime * hashCode + ((getS3KeyPrefix() == null) ? 0 : getS3KeyPrefix().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof EnableLoggingRequest == falsereturn false;
        EnableLoggingRequest other = (EnableLoggingRequest)obj;
        
        if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == nullreturn false;
        if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == 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
        return true;
    }
    
    @Override
    public EnableLoggingRequest clone() {
        
            return (EnableLoggingRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X