
com.amazonaws.services.simpleemail.model.IdentityNotificationAttributes Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ses Show documentation
/*
* Copyright 2010-2016 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;
import java.io.Serializable;
/**
*
* Represents the notification attributes of an identity, including whether an
* identity has Amazon Simple Notification Service (Amazon SNS) topics set for
* bounce, complaint, and/or delivery notifications, and whether feedback
* forwarding is enabled for bounce and complaint notifications.
*
*/
public class IdentityNotificationAttributes implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish bounce notifications.
*
*/
private String bounceTopic;
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish complaint notifications.
*
*/
private String complaintTopic;
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish delivery notifications.
*
*/
private String deliveryTopic;
/**
*
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon SES will
* forward bounce and complaint notifications as email, while
* false
indicates that bounce and complaint notifications will
* be published only to the specified bounce and complaint Amazon SNS
* topics.
*
*/
private Boolean forwardingEnabled;
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Bounce
. A value of
* true
specifies that Amazon SES will include headers in
* bounce notifications, and a value of false
specifies that
* Amazon SES will not include headers in bounce notifications.
*
*/
private Boolean headersInBounceNotificationsEnabled;
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Complaint
. A value of
* true
specifies that Amazon SES will include headers in
* complaint notifications, and a value of false
specifies that
* Amazon SES will not include headers in complaint notifications.
*
*/
private Boolean headersInComplaintNotificationsEnabled;
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Delivery
. A value of
* true
specifies that Amazon SES will include headers in
* delivery notifications, and a value of false
specifies that
* Amazon SES will not include headers in delivery notifications.
*
*/
private Boolean headersInDeliveryNotificationsEnabled;
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish bounce notifications.
*
*
* @param bounceTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish bounce notifications.
*/
public void setBounceTopic(String bounceTopic) {
this.bounceTopic = bounceTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish bounce notifications.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish bounce notifications.
*/
public String getBounceTopic() {
return this.bounceTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish bounce notifications.
*
*
* @param bounceTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish bounce notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withBounceTopic(String bounceTopic) {
setBounceTopic(bounceTopic);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish complaint notifications.
*
*
* @param complaintTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish complaint notifications.
*/
public void setComplaintTopic(String complaintTopic) {
this.complaintTopic = complaintTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish complaint notifications.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish complaint notifications.
*/
public String getComplaintTopic() {
return this.complaintTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish complaint notifications.
*
*
* @param complaintTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish complaint notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withComplaintTopic(
String complaintTopic) {
setComplaintTopic(complaintTopic);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish delivery notifications.
*
*
* @param deliveryTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish delivery notifications.
*/
public void setDeliveryTopic(String deliveryTopic) {
this.deliveryTopic = deliveryTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish delivery notifications.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish delivery notifications.
*/
public String getDeliveryTopic() {
return this.deliveryTopic;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
* will publish delivery notifications.
*
*
* @param deliveryTopic
* The Amazon Resource Name (ARN) of the Amazon SNS topic where
* Amazon SES will publish delivery notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withDeliveryTopic(String deliveryTopic) {
setDeliveryTopic(deliveryTopic);
return this;
}
/**
*
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon SES will
* forward bounce and complaint notifications as email, while
* false
indicates that bounce and complaint notifications will
* be published only to the specified bounce and complaint Amazon SNS
* topics.
*
*
* @param forwardingEnabled
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon
* SES will forward bounce and complaint notifications as email,
* while false
indicates that bounce and complaint
* notifications will be published only to the specified bounce and
* complaint Amazon SNS topics.
*/
public void setForwardingEnabled(Boolean forwardingEnabled) {
this.forwardingEnabled = forwardingEnabled;
}
/**
*
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon SES will
* forward bounce and complaint notifications as email, while
* false
indicates that bounce and complaint notifications will
* be published only to the specified bounce and complaint Amazon SNS
* topics.
*
*
* @return Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon
* SES will forward bounce and complaint notifications as email,
* while false
indicates that bounce and complaint
* notifications will be published only to the specified bounce and
* complaint Amazon SNS topics.
*/
public Boolean getForwardingEnabled() {
return this.forwardingEnabled;
}
/**
*
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon SES will
* forward bounce and complaint notifications as email, while
* false
indicates that bounce and complaint notifications will
* be published only to the specified bounce and complaint Amazon SNS
* topics.
*
*
* @param forwardingEnabled
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon
* SES will forward bounce and complaint notifications as email,
* while false
indicates that bounce and complaint
* notifications will be published only to the specified bounce and
* complaint Amazon SNS topics.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withForwardingEnabled(
Boolean forwardingEnabled) {
setForwardingEnabled(forwardingEnabled);
return this;
}
/**
*
* Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon SES will
* forward bounce and complaint notifications as email, while
* false
indicates that bounce and complaint notifications will
* be published only to the specified bounce and complaint Amazon SNS
* topics.
*
*
* @return Describes whether Amazon SES will forward bounce and complaint
* notifications as email. true
indicates that Amazon
* SES will forward bounce and complaint notifications as email,
* while false
indicates that bounce and complaint
* notifications will be published only to the specified bounce and
* complaint Amazon SNS topics.
*/
public Boolean isForwardingEnabled() {
return this.forwardingEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Bounce
. A value of
* true
specifies that Amazon SES will include headers in
* bounce notifications, and a value of false
specifies that
* Amazon SES will not include headers in bounce notifications.
*
*
* @param headersInBounceNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Bounce
. A value
* of true
specifies that Amazon SES will include
* headers in bounce notifications, and a value of false
* specifies that Amazon SES will not include headers in bounce
* notifications.
*/
public void setHeadersInBounceNotificationsEnabled(
Boolean headersInBounceNotificationsEnabled) {
this.headersInBounceNotificationsEnabled = headersInBounceNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Bounce
. A value of
* true
specifies that Amazon SES will include headers in
* bounce notifications, and a value of false
specifies that
* Amazon SES will not include headers in bounce notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Bounce
. A value
* of true
specifies that Amazon SES will include
* headers in bounce notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in bounce notifications.
*/
public Boolean getHeadersInBounceNotificationsEnabled() {
return this.headersInBounceNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Bounce
. A value of
* true
specifies that Amazon SES will include headers in
* bounce notifications, and a value of false
specifies that
* Amazon SES will not include headers in bounce notifications.
*
*
* @param headersInBounceNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Bounce
. A value
* of true
specifies that Amazon SES will include
* headers in bounce notifications, and a value of false
* specifies that Amazon SES will not include headers in bounce
* notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withHeadersInBounceNotificationsEnabled(
Boolean headersInBounceNotificationsEnabled) {
setHeadersInBounceNotificationsEnabled(headersInBounceNotificationsEnabled);
return this;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Bounce
. A value of
* true
specifies that Amazon SES will include headers in
* bounce notifications, and a value of false
specifies that
* Amazon SES will not include headers in bounce notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Bounce
. A value
* of true
specifies that Amazon SES will include
* headers in bounce notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in bounce notifications.
*/
public Boolean isHeadersInBounceNotificationsEnabled() {
return this.headersInBounceNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Complaint
. A value of
* true
specifies that Amazon SES will include headers in
* complaint notifications, and a value of false
specifies that
* Amazon SES will not include headers in complaint notifications.
*
*
* @param headersInComplaintNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Complaint
. A
* value of true
specifies that Amazon SES will include
* headers in complaint notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in complaint notifications.
*/
public void setHeadersInComplaintNotificationsEnabled(
Boolean headersInComplaintNotificationsEnabled) {
this.headersInComplaintNotificationsEnabled = headersInComplaintNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Complaint
. A value of
* true
specifies that Amazon SES will include headers in
* complaint notifications, and a value of false
specifies that
* Amazon SES will not include headers in complaint notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Complaint
. A
* value of true
specifies that Amazon SES will include
* headers in complaint notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in complaint notifications.
*/
public Boolean getHeadersInComplaintNotificationsEnabled() {
return this.headersInComplaintNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Complaint
. A value of
* true
specifies that Amazon SES will include headers in
* complaint notifications, and a value of false
specifies that
* Amazon SES will not include headers in complaint notifications.
*
*
* @param headersInComplaintNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Complaint
. A
* value of true
specifies that Amazon SES will include
* headers in complaint notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in complaint notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withHeadersInComplaintNotificationsEnabled(
Boolean headersInComplaintNotificationsEnabled) {
setHeadersInComplaintNotificationsEnabled(headersInComplaintNotificationsEnabled);
return this;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Complaint
. A value of
* true
specifies that Amazon SES will include headers in
* complaint notifications, and a value of false
specifies that
* Amazon SES will not include headers in complaint notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Complaint
. A
* value of true
specifies that Amazon SES will include
* headers in complaint notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in complaint notifications.
*/
public Boolean isHeadersInComplaintNotificationsEnabled() {
return this.headersInComplaintNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Delivery
. A value of
* true
specifies that Amazon SES will include headers in
* delivery notifications, and a value of false
specifies that
* Amazon SES will not include headers in delivery notifications.
*
*
* @param headersInDeliveryNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Delivery
. A value
* of true
specifies that Amazon SES will include
* headers in delivery notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in delivery notifications.
*/
public void setHeadersInDeliveryNotificationsEnabled(
Boolean headersInDeliveryNotificationsEnabled) {
this.headersInDeliveryNotificationsEnabled = headersInDeliveryNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Delivery
. A value of
* true
specifies that Amazon SES will include headers in
* delivery notifications, and a value of false
specifies that
* Amazon SES will not include headers in delivery notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Delivery
. A
* value of true
specifies that Amazon SES will include
* headers in delivery notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in delivery notifications.
*/
public Boolean getHeadersInDeliveryNotificationsEnabled() {
return this.headersInDeliveryNotificationsEnabled;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Delivery
. A value of
* true
specifies that Amazon SES will include headers in
* delivery notifications, and a value of false
specifies that
* Amazon SES will not include headers in delivery notifications.
*
*
* @param headersInDeliveryNotificationsEnabled
* Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Delivery
. A value
* of true
specifies that Amazon SES will include
* headers in delivery notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in delivery notifications.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public IdentityNotificationAttributes withHeadersInDeliveryNotificationsEnabled(
Boolean headersInDeliveryNotificationsEnabled) {
setHeadersInDeliveryNotificationsEnabled(headersInDeliveryNotificationsEnabled);
return this;
}
/**
*
* Describes whether Amazon SES includes the original email headers in
* Amazon SNS notifications of type Delivery
. A value of
* true
specifies that Amazon SES will include headers in
* delivery notifications, and a value of false
specifies that
* Amazon SES will not include headers in delivery notifications.
*
*
* @return Describes whether Amazon SES includes the original email headers
* in Amazon SNS notifications of type Delivery
. A
* value of true
specifies that Amazon SES will include
* headers in delivery notifications, and a value of
* false
specifies that Amazon SES will not include
* headers in delivery notifications.
*/
public Boolean isHeadersInDeliveryNotificationsEnabled() {
return this.headersInDeliveryNotificationsEnabled;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getBounceTopic() != null)
sb.append("BounceTopic: " + getBounceTopic() + ",");
if (getComplaintTopic() != null)
sb.append("ComplaintTopic: " + getComplaintTopic() + ",");
if (getDeliveryTopic() != null)
sb.append("DeliveryTopic: " + getDeliveryTopic() + ",");
if (getForwardingEnabled() != null)
sb.append("ForwardingEnabled: " + getForwardingEnabled() + ",");
if (getHeadersInBounceNotificationsEnabled() != null)
sb.append("HeadersInBounceNotificationsEnabled: "
+ getHeadersInBounceNotificationsEnabled() + ",");
if (getHeadersInComplaintNotificationsEnabled() != null)
sb.append("HeadersInComplaintNotificationsEnabled: "
+ getHeadersInComplaintNotificationsEnabled() + ",");
if (getHeadersInDeliveryNotificationsEnabled() != null)
sb.append("HeadersInDeliveryNotificationsEnabled: "
+ getHeadersInDeliveryNotificationsEnabled());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof IdentityNotificationAttributes == false)
return false;
IdentityNotificationAttributes other = (IdentityNotificationAttributes) obj;
if (other.getBounceTopic() == null ^ this.getBounceTopic() == null)
return false;
if (other.getBounceTopic() != null
&& other.getBounceTopic().equals(this.getBounceTopic()) == false)
return false;
if (other.getComplaintTopic() == null
^ this.getComplaintTopic() == null)
return false;
if (other.getComplaintTopic() != null
&& other.getComplaintTopic().equals(this.getComplaintTopic()) == false)
return false;
if (other.getDeliveryTopic() == null ^ this.getDeliveryTopic() == null)
return false;
if (other.getDeliveryTopic() != null
&& other.getDeliveryTopic().equals(this.getDeliveryTopic()) == false)
return false;
if (other.getForwardingEnabled() == null
^ this.getForwardingEnabled() == null)
return false;
if (other.getForwardingEnabled() != null
&& other.getForwardingEnabled().equals(
this.getForwardingEnabled()) == false)
return false;
if (other.getHeadersInBounceNotificationsEnabled() == null
^ this.getHeadersInBounceNotificationsEnabled() == null)
return false;
if (other.getHeadersInBounceNotificationsEnabled() != null
&& other.getHeadersInBounceNotificationsEnabled().equals(
this.getHeadersInBounceNotificationsEnabled()) == false)
return false;
if (other.getHeadersInComplaintNotificationsEnabled() == null
^ this.getHeadersInComplaintNotificationsEnabled() == null)
return false;
if (other.getHeadersInComplaintNotificationsEnabled() != null
&& other.getHeadersInComplaintNotificationsEnabled().equals(
this.getHeadersInComplaintNotificationsEnabled()) == false)
return false;
if (other.getHeadersInDeliveryNotificationsEnabled() == null
^ this.getHeadersInDeliveryNotificationsEnabled() == null)
return false;
if (other.getHeadersInDeliveryNotificationsEnabled() != null
&& other.getHeadersInDeliveryNotificationsEnabled().equals(
this.getHeadersInDeliveryNotificationsEnabled()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getBounceTopic() == null) ? 0 : getBounceTopic().hashCode());
hashCode = prime
* hashCode
+ ((getComplaintTopic() == null) ? 0 : getComplaintTopic()
.hashCode());
hashCode = prime
* hashCode
+ ((getDeliveryTopic() == null) ? 0 : getDeliveryTopic()
.hashCode());
hashCode = prime
* hashCode
+ ((getForwardingEnabled() == null) ? 0
: getForwardingEnabled().hashCode());
hashCode = prime
* hashCode
+ ((getHeadersInBounceNotificationsEnabled() == null) ? 0
: getHeadersInBounceNotificationsEnabled().hashCode());
hashCode = prime
* hashCode
+ ((getHeadersInComplaintNotificationsEnabled() == null) ? 0
: getHeadersInComplaintNotificationsEnabled()
.hashCode());
hashCode = prime
* hashCode
+ ((getHeadersInDeliveryNotificationsEnabled() == null) ? 0
: getHeadersInDeliveryNotificationsEnabled().hashCode());
return hashCode;
}
@Override
public IdentityNotificationAttributes clone() {
try {
return (IdentityNotificationAttributes) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
}