/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace SES { namespace Model { /** *

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 Also:

AWS * API Reference

*/ class BounceAction { public: AWS_SES_API BounceAction(); AWS_SES_API BounceAction(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API BounceAction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_SES_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline const Aws::String& GetTopicArn() const{ return m_topicArn; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline BounceAction& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline BounceAction& WithTopicArn(Aws::String&& value) { SetTopicArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the * bounce action is taken. An example of an Amazon SNS topic ARN is * arn:aws:sns:us-west-2:123456789012:MyTopic. For more information * about Amazon SNS topics, see the Amazon SNS * Developer Guide.

*/ inline BounceAction& WithTopicArn(const char* value) { SetTopicArn(value); return *this;} /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline const Aws::String& GetSmtpReplyCode() const{ return m_smtpReplyCode; } /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline bool SmtpReplyCodeHasBeenSet() const { return m_smtpReplyCodeHasBeenSet; } /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline void SetSmtpReplyCode(const Aws::String& value) { m_smtpReplyCodeHasBeenSet = true; m_smtpReplyCode = value; } /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline void SetSmtpReplyCode(Aws::String&& value) { m_smtpReplyCodeHasBeenSet = true; m_smtpReplyCode = std::move(value); } /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline void SetSmtpReplyCode(const char* value) { m_smtpReplyCodeHasBeenSet = true; m_smtpReplyCode.assign(value); } /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline BounceAction& WithSmtpReplyCode(const Aws::String& value) { SetSmtpReplyCode(value); return *this;} /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline BounceAction& WithSmtpReplyCode(Aws::String&& value) { SetSmtpReplyCode(std::move(value)); return *this;} /** *

The SMTP reply code, as defined by RFC 5321.

*/ inline BounceAction& WithSmtpReplyCode(const char* value) { SetSmtpReplyCode(value); return *this;} /** *

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

*/ inline const Aws::String& GetStatusCode() const{ return m_statusCode; } /** *

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

*/ inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; } /** *

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

*/ inline void SetStatusCode(const Aws::String& value) { m_statusCodeHasBeenSet = true; m_statusCode = value; } /** *

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

*/ inline void SetStatusCode(Aws::String&& value) { m_statusCodeHasBeenSet = true; m_statusCode = std::move(value); } /** *

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

*/ inline void SetStatusCode(const char* value) { m_statusCodeHasBeenSet = true; m_statusCode.assign(value); } /** *

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

*/ inline BounceAction& WithStatusCode(const Aws::String& value) { SetStatusCode(value); return *this;} /** *

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

*/ inline BounceAction& WithStatusCode(Aws::String&& value) { SetStatusCode(std::move(value)); return *this;} /** *

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

*/ inline BounceAction& WithStatusCode(const char* value) { SetStatusCode(value); return *this;} /** *

Human-readable text to include in the bounce message.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

Human-readable text to include in the bounce message.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

Human-readable text to include in the bounce message.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

Human-readable text to include in the bounce message.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

Human-readable text to include in the bounce message.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

Human-readable text to include in the bounce message.

*/ inline BounceAction& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

Human-readable text to include in the bounce message.

*/ inline BounceAction& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

Human-readable text to include in the bounce message.

*/ inline BounceAction& WithMessage(const char* value) { SetMessage(value); return *this;} /** *

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

*/ inline const Aws::String& GetSender() const{ return m_sender; } /** *

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

*/ inline bool SenderHasBeenSet() const { return m_senderHasBeenSet; } /** *

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

*/ inline void SetSender(const Aws::String& value) { m_senderHasBeenSet = true; m_sender = value; } /** *

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

*/ inline void SetSender(Aws::String&& value) { m_senderHasBeenSet = true; m_sender = std::move(value); } /** *

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

*/ inline void SetSender(const char* value) { m_senderHasBeenSet = true; m_sender.assign(value); } /** *

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

*/ inline BounceAction& WithSender(const Aws::String& value) { SetSender(value); return *this;} /** *

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

*/ inline BounceAction& WithSender(Aws::String&& value) { SetSender(std::move(value)); return *this;} /** *

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

*/ inline BounceAction& WithSender(const char* value) { SetSender(value); return *this;} private: Aws::String m_topicArn; bool m_topicArnHasBeenSet = false; Aws::String m_smtpReplyCode; bool m_smtpReplyCodeHasBeenSet = false; Aws::String m_statusCode; bool m_statusCodeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; Aws::String m_sender; bool m_senderHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws