<reponame>pulumiverse/pulumi-fortios// *** 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 VLAN policy to be applied on the managed FortiSwitch ports through port-policy. Applies to FortiOS Version `&gt;= 6.4.0`.
    /// 
    /// ## Import
    /// 
    /// SwitchController VlanPolicy can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/switchcontrollerVlanpolicy:SwitchcontrollerVlanpolicy labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/switchcontrollerVlanpolicy:SwitchcontrollerVlanpolicy labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/switchcontrollerVlanpolicy:SwitchcontrollerVlanpolicy")]
    public partial class SwitchcontrollerVlanpolicy : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Allowed VLANs to be applied when using this VLAN policy. The structure of `allowed_vlans` block is documented below.
        /// </summary>
        [Output("allowedVlans")]
        public Output<ImmutableArray<Outputs.SwitchcontrollerVlanpolicyAllowedVlan>> AllowedVlans { get; private set; } = null!;

        /// <summary>
        /// Enable/disable all defined VLANs when using this VLAN policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("allowedVlansAll")]
        public Output<string> AllowedVlansAll { get; private set; } = null!;

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

        /// <summary>
        /// Discard mode to be applied when using this VLAN policy. Valid values: `none`, `all-untagged`, `all-tagged`.
        /// </summary>
        [Output("discardMode")]
        public Output<string> DiscardMode { 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>
        /// FortiLink interface for which this VLAN policy belongs to.
        /// </summary>
        [Output("fortilink")]
        public Output<string> Fortilink { get; private set; } = null!;

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

        /// <summary>
        /// Untagged VLANs to be applied when using this VLAN policy. The structure of `untagged_vlans` block is documented below.
        /// </summary>
        [Output("untaggedVlans")]
        public Output<ImmutableArray<Outputs.SwitchcontrollerVlanpolicyUntaggedVlan>> UntaggedVlans { 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>
        /// Native VLAN to be applied when using this VLAN policy.
        /// </summary>
        [Output("vlan")]
        public Output<string> Vlan { get; private set; } = null!;


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

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

    public sealed class SwitchcontrollerVlanpolicyArgs : global::Pulumi.ResourceArgs
    {
        [Input("allowedVlans")]
        private InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanArgs>? _allowedVlans;

        /// <summary>
        /// Allowed VLANs to be applied when using this VLAN policy. The structure of `allowed_vlans` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanArgs> AllowedVlans
        {
            get => _allowedVlans ?? (_allowedVlans = new InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanArgs>());
            set => _allowedVlans = value;
        }

        /// <summary>
        /// Enable/disable all defined VLANs when using this VLAN policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("allowedVlansAll")]
        public Input<string>? AllowedVlansAll { get; set; }

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

        /// <summary>
        /// Discard mode to be applied when using this VLAN policy. Valid values: `none`, `all-untagged`, `all-tagged`.
        /// </summary>
        [Input("discardMode")]
        public Input<string>? DiscardMode { 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>
        /// FortiLink interface for which this VLAN policy belongs to.
        /// </summary>
        [Input("fortilink")]
        public Input<string>? Fortilink { get; set; }

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

        [Input("untaggedVlans")]
        private InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanArgs>? _untaggedVlans;

        /// <summary>
        /// Untagged VLANs to be applied when using this VLAN policy. The structure of `untagged_vlans` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanArgs> UntaggedVlans
        {
            get => _untaggedVlans ?? (_untaggedVlans = new InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanArgs>());
            set => _untaggedVlans = value;
        }

        /// <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>
        /// Native VLAN to be applied when using this VLAN policy.
        /// </summary>
        [Input("vlan")]
        public Input<string>? Vlan { get; set; }

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

    public sealed class SwitchcontrollerVlanpolicyState : global::Pulumi.ResourceArgs
    {
        [Input("allowedVlans")]
        private InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanGetArgs>? _allowedVlans;

        /// <summary>
        /// Allowed VLANs to be applied when using this VLAN policy. The structure of `allowed_vlans` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanGetArgs> AllowedVlans
        {
            get => _allowedVlans ?? (_allowedVlans = new InputList<Inputs.SwitchcontrollerVlanpolicyAllowedVlanGetArgs>());
            set => _allowedVlans = value;
        }

        /// <summary>
        /// Enable/disable all defined VLANs when using this VLAN policy. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("allowedVlansAll")]
        public Input<string>? AllowedVlansAll { get; set; }

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

        /// <summary>
        /// Discard mode to be applied when using this VLAN policy. Valid values: `none`, `all-untagged`, `all-tagged`.
        /// </summary>
        [Input("discardMode")]
        public Input<string>? DiscardMode { 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>
        /// FortiLink interface for which this VLAN policy belongs to.
        /// </summary>
        [Input("fortilink")]
        public Input<string>? Fortilink { get; set; }

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

        [Input("untaggedVlans")]
        private InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanGetArgs>? _untaggedVlans;

        /// <summary>
        /// Untagged VLANs to be applied when using this VLAN policy. The structure of `untagged_vlans` block is documented below.
        /// </summary>
        public InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanGetArgs> UntaggedVlans
        {
            get => _untaggedVlans ?? (_untaggedVlans = new InputList<Inputs.SwitchcontrollerVlanpolicyUntaggedVlanGetArgs>());
            set => _untaggedVlans = value;
        }

        /// <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>
        /// Native VLAN to be applied when using this VLAN policy.
        /// </summary>
        [Input("vlan")]
        public Input<string>? Vlan { get; set; }

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