/*
* Copyright 2010-2014 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.
*/
/*
* Do not modify this file. This file is generated from the email-2010-12-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.SimpleEmail.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.
///
///
public partial class RecipientDsnFields
{
private DsnAction _action;
private string _diagnosticCode;
private List _extensionFields = new List();
private string _finalRecipient;
private DateTime? _lastAttemptDateUtc;
private string _remoteMta;
private string _status;
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Required=true)]
public DsnAction Action
{
get { return this._action; }
set { this._action = value; }
}
// Check to see if Action property is set
internal bool IsSetAction()
{
return this._action != null;
}
///
/// Gets and sets the property DiagnosticCode.
///
/// An extended explanation of what went wrong; this is usually an SMTP response. See
/// RFC 3463 for the correct formatting
/// of this parameter.
///
///
public string DiagnosticCode
{
get { return this._diagnosticCode; }
set { this._diagnosticCode = value; }
}
// Check to see if DiagnosticCode property is set
internal bool IsSetDiagnosticCode()
{
return this._diagnosticCode != null;
}
///
/// Gets and sets the property ExtensionFields.
///
/// Additional X-headers to include in the DSN.
///
///
public List ExtensionFields
{
get { return this._extensionFields; }
set { this._extensionFields = value; }
}
// Check to see if ExtensionFields property is set
internal bool IsSetExtensionFields()
{
return this._extensionFields != null && this._extensionFields.Count > 0;
}
///
/// Gets and sets the property 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.
///
///
///
public string FinalRecipient
{
get { return this._finalRecipient; }
set { this._finalRecipient = value; }
}
// Check to see if FinalRecipient property is set
internal bool IsSetFinalRecipient()
{
return this._finalRecipient != null;
}
///
/// Gets and sets the property LastAttemptDateUtc.
///
/// The time the final delivery attempt was made, in RFC
/// 822 date-time format.
///
///
public DateTime LastAttemptDateUtc
{
get { return this._lastAttemptDateUtc.GetValueOrDefault(); }
set { this._lastAttemptDate = this._lastAttemptDateUtc = value; }
}
// Check to see if LastAttemptDateUtc property is set
internal bool IsSetLastAttemptDateUtc()
{
return this._lastAttemptDateUtc.HasValue;
}
///
/// Gets and sets the property 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.
///
///
public string RemoteMta
{
get { return this._remoteMta; }
set { this._remoteMta = value; }
}
// Check to see if RemoteMta property is set
internal bool IsSetRemoteMta()
{
return this._remoteMta != null;
}
///
/// Gets and sets the property Status.
///
/// The status code that indicates what went wrong. This is required by RFC
/// 3464.
///
///
[AWSProperty(Required=true)]
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
#region Backwards compatible properties
private DateTime? _lastAttemptDate;
///
/// Gets and sets the property LastAttemptDateUtc.
///
/// This property is deprecated. Setting this property results in non-UTC DateTimes not
/// being marshalled correctly. Use LastAttemptDateUtc instead. Setting either LastAttemptDate
/// or LastAttemptDateUtc results in both LastAttemptDate and LastAttemptDateUtc being
/// assigned, the latest assignment to either one of the two property is reflected in
/// the value of both. LastAttemptDate is provided for backwards compatibility only and
/// assigning a non-Utc DateTime to it results in the wrong timestamp being passed to
/// the service.
///
///
///
/// The time the final delivery attempt was made, in RFC
/// 822 date-time format.
///
///
[Obsolete("Setting this property results in non-UTC DateTimes not being marshalled correctly. " +
"Use LastAttemptDateUtc instead. Setting either LastAttemptDate or LastAttemptDateUtc results in both LastAttemptDate and " +
"LastAttemptDateUtc being assigned, the latest assignment to either one of the two property is " +
"reflected in the value of both. LastAttemptDate is provided for backwards compatibility only and " +
"assigning a non-Utc DateTime to it results in the wrong timestamp being passed to the service.", false)]
public DateTime LastAttemptDate
{
get { return this._lastAttemptDate.GetValueOrDefault(); }
set
{
this._lastAttemptDate = value;
this._lastAttemptDateUtc = new DateTime(value.Ticks, DateTimeKind.Utc);
}
}
#endregion
}
}