<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks<filename>sdk/dotnet/Vpc/Switch.cs// *** 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;

namespace Pulumi.AliCloud.Vpc
{
    /// <summary>
    /// ## Import
    /// 
    /// Vswitch can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpc/switch:Switch example vsw-abc123456
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpc/switch:Switch")]
    public partial class Switch : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Field `availability_zone` has been deprecated from provider version 1.119.0. New field `zone_id` instead.
        /// </summary>
        [Output("availabilityZone")]
        public Output<string> AvailabilityZone { get; private set; } = null!;

        /// <summary>
        /// The CIDR block for the switch.
        /// </summary>
        [Output("cidrBlock")]
        public Output<string> CidrBlock { get; private set; } = null!;

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

        /// <summary>
        /// Specifies whether to enable the IPv6 CIDR block. Valid values: `false` (Default): disables IPv6 CIDR blocks. `true`: enables IPv6 CIDR blocks.
        /// </summary>
        [Output("enableIpv6")]
        public Output<bool?> EnableIpv6 { get; private set; } = null!;

        /// <summary>
        /// (Available in 1.201.1+) The IPv6 CIDR block for the switch.
        /// </summary>
        [Output("ipv6CidrBlock")]
        public Output<string> Ipv6CidrBlock { get; private set; } = null!;

        /// <summary>
        /// The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.
        /// </summary>
        [Output("ipv6CidrBlockMask")]
        public Output<int?> Ipv6CidrBlockMask { get; private set; } = null!;

        /// <summary>
        /// Field `name` has been deprecated from provider version 1.119.0. New field `vswitch_name` instead.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// (Available in 1.119.0+) The status of the switch.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The VPC ID.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;

        /// <summary>
        /// The name of the switch. Defaults to null.
        /// </summary>
        [Output("vswitchName")]
        public Output<string> VswitchName { get; private set; } = null!;

        /// <summary>
        /// The AZ for the switch. **Note:** Required for a VPC switch.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a Switch 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 Switch(string name, SwitchArgs args, CustomResourceOptions? options = null)
            : base("alicloud:vpc/switch:Switch", name, args ?? new SwitchArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Switch(string name, Input<string> id, SwitchState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:vpc/switch:Switch", 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/rhysmdnz/pulumi-alicloud",
            };
            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 Switch 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 Switch Get(string name, Input<string> id, SwitchState? state = null, CustomResourceOptions? options = null)
        {
            return new Switch(name, id, state, options);
        }
    }

    public sealed class SwitchArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Field `availability_zone` has been deprecated from provider version 1.119.0. New field `zone_id` instead.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// The CIDR block for the switch.
        /// </summary>
        [Input("cidrBlock", required: true)]
        public Input<string> CidrBlock { get; set; } = null!;

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

        /// <summary>
        /// Specifies whether to enable the IPv6 CIDR block. Valid values: `false` (Default): disables IPv6 CIDR blocks. `true`: enables IPv6 CIDR blocks.
        /// </summary>
        [Input("enableIpv6")]
        public Input<bool>? EnableIpv6 { get; set; }

        /// <summary>
        /// The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.
        /// </summary>
        [Input("ipv6CidrBlockMask")]
        public Input<int>? Ipv6CidrBlockMask { get; set; }

        /// <summary>
        /// Field `name` has been deprecated from provider version 1.119.0. New field `vswitch_name` instead.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The VPC ID.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        /// <summary>
        /// The name of the switch. Defaults to null.
        /// </summary>
        [Input("vswitchName")]
        public Input<string>? VswitchName { get; set; }

        /// <summary>
        /// The AZ for the switch. **Note:** Required for a VPC switch.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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

    public sealed class SwitchState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Field `availability_zone` has been deprecated from provider version 1.119.0. New field `zone_id` instead.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// The CIDR block for the switch.
        /// </summary>
        [Input("cidrBlock")]
        public Input<string>? CidrBlock { get; set; }

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

        /// <summary>
        /// Specifies whether to enable the IPv6 CIDR block. Valid values: `false` (Default): disables IPv6 CIDR blocks. `true`: enables IPv6 CIDR blocks.
        /// </summary>
        [Input("enableIpv6")]
        public Input<bool>? EnableIpv6 { get; set; }

        /// <summary>
        /// (Available in 1.201.1+) The IPv6 CIDR block for the switch.
        /// </summary>
        [Input("ipv6CidrBlock")]
        public Input<string>? Ipv6CidrBlock { get; set; }

        /// <summary>
        /// The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.
        /// </summary>
        [Input("ipv6CidrBlockMask")]
        public Input<int>? Ipv6CidrBlockMask { get; set; }

        /// <summary>
        /// Field `name` has been deprecated from provider version 1.119.0. New field `vswitch_name` instead.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// (Available in 1.119.0+) The status of the switch.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The VPC ID.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The name of the switch. Defaults to null.
        /// </summary>
        [Input("vswitchName")]
        public Input<string>? VswitchName { get; set; }

        /// <summary>
        /// The AZ for the switch. **Note:** Required for a VPC switch.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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