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

Recipient-related information to include in the Delivery Status Notification * (DSN) when an email that Amazon SES receives on your behalf bounces.

For * information about receiving email through Amazon SES, see the Amazon * SES Developer Guide.

See Also:

AWS * API Reference

*/ class RecipientDsnFields { public: AWS_SES_API RecipientDsnFields(); AWS_SES_API RecipientDsnFields(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_SES_API RecipientDsnFields& 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 email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline const Aws::String& GetFinalRecipient() const{ return m_finalRecipient; } /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline bool FinalRecipientHasBeenSet() const { return m_finalRecipientHasBeenSet; } /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline void SetFinalRecipient(const Aws::String& value) { m_finalRecipientHasBeenSet = true; m_finalRecipient = value; } /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline void SetFinalRecipient(Aws::String&& value) { m_finalRecipientHasBeenSet = true; m_finalRecipient = std::move(value); } /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline void SetFinalRecipient(const char* value) { m_finalRecipientHasBeenSet = true; m_finalRecipient.assign(value); } /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline RecipientDsnFields& WithFinalRecipient(const Aws::String& value) { SetFinalRecipient(value); return *this;} /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline RecipientDsnFields& WithFinalRecipient(Aws::String&& value) { SetFinalRecipient(std::move(value)); return *this;} /** *

The email address that the message was ultimately delivered to. This * corresponds to the Final-Recipient in the DSN. If not specified, * FinalRecipient will be set to the Recipient specified * in the BouncedRecipientInfo structure. Either * FinalRecipient or the recipient in * BouncedRecipientInfo must be a recipient of the original bounced * message.

Do not prepend the FinalRecipient email * address with rfc 822;, as described in RFC 3798.

*/ inline RecipientDsnFields& WithFinalRecipient(const char* value) { SetFinalRecipient(value); return *this;} /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline const DsnAction& GetAction() const{ return m_action; } /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline void SetAction(const DsnAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline void SetAction(DsnAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline RecipientDsnFields& WithAction(const DsnAction& value) { SetAction(value); return *this;} /** *

The action performed by the reporting mail transfer agent (MTA) as a result * of its attempt to deliver the message to the recipient address. This is required * by RFC 3464.

*/ inline RecipientDsnFields& WithAction(DsnAction&& value) { SetAction(std::move(value)); return *this;} /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline const Aws::String& GetRemoteMta() const{ return m_remoteMta; } /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline bool RemoteMtaHasBeenSet() const { return m_remoteMtaHasBeenSet; } /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline void SetRemoteMta(const Aws::String& value) { m_remoteMtaHasBeenSet = true; m_remoteMta = value; } /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline void SetRemoteMta(Aws::String&& value) { m_remoteMtaHasBeenSet = true; m_remoteMta = std::move(value); } /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline void SetRemoteMta(const char* value) { m_remoteMtaHasBeenSet = true; m_remoteMta.assign(value); } /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline RecipientDsnFields& WithRemoteMta(const Aws::String& value) { SetRemoteMta(value); return *this;} /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline RecipientDsnFields& WithRemoteMta(Aws::String&& value) { SetRemoteMta(std::move(value)); return *this;} /** *

The MTA to which the remote MTA attempted to deliver the message, formatted * as specified in RFC 3464 * (mta-name-type; mta-name). This parameter typically applies only to * propagating synchronous bounces.

*/ inline RecipientDsnFields& WithRemoteMta(const char* value) { SetRemoteMta(value); return *this;} /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline RecipientDsnFields& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline RecipientDsnFields& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status code that indicates what went wrong. This is required by RFC 3464.

*/ inline RecipientDsnFields& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline const Aws::String& GetDiagnosticCode() const{ return m_diagnosticCode; } /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline bool DiagnosticCodeHasBeenSet() const { return m_diagnosticCodeHasBeenSet; } /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline void SetDiagnosticCode(const Aws::String& value) { m_diagnosticCodeHasBeenSet = true; m_diagnosticCode = value; } /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline void SetDiagnosticCode(Aws::String&& value) { m_diagnosticCodeHasBeenSet = true; m_diagnosticCode = std::move(value); } /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline void SetDiagnosticCode(const char* value) { m_diagnosticCodeHasBeenSet = true; m_diagnosticCode.assign(value); } /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline RecipientDsnFields& WithDiagnosticCode(const Aws::String& value) { SetDiagnosticCode(value); return *this;} /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline RecipientDsnFields& WithDiagnosticCode(Aws::String&& value) { SetDiagnosticCode(std::move(value)); return *this;} /** *

An extended explanation of what went wrong; this is usually an SMTP response. * See RFC 3463 for the correct * formatting of this parameter.

*/ inline RecipientDsnFields& WithDiagnosticCode(const char* value) { SetDiagnosticCode(value); return *this;} /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline const Aws::Utils::DateTime& GetLastAttemptDate() const{ return m_lastAttemptDate; } /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline bool LastAttemptDateHasBeenSet() const { return m_lastAttemptDateHasBeenSet; } /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline void SetLastAttemptDate(const Aws::Utils::DateTime& value) { m_lastAttemptDateHasBeenSet = true; m_lastAttemptDate = value; } /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline void SetLastAttemptDate(Aws::Utils::DateTime&& value) { m_lastAttemptDateHasBeenSet = true; m_lastAttemptDate = std::move(value); } /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline RecipientDsnFields& WithLastAttemptDate(const Aws::Utils::DateTime& value) { SetLastAttemptDate(value); return *this;} /** *

The time the final delivery attempt was made, in RFC 822 date-time format.

*/ inline RecipientDsnFields& WithLastAttemptDate(Aws::Utils::DateTime&& value) { SetLastAttemptDate(std::move(value)); return *this;} /** *

Additional X-headers to include in the DSN.

*/ inline const Aws::Vector& GetExtensionFields() const{ return m_extensionFields; } /** *

Additional X-headers to include in the DSN.

*/ inline bool ExtensionFieldsHasBeenSet() const { return m_extensionFieldsHasBeenSet; } /** *

Additional X-headers to include in the DSN.

*/ inline void SetExtensionFields(const Aws::Vector& value) { m_extensionFieldsHasBeenSet = true; m_extensionFields = value; } /** *

Additional X-headers to include in the DSN.

*/ inline void SetExtensionFields(Aws::Vector&& value) { m_extensionFieldsHasBeenSet = true; m_extensionFields = std::move(value); } /** *

Additional X-headers to include in the DSN.

*/ inline RecipientDsnFields& WithExtensionFields(const Aws::Vector& value) { SetExtensionFields(value); return *this;} /** *

Additional X-headers to include in the DSN.

*/ inline RecipientDsnFields& WithExtensionFields(Aws::Vector&& value) { SetExtensionFields(std::move(value)); return *this;} /** *

Additional X-headers to include in the DSN.

*/ inline RecipientDsnFields& AddExtensionFields(const ExtensionField& value) { m_extensionFieldsHasBeenSet = true; m_extensionFields.push_back(value); return *this; } /** *

Additional X-headers to include in the DSN.

*/ inline RecipientDsnFields& AddExtensionFields(ExtensionField&& value) { m_extensionFieldsHasBeenSet = true; m_extensionFields.push_back(std::move(value)); return *this; } private: Aws::String m_finalRecipient; bool m_finalRecipientHasBeenSet = false; DsnAction m_action; bool m_actionHasBeenSet = false; Aws::String m_remoteMta; bool m_remoteMtaHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_diagnosticCode; bool m_diagnosticCodeHasBeenSet = false; Aws::Utils::DateTime m_lastAttemptDate; bool m_lastAttemptDateHasBeenSet = false; Aws::Vector m_extensionFields; bool m_extensionFieldsHasBeenSet = false; }; } // namespace Model } // namespace SES } // namespace Aws