All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.simpleemail.model.BounceAction Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SES module holds the client classes that are used for communicating with Amazon Simple Email Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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;
import javax.annotation.Generated;

/**
 * 

* When included in a receipt rule, this action rejects the received email by returning a bounce response to the sender * and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS). *

*

* For information about sending a bounce message in response to a received email, see the Amazon SES Developer Guide. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BounceAction implements Serializable, Cloneable { /** *

* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can find * the ARN of a topic by using the ListTopics operation in Amazon SNS. *

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. *

*/ private String topicArn; /** *

* The SMTP reply code, as defined by RFC 5321. *

*/ private String smtpReplyCode; /** *

* The SMTP enhanced status code, as defined by RFC 3463. *

*/ private String statusCode; /** *

* Human-readable text to include in the bounce message. *

*/ private String message; /** *

* The email address of the sender of the bounced email. This is the address from which the bounce message is sent. *

*/ private String sender; /** *

* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can find * the ARN of a topic by using the ListTopics operation in Amazon SNS. *

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. *

* * @param topicArn * The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can * find the ARN of a topic by using the ListTopics operation in Amazon * SNS.

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. */ public void setTopicArn(String topicArn) { this.topicArn = topicArn; } /** *

* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can find * the ARN of a topic by using the ListTopics operation in Amazon SNS. *

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. *

* * @return The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can * find the ARN of a topic by using the ListTopics operation in Amazon * SNS.

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. */ public String getTopicArn() { return this.topicArn; } /** *

* The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can find * the ARN of a topic by using the ListTopics operation in Amazon SNS. *

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. *

* * @param topicArn * The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. You can * find the ARN of a topic by using the ListTopics operation in Amazon * SNS.

*

* For more information about Amazon SNS topics, see the Amazon SNS Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public BounceAction withTopicArn(String topicArn) { setTopicArn(topicArn); return this; } /** *

* The SMTP reply code, as defined by RFC 5321. *

* * @param smtpReplyCode * The SMTP reply code, as defined by RFC 5321. */ public void setSmtpReplyCode(String smtpReplyCode) { this.smtpReplyCode = smtpReplyCode; } /** *

* The SMTP reply code, as defined by RFC 5321. *

* * @return The SMTP reply code, as defined by RFC 5321. */ public String getSmtpReplyCode() { return this.smtpReplyCode; } /** *

* The SMTP reply code, as defined by RFC 5321. *

* * @param smtpReplyCode * The SMTP reply code, as defined by RFC 5321. * @return Returns a reference to this object so that method calls can be chained together. */ public BounceAction withSmtpReplyCode(String smtpReplyCode) { setSmtpReplyCode(smtpReplyCode); return this; } /** *

* The SMTP enhanced status code, as defined by RFC 3463. *

* * @param statusCode * The SMTP enhanced status code, as defined by RFC 3463. */ public void setStatusCode(String statusCode) { this.statusCode = statusCode; } /** *

* The SMTP enhanced status code, as defined by RFC 3463. *

* * @return The SMTP enhanced status code, as defined by RFC 3463. */ public String getStatusCode() { return this.statusCode; } /** *

* The SMTP enhanced status code, as defined by RFC 3463. *

* * @param statusCode * The SMTP enhanced status code, as defined by RFC 3463. * @return Returns a reference to this object so that method calls can be chained together. */ public BounceAction withStatusCode(String statusCode) { setStatusCode(statusCode); return this; } /** *

* Human-readable text to include in the bounce message. *

* * @param message * Human-readable text to include in the bounce message. */ public void setMessage(String message) { this.message = message; } /** *

* Human-readable text to include in the bounce message. *

* * @return Human-readable text to include in the bounce message. */ public String getMessage() { return this.message; } /** *

* Human-readable text to include in the bounce message. *

* * @param message * Human-readable text to include in the bounce message. * @return Returns a reference to this object so that method calls can be chained together. */ public BounceAction withMessage(String message) { setMessage(message); return this; } /** *

* The email address of the sender of the bounced email. This is the address from which the bounce message is sent. *

* * @param sender * The email address of the sender of the bounced email. This is the address from which the bounce message is * sent. */ public void setSender(String sender) { this.sender = sender; } /** *

* The email address of the sender of the bounced email. This is the address from which the bounce message is sent. *

* * @return The email address of the sender of the bounced email. This is the address from which the bounce message * is sent. */ public String getSender() { return this.sender; } /** *

* The email address of the sender of the bounced email. This is the address from which the bounce message is sent. *

* * @param sender * The email address of the sender of the bounced email. This is the address from which the bounce message is * sent. * @return Returns a reference to this object so that method calls can be chained together. */ public BounceAction withSender(String sender) { setSender(sender); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()).append(","); if (getSmtpReplyCode() != null) sb.append("SmtpReplyCode: ").append(getSmtpReplyCode()).append(","); if (getStatusCode() != null) sb.append("StatusCode: ").append(getStatusCode()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getSender() != null) sb.append("Sender: ").append(getSender()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BounceAction == false) return false; BounceAction other = (BounceAction) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getSmtpReplyCode() == null ^ this.getSmtpReplyCode() == null) return false; if (other.getSmtpReplyCode() != null && other.getSmtpReplyCode().equals(this.getSmtpReplyCode()) == false) return false; if (other.getStatusCode() == null ^ this.getStatusCode() == null) return false; if (other.getStatusCode() != null && other.getStatusCode().equals(this.getStatusCode()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; if (other.getSender() == null ^ this.getSender() == null) return false; if (other.getSender() != null && other.getSender().equals(this.getSender()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getSmtpReplyCode() == null) ? 0 : getSmtpReplyCode().hashCode()); hashCode = prime * hashCode + ((getStatusCode() == null) ? 0 : getStatusCode().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getSender() == null) ? 0 : getSender().hashCode()); return hashCode; } @Override public BounceAction clone() { try { return (BounceAction) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy