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 logical container used for storing the configuration changes of an AWS resource.

 
 public class DeliveryChannel implements SerializableCloneable {

    
The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

Constraints:
Length: 1 - 256

 
     private String name;

    
The name of the Amazon S3 bucket used to store configuration history for the delivery channel.
 
     private String s3BucketName;

    
The prefix for the specified Amazon S3 bucket.
 
     private String s3KeyPrefix;

    
The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.
 
     private String snsTopicARN;

    
The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

Constraints:
Length: 1 - 256

Returns:
The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.
 
     public String getName() {
         return ;
     }
    
    
The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

Constraints:
Length: 1 - 256

Parameters:
name The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.

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

Constraints:
Length: 1 - 256

Parameters:
name The name of the delivery channel. By default, AWS Config automatically assigns the name "default" when creating the delivery channel. You cannot change the assigned name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeliveryChannel withName(String name) {
        this. = name;
        return this;
    }

    
The name of the Amazon S3 bucket used to store configuration history for the delivery channel.

Returns:
The name of the Amazon S3 bucket used to store configuration history for the delivery channel.
    public String getS3BucketName() {
        return ;
    }
    
    
The name of the Amazon S3 bucket used to store configuration history for the delivery channel.

Parameters:
s3BucketName The name of the Amazon S3 bucket used to store configuration history for the delivery channel.
    public void setS3BucketName(String s3BucketName) {
        this. = s3BucketName;
    }
    
    
The name of the Amazon S3 bucket used to store configuration history for the delivery channel.

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

Parameters:
s3BucketName The name of the Amazon S3 bucket used to store configuration history for the delivery channel.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeliveryChannel withS3BucketName(String s3BucketName) {
        this. = s3BucketName;
        return this;
    }

    
The prefix for the specified Amazon S3 bucket.

Returns:
The prefix for the specified Amazon S3 bucket.
    public String getS3KeyPrefix() {
        return ;
    }
    
    
The prefix for the specified Amazon S3 bucket.

Parameters:
s3KeyPrefix The prefix for the specified Amazon S3 bucket.
    public void setS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
    }
    
    
The prefix for the specified Amazon S3 bucket.

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

Parameters:
s3KeyPrefix The prefix for the specified Amazon S3 bucket.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeliveryChannel withS3KeyPrefix(String s3KeyPrefix) {
        this. = s3KeyPrefix;
        return this;
    }

    
The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.

Returns:
The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.
    public String getSnsTopicARN() {
        return ;
    }
    
    
The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.

Parameters:
snsTopicARN The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.
    public void setSnsTopicARN(String snsTopicARN) {
        this. = snsTopicARN;
    }
    
    
The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.

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

Parameters:
snsTopicARN The Amazon Resource Name (ARN) of the IAM role used for accessing the Amazon S3 bucket and the Amazon SNS topic.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DeliveryChannel withSnsTopicARN(String snsTopicARN) {
        this. = snsTopicARN;
        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 (getS3BucketName() != nullsb.append("S3BucketName: " + getS3BucketName() + ",");
        if (getS3KeyPrefix() != nullsb.append("S3KeyPrefix: " + getS3KeyPrefix() + ",");
        if (getSnsTopicARN() != nullsb.append("SnsTopicARN: " + getSnsTopicARN() );
        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 + ((getS3BucketName() == null) ? 0 : getS3BucketName().hashCode()); 
        hashCode = prime * hashCode + ((getS3KeyPrefix() == null) ? 0 : getS3KeyPrefix().hashCode()); 
        hashCode = prime * hashCode + ((getSnsTopicARN() == null) ? 0 : getSnsTopicARN().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DeliveryChannel == falsereturn false;
        DeliveryChannel other = (DeliveryChannel)obj;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getS3BucketName() == null ^ this.getS3BucketName() == nullreturn false;
        if (other.getS3BucketName() != null && other.getS3BucketName().equals(this.getS3BucketName()) == falsereturn false
        if (other.getS3KeyPrefix() == null ^ this.getS3KeyPrefix() == nullreturn false;
        if (other.getS3KeyPrefix() != null && other.getS3KeyPrefix().equals(this.getS3KeyPrefix()) == falsereturn false
        if (other.getSnsTopicARN() == null ^ this.getSnsTopicARN() == nullreturn false;
        if (other.getSnsTopicARN() != null && other.getSnsTopicARN().equals(this.getSnsTopicARN()) == falsereturn false
        return true;
    }
    
    @Override
    public DeliveryChannel clone() {
        try {
            return (DeliveryChannelsuper.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