// *** 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 PiersKarsenbarg.Nutanix
{
    /// <summary>
    /// Provides Nutanix resource to create Floating IPs.
    /// 
    /// ## create one static route for vpc uuid with external subnet
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var scn = new Nutanix.StaticRoutes("scn", new Nutanix.StaticRoutesArgs
    ///         {
    ///             StaticRoutesLists = 
    ///             {
    ///                 new Nutanix.Inputs.StaticRoutesStaticRoutesListArgs
    ///                 {
    ///                     Destination = "10.x.x.x/x",
    ///                     ExternalSubnetReferenceUuid = "{{ext_subnet_uuid}}",
    ///                 },
    ///             },
    ///             VpcUuid = "{{vpc_uuid}}",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## create one static route with default route for vpc name with external subnet
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var scn = new Nutanix.StaticRoutes("scn", new Nutanix.StaticRoutesArgs
    ///         {
    ///             DefaultRouteNexthops = 
    ///             {
    ///                 new Nutanix.Inputs.StaticRoutesDefaultRouteNexthopArgs
    ///                 {
    ///                     ExternalSubnetReferenceUuid = "{{ext_subnet_uuid}}",
    ///                 },
    ///             },
    ///             StaticRoutesLists = 
    ///             {
    ///                 new Nutanix.Inputs.StaticRoutesStaticRoutesListArgs
    ///                 {
    ///                     Destination = "10.x.x.x/x",
    ///                     ExternalSubnetReferenceUuid = "{{ext_subnet_uuid}}",
    ///                 },
    ///             },
    ///             VpcName = "{{vpc_name}}",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// #### Note: destination with 0.0.0.0/0 will be default route.
    /// </summary>
    [NutanixResourceType("nutanix:index/staticRoutes:StaticRoutes")]
    public partial class StaticRoutes : Pulumi.CustomResource
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Output("apiVersion")]
        public Output<string> ApiVersion { get; private set; } = null!;

        /// <summary>
        /// Default Route
        /// </summary>
        [Output("defaultRouteNexthops")]
        public Output<ImmutableArray<Outputs.StaticRoutesDefaultRouteNexthop>> DefaultRouteNexthops { get; private set; } = null!;

        /// <summary>
        /// The vpc_route_table kind metadata.
        /// </summary>
        [Output("metadata")]
        public Output<ImmutableDictionary<string, string>> Metadata { get; private set; } = null!;

        /// <summary>
        /// Static Routes.
        /// </summary>
        [Output("staticRoutesLists")]
        public Output<ImmutableArray<Outputs.StaticRoutesStaticRoutesList>> StaticRoutesLists { get; private set; } = null!;

        /// <summary>
        /// vpc Name. Should not be used with vpc_uuid.
        /// </summary>
        [Output("vpcName")]
        public Output<string?> VpcName { get; private set; } = null!;

        /// <summary>
        /// Reference to a VPC UUID. Should not be used with vpc_name.
        /// </summary>
        [Output("vpcUuid")]
        public Output<string> VpcUuid { get; private set; } = null!;


        /// <summary>
        /// Create a StaticRoutes 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 StaticRoutes(string name, StaticRoutesArgs? args = null, CustomResourceOptions? options = null)
            : base("nutanix:index/staticRoutes:StaticRoutes", name, args ?? new StaticRoutesArgs(), MakeResourceOptions(options, ""))
        {
        }

        private StaticRoutes(string name, Input<string> id, StaticRoutesState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/staticRoutes:StaticRoutes", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/pierskarsenbarg/pulumi-nutanix/releases/download/${VERSION}",
            };
            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 StaticRoutes 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 StaticRoutes Get(string name, Input<string> id, StaticRoutesState? state = null, CustomResourceOptions? options = null)
        {
            return new StaticRoutes(name, id, state, options);
        }
    }

    public sealed class StaticRoutesArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        [Input("defaultRouteNexthops")]
        private InputList<Inputs.StaticRoutesDefaultRouteNexthopArgs>? _defaultRouteNexthops;

        /// <summary>
        /// Default Route
        /// </summary>
        public InputList<Inputs.StaticRoutesDefaultRouteNexthopArgs> DefaultRouteNexthops
        {
            get => _defaultRouteNexthops ?? (_defaultRouteNexthops = new InputList<Inputs.StaticRoutesDefaultRouteNexthopArgs>());
            set => _defaultRouteNexthops = value;
        }

        [Input("staticRoutesLists")]
        private InputList<Inputs.StaticRoutesStaticRoutesListArgs>? _staticRoutesLists;

        /// <summary>
        /// Static Routes.
        /// </summary>
        public InputList<Inputs.StaticRoutesStaticRoutesListArgs> StaticRoutesLists
        {
            get => _staticRoutesLists ?? (_staticRoutesLists = new InputList<Inputs.StaticRoutesStaticRoutesListArgs>());
            set => _staticRoutesLists = value;
        }

        /// <summary>
        /// vpc Name. Should not be used with vpc_uuid.
        /// </summary>
        [Input("vpcName")]
        public Input<string>? VpcName { get; set; }

        /// <summary>
        /// Reference to a VPC UUID. Should not be used with vpc_name.
        /// </summary>
        [Input("vpcUuid")]
        public Input<string>? VpcUuid { get; set; }

        public StaticRoutesArgs()
        {
        }
    }

    public sealed class StaticRoutesState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        [Input("defaultRouteNexthops")]
        private InputList<Inputs.StaticRoutesDefaultRouteNexthopGetArgs>? _defaultRouteNexthops;

        /// <summary>
        /// Default Route
        /// </summary>
        public InputList<Inputs.StaticRoutesDefaultRouteNexthopGetArgs> DefaultRouteNexthops
        {
            get => _defaultRouteNexthops ?? (_defaultRouteNexthops = new InputList<Inputs.StaticRoutesDefaultRouteNexthopGetArgs>());
            set => _defaultRouteNexthops = value;
        }

        [Input("metadata")]
        private InputMap<string>? _metadata;

        /// <summary>
        /// The vpc_route_table kind metadata.
        /// </summary>
        public InputMap<string> Metadata
        {
            get => _metadata ?? (_metadata = new InputMap<string>());
            set => _metadata = value;
        }

        [Input("staticRoutesLists")]
        private InputList<Inputs.StaticRoutesStaticRoutesListGetArgs>? _staticRoutesLists;

        /// <summary>
        /// Static Routes.
        /// </summary>
        public InputList<Inputs.StaticRoutesStaticRoutesListGetArgs> StaticRoutesLists
        {
            get => _staticRoutesLists ?? (_staticRoutesLists = new InputList<Inputs.StaticRoutesStaticRoutesListGetArgs>());
            set => _staticRoutesLists = value;
        }

        /// <summary>
        /// vpc Name. Should not be used with vpc_uuid.
        /// </summary>
        [Input("vpcName")]
        public Input<string>? VpcName { get; set; }

        /// <summary>
        /// Reference to a VPC UUID. Should not be used with vpc_name.
        /// </summary>
        [Input("vpcUuid")]
        public Input<string>? VpcUuid { get; set; }

        public StaticRoutesState()
        {
        }
    }
}
