// *** 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 interface settings of FortiOS.
    /// 
    /// !&gt; **Warning:** The resource will be deprecated and replaced by new resource `fortios.SystemInterface`, we recommend that you use the new resource.
    /// 
    /// ## Example Usage
    /// ### Loopback Interface
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var loopback1 = new Fortios.NetworkingInterfacePort("loopback1", new()
    ///     {
    ///         Alias = "cc1",
    ///         Allowaccess = "ping http",
    ///         Description = "description",
    ///         Ip = "172.16.17.32 255.255.255.0",
    ///         Mode = "static",
    ///         Role = "lan",
    ///         Status = "up",
    ///         Type = "loopback",
    ///         Vdom = "root",
    ///     });
    /// 
    /// });
    /// ```
    /// ### VLAN Interface
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var vlan1 = new Fortios.NetworkingInterfacePort("vlan1", new()
    ///     {
    ///         Allowaccess = "ping",
    ///         Defaultgw = "enable",
    ///         Distance = "33",
    ///         Interface = "port2",
    ///         Ip = "172.16.58.3 255.255.255.0",
    ///         Mode = "static",
    ///         Role = "lan",
    ///         Type = "vlan",
    ///         Vdom = "root",
    ///         Vlanid = "3",
    ///     });
    /// 
    /// });
    /// ```
    /// ### Physical Interface
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var test1 = new Fortios.NetworkingInterfacePort("test1", new()
    ///     {
    ///         Alias = "dkeeew",
    ///         Allowaccess = "ping https",
    ///         Defaultgw = "enable",
    ///         Description = "description",
    ///         DeviceIdentification = "enable",
    ///         Distance = "33",
    ///         DnsServerOverride = "enable",
    ///         Ip = "192.168.3.11 255.255.255.0",
    ///         Mode = "static",
    ///         Mtu = "2933",
    ///         MtuOverride = "enable",
    ///         Role = "lan",
    ///         Speed = "auto",
    ///         Status = "up",
    ///         TcpMss = "3232",
    ///         Type = "physical",
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [FortiosResourceType("fortios:index/networkingInterfacePort:NetworkingInterfacePort")]
    public partial class NetworkingInterfacePort : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Alias will be displayed with the interface name to make it easier to distinguish.
        /// </summary>
        [Output("alias")]
        public Output<string> Alias { get; private set; } = null!;

        /// <summary>
        /// Permitted types of management access to this interface.
        /// </summary>
        [Output("allowaccess")]
        public Output<string> Allowaccess { get; private set; } = null!;

        /// <summary>
        /// Enable to get the gateway IP from the DHCP or PPPoE server.
        /// </summary>
        [Output("defaultgw")]
        public Output<string> Defaultgw { get; private set; } = null!;

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

        /// <summary>
        /// Enable/disable passively gathering of device identity information about the devices on the network connected to this interface.
        /// </summary>
        [Output("deviceIdentification")]
        public Output<string> DeviceIdentification { get; private set; } = null!;

        /// <summary>
        /// Distance for routes learned through PPPoE or DHCP, lower distance indicates preferred route.
        /// </summary>
        [Output("distance")]
        public Output<string> Distance { get; private set; } = null!;

        /// <summary>
        /// Enable/disable use DNS acquired by DHCP or PPPoE.
        /// </summary>
        [Output("dnsServerOverride")]
        public Output<string> DnsServerOverride { get; private set; } = null!;

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

        /// <summary>
        /// Interface IPv4 address and subnet mask, syntax` - X.X.X.X X.X.X.X.
        /// </summary>
        [Output("ip")]
        public Output<string> Ip { get; private set; } = null!;

        /// <summary>
        /// Addressing mode.
        /// </summary>
        [Output("mode")]
        public Output<string> Mode { get; private set; } = null!;

        /// <summary>
        /// MTU value for this interface.
        /// </summary>
        [Output("mtu")]
        public Output<string> Mtu { get; private set; } = null!;

        /// <summary>
        /// Enable to set a custom MTU for this interface.
        /// </summary>
        [Output("mtuOverride")]
        public Output<string> MtuOverride { get; private set; } = null!;

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

        /// <summary>
        /// Interface role.
        /// </summary>
        [Output("role")]
        public Output<string> Role { get; private set; } = null!;

        /// <summary>
        /// Interface speed. The default setting and the options available depend on the interface hardware.
        /// </summary>
        [Output("speed")]
        public Output<string> Speed { get; private set; } = null!;

        /// <summary>
        /// Bring the interface up or shut the interface down.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// TCP maximum segment size. 0 means do not change segment size.
        /// </summary>
        [Output("tcpMss")]
        public Output<string> TcpMss { get; private set; } = null!;

        /// <summary>
        /// Interface type (support physical, vlan, loopback).
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;

        /// <summary>
        /// Interface is in this virtual domain (VDOM).
        /// </summary>
        [Output("vdom")]
        public Output<string> Vdom { get; private set; } = null!;

        /// <summary>
        /// VLAN ID.
        /// </summary>
        [Output("vlanid")]
        public Output<string> Vlanid { get; private set; } = null!;


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

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

    public sealed class NetworkingInterfacePortArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Alias will be displayed with the interface name to make it easier to distinguish.
        /// </summary>
        [Input("alias")]
        public Input<string>? Alias { get; set; }

        /// <summary>
        /// Permitted types of management access to this interface.
        /// </summary>
        [Input("allowaccess")]
        public Input<string>? Allowaccess { get; set; }

        /// <summary>
        /// Enable to get the gateway IP from the DHCP or PPPoE server.
        /// </summary>
        [Input("defaultgw")]
        public Input<string>? Defaultgw { get; set; }

        /// <summary>
        /// Description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Enable/disable passively gathering of device identity information about the devices on the network connected to this interface.
        /// </summary>
        [Input("deviceIdentification")]
        public Input<string>? DeviceIdentification { get; set; }

        /// <summary>
        /// Distance for routes learned through PPPoE or DHCP, lower distance indicates preferred route.
        /// </summary>
        [Input("distance")]
        public Input<string>? Distance { get; set; }

        /// <summary>
        /// Enable/disable use DNS acquired by DHCP or PPPoE.
        /// </summary>
        [Input("dnsServerOverride")]
        public Input<string>? DnsServerOverride { get; set; }

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

        /// <summary>
        /// Interface IPv4 address and subnet mask, syntax` - X.X.X.X X.X.X.X.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        /// <summary>
        /// Addressing mode.
        /// </summary>
        [Input("mode")]
        public Input<string>? Mode { get; set; }

        /// <summary>
        /// MTU value for this interface.
        /// </summary>
        [Input("mtu")]
        public Input<string>? Mtu { get; set; }

        /// <summary>
        /// Enable to set a custom MTU for this interface.
        /// </summary>
        [Input("mtuOverride")]
        public Input<string>? MtuOverride { get; set; }

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

        /// <summary>
        /// Interface role.
        /// </summary>
        [Input("role")]
        public Input<string>? Role { get; set; }

        /// <summary>
        /// Interface speed. The default setting and the options available depend on the interface hardware.
        /// </summary>
        [Input("speed")]
        public Input<string>? Speed { get; set; }

        /// <summary>
        /// Bring the interface up or shut the interface down.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// TCP maximum segment size. 0 means do not change segment size.
        /// </summary>
        [Input("tcpMss")]
        public Input<string>? TcpMss { get; set; }

        /// <summary>
        /// Interface type (support physical, vlan, loopback).
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; set; } = null!;

        /// <summary>
        /// Interface is in this virtual domain (VDOM).
        /// </summary>
        [Input("vdom")]
        public Input<string>? Vdom { get; set; }

        /// <summary>
        /// VLAN ID.
        /// </summary>
        [Input("vlanid")]
        public Input<string>? Vlanid { get; set; }

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

    public sealed class NetworkingInterfacePortState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Alias will be displayed with the interface name to make it easier to distinguish.
        /// </summary>
        [Input("alias")]
        public Input<string>? Alias { get; set; }

        /// <summary>
        /// Permitted types of management access to this interface.
        /// </summary>
        [Input("allowaccess")]
        public Input<string>? Allowaccess { get; set; }

        /// <summary>
        /// Enable to get the gateway IP from the DHCP or PPPoE server.
        /// </summary>
        [Input("defaultgw")]
        public Input<string>? Defaultgw { get; set; }

        /// <summary>
        /// Description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Enable/disable passively gathering of device identity information about the devices on the network connected to this interface.
        /// </summary>
        [Input("deviceIdentification")]
        public Input<string>? DeviceIdentification { get; set; }

        /// <summary>
        /// Distance for routes learned through PPPoE or DHCP, lower distance indicates preferred route.
        /// </summary>
        [Input("distance")]
        public Input<string>? Distance { get; set; }

        /// <summary>
        /// Enable/disable use DNS acquired by DHCP or PPPoE.
        /// </summary>
        [Input("dnsServerOverride")]
        public Input<string>? DnsServerOverride { get; set; }

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

        /// <summary>
        /// Interface IPv4 address and subnet mask, syntax` - X.X.X.X X.X.X.X.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        /// <summary>
        /// Addressing mode.
        /// </summary>
        [Input("mode")]
        public Input<string>? Mode { get; set; }

        /// <summary>
        /// MTU value for this interface.
        /// </summary>
        [Input("mtu")]
        public Input<string>? Mtu { get; set; }

        /// <summary>
        /// Enable to set a custom MTU for this interface.
        /// </summary>
        [Input("mtuOverride")]
        public Input<string>? MtuOverride { get; set; }

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

        /// <summary>
        /// Interface role.
        /// </summary>
        [Input("role")]
        public Input<string>? Role { get; set; }

        /// <summary>
        /// Interface speed. The default setting and the options available depend on the interface hardware.
        /// </summary>
        [Input("speed")]
        public Input<string>? Speed { get; set; }

        /// <summary>
        /// Bring the interface up or shut the interface down.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// TCP maximum segment size. 0 means do not change segment size.
        /// </summary>
        [Input("tcpMss")]
        public Input<string>? TcpMss { get; set; }

        /// <summary>
        /// Interface type (support physical, vlan, loopback).
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        /// <summary>
        /// Interface is in this virtual domain (VDOM).
        /// </summary>
        [Input("vdom")]
        public Input<string>? Vdom { get; set; }

        /// <summary>
        /// VLAN ID.
        /// </summary>
        [Input("vlanid")]
        public Input<string>? Vlanid { get; set; }

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