// *** 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 central SNAT 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.FirewallCentralsnatmap("trname", new()
    ///     {
    ///         DstAddrs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallCentralsnatmapDstAddrArgs
    ///             {
    ///                 Name = "all",
    ///             },
    ///         },
    ///         Dstintfs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallCentralsnatmapDstintfArgs
    ///             {
    ///                 Name = "port3",
    ///             },
    ///         },
    ///         Nat = "enable",
    ///         NatPort = "0",
    ///         OrigAddrs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallCentralsnatmapOrigAddrArgs
    ///             {
    ///                 Name = "all",
    ///             },
    ///         },
    ///         OrigPort = "0",
    ///         Policyid = 1,
    ///         Protocol = 33,
    ///         Srcintfs = new[]
    ///         {
    ///             new Fortios.Inputs.FirewallCentralsnatmapSrcintfArgs
    ///             {
    ///                 Name = "port1",
    ///             },
    ///         },
    ///         Status = "enable",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Firewall CentralSnatMap can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/firewallCentralsnatmap:FirewallCentralsnatmap labelname {{policyid}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/firewallCentralsnatmap:FirewallCentralsnatmap labelname {{policyid}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/firewallCentralsnatmap:FirewallCentralsnatmap")]
    public partial class FirewallCentralsnatmap : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comments")]
        public Output<string?> Comments { get; private set; } = null!;

        /// <summary>
        /// IPv6 Destination address. The structure of `dst_addr6` block is documented below.
        /// </summary>
        [Output("dstAddr6s")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapDstAddr6>> DstAddr6s { get; private set; } = null!;

        /// <summary>
        /// Destination address name from available addresses. The structure of `dst_addr` block is documented below.
        /// </summary>
        [Output("dstAddrs")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapDstAddr>> DstAddrs { get; private set; } = null!;

        /// <summary>
        /// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
        /// </summary>
        [Output("dstintfs")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapDstintf>> Dstintfs { 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>
        /// Enable/disable source NAT. Valid values: `disable`, `enable`.
        /// </summary>
        [Output("nat")]
        public Output<string> Nat { get; private set; } = null!;

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

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

        /// <summary>
        /// IPv6 pools to be used for source NAT. The structure of `nat_ippool6` block is documented below.
        /// </summary>
        [Output("natIppool6s")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapNatIppool6>> NatIppool6s { get; private set; } = null!;

        /// <summary>
        /// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `nat_ippool` block is documented below.
        /// </summary>
        [Output("natIppools")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapNatIppool>> NatIppools { get; private set; } = null!;

        /// <summary>
        /// Translated port or port range (0 to 65535).
        /// </summary>
        [Output("natPort")]
        public Output<string> NatPort { get; private set; } = null!;

        /// <summary>
        /// IPv6 Original address. The structure of `orig_addr6` block is documented below.
        /// </summary>
        [Output("origAddr6s")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapOrigAddr6>> OrigAddr6s { get; private set; } = null!;

        /// <summary>
        /// Original address. The structure of `orig_addr` block is documented below.
        /// </summary>
        [Output("origAddrs")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapOrigAddr>> OrigAddrs { get; private set; } = null!;

        /// <summary>
        /// Original TCP port (0 to 65535).
        /// </summary>
        [Output("origPort")]
        public Output<string> OrigPort { get; private set; } = null!;

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

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

        /// <summary>
        /// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
        /// </summary>
        [Output("srcintfs")]
        public Output<ImmutableArray<Outputs.FirewallCentralsnatmapSrcintf>> Srcintfs { get; private set; } = null!;

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

        /// <summary>
        /// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Output("type")]
        public Output<string> Type { 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 FirewallCentralsnatmap 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 FirewallCentralsnatmap(string name, FirewallCentralsnatmapArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/firewallCentralsnatmap:FirewallCentralsnatmap", name, args ?? new FirewallCentralsnatmapArgs(), MakeResourceOptions(options, ""))
        {
        }

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

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

        [Input("dstAddr6s")]
        private InputList<Inputs.FirewallCentralsnatmapDstAddr6Args>? _dstAddr6s;

        /// <summary>
        /// IPv6 Destination address. The structure of `dst_addr6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstAddr6Args> DstAddr6s
        {
            get => _dstAddr6s ?? (_dstAddr6s = new InputList<Inputs.FirewallCentralsnatmapDstAddr6Args>());
            set => _dstAddr6s = value;
        }

        [Input("dstAddrs", required: true)]
        private InputList<Inputs.FirewallCentralsnatmapDstAddrArgs>? _dstAddrs;

        /// <summary>
        /// Destination address name from available addresses. The structure of `dst_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstAddrArgs> DstAddrs
        {
            get => _dstAddrs ?? (_dstAddrs = new InputList<Inputs.FirewallCentralsnatmapDstAddrArgs>());
            set => _dstAddrs = value;
        }

        [Input("dstintfs", required: true)]
        private InputList<Inputs.FirewallCentralsnatmapDstintfArgs>? _dstintfs;

        /// <summary>
        /// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstintfArgs> Dstintfs
        {
            get => _dstintfs ?? (_dstintfs = new InputList<Inputs.FirewallCentralsnatmapDstintfArgs>());
            set => _dstintfs = value;
        }

        /// <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>
        /// Enable/disable source NAT. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("nat", required: true)]
        public Input<string> Nat { get; set; } = null!;

        /// <summary>
        /// Enable/disable NAT46. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("nat46")]
        public Input<string>? Nat46 { get; set; }

        /// <summary>
        /// Enable/disable NAT64. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("nat64")]
        public Input<string>? Nat64 { get; set; }

        [Input("natIppool6s")]
        private InputList<Inputs.FirewallCentralsnatmapNatIppool6Args>? _natIppool6s;

        /// <summary>
        /// IPv6 pools to be used for source NAT. The structure of `nat_ippool6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapNatIppool6Args> NatIppool6s
        {
            get => _natIppool6s ?? (_natIppool6s = new InputList<Inputs.FirewallCentralsnatmapNatIppool6Args>());
            set => _natIppool6s = value;
        }

        [Input("natIppools")]
        private InputList<Inputs.FirewallCentralsnatmapNatIppoolArgs>? _natIppools;

        /// <summary>
        /// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `nat_ippool` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapNatIppoolArgs> NatIppools
        {
            get => _natIppools ?? (_natIppools = new InputList<Inputs.FirewallCentralsnatmapNatIppoolArgs>());
            set => _natIppools = value;
        }

        /// <summary>
        /// Translated port or port range (0 to 65535).
        /// </summary>
        [Input("natPort")]
        public Input<string>? NatPort { get; set; }

        [Input("origAddr6s")]
        private InputList<Inputs.FirewallCentralsnatmapOrigAddr6Args>? _origAddr6s;

        /// <summary>
        /// IPv6 Original address. The structure of `orig_addr6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapOrigAddr6Args> OrigAddr6s
        {
            get => _origAddr6s ?? (_origAddr6s = new InputList<Inputs.FirewallCentralsnatmapOrigAddr6Args>());
            set => _origAddr6s = value;
        }

        [Input("origAddrs", required: true)]
        private InputList<Inputs.FirewallCentralsnatmapOrigAddrArgs>? _origAddrs;

        /// <summary>
        /// Original address. The structure of `orig_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapOrigAddrArgs> OrigAddrs
        {
            get => _origAddrs ?? (_origAddrs = new InputList<Inputs.FirewallCentralsnatmapOrigAddrArgs>());
            set => _origAddrs = value;
        }

        /// <summary>
        /// Original TCP port (0 to 65535).
        /// </summary>
        [Input("origPort", required: true)]
        public Input<string> OrigPort { get; set; } = null!;

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

        /// <summary>
        /// Integer value for the protocol type (0 - 255).
        /// </summary>
        [Input("protocol", required: true)]
        public Input<int> Protocol { get; set; } = null!;

        [Input("srcintfs", required: true)]
        private InputList<Inputs.FirewallCentralsnatmapSrcintfArgs>? _srcintfs;

        /// <summary>
        /// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapSrcintfArgs> Srcintfs
        {
            get => _srcintfs ?? (_srcintfs = new InputList<Inputs.FirewallCentralsnatmapSrcintfArgs>());
            set => _srcintfs = value;
        }

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

        /// <summary>
        /// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { 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 FirewallCentralsnatmapArgs()
        {
        }
        public static new FirewallCentralsnatmapArgs Empty => new FirewallCentralsnatmapArgs();
    }

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

        [Input("dstAddr6s")]
        private InputList<Inputs.FirewallCentralsnatmapDstAddr6GetArgs>? _dstAddr6s;

        /// <summary>
        /// IPv6 Destination address. The structure of `dst_addr6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstAddr6GetArgs> DstAddr6s
        {
            get => _dstAddr6s ?? (_dstAddr6s = new InputList<Inputs.FirewallCentralsnatmapDstAddr6GetArgs>());
            set => _dstAddr6s = value;
        }

        [Input("dstAddrs")]
        private InputList<Inputs.FirewallCentralsnatmapDstAddrGetArgs>? _dstAddrs;

        /// <summary>
        /// Destination address name from available addresses. The structure of `dst_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstAddrGetArgs> DstAddrs
        {
            get => _dstAddrs ?? (_dstAddrs = new InputList<Inputs.FirewallCentralsnatmapDstAddrGetArgs>());
            set => _dstAddrs = value;
        }

        [Input("dstintfs")]
        private InputList<Inputs.FirewallCentralsnatmapDstintfGetArgs>? _dstintfs;

        /// <summary>
        /// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapDstintfGetArgs> Dstintfs
        {
            get => _dstintfs ?? (_dstintfs = new InputList<Inputs.FirewallCentralsnatmapDstintfGetArgs>());
            set => _dstintfs = value;
        }

        /// <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>
        /// Enable/disable source NAT. Valid values: `disable`, `enable`.
        /// </summary>
        [Input("nat")]
        public Input<string>? Nat { get; set; }

        /// <summary>
        /// Enable/disable NAT46. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("nat46")]
        public Input<string>? Nat46 { get; set; }

        /// <summary>
        /// Enable/disable NAT64. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("nat64")]
        public Input<string>? Nat64 { get; set; }

        [Input("natIppool6s")]
        private InputList<Inputs.FirewallCentralsnatmapNatIppool6GetArgs>? _natIppool6s;

        /// <summary>
        /// IPv6 pools to be used for source NAT. The structure of `nat_ippool6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapNatIppool6GetArgs> NatIppool6s
        {
            get => _natIppool6s ?? (_natIppool6s = new InputList<Inputs.FirewallCentralsnatmapNatIppool6GetArgs>());
            set => _natIppool6s = value;
        }

        [Input("natIppools")]
        private InputList<Inputs.FirewallCentralsnatmapNatIppoolGetArgs>? _natIppools;

        /// <summary>
        /// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `nat_ippool` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapNatIppoolGetArgs> NatIppools
        {
            get => _natIppools ?? (_natIppools = new InputList<Inputs.FirewallCentralsnatmapNatIppoolGetArgs>());
            set => _natIppools = value;
        }

        /// <summary>
        /// Translated port or port range (0 to 65535).
        /// </summary>
        [Input("natPort")]
        public Input<string>? NatPort { get; set; }

        [Input("origAddr6s")]
        private InputList<Inputs.FirewallCentralsnatmapOrigAddr6GetArgs>? _origAddr6s;

        /// <summary>
        /// IPv6 Original address. The structure of `orig_addr6` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapOrigAddr6GetArgs> OrigAddr6s
        {
            get => _origAddr6s ?? (_origAddr6s = new InputList<Inputs.FirewallCentralsnatmapOrigAddr6GetArgs>());
            set => _origAddr6s = value;
        }

        [Input("origAddrs")]
        private InputList<Inputs.FirewallCentralsnatmapOrigAddrGetArgs>? _origAddrs;

        /// <summary>
        /// Original address. The structure of `orig_addr` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapOrigAddrGetArgs> OrigAddrs
        {
            get => _origAddrs ?? (_origAddrs = new InputList<Inputs.FirewallCentralsnatmapOrigAddrGetArgs>());
            set => _origAddrs = value;
        }

        /// <summary>
        /// Original TCP port (0 to 65535).
        /// </summary>
        [Input("origPort")]
        public Input<string>? OrigPort { get; set; }

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

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

        [Input("srcintfs")]
        private InputList<Inputs.FirewallCentralsnatmapSrcintfGetArgs>? _srcintfs;

        /// <summary>
        /// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
        /// </summary>
        public InputList<Inputs.FirewallCentralsnatmapSrcintfGetArgs> Srcintfs
        {
            get => _srcintfs ?? (_srcintfs = new InputList<Inputs.FirewallCentralsnatmapSrcintfGetArgs>());
            set => _srcintfs = value;
        }

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

        /// <summary>
        /// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { 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 FirewallCentralsnatmapState()
        {
        }
        public static new FirewallCentralsnatmapState Empty => new FirewallCentralsnatmapState();
    }
}
