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

An action that Amazon SES can take when it receives an email on behalf of one * or more email addresses or domains that you own. An instance of this data type * can represent only one action.

For information about setting up receipt * rules, see the Amazon * SES Developer Guide.

See Also:

AWS * API Reference

*/ class ReceiptAction { public: AWS_SES_API ReceiptAction(); AWS_SES_API ReceiptAction(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API ReceiptAction& 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; /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline const S3Action& GetS3Action() const{ return m_s3Action; } /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline bool S3ActionHasBeenSet() const { return m_s3ActionHasBeenSet; } /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline void SetS3Action(const S3Action& value) { m_s3ActionHasBeenSet = true; m_s3Action = value; } /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline void SetS3Action(S3Action&& value) { m_s3ActionHasBeenSet = true; m_s3Action = std::move(value); } /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline ReceiptAction& WithS3Action(const S3Action& value) { SetS3Action(value); return *this;} /** *

Saves the received message to an Amazon Simple Storage Service (Amazon S3) * bucket and, optionally, publishes a notification to Amazon SNS.

*/ inline ReceiptAction& WithS3Action(S3Action&& value) { SetS3Action(std::move(value)); return *this;} /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline const BounceAction& GetBounceAction() const{ return m_bounceAction; } /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline bool BounceActionHasBeenSet() const { return m_bounceActionHasBeenSet; } /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline void SetBounceAction(const BounceAction& value) { m_bounceActionHasBeenSet = true; m_bounceAction = value; } /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline void SetBounceAction(BounceAction&& value) { m_bounceActionHasBeenSet = true; m_bounceAction = std::move(value); } /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline ReceiptAction& WithBounceAction(const BounceAction& value) { SetBounceAction(value); return *this;} /** *

Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon Simple Notification Service * (Amazon SNS).

*/ inline ReceiptAction& WithBounceAction(BounceAction&& value) { SetBounceAction(std::move(value)); return *this;} /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline const WorkmailAction& GetWorkmailAction() const{ return m_workmailAction; } /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline bool WorkmailActionHasBeenSet() const { return m_workmailActionHasBeenSet; } /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline void SetWorkmailAction(const WorkmailAction& value) { m_workmailActionHasBeenSet = true; m_workmailAction = value; } /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline void SetWorkmailAction(WorkmailAction&& value) { m_workmailActionHasBeenSet = true; m_workmailAction = std::move(value); } /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline ReceiptAction& WithWorkmailAction(const WorkmailAction& value) { SetWorkmailAction(value); return *this;} /** *

Calls Amazon WorkMail and, optionally, publishes a notification to Amazon * Amazon SNS.

*/ inline ReceiptAction& WithWorkmailAction(WorkmailAction&& value) { SetWorkmailAction(std::move(value)); return *this;} /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline const LambdaAction& GetLambdaAction() const{ return m_lambdaAction; } /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline bool LambdaActionHasBeenSet() const { return m_lambdaActionHasBeenSet; } /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline void SetLambdaAction(const LambdaAction& value) { m_lambdaActionHasBeenSet = true; m_lambdaAction = value; } /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline void SetLambdaAction(LambdaAction&& value) { m_lambdaActionHasBeenSet = true; m_lambdaAction = std::move(value); } /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline ReceiptAction& WithLambdaAction(const LambdaAction& value) { SetLambdaAction(value); return *this;} /** *

Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS.

*/ inline ReceiptAction& WithLambdaAction(LambdaAction&& value) { SetLambdaAction(std::move(value)); return *this;} /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline const StopAction& GetStopAction() const{ return m_stopAction; } /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline bool StopActionHasBeenSet() const { return m_stopActionHasBeenSet; } /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline void SetStopAction(const StopAction& value) { m_stopActionHasBeenSet = true; m_stopAction = value; } /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline void SetStopAction(StopAction&& value) { m_stopActionHasBeenSet = true; m_stopAction = std::move(value); } /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline ReceiptAction& WithStopAction(const StopAction& value) { SetStopAction(value); return *this;} /** *

Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS.

*/ inline ReceiptAction& WithStopAction(StopAction&& value) { SetStopAction(std::move(value)); return *this;} /** *

Adds a header to the received email.

*/ inline const AddHeaderAction& GetAddHeaderAction() const{ return m_addHeaderAction; } /** *

Adds a header to the received email.

*/ inline bool AddHeaderActionHasBeenSet() const { return m_addHeaderActionHasBeenSet; } /** *

Adds a header to the received email.

*/ inline void SetAddHeaderAction(const AddHeaderAction& value) { m_addHeaderActionHasBeenSet = true; m_addHeaderAction = value; } /** *

Adds a header to the received email.

*/ inline void SetAddHeaderAction(AddHeaderAction&& value) { m_addHeaderActionHasBeenSet = true; m_addHeaderAction = std::move(value); } /** *

Adds a header to the received email.

*/ inline ReceiptAction& WithAddHeaderAction(const AddHeaderAction& value) { SetAddHeaderAction(value); return *this;} /** *

Adds a header to the received email.

*/ inline ReceiptAction& WithAddHeaderAction(AddHeaderAction&& value) { SetAddHeaderAction(std::move(value)); return *this;} /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline const SNSAction& GetSNSAction() const{ return m_sNSAction; } /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline bool SNSActionHasBeenSet() const { return m_sNSActionHasBeenSet; } /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline void SetSNSAction(const SNSAction& value) { m_sNSActionHasBeenSet = true; m_sNSAction = value; } /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline void SetSNSAction(SNSAction&& value) { m_sNSActionHasBeenSet = true; m_sNSAction = std::move(value); } /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline ReceiptAction& WithSNSAction(const SNSAction& value) { SetSNSAction(value); return *this;} /** *

Publishes the email content within a notification to Amazon SNS.

*/ inline ReceiptAction& WithSNSAction(SNSAction&& value) { SetSNSAction(std::move(value)); return *this;} private: S3Action m_s3Action; bool m_s3ActionHasBeenSet = false; BounceAction m_bounceAction; bool m_bounceActionHasBeenSet = false; WorkmailAction m_workmailAction; bool m_workmailActionHasBeenSet = false; LambdaAction m_lambdaAction; bool m_lambdaActionHasBeenSet = false; StopAction m_stopAction; bool m_stopActionHasBeenSet = false; AddHeaderAction m_addHeaderAction; bool m_addHeaderActionHasBeenSet = false; SNSAction m_sNSAction; bool m_sNSActionHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws