// *** 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.Vra.Network
{
    /// <summary>
    /// ## Example Usage
    /// ### S
    /// 
    /// This is an example of how to create a network resource.
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Vra = Pulumiverse.Vra;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var myNetwork = new Vra.Network.Network("myNetwork", new()
    ///     {
    ///         Constraints = new[]
    ///         {
    ///             new Vra.Network.Inputs.NetworkConstraintArgs
    ///             {
    ///                 Expression = "pci",
    ///                 Mandatory = true,
    ///             },
    ///         },
    ///         OutboundAccess = false,
    ///         Tags = new[]
    ///         {
    ///             new Vra.Network.Inputs.NetworkTagArgs
    ///             {
    ///                 Key = "foo",
    ///                 Value = "bar",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// A network resource supports the following resource:
    /// </summary>
    [VraResourceType("vra:network/network:Network")]
    public partial class Network : global::Pulumi.CustomResource
    {
        /// <summary>
        /// IPv4 address range of the network in CIDR format.
        /// </summary>
        [Output("cidr")]
        public Output<string> Cidr { get; private set; } = null!;

        /// <summary>
        /// List of storage, network and extensibility constraints to be applied when provisioning through this project.
        /// </summary>
        [Output("constraints")]
        public Output<ImmutableArray<Outputs.NetworkConstraint>> Constraints { get; private set; } = null!;

        /// <summary>
        /// Additional properties that may be used to extend the base resource.
        /// </summary>
        [Output("customProperties")]
        public Output<ImmutableDictionary<string, object>> CustomProperties { get; private set; } = null!;

        /// <summary>
        /// Deployment id that is associated with this resource.
        /// </summary>
        [Output("deploymentId")]
        public Output<string> DeploymentId { get; private set; } = null!;

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

        /// <summary>
        /// External entity Id on the provider side.
        /// </summary>
        [Output("externalId")]
        public Output<string> ExternalId { get; private set; } = null!;

        /// <summary>
        /// The external zoneId of the resource.
        /// </summary>
        [Output("externalZoneId")]
        public Output<string> ExternalZoneId { get; private set; } = null!;

        /// <summary>
        /// HATEOAS of the entity
        /// </summary>
        [Output("links")]
        public Output<ImmutableArray<Outputs.NetworkLink>> Links { get; private set; } = null!;

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        [Output("organizationId")]
        public Output<string> OrganizationId { get; private set; } = null!;

        /// <summary>
        /// Flag to indicate if the network needs to have outbound access or not. Default is true. This field will be ignored if there is proper input for networkType customProperty.
        /// </summary>
        [Output("outboundAccess")]
        public Output<bool?> OutboundAccess { get; private set; } = null!;

        /// <summary>
        /// Email of the user that owns the entity.
        /// </summary>
        [Output("owner")]
        public Output<string> Owner { get; private set; } = null!;

        /// <summary>
        /// The id of the project this resource belongs to.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// Self link of this request.
        /// </summary>
        [Output("selfLink")]
        public Output<string> SelfLink { get; private set; } = null!;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource.
        /// example:[ { "key" : "ownedBy", "value": "Rainpole" } ]
        /// </summary>
        [Output("tags")]
        public Output<ImmutableArray<Outputs.NetworkTag>> Tags { get; private set; } = null!;

        [Output("updatedAt")]
        public Output<string> UpdatedAt { get; private set; } = null!;


        /// <summary>
        /// Create a Network 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 Network(string name, NetworkArgs args, CustomResourceOptions? options = null)
            : base("vra:network/network:Network", name, args ?? new NetworkArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Network(string name, Input<string> id, NetworkState? state = null, CustomResourceOptions? options = null)
            : base("vra:network/network:Network", 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",
            };
            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 Network 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 Network Get(string name, Input<string> id, NetworkState? state = null, CustomResourceOptions? options = null)
        {
            return new Network(name, id, state, options);
        }
    }

    public sealed class NetworkArgs : global::Pulumi.ResourceArgs
    {
        [Input("constraints")]
        private InputList<Inputs.NetworkConstraintArgs>? _constraints;

        /// <summary>
        /// List of storage, network and extensibility constraints to be applied when provisioning through this project.
        /// </summary>
        public InputList<Inputs.NetworkConstraintArgs> Constraints
        {
            get => _constraints ?? (_constraints = new InputList<Inputs.NetworkConstraintArgs>());
            set => _constraints = value;
        }

        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional properties that may be used to extend the base resource.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// Deployment id that is associated with this resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

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

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Flag to indicate if the network needs to have outbound access or not. Default is true. This field will be ignored if there is proper input for networkType customProperty.
        /// </summary>
        [Input("outboundAccess")]
        public Input<bool>? OutboundAccess { get; set; }

        /// <summary>
        /// The id of the project this resource belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        [Input("tags")]
        private InputList<Inputs.NetworkTagArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource.
        /// example:[ { "key" : "ownedBy", "value": "Rainpole" } ]
        /// </summary>
        public InputList<Inputs.NetworkTagArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.NetworkTagArgs>());
            set => _tags = value;
        }

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

    public sealed class NetworkState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// IPv4 address range of the network in CIDR format.
        /// </summary>
        [Input("cidr")]
        public Input<string>? Cidr { get; set; }

        [Input("constraints")]
        private InputList<Inputs.NetworkConstraintGetArgs>? _constraints;

        /// <summary>
        /// List of storage, network and extensibility constraints to be applied when provisioning through this project.
        /// </summary>
        public InputList<Inputs.NetworkConstraintGetArgs> Constraints
        {
            get => _constraints ?? (_constraints = new InputList<Inputs.NetworkConstraintGetArgs>());
            set => _constraints = value;
        }

        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional properties that may be used to extend the base resource.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// Deployment id that is associated with this resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

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

        /// <summary>
        /// External entity Id on the provider side.
        /// </summary>
        [Input("externalId")]
        public Input<string>? ExternalId { get; set; }

        /// <summary>
        /// The external zoneId of the resource.
        /// </summary>
        [Input("externalZoneId")]
        public Input<string>? ExternalZoneId { get; set; }

        [Input("links")]
        private InputList<Inputs.NetworkLinkGetArgs>? _links;

        /// <summary>
        /// HATEOAS of the entity
        /// </summary>
        public InputList<Inputs.NetworkLinkGetArgs> Links
        {
            get => _links ?? (_links = new InputList<Inputs.NetworkLinkGetArgs>());
            set => _links = value;
        }

        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        [Input("organizationId")]
        public Input<string>? OrganizationId { get; set; }

        /// <summary>
        /// Flag to indicate if the network needs to have outbound access or not. Default is true. This field will be ignored if there is proper input for networkType customProperty.
        /// </summary>
        [Input("outboundAccess")]
        public Input<bool>? OutboundAccess { get; set; }

        /// <summary>
        /// Email of the user that owns the entity.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

        /// <summary>
        /// The id of the project this resource belongs to.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// Self link of this request.
        /// </summary>
        [Input("selfLink")]
        public Input<string>? SelfLink { get; set; }

        [Input("tags")]
        private InputList<Inputs.NetworkTagGetArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource.
        /// example:[ { "key" : "ownedBy", "value": "Rainpole" } ]
        /// </summary>
        public InputList<Inputs.NetworkTagGetArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.NetworkTagGetArgs>());
            set => _tags = value;
        }

        [Input("updatedAt")]
        public Input<string>? UpdatedAt { get; set; }

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