/** * 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 namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace SES { namespace Model { /** *

Receipt rules enable you to specify which actions Amazon SES should take when * it receives mail on behalf of one or more email addresses or domains that you * own.

Each receipt rule defines a set of email addresses or domains that * it applies to. If the email addresses or domains match at least one recipient * address of the message, Amazon SES executes all of the receipt rule's actions on * the message.

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

See Also:

AWS * API Reference

*/ class ReceiptRule { public: AWS_SES_API ReceiptRule(); AWS_SES_API ReceiptRule(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API ReceiptRule& 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 name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline ReceiptRule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline ReceiptRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the receipt rule. The name must:

  • This value can * only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes * (-).

  • Start and end with a letter or number.

  • *

    Contain less than 64 characters.

*/ inline ReceiptRule& WithName(const char* value) { SetName(value); return *this;} /** *

If true, the receipt rule is active. The default value is * false.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

If true, the receipt rule is active. The default value is * false.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

If true, the receipt rule is active. The default value is * false.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

If true, the receipt rule is active. The default value is * false.

*/ inline ReceiptRule& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline const TlsPolicy& GetTlsPolicy() const{ return m_tlsPolicy; } /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline bool TlsPolicyHasBeenSet() const { return m_tlsPolicyHasBeenSet; } /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline void SetTlsPolicy(const TlsPolicy& value) { m_tlsPolicyHasBeenSet = true; m_tlsPolicy = value; } /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline void SetTlsPolicy(TlsPolicy&& value) { m_tlsPolicyHasBeenSet = true; m_tlsPolicy = std::move(value); } /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline ReceiptRule& WithTlsPolicy(const TlsPolicy& value) { SetTlsPolicy(value); return *this;} /** *

Specifies whether Amazon SES should require that incoming email is delivered * over a connection encrypted with Transport Layer Security (TLS). If this * parameter is set to Require, Amazon SES will bounce emails that are * not received over TLS. The default is Optional.

*/ inline ReceiptRule& WithTlsPolicy(TlsPolicy&& value) { SetTlsPolicy(std::move(value)); return *this;} /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline const Aws::Vector& GetRecipients() const{ return m_recipients; } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline bool RecipientsHasBeenSet() const { return m_recipientsHasBeenSet; } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline void SetRecipients(const Aws::Vector& value) { m_recipientsHasBeenSet = true; m_recipients = value; } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline void SetRecipients(Aws::Vector&& value) { m_recipientsHasBeenSet = true; m_recipients = std::move(value); } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline ReceiptRule& WithRecipients(const Aws::Vector& value) { SetRecipients(value); return *this;} /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline ReceiptRule& WithRecipients(Aws::Vector&& value) { SetRecipients(std::move(value)); return *this;} /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline ReceiptRule& AddRecipients(const Aws::String& value) { m_recipientsHasBeenSet = true; m_recipients.push_back(value); return *this; } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline ReceiptRule& AddRecipients(Aws::String&& value) { m_recipientsHasBeenSet = true; m_recipients.push_back(std::move(value)); return *this; } /** *

The recipient domains and email addresses that the receipt rule applies to. * If this field is not specified, this rule will match all recipients under all * verified domains.

*/ inline ReceiptRule& AddRecipients(const char* value) { m_recipientsHasBeenSet = true; m_recipients.push_back(value); return *this; } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline ReceiptRule& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline ReceiptRule& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline ReceiptRule& AddActions(const ReceiptAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

An ordered list of actions to perform on messages that match at least one of * the recipient email addresses or domains specified in the receipt rule.

*/ inline ReceiptRule& AddActions(ReceiptAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } /** *

If true, then messages that this receipt rule applies to are * scanned for spam and viruses. The default value is false.

*/ inline bool GetScanEnabled() const{ return m_scanEnabled; } /** *

If true, then messages that this receipt rule applies to are * scanned for spam and viruses. The default value is false.

*/ inline bool ScanEnabledHasBeenSet() const { return m_scanEnabledHasBeenSet; } /** *

If true, then messages that this receipt rule applies to are * scanned for spam and viruses. The default value is false.

*/ inline void SetScanEnabled(bool value) { m_scanEnabledHasBeenSet = true; m_scanEnabled = value; } /** *

If true, then messages that this receipt rule applies to are * scanned for spam and viruses. The default value is false.

*/ inline ReceiptRule& WithScanEnabled(bool value) { SetScanEnabled(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; TlsPolicy m_tlsPolicy; bool m_tlsPolicyHasBeenSet = false; Aws::Vector m_recipients; bool m_recipientsHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; bool m_scanEnabled; bool m_scanEnabledHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws