// *** 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>
    /// Provides a resource to configure firewall virtual IPs (VIPs) of FortiOS.
    /// 
    /// !&gt; **Warning:** The resource will be deprecated and replaced by new resource `fortios.FirewallVip`, we recommend that you use the new resource.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var v11 = new Fortios.FirewallObjectVip("v11", new()
    ///     {
    ///         Comment = "fdsafdsafds",
    ///         Extintf = "port3",
    ///         Extip = "11.1.1.1-21.1.1.1",
    ///         Extport = "2-3",
    ///         Mappedips = new[]
    ///         {
    ///             "22.2.2.2-32.2.2.2",
    ///         },
    ///         Mappedport = "4-5",
    ///         Portforward = "enable",
    ///         Protocol = "tcp",
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [FortiosResourceType("fortios:index/firewallObjectVip:FirewallObjectVip")]
    public partial class FirewallObjectVip : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Comment.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        /// <summary>
        /// Interface connected to the source network that receives the packets that will be forwarded to the destination network.
        /// </summary>
        [Output("extintf")]
        public Output<string> Extintf { get; private set; } = null!;

        /// <summary>
        /// IP address or address range on the external interface that you want to map to an address or address range on the
        /// destination network.
        /// </summary>
        [Output("extip")]
        public Output<string> Extip { get; private set; } = null!;

        /// <summary>
        /// Incoming port number range that you want to map to a port number range on the destination network.
        /// </summary>
        [Output("extport")]
        public Output<string> Extport { get; private set; } = null!;

        /// <summary>
        /// IP address or address range on the destination network to which the external IP address is mapped.
        /// </summary>
        [Output("mappedips")]
        public Output<ImmutableArray<string>> Mappedips { get; private set; } = null!;

        /// <summary>
        /// Port number range on the destination network to which the external port number range is mapped.
        /// </summary>
        [Output("mappedport")]
        public Output<string> Mappedport { get; private set; } = null!;

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

        /// <summary>
        /// Enable/disable port forwarding.
        /// </summary>
        [Output("portforward")]
        public Output<string> Portforward { get; private set; } = null!;

        /// <summary>
        /// Protocol to use when forwarding packets.
        /// </summary>
        [Output("protocol")]
        public Output<string> Protocol { get; private set; } = null!;


        /// <summary>
        /// Create a FirewallObjectVip 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 FirewallObjectVip(string name, FirewallObjectVipArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/firewallObjectVip:FirewallObjectVip", name, args ?? new FirewallObjectVipArgs(), MakeResourceOptions(options, ""))
        {
        }

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

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

        /// <summary>
        /// Interface connected to the source network that receives the packets that will be forwarded to the destination network.
        /// </summary>
        [Input("extintf")]
        public Input<string>? Extintf { get; set; }

        /// <summary>
        /// IP address or address range on the external interface that you want to map to an address or address range on the
        /// destination network.
        /// </summary>
        [Input("extip", required: true)]
        public Input<string> Extip { get; set; } = null!;

        /// <summary>
        /// Incoming port number range that you want to map to a port number range on the destination network.
        /// </summary>
        [Input("extport")]
        public Input<string>? Extport { get; set; }

        [Input("mappedips", required: true)]
        private InputList<string>? _mappedips;

        /// <summary>
        /// IP address or address range on the destination network to which the external IP address is mapped.
        /// </summary>
        public InputList<string> Mappedips
        {
            get => _mappedips ?? (_mappedips = new InputList<string>());
            set => _mappedips = value;
        }

        /// <summary>
        /// Port number range on the destination network to which the external port number range is mapped.
        /// </summary>
        [Input("mappedport")]
        public Input<string>? Mappedport { get; set; }

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

        /// <summary>
        /// Enable/disable port forwarding.
        /// </summary>
        [Input("portforward")]
        public Input<string>? Portforward { get; set; }

        /// <summary>
        /// Protocol to use when forwarding packets.
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

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

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

        /// <summary>
        /// Interface connected to the source network that receives the packets that will be forwarded to the destination network.
        /// </summary>
        [Input("extintf")]
        public Input<string>? Extintf { get; set; }

        /// <summary>
        /// IP address or address range on the external interface that you want to map to an address or address range on the
        /// destination network.
        /// </summary>
        [Input("extip")]
        public Input<string>? Extip { get; set; }

        /// <summary>
        /// Incoming port number range that you want to map to a port number range on the destination network.
        /// </summary>
        [Input("extport")]
        public Input<string>? Extport { get; set; }

        [Input("mappedips")]
        private InputList<string>? _mappedips;

        /// <summary>
        /// IP address or address range on the destination network to which the external IP address is mapped.
        /// </summary>
        public InputList<string> Mappedips
        {
            get => _mappedips ?? (_mappedips = new InputList<string>());
            set => _mappedips = value;
        }

        /// <summary>
        /// Port number range on the destination network to which the external port number range is mapped.
        /// </summary>
        [Input("mappedport")]
        public Input<string>? Mappedport { get; set; }

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

        /// <summary>
        /// Enable/disable port forwarding.
        /// </summary>
        [Input("portforward")]
        public Input<string>? Portforward { get; set; }

        /// <summary>
        /// Protocol to use when forwarding packets.
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

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