// *** 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 multicast NAT policies.
    /// 
    /// ## 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.FirewallMulticastpolicy("trname", new()
    ///     {
    ///         Action = "accept",
    ///         Dnat = "0.0.0.0",
    ///         Dstaddrs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallMulticastpolicyDstaddrArgs
    ///             {
    ///                 Name = "all",
    ///             },
    ///         },
    ///         Dstintf = "port4",
    ///         EndPort = 65535,
    ///         Fosid = 1,
    ///         Logtraffic = "enable",
    ///         Protocol = 0,
    ///         Snat = "disable",
    ///         SnatIp = "0.0.0.0",
    ///         Srcaddrs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallMulticastpolicySrcaddrArgs
    ///             {
    ///                 Name = "all",
    ///             },
    ///         },
    ///         Srcintf = "port3",
    ///         StartPort = 1,
    ///         Status = "enable",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Firewall MulticastPolicy can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/firewallMulticastpolicy:FirewallMulticastpolicy labelname {{fosid}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/firewallMulticastpolicy:FirewallMulticastpolicy labelname {{fosid}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/firewallMulticastpolicy:FirewallMulticastpolicy")]
    public partial class FirewallMulticastpolicy : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Accept or deny traffic matching the policy. Valid values: `accept`, `deny`.
        /// </summary>
        [Output("action")]
        public Output<string> Action { get; private set; } = null!;

        /// <summary>
        /// Enable/disable offloading policy traffic for hardware acceleration. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("autoAsicOffload")]
        public Output<string> AutoAsicOffload { get; private set; } = null!;

        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comments")]
        public Output<string?> Comments { get; private set; } = null!;

        /// <summary>
        /// IPv4 DNAT address used for multicast destination addresses.
        /// </summary>
        [Output("dnat")]
        public Output<string> Dnat { get; private set; } = null!;

        /// <summary>
        /// Destination address objects. The structure of `dstaddr` block is documented below.
        /// </summary>
        [Output("dstaddrs")]
        public Output<ImmutableArray<Outputs.FirewallMulticastpolicyDstaddr>> Dstaddrs { get; private set; } = null!;

        /// <summary>
        /// Destination interface name.
        /// </summary>
        [Output("dstintf")]
        public Output<string> Dstintf { get; private set; } = null!;

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Output("dynamicSortSubtable")]
        public Output<string?> DynamicSortSubtable { get; private set; } = null!;

        /// <summary>
        /// Integer value for ending TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Output("endPort")]
        public Output<int> EndPort { get; private set; } = null!;

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Output("fosid")]
        public Output<int> Fosid { get; private set; } = null!;

        /// <summary>
        /// Enable/disable logging traffic accepted by this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("logtraffic")]
        public Output<string> Logtraffic { get; private set; } = null!;

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

        /// <summary>
        /// Integer value for the protocol type as defined by IANA (0 - 255, default = 0).
        /// </summary>
        [Output("protocol")]
        public Output<int> Protocol { get; private set; } = null!;

        /// <summary>
        /// Enable/disable substitution of the outgoing interface IP address for the original source IP address (called source NAT or SNAT). Valid values: `enable`, `disable`.
        /// </summary>
        [Output("snat")]
        public Output<string> Snat { get; private set; } = null!;

        /// <summary>
        /// IPv4 address to be used as the source address for NATed traffic.
        /// </summary>
        [Output("snatIp")]
        public Output<string> SnatIp { get; private set; } = null!;

        /// <summary>
        /// Source address objects. The structure of `srcaddr` block is documented below.
        /// </summary>
        [Output("srcaddrs")]
        public Output<ImmutableArray<Outputs.FirewallMulticastpolicySrcaddr>> Srcaddrs { get; private set; } = null!;

        /// <summary>
        /// Source interface name.
        /// </summary>
        [Output("srcintf")]
        public Output<string> Srcintf { get; private set; } = null!;

        /// <summary>
        /// Integer value for starting TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Output("startPort")]
        public Output<int> StartPort { get; private set; } = null!;

        /// <summary>
        /// Enable/disable this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Traffic shaper to apply to traffic forwarded by the multicast policy.
        /// </summary>
        [Output("trafficShaper")]
        public Output<string> TrafficShaper { get; private set; } = null!;

        /// <summary>
        /// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
        /// </summary>
        [Output("uuid")]
        public Output<string> Uuid { 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>
        /// Create a FirewallMulticastpolicy 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 FirewallMulticastpolicy(string name, FirewallMulticastpolicyArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/firewallMulticastpolicy:FirewallMulticastpolicy", name, args ?? new FirewallMulticastpolicyArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FirewallMulticastpolicy(string name, Input<string> id, FirewallMulticastpolicyState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/firewallMulticastpolicy:FirewallMulticastpolicy", 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 FirewallMulticastpolicy 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 FirewallMulticastpolicy Get(string name, Input<string> id, FirewallMulticastpolicyState? state = null, CustomResourceOptions? options = null)
        {
            return new FirewallMulticastpolicy(name, id, state, options);
        }
    }

    public sealed class FirewallMulticastpolicyArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Accept or deny traffic matching the policy. Valid values: `accept`, `deny`.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// Enable/disable offloading policy traffic for hardware acceleration. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("autoAsicOffload")]
        public Input<string>? AutoAsicOffload { get; set; }

        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comments")]
        public Input<string>? Comments { get; set; }

        /// <summary>
        /// IPv4 DNAT address used for multicast destination addresses.
        /// </summary>
        [Input("dnat")]
        public Input<string>? Dnat { get; set; }

        [Input("dstaddrs", required: true)]
        private InputList<Inputs.FirewallMulticastpolicyDstaddrArgs>? _dstaddrs;

        /// <summary>
        /// Destination address objects. The structure of `dstaddr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallMulticastpolicyDstaddrArgs> Dstaddrs
        {
            get => _dstaddrs ?? (_dstaddrs = new InputList<Inputs.FirewallMulticastpolicyDstaddrArgs>());
            set => _dstaddrs = value;
        }

        /// <summary>
        /// Destination interface name.
        /// </summary>
        [Input("dstintf", required: true)]
        public Input<string> Dstintf { get; set; } = null!;

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        /// <summary>
        /// Integer value for ending TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Input("endPort")]
        public Input<int>? EndPort { get; set; }

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Input("fosid")]
        public Input<int>? Fosid { get; set; }

        /// <summary>
        /// Enable/disable logging traffic accepted by this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("logtraffic")]
        public Input<string>? Logtraffic { get; set; }

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

        /// <summary>
        /// Integer value for the protocol type as defined by IANA (0 - 255, default = 0).
        /// </summary>
        [Input("protocol")]
        public Input<int>? Protocol { get; set; }

        /// <summary>
        /// Enable/disable substitution of the outgoing interface IP address for the original source IP address (called source NAT or SNAT). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("snat")]
        public Input<string>? Snat { get; set; }

        /// <summary>
        /// IPv4 address to be used as the source address for NATed traffic.
        /// </summary>
        [Input("snatIp")]
        public Input<string>? SnatIp { get; set; }

        [Input("srcaddrs", required: true)]
        private InputList<Inputs.FirewallMulticastpolicySrcaddrArgs>? _srcaddrs;

        /// <summary>
        /// Source address objects. The structure of `srcaddr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallMulticastpolicySrcaddrArgs> Srcaddrs
        {
            get => _srcaddrs ?? (_srcaddrs = new InputList<Inputs.FirewallMulticastpolicySrcaddrArgs>());
            set => _srcaddrs = value;
        }

        /// <summary>
        /// Source interface name.
        /// </summary>
        [Input("srcintf", required: true)]
        public Input<string> Srcintf { get; set; } = null!;

        /// <summary>
        /// Integer value for starting TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Input("startPort")]
        public Input<int>? StartPort { get; set; }

        /// <summary>
        /// Enable/disable this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Traffic shaper to apply to traffic forwarded by the multicast policy.
        /// </summary>
        [Input("trafficShaper")]
        public Input<string>? TrafficShaper { get; set; }

        /// <summary>
        /// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
        /// </summary>
        [Input("uuid")]
        public Input<string>? Uuid { 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; }

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

    public sealed class FirewallMulticastpolicyState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Accept or deny traffic matching the policy. Valid values: `accept`, `deny`.
        /// </summary>
        [Input("action")]
        public Input<string>? Action { get; set; }

        /// <summary>
        /// Enable/disable offloading policy traffic for hardware acceleration. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("autoAsicOffload")]
        public Input<string>? AutoAsicOffload { get; set; }

        /// <summary>
        /// Comment.
        /// </summary>
        [Input("comments")]
        public Input<string>? Comments { get; set; }

        /// <summary>
        /// IPv4 DNAT address used for multicast destination addresses.
        /// </summary>
        [Input("dnat")]
        public Input<string>? Dnat { get; set; }

        [Input("dstaddrs")]
        private InputList<Inputs.FirewallMulticastpolicyDstaddrGetArgs>? _dstaddrs;

        /// <summary>
        /// Destination address objects. The structure of `dstaddr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallMulticastpolicyDstaddrGetArgs> Dstaddrs
        {
            get => _dstaddrs ?? (_dstaddrs = new InputList<Inputs.FirewallMulticastpolicyDstaddrGetArgs>());
            set => _dstaddrs = value;
        }

        /// <summary>
        /// Destination interface name.
        /// </summary>
        [Input("dstintf")]
        public Input<string>? Dstintf { get; set; }

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        /// <summary>
        /// Integer value for ending TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Input("endPort")]
        public Input<int>? EndPort { get; set; }

        /// <summary>
        /// Policy ID.
        /// </summary>
        [Input("fosid")]
        public Input<int>? Fosid { get; set; }

        /// <summary>
        /// Enable/disable logging traffic accepted by this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("logtraffic")]
        public Input<string>? Logtraffic { get; set; }

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

        /// <summary>
        /// Integer value for the protocol type as defined by IANA (0 - 255, default = 0).
        /// </summary>
        [Input("protocol")]
        public Input<int>? Protocol { get; set; }

        /// <summary>
        /// Enable/disable substitution of the outgoing interface IP address for the original source IP address (called source NAT or SNAT). Valid values: `enable`, `disable`.
        /// </summary>
        [Input("snat")]
        public Input<string>? Snat { get; set; }

        /// <summary>
        /// IPv4 address to be used as the source address for NATed traffic.
        /// </summary>
        [Input("snatIp")]
        public Input<string>? SnatIp { get; set; }

        [Input("srcaddrs")]
        private InputList<Inputs.FirewallMulticastpolicySrcaddrGetArgs>? _srcaddrs;

        /// <summary>
        /// Source address objects. The structure of `srcaddr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallMulticastpolicySrcaddrGetArgs> Srcaddrs
        {
            get => _srcaddrs ?? (_srcaddrs = new InputList<Inputs.FirewallMulticastpolicySrcaddrGetArgs>());
            set => _srcaddrs = value;
        }

        /// <summary>
        /// Source interface name.
        /// </summary>
        [Input("srcintf")]
        public Input<string>? Srcintf { get; set; }

        /// <summary>
        /// Integer value for starting TCP/UDP/SCTP destination port in range (1 - 65535, default = 1).
        /// </summary>
        [Input("startPort")]
        public Input<int>? StartPort { get; set; }

        /// <summary>
        /// Enable/disable this policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Traffic shaper to apply to traffic forwarded by the multicast policy.
        /// </summary>
        [Input("trafficShaper")]
        public Input<string>? TrafficShaper { get; set; }

        /// <summary>
        /// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
        /// </summary>
        [Input("uuid")]
        public Input<string>? Uuid { 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; }

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