<filename>sdk/dotnet/SpamfilterProfile.cs// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Fortios
{
    /// <summary>
    /// Configure AntiSpam profiles. Applies to FortiOS Version `&lt;= 6.2.0`.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname = new Fortios.SpamfilterProfile("trname", new()
    ///     {
    ///         Comment = "terraform test",
    ///         External = "disable",
    ///         FlowBased = "disable",
    ///         Gmail = new Fortios.Inputs.SpamfilterProfileGmailArgs
    ///         {
    ///             Log = "disable",
    ///         },
    ///         Imap = new Fortios.Inputs.SpamfilterProfileImapArgs
    ///         {
    ///             Action = "tag",
    ///             Log = "disable",
    ///             TagMsg = "Spam",
    ///             TagType = "subject spaminfo",
    ///         },
    ///         Mapi = new Fortios.Inputs.SpamfilterProfileMapiArgs
    ///         {
    ///             Action = "discard",
    ///             Log = "disable",
    ///         },
    ///         MsnHotmail = new Fortios.Inputs.SpamfilterProfileMsnHotmailArgs
    ///         {
    ///             Log = "disable",
    ///         },
    ///         Pop3 = new Fortios.Inputs.SpamfilterProfilePop3Args
    ///         {
    ///             Action = "tag",
    ///             Log = "disable",
    ///             TagMsg = "Spam",
    ///             TagType = "subject spaminfo",
    ///         },
    ///         Smtp = new Fortios.Inputs.SpamfilterProfileSmtpArgs
    ///         {
    ///             Action = "discard",
    ///             Hdrip = "disable",
    ///             LocalOverride = "disable",
    ///             Log = "disable",
    ///             TagMsg = "Spam",
    ///             TagType = "subject spaminfo",
    ///         },
    ///         SpamBwlTable = 0,
    ///         SpamBwordTable = 0,
    ///         SpamBwordThreshold = 10,
    ///         SpamFiltering = "disable",
    ///         SpamIptrustTable = 0,
    ///         SpamLog = "enable",
    ///         SpamLogFortiguardResponse = "disable",
    ///         SpamMheaderTable = 0,
    ///         SpamRblTable = 0,
    ///         YahooMail = new Fortios.Inputs.SpamfilterProfileYahooMailArgs
    ///         {
    ///             Log = "disable",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Spamfilter Profile can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/spamfilterProfile:SpamfilterProfile labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/spamfilterProfile:SpamfilterProfile labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/spamfilterProfile:SpamfilterProfile")]
    public partial class SpamfilterProfile : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        /// <summary>
        /// Enable/disable external Email inspection. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("external")]
        public Output<string> External { get; private set; } = null!;

        /// <summary>
        /// Enable/disable flow-based spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("flowBased")]
        public Output<string> FlowBased { get; private set; } = null!;

        /// <summary>
        /// Gmail. The structure of `gmail` block is documented below.
        /// </summary>
        [Output("gmail")]
        public Output<Outputs.SpamfilterProfileGmail> Gmail { get; private set; } = null!;

        /// <summary>
        /// IMAP. The structure of `imap` block is documented below.
        /// </summary>
        [Output("imap")]
        public Output<Outputs.SpamfilterProfileImap> Imap { get; private set; } = null!;

        /// <summary>
        /// MAPI. The structure of `mapi` block is documented below.
        /// </summary>
        [Output("mapi")]
        public Output<Outputs.SpamfilterProfileMapi> Mapi { get; private set; } = null!;

        /// <summary>
        /// MSN Hotmail. The structure of `msn_hotmail` block is documented below.
        /// </summary>
        [Output("msnHotmail")]
        public Output<Outputs.SpamfilterProfileMsnHotmail> MsnHotmail { get; private set; } = null!;

        /// <summary>
        /// Profile name.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Options. Valid values: `bannedword`, `spambwl`, `spamfsip`, `spamfssubmit`, `spamfschksum`, `spamfsurl`, `spamhelodns`, `spamraddrdns`, `spamrbl`, `spamhdrcheck`, `spamfsphish`.
        /// </summary>
        [Output("options")]
        public Output<string> Options { get; private set; } = null!;

        /// <summary>
        /// POP3. The structure of `pop3` block is documented below.
        /// </summary>
        [Output("pop3")]
        public Output<Outputs.SpamfilterProfilePop3> Pop3 { get; private set; } = null!;

        /// <summary>
        /// Replacement message group.
        /// </summary>
        [Output("replacemsgGroup")]
        public Output<string> ReplacemsgGroup { get; private set; } = null!;

        /// <summary>
        /// SMTP. The structure of `smtp` block is documented below.
        /// </summary>
        [Output("smtp")]
        public Output<Outputs.SpamfilterProfileSmtp> Smtp { get; private set; } = null!;

        /// <summary>
        /// Anti-spam black/white list table ID.
        /// </summary>
        [Output("spamBwlTable")]
        public Output<int> SpamBwlTable { get; private set; } = null!;

        /// <summary>
        /// Anti-spam banned word table ID.
        /// </summary>
        [Output("spamBwordTable")]
        public Output<int> SpamBwordTable { get; private set; } = null!;

        /// <summary>
        /// Spam banned word threshold.
        /// </summary>
        [Output("spamBwordThreshold")]
        public Output<int> SpamBwordThreshold { get; private set; } = null!;

        /// <summary>
        /// Enable/disable spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("spamFiltering")]
        public Output<string> SpamFiltering { get; private set; } = null!;

        /// <summary>
        /// Anti-spam IP trust table ID.
        /// </summary>
        [Output("spamIptrustTable")]
        public Output<int> SpamIptrustTable { get; private set; } = null!;

        /// <summary>
        /// Enable/disable spam logging for email filtering. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("spamLog")]
        public Output<string> SpamLog { get; private set; } = null!;

        /// <summary>
        /// Enable/disable logging FortiGuard spam response. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("spamLogFortiguardResponse")]
        public Output<string> SpamLogFortiguardResponse { get; private set; } = null!;

        /// <summary>
        /// Anti-spam MIME header table ID.
        /// </summary>
        [Output("spamMheaderTable")]
        public Output<int> SpamMheaderTable { get; private set; } = null!;

        /// <summary>
        /// Anti-spam DNSBL table ID.
        /// </summary>
        [Output("spamRblTable")]
        public Output<int> SpamRblTable { get; private set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;

        /// <summary>
        /// Yahoo! Mail. The structure of `yahoo_mail` block is documented below.
        /// </summary>
        [Output("yahooMail")]
        public Output<Outputs.SpamfilterProfileYahooMail> YahooMail { get; private set; } = null!;


        /// <summary>
        /// Create a SpamfilterProfile resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public SpamfilterProfile(string name, SpamfilterProfileArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/spamfilterProfile:SpamfilterProfile", name, args ?? new SpamfilterProfileArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SpamfilterProfile(string name, Input<string> id, SpamfilterProfileState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/spamfilterProfile:SpamfilterProfile", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse/pulumi-fortios",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing SpamfilterProfile resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static SpamfilterProfile Get(string name, Input<string> id, SpamfilterProfileState? state = null, CustomResourceOptions? options = null)
        {
            return new SpamfilterProfile(name, id, state, options);
        }
    }

    public sealed class SpamfilterProfileArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Enable/disable external Email inspection. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("external")]
        public Input<string>? External { get; set; }

        /// <summary>
        /// Enable/disable flow-based spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("flowBased")]
        public Input<string>? FlowBased { get; set; }

        /// <summary>
        /// Gmail. The structure of `gmail` block is documented below.
        /// </summary>
        [Input("gmail")]
        public Input<Inputs.SpamfilterProfileGmailArgs>? Gmail { get; set; }

        /// <summary>
        /// IMAP. The structure of `imap` block is documented below.
        /// </summary>
        [Input("imap")]
        public Input<Inputs.SpamfilterProfileImapArgs>? Imap { get; set; }

        /// <summary>
        /// MAPI. The structure of `mapi` block is documented below.
        /// </summary>
        [Input("mapi")]
        public Input<Inputs.SpamfilterProfileMapiArgs>? Mapi { get; set; }

        /// <summary>
        /// MSN Hotmail. The structure of `msn_hotmail` block is documented below.
        /// </summary>
        [Input("msnHotmail")]
        public Input<Inputs.SpamfilterProfileMsnHotmailArgs>? MsnHotmail { get; set; }

        /// <summary>
        /// Profile name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Options. Valid values: `bannedword`, `spambwl`, `spamfsip`, `spamfssubmit`, `spamfschksum`, `spamfsurl`, `spamhelodns`, `spamraddrdns`, `spamrbl`, `spamhdrcheck`, `spamfsphish`.
        /// </summary>
        [Input("options")]
        public Input<string>? Options { get; set; }

        /// <summary>
        /// POP3. The structure of `pop3` block is documented below.
        /// </summary>
        [Input("pop3")]
        public Input<Inputs.SpamfilterProfilePop3Args>? Pop3 { get; set; }

        /// <summary>
        /// Replacement message group.
        /// </summary>
        [Input("replacemsgGroup")]
        public Input<string>? ReplacemsgGroup { get; set; }

        /// <summary>
        /// SMTP. The structure of `smtp` block is documented below.
        /// </summary>
        [Input("smtp")]
        public Input<Inputs.SpamfilterProfileSmtpArgs>? Smtp { get; set; }

        /// <summary>
        /// Anti-spam black/white list table ID.
        /// </summary>
        [Input("spamBwlTable")]
        public Input<int>? SpamBwlTable { get; set; }

        /// <summary>
        /// Anti-spam banned word table ID.
        /// </summary>
        [Input("spamBwordTable")]
        public Input<int>? SpamBwordTable { get; set; }

        /// <summary>
        /// Spam banned word threshold.
        /// </summary>
        [Input("spamBwordThreshold")]
        public Input<int>? SpamBwordThreshold { get; set; }

        /// <summary>
        /// Enable/disable spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("spamFiltering")]
        public Input<string>? SpamFiltering { get; set; }

        /// <summary>
        /// Anti-spam IP trust table ID.
        /// </summary>
        [Input("spamIptrustTable")]
        public Input<int>? SpamIptrustTable { get; set; }

        /// <summary>
        /// Enable/disable spam logging for email filtering. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("spamLog")]
        public Input<string>? SpamLog { get; set; }

        /// <summary>
        /// Enable/disable logging FortiGuard spam response. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("spamLogFortiguardResponse")]
        public Input<string>? SpamLogFortiguardResponse { get; set; }

        /// <summary>
        /// Anti-spam MIME header table ID.
        /// </summary>
        [Input("spamMheaderTable")]
        public Input<int>? SpamMheaderTable { get; set; }

        /// <summary>
        /// Anti-spam DNSBL table ID.
        /// </summary>
        [Input("spamRblTable")]
        public Input<int>? SpamRblTable { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        /// <summary>
        /// Yahoo! Mail. The structure of `yahoo_mail` block is documented below.
        /// </summary>
        [Input("yahooMail")]
        public Input<Inputs.SpamfilterProfileYahooMailArgs>? YahooMail { get; set; }

        public SpamfilterProfileArgs()
        {
        }
        public static new SpamfilterProfileArgs Empty => new SpamfilterProfileArgs();
    }

    public sealed class SpamfilterProfileState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Enable/disable external Email inspection. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("external")]
        public Input<string>? External { get; set; }

        /// <summary>
        /// Enable/disable flow-based spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("flowBased")]
        public Input<string>? FlowBased { get; set; }

        /// <summary>
        /// Gmail. The structure of `gmail` block is documented below.
        /// </summary>
        [Input("gmail")]
        public Input<Inputs.SpamfilterProfileGmailGetArgs>? Gmail { get; set; }

        /// <summary>
        /// IMAP. The structure of `imap` block is documented below.
        /// </summary>
        [Input("imap")]
        public Input<Inputs.SpamfilterProfileImapGetArgs>? Imap { get; set; }

        /// <summary>
        /// MAPI. The structure of `mapi` block is documented below.
        /// </summary>
        [Input("mapi")]
        public Input<Inputs.SpamfilterProfileMapiGetArgs>? Mapi { get; set; }

        /// <summary>
        /// MSN Hotmail. The structure of `msn_hotmail` block is documented below.
        /// </summary>
        [Input("msnHotmail")]
        public Input<Inputs.SpamfilterProfileMsnHotmailGetArgs>? MsnHotmail { get; set; }

        /// <summary>
        /// Profile name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Options. Valid values: `bannedword`, `spambwl`, `spamfsip`, `spamfssubmit`, `spamfschksum`, `spamfsurl`, `spamhelodns`, `spamraddrdns`, `spamrbl`, `spamhdrcheck`, `spamfsphish`.
        /// </summary>
        [Input("options")]
        public Input<string>? Options { get; set; }

        /// <summary>
        /// POP3. The structure of `pop3` block is documented below.
        /// </summary>
        [Input("pop3")]
        public Input<Inputs.SpamfilterProfilePop3GetArgs>? Pop3 { get; set; }

        /// <summary>
        /// Replacement message group.
        /// </summary>
        [Input("replacemsgGroup")]
        public Input<string>? ReplacemsgGroup { get; set; }

        /// <summary>
        /// SMTP. The structure of `smtp` block is documented below.
        /// </summary>
        [Input("smtp")]
        public Input<Inputs.SpamfilterProfileSmtpGetArgs>? Smtp { get; set; }

        /// <summary>
        /// Anti-spam black/white list table ID.
        /// </summary>
        [Input("spamBwlTable")]
        public Input<int>? SpamBwlTable { get; set; }

        /// <summary>
        /// Anti-spam banned word table ID.
        /// </summary>
        [Input("spamBwordTable")]
        public Input<int>? SpamBwordTable { get; set; }

        /// <summary>
        /// Spam banned word threshold.
        /// </summary>
        [Input("spamBwordThreshold")]
        public Input<int>? SpamBwordThreshold { get; set; }

        /// <summary>
        /// Enable/disable spam filtering. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("spamFiltering")]
        public Input<string>? SpamFiltering { get; set; }

        /// <summary>
        /// Anti-spam IP trust table ID.
        /// </summary>
        [Input("spamIptrustTable")]
        public Input<int>? SpamIptrustTable { get; set; }

        /// <summary>
        /// Enable/disable spam logging for email filtering. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("spamLog")]
        public Input<string>? SpamLog { get; set; }

        /// <summary>
        /// Enable/disable logging FortiGuard spam response. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("spamLogFortiguardResponse")]
        public Input<string>? SpamLogFortiguardResponse { get; set; }

        /// <summary>
        /// Anti-spam MIME header table ID.
        /// </summary>
        [Input("spamMheaderTable")]
        public Input<int>? SpamMheaderTable { get; set; }

        /// <summary>
        /// Anti-spam DNSBL table ID.
        /// </summary>
        [Input("spamRblTable")]
        public Input<int>? SpamRblTable { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        /// <summary>
        /// Yahoo! Mail. The structure of `yahoo_mail` block is documented below.
        /// </summary>
        [Input("yahooMail")]
        public Input<Inputs.SpamfilterProfileYahooMailGetArgs>? YahooMail { get; set; }

        public SpamfilterProfileState()
        {
        }
        public static new SpamfilterProfileState Empty => new SpamfilterProfileState();
    }
}
