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

Information about the AccessLog attribute.

 
 public class AccessLog implements SerializableCloneable {

    
Specifies whether access log is enabled for the load balancer.
 
     private Boolean enabled;

    
The name of the Amazon S3 bucket where the access logs are stored.
 
     private String s3BucketName;

    
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

 
     private Integer emitInterval;

    
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.
 
     private String s3BucketPrefix;

    
Specifies whether access log is enabled for the load balancer.

Returns:
Specifies whether access log is enabled for the load balancer.
 
     public Boolean isEnabled() {
         return ;
     }
    
    
Specifies whether access log is enabled for the load balancer.

Parameters:
enabled Specifies whether access log is enabled for the load balancer.
 
     public void setEnabled(Boolean enabled) {
         this. = enabled;
     }
    
    
Specifies whether access log is enabled for the load balancer.

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

Parameters:
enabled Specifies whether access log is enabled for the load balancer.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AccessLog withEnabled(Boolean enabled) {
         this. = enabled;
         return this;
     }

    
Specifies whether access log is enabled for the load balancer.

Returns:
Specifies whether access log is enabled for the load balancer.
 
     public Boolean getEnabled() {
         return ;
     }

    
The name of the Amazon S3 bucket where the access logs are stored.

Returns:
The name of the Amazon S3 bucket where the access logs are stored.
 
     public String getS3BucketName() {
         return ;
     }
    
    
The name of the Amazon S3 bucket where the access logs are stored.

Parameters:
s3BucketName The name of the Amazon S3 bucket where the access logs are stored.
    public void setS3BucketName(String s3BucketName) {
        this. = s3BucketName;
    }
    
    
The name of the Amazon S3 bucket where the access logs are stored.

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

Parameters:
s3BucketName The name of the Amazon S3 bucket where the access logs are stored.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AccessLog withS3BucketName(String s3BucketName) {
        this. = s3BucketName;
        return this;
    }

    
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

Returns:
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

    public Integer getEmitInterval() {
        return ;
    }
    
    
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

Parameters:
emitInterval The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

    public void setEmitInterval(Integer emitInterval) {
        this. = emitInterval;
    }
    
    
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

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

Parameters:
emitInterval The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

Returns:
A reference to this updated object so that method calls can be chained together.
    public AccessLog withEmitInterval(Integer emitInterval) {
        this. = emitInterval;
        return this;
    }

    
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.

Returns:
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.
    public String getS3BucketPrefix() {
        return ;
    }
    
    
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.

Parameters:
s3BucketPrefix The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.
    public void setS3BucketPrefix(String s3BucketPrefix) {
        this. = s3BucketPrefix;
    }
    
    
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.

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

Parameters:
s3BucketPrefix The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AccessLog withS3BucketPrefix(String s3BucketPrefix) {
        this. = s3BucketPrefix;
        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 (isEnabled() != nullsb.append("Enabled: " + isEnabled() + ",");
        if (getS3BucketName() != nullsb.append("S3BucketName: " + getS3BucketName() + ",");
        if (getEmitInterval() != nullsb.append("EmitInterval: " + getEmitInterval() + ",");
        if (getS3BucketPrefix() != nullsb.append("S3BucketPrefix: " + getS3BucketPrefix() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((isEnabled() == null) ? 0 : isEnabled().hashCode()); 
        hashCode = prime * hashCode + ((getS3BucketName() == null) ? 0 : getS3BucketName().hashCode()); 
        hashCode = prime * hashCode + ((getEmitInterval() == null) ? 0 : getEmitInterval().hashCode()); 
        hashCode = prime * hashCode + ((getS3BucketPrefix() == null) ? 0 : getS3BucketPrefix().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AccessLog == falsereturn false;
        AccessLog other = (AccessLog)obj;
        
        if (other.isEnabled() == null ^ this.isEnabled() == nullreturn false;
        if (other.isEnabled() != null && other.isEnabled().equals(this.isEnabled()) == falsereturn false
        if (other.getS3BucketName() == null ^ this.getS3BucketName() == nullreturn false;
        if (other.getS3BucketName() != null && other.getS3BucketName().equals(this.getS3BucketName()) == falsereturn false
        if (other.getEmitInterval() == null ^ this.getEmitInterval() == nullreturn false;
        if (other.getEmitInterval() != null && other.getEmitInterval().equals(this.getEmitInterval()) == falsereturn false
        if (other.getS3BucketPrefix() == null ^ this.getS3BucketPrefix() == nullreturn false;
        if (other.getS3BucketPrefix() != null && other.getS3BucketPrefix().equals(this.getS3BucketPrefix()) == falsereturn false
        return true;
    }
    
    @Override
    public AccessLog clone() {
        try {
            return (AccessLogsuper.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