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

Allows a subscription owner to set an attribute of the topic to a new value.

 
 public class SetSubscriptionAttributesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ARN of the subscription to modify.
 
     private String subscriptionArn;

    
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

 
     private String attributeName;

    
The new value for the attribute in JSON format.
 
     private String attributeValue;

    
Default constructor for a new SetSubscriptionAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public SetSubscriptionAttributesRequest() {}
    
    
Constructs a new SetSubscriptionAttributesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
subscriptionArn The ARN of the subscription to modify.
attributeName The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

attributeValue The new value for the attribute in JSON format.
 
     public SetSubscriptionAttributesRequest(String subscriptionArnString attributeNameString attributeValue) {
         setSubscriptionArn(subscriptionArn);
         setAttributeName(attributeName);
         setAttributeValue(attributeValue);
     }

    
The ARN of the subscription to modify.

Returns:
The ARN of the subscription to modify.
 
     public String getSubscriptionArn() {
         return ;
     }
    
    
The ARN of the subscription to modify.

Parameters:
subscriptionArn The ARN of the subscription to modify.
 
     public void setSubscriptionArn(String subscriptionArn) {
         this. = subscriptionArn;
     }
    
    
The ARN of the subscription to modify.

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

Parameters:
subscriptionArn The ARN of the subscription to modify.
Returns:
A reference to this updated object so that method calls can be chained together.
 
    public SetSubscriptionAttributesRequest withSubscriptionArn(String subscriptionArn) {
        this. = subscriptionArn;
        return this;
    }

    
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

Returns:
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

    public String getAttributeName() {
        return ;
    }
    
    
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

Parameters:
attributeName The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

    public void setAttributeName(String attributeName) {
        this. = attributeName;
    }
    
    
The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

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

Parameters:
attributeName The name of the attribute you want to set. Only a subset of the subscriptions attributes are mutable.

Valid values: DeliveryPolicy | RawMessageDelivery

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = attributeName;
        return this;
    }

    
The new value for the attribute in JSON format.

Returns:
The new value for the attribute in JSON format.
    public String getAttributeValue() {
        return ;
    }
    
    
The new value for the attribute in JSON format.

Parameters:
attributeValue The new value for the attribute in JSON format.
    public void setAttributeValue(String attributeValue) {
        this. = attributeValue;
    }
    
    
The new value for the attribute in JSON format.

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

Parameters:
attributeValue The new value for the attribute in JSON format.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = attributeValue;
        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 (getSubscriptionArn() != nullsb.append("SubscriptionArn: " + getSubscriptionArn() + ",");
        if (getAttributeName() != nullsb.append("AttributeName: " + getAttributeName() + ",");
        if (getAttributeValue() != nullsb.append("AttributeValue: " + getAttributeValue() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); 
        hashCode = prime * hashCode + ((getAttributeName() == null) ? 0 : getAttributeName().hashCode()); 
        hashCode = prime * hashCode + ((getAttributeValue() == null) ? 0 : getAttributeValue().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SetSubscriptionAttributesRequest == falsereturn false;
        
        if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == nullreturn false;
        if (other.getSubscriptionArn() != null && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == falsereturn false
        if (other.getAttributeName() == null ^ this.getAttributeName() == nullreturn false;
        if (other.getAttributeName() != null && other.getAttributeName().equals(this.getAttributeName()) == falsereturn false
        if (other.getAttributeValue() == null ^ this.getAttributeValue() == nullreturn false;
        if (other.getAttributeValue() != null && other.getAttributeValue().equals(this.getAttributeValue()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (SetSubscriptionAttributesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X