/*
 * 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
{
    /// 
    /// 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.
    /// 
    /// 
    public partial class ReceiptRule
    {
        private List _actions = new List();
        private bool? _enabled;
        private string _name;
        private List _recipients = new List();
        private bool? _scanEnabled;
        private TlsPolicy _tlsPolicy;
        /// 
        /// Gets and sets the property 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.
        /// 
        /// 
        public List Actions
        {
            get { return this._actions; }
            set { this._actions = value; }
        }
        // Check to see if Actions property is set
        internal bool IsSetActions()
        {
            return this._actions != null && this._actions.Count > 0; 
        }
        /// 
        /// Gets and sets the property Enabled. 
        /// 
        /// If true, the receipt rule is active. The default value is false.
        /// 
        /// 
        public bool Enabled
        {
            get { return this._enabled.GetValueOrDefault(); }
            set { this._enabled = value; }
        }
        // Check to see if Enabled property is set
        internal bool IsSetEnabled()
        {
            return this._enabled.HasValue; 
        }
        /// 
        /// Gets and sets the property 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.
        /// 
        ///  
/// 
        [AWSProperty(Required=true)]
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }
        // Check to see if Name property is set
        internal bool IsSetName()
        {
            return this._name != null;
        }
        /// 
        /// Gets and sets the property 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.
        /// 
        /// 
        public List Recipients
        {
            get { return this._recipients; }
            set { this._recipients = value; }
        }
        // Check to see if Recipients property is set
        internal bool IsSetRecipients()
        {
            return this._recipients != null && this._recipients.Count > 0; 
        }
        /// 
        /// Gets and sets the property ScanEnabled. 
        /// 
        /// Iftrue, then messages that this receipt rule applies to are scanned
        /// for spam and viruses. The default value is false.
        /// 
        /// 
        public bool ScanEnabled
        {
            get { return this._scanEnabled.GetValueOrDefault(); }
            set { this._scanEnabled = value; }
        }
        // Check to see if ScanEnabled property is set
        internal bool IsSetScanEnabled()
        {
            return this._scanEnabled.HasValue; 
        }
        /// 
        /// Gets and sets the property 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.
        /// 
        /// 
        public TlsPolicy TlsPolicy
        {
            get { return this._tlsPolicy; }
            set { this._tlsPolicy = value; }
        }
        // Check to see if TlsPolicy property is set
        internal bool IsSetTlsPolicy()
        {
            return this._tlsPolicy != null;
        }
    }
}