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

Given an identity (email address or domain), sets the Amazon Simple Notification Service (Amazon SNS) topic to which Amazon SES will publish bounce, complaint, and/or delivery notifications for emails sent with that identity as the Source .

NOTE:Unless feedback forwarding is enabled, you must specify Amazon SNS topics for bounce and complaint notifications. For more information, see SetIdentityFeedbackForwardingEnabled.

This action is throttled at one request per second.

For more information about feedback notification, see the Amazon SES Developer Guide .

 
 public class SetIdentityNotificationTopicRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.
 
     private String identity;

    
The type of notifications that will be published to the specified Amazon SNS topic.

Constraints:
Allowed Values: Bounce, Complaint, Delivery

 
     private String notificationType;

    
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.
 
     private String snsTopic;

    
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.

Returns:
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.
 
     public String getIdentity() {
         return ;
     }
    
    
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.

Parameters:
identity The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.
 
     public void setIdentity(String identity) {
         this. = identity;
     }
    
    
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.

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

Parameters:
identity The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = identity;
        return this;
    }

    
The type of notifications that will be published to the specified Amazon SNS topic.

Constraints:
Allowed Values: Bounce, Complaint, Delivery

Returns:
The type of notifications that will be published to the specified Amazon SNS topic.
See also:
NotificationType
    public String getNotificationType() {
        return ;
    }
    
    
The type of notifications that will be published to the specified Amazon SNS topic.

Constraints:
Allowed Values: Bounce, Complaint, Delivery

Parameters:
notificationType The type of notifications that will be published to the specified Amazon SNS topic.
See also:
NotificationType
    public void setNotificationType(String notificationType) {
        this. = notificationType;
    }
    
    
The type of notifications that will be published to the specified Amazon SNS topic.

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

Constraints:
Allowed Values: Bounce, Complaint, Delivery

Parameters:
notificationType The type of notifications that will be published to the specified Amazon SNS topic.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
NotificationType
        this. = notificationType;
        return this;
    }

    
The type of notifications that will be published to the specified Amazon SNS topic.

Constraints:
Allowed Values: Bounce, Complaint, Delivery

Parameters:
notificationType The type of notifications that will be published to the specified Amazon SNS topic.
See also:
NotificationType
    public void setNotificationType(NotificationType notificationType) {
        this. = notificationType.toString();
    }
    
    
The type of notifications that will be published to the specified Amazon SNS topic.

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

Constraints:
Allowed Values: Bounce, Complaint, Delivery

Parameters:
notificationType The type of notifications that will be published to the specified Amazon SNS topic.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
NotificationType
        this. = notificationType.toString();
        return this;
    }

    
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.

Returns:
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.
    public String getSnsTopic() {
        return ;
    }
    
    
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.

Parameters:
snsTopic The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.
    public void setSnsTopic(String snsTopic) {
        this. = snsTopic;
    }
    
    
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.

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

Parameters:
snsTopic The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = snsTopic;
        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 (getIdentity() != nullsb.append("Identity: " + getIdentity() + ",");
        if (getNotificationType() != nullsb.append("NotificationType: " + getNotificationType() + ",");
        if (getSnsTopic() != nullsb.append("SnsTopic: " + getSnsTopic() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIdentity() == null) ? 0 : getIdentity().hashCode()); 
        hashCode = prime * hashCode + ((getNotificationType() == null) ? 0 : getNotificationType().hashCode()); 
        hashCode = prime * hashCode + ((getSnsTopic() == null) ? 0 : getSnsTopic().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SetIdentityNotificationTopicRequest == falsereturn false;
        
        if (other.getIdentity() == null ^ this.getIdentity() == nullreturn false;
        if (other.getIdentity() != null && other.getIdentity().equals(this.getIdentity()) == falsereturn false
        if (other.getNotificationType() == null ^ this.getNotificationType() == nullreturn false;
        if (other.getNotificationType() != null && other.getNotificationType().equals(this.getNotificationType()) == falsereturn false
        if (other.getSnsTopic() == null ^ this.getSnsTopic() == nullreturn false;
        if (other.getSnsTopic() != null && other.getSnsTopic().equals(this.getSnsTopic()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (SetIdentityNotificationTopicRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X