// *** 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 a Nutanix Project resource to Create a Project.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var subnet = new Nutanix.Subnet("subnet", new Nutanix.SubnetArgs
    ///         {
    ///             ClusterUuid = "&lt;YOUR_CLUSTER_ID&gt;",
    ///             Description = "Description of my unit test VLAN",
    ///             VlanId = 31,
    ///             SubnetType = "VLAN",
    ///             SubnetIp = "10.250.140.0",
    ///             DefaultGatewayIp = "10.250.140.1",
    ///             PrefixLength = 24,
    ///             DhcpOptions = 
    ///             {
    ///                 { "boot_file_name", "bootfile" },
    ///                 { "domain_name", "nutanix" },
    ///                 { "tftp_server_name", "10.250.140.200" },
    ///             },
    ///             DhcpDomainNameServerLists = 
    ///             {
    ///                 "8.8.8.8",
    ///                 "172.16.58.3",
    ///             },
    ///             DhcpDomainSearchLists = 
    ///             {
    ///                 "terraform.nutanix.com",
    ///                 "terraform.unit.test.com",
    ///             },
    ///         });
    ///         var projectTest = new Nutanix.Project("projectTest", new Nutanix.ProjectArgs
    ///         {
    ///             Description = "This is my project",
    ///             Categories = 
    ///             {
    ///                 new Nutanix.Inputs.ProjectCategoryArgs
    ///                 {
    ///                     Name = "Environment",
    ///                     Value = "Staging",
    ///                 },
    ///             },
    ///             ResourceDomain = new Nutanix.Inputs.ProjectResourceDomainArgs
    ///             {
    ///                 Resources = 
    ///                 {
    ///                     new Nutanix.Inputs.ProjectResourceDomainResourceArgs
    ///                     {
    ///                         Limit = 4,
    ///                         ResourceType = "STORAGE",
    ///                     },
    ///                 },
    ///             },
    ///             DefaultSubnetReference = new Nutanix.Inputs.ProjectDefaultSubnetReferenceArgs
    ///             {
    ///                 Uuid = subnet.Metadata.Apply(metadata =&gt; metadata.Uuid),
    ///             },
    ///             ApiVersion = "3.1",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [NutanixResourceType("nutanix:index/project:Project")]
    public partial class Project : Pulumi.CustomResource
    {
        /// <summary>
        /// List of accounts associated with the project.
        /// * `account_reference_list.#.kind` - (Optional) The kind name. Default value is `account`
        /// * `account_reference_list.#.uuid` - (Required) The UUID of an account.
        /// * `account_reference_list.#.name` - (Optional/Computed) The name of an account.
        /// </summary>
        [Output("accountReferenceLists")]
        public Output<ImmutableArray<Outputs.ProjectAccountReferenceList>> AccountReferenceLists { get; private set; } = null!;

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

        [Output("categories")]
        public Output<ImmutableArray<Outputs.ProjectCategory>> Categories { get; private set; } = null!;

        /// <summary>
        /// Reference to a subnet.
        /// * `default_subnet_reference.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `default_subnet_reference.uuid` - (Required) The UUID of a subnet.
        /// * `default_subnet_reference.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        [Output("defaultSubnetReference")]
        public Output<Outputs.ProjectDefaultSubnetReference> DefaultSubnetReference { get; private set; } = null!;

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

        /// <summary>
        /// List of environments associated with the project.
        /// * `environment_reference_list.#.kind` - (Optional) The kind name. Default value is `environment`
        /// * `environment_reference_list.#.uuid` - (Required) The UUID of an environment.
        /// * `environment_reference_list.#.name` - (Optional/Computed) The name of an environment.
        /// </summary>
        [Output("environmentReferenceLists")]
        public Output<ImmutableArray<Outputs.ProjectEnvironmentReferenceList>> EnvironmentReferenceLists { get; private set; } = null!;

        /// <summary>
        /// List of external networks associated with the project.
        /// * `external_network_list.#.uuid` - (Required) The UUID of a network.
        /// * `external_network_list.#.name` - (Optional/Computed) The name of a network.
        /// </summary>
        [Output("externalNetworkLists")]
        public Output<ImmutableArray<Outputs.ProjectExternalNetworkList>> ExternalNetworkLists { get; private set; } = null!;

        /// <summary>
        /// List of directory service user groups. These groups are not managed by Nutanix.
        /// * `external_user_group_reference_list.#.kind` - (Optional) The kind name. Default value is `user_group`
        /// * `external_user_group_reference_list.#.uuid` - (Required) The UUID of a user_group
        /// * `external_user_group_reference_list.#.name` - (Optional/Computed) The name of a user_group
        /// </summary>
        [Output("externalUserGroupReferenceLists")]
        public Output<ImmutableArray<Outputs.ProjectExternalUserGroupReferenceList>> ExternalUserGroupReferenceLists { get; private set; } = null!;

        [Output("isDefault")]
        public Output<bool> IsDefault { get; private set; } = null!;

        [Output("metadata")]
        public Output<ImmutableDictionary<string, string>> Metadata { get; private set; } = null!;

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

        [Output("ownerReference")]
        public Output<ImmutableDictionary<string, string>> OwnerReference { get; private set; } = null!;

        [Output("projectReference")]
        public Output<ImmutableDictionary<string, string>> ProjectReference { get; private set; } = null!;

        /// <summary>
        /// The status for a resource domain (limits and values)
        /// * `resource_domain.resources` - (Required) Array of the utilization/limit for resource types
        /// * `resource_domain.resources.#.limit` - (Required) The resource consumption limit (unspecified is unlimited)
        /// * `resource_domain.resources.#.resource_type` - (Required) The type of resource (for example storage, CPUs)
        /// </summary>
        [Output("resourceDomain")]
        public Output<Outputs.ProjectResourceDomain?> ResourceDomain { get; private set; } = null!;

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

        /// <summary>
        /// List of subnets for the project.
        /// * `subnet_reference_list.#.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `subnet_reference_list.#.uuid` - (Required) The UUID of a subnet
        /// * `subnet_reference_list.#.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        [Output("subnetReferenceLists")]
        public Output<ImmutableArray<Outputs.ProjectSubnetReferenceList>> SubnetReferenceLists { get; private set; } = null!;

        /// <summary>
        /// List of users in the project.
        /// * `user_reference_list.#.kind` - (Optional) The kind name. Default value is `user`
        /// * `user_reference_list.#.uuid` - (Required) The UUID of a user
        /// * `user_reference_list.#.name` - (Optional/Computed) The name of a user.
        /// </summary>
        [Output("userReferenceLists")]
        public Output<ImmutableArray<Outputs.ProjectUserReferenceList>> UserReferenceLists { get; private set; } = null!;


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

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

    public sealed class ProjectArgs : Pulumi.ResourceArgs
    {
        [Input("accountReferenceLists")]
        private InputList<Inputs.ProjectAccountReferenceListArgs>? _accountReferenceLists;

        /// <summary>
        /// List of accounts associated with the project.
        /// * `account_reference_list.#.kind` - (Optional) The kind name. Default value is `account`
        /// * `account_reference_list.#.uuid` - (Required) The UUID of an account.
        /// * `account_reference_list.#.name` - (Optional/Computed) The name of an account.
        /// </summary>
        public InputList<Inputs.ProjectAccountReferenceListArgs> AccountReferenceLists
        {
            get => _accountReferenceLists ?? (_accountReferenceLists = new InputList<Inputs.ProjectAccountReferenceListArgs>());
            set => _accountReferenceLists = value;
        }

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

        [Input("categories")]
        private InputList<Inputs.ProjectCategoryArgs>? _categories;
        public InputList<Inputs.ProjectCategoryArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.ProjectCategoryArgs>());
            set => _categories = value;
        }

        /// <summary>
        /// Reference to a subnet.
        /// * `default_subnet_reference.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `default_subnet_reference.uuid` - (Required) The UUID of a subnet.
        /// * `default_subnet_reference.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        [Input("defaultSubnetReference", required: true)]
        public Input<Inputs.ProjectDefaultSubnetReferenceArgs> DefaultSubnetReference { get; set; } = null!;

        /// <summary>
        /// A description for project.
        /// </summary>
        [Input("description", required: true)]
        public Input<string> Description { get; set; } = null!;

        [Input("environmentReferenceLists")]
        private InputList<Inputs.ProjectEnvironmentReferenceListArgs>? _environmentReferenceLists;

        /// <summary>
        /// List of environments associated with the project.
        /// * `environment_reference_list.#.kind` - (Optional) The kind name. Default value is `environment`
        /// * `environment_reference_list.#.uuid` - (Required) The UUID of an environment.
        /// * `environment_reference_list.#.name` - (Optional/Computed) The name of an environment.
        /// </summary>
        public InputList<Inputs.ProjectEnvironmentReferenceListArgs> EnvironmentReferenceLists
        {
            get => _environmentReferenceLists ?? (_environmentReferenceLists = new InputList<Inputs.ProjectEnvironmentReferenceListArgs>());
            set => _environmentReferenceLists = value;
        }

        [Input("externalNetworkLists")]
        private InputList<Inputs.ProjectExternalNetworkListArgs>? _externalNetworkLists;

        /// <summary>
        /// List of external networks associated with the project.
        /// * `external_network_list.#.uuid` - (Required) The UUID of a network.
        /// * `external_network_list.#.name` - (Optional/Computed) The name of a network.
        /// </summary>
        public InputList<Inputs.ProjectExternalNetworkListArgs> ExternalNetworkLists
        {
            get => _externalNetworkLists ?? (_externalNetworkLists = new InputList<Inputs.ProjectExternalNetworkListArgs>());
            set => _externalNetworkLists = value;
        }

        [Input("externalUserGroupReferenceLists")]
        private InputList<Inputs.ProjectExternalUserGroupReferenceListArgs>? _externalUserGroupReferenceLists;

        /// <summary>
        /// List of directory service user groups. These groups are not managed by Nutanix.
        /// * `external_user_group_reference_list.#.kind` - (Optional) The kind name. Default value is `user_group`
        /// * `external_user_group_reference_list.#.uuid` - (Required) The UUID of a user_group
        /// * `external_user_group_reference_list.#.name` - (Optional/Computed) The name of a user_group
        /// </summary>
        public InputList<Inputs.ProjectExternalUserGroupReferenceListArgs> ExternalUserGroupReferenceLists
        {
            get => _externalUserGroupReferenceLists ?? (_externalUserGroupReferenceLists = new InputList<Inputs.ProjectExternalUserGroupReferenceListArgs>());
            set => _externalUserGroupReferenceLists = value;
        }

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

        [Input("ownerReference")]
        private InputMap<string>? _ownerReference;
        public InputMap<string> OwnerReference
        {
            get => _ownerReference ?? (_ownerReference = new InputMap<string>());
            set => _ownerReference = value;
        }

        [Input("projectReference")]
        private InputMap<string>? _projectReference;
        public InputMap<string> ProjectReference
        {
            get => _projectReference ?? (_projectReference = new InputMap<string>());
            set => _projectReference = value;
        }

        /// <summary>
        /// The status for a resource domain (limits and values)
        /// * `resource_domain.resources` - (Required) Array of the utilization/limit for resource types
        /// * `resource_domain.resources.#.limit` - (Required) The resource consumption limit (unspecified is unlimited)
        /// * `resource_domain.resources.#.resource_type` - (Required) The type of resource (for example storage, CPUs)
        /// </summary>
        [Input("resourceDomain")]
        public Input<Inputs.ProjectResourceDomainArgs>? ResourceDomain { get; set; }

        [Input("subnetReferenceLists")]
        private InputList<Inputs.ProjectSubnetReferenceListArgs>? _subnetReferenceLists;

        /// <summary>
        /// List of subnets for the project.
        /// * `subnet_reference_list.#.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `subnet_reference_list.#.uuid` - (Required) The UUID of a subnet
        /// * `subnet_reference_list.#.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        public InputList<Inputs.ProjectSubnetReferenceListArgs> SubnetReferenceLists
        {
            get => _subnetReferenceLists ?? (_subnetReferenceLists = new InputList<Inputs.ProjectSubnetReferenceListArgs>());
            set => _subnetReferenceLists = value;
        }

        [Input("userReferenceLists")]
        private InputList<Inputs.ProjectUserReferenceListArgs>? _userReferenceLists;

        /// <summary>
        /// List of users in the project.
        /// * `user_reference_list.#.kind` - (Optional) The kind name. Default value is `user`
        /// * `user_reference_list.#.uuid` - (Required) The UUID of a user
        /// * `user_reference_list.#.name` - (Optional/Computed) The name of a user.
        /// </summary>
        public InputList<Inputs.ProjectUserReferenceListArgs> UserReferenceLists
        {
            get => _userReferenceLists ?? (_userReferenceLists = new InputList<Inputs.ProjectUserReferenceListArgs>());
            set => _userReferenceLists = value;
        }

        public ProjectArgs()
        {
        }
    }

    public sealed class ProjectState : Pulumi.ResourceArgs
    {
        [Input("accountReferenceLists")]
        private InputList<Inputs.ProjectAccountReferenceListGetArgs>? _accountReferenceLists;

        /// <summary>
        /// List of accounts associated with the project.
        /// * `account_reference_list.#.kind` - (Optional) The kind name. Default value is `account`
        /// * `account_reference_list.#.uuid` - (Required) The UUID of an account.
        /// * `account_reference_list.#.name` - (Optional/Computed) The name of an account.
        /// </summary>
        public InputList<Inputs.ProjectAccountReferenceListGetArgs> AccountReferenceLists
        {
            get => _accountReferenceLists ?? (_accountReferenceLists = new InputList<Inputs.ProjectAccountReferenceListGetArgs>());
            set => _accountReferenceLists = value;
        }

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

        [Input("categories")]
        private InputList<Inputs.ProjectCategoryGetArgs>? _categories;
        public InputList<Inputs.ProjectCategoryGetArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.ProjectCategoryGetArgs>());
            set => _categories = value;
        }

        /// <summary>
        /// Reference to a subnet.
        /// * `default_subnet_reference.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `default_subnet_reference.uuid` - (Required) The UUID of a subnet.
        /// * `default_subnet_reference.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        [Input("defaultSubnetReference")]
        public Input<Inputs.ProjectDefaultSubnetReferenceGetArgs>? DefaultSubnetReference { get; set; }

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

        [Input("environmentReferenceLists")]
        private InputList<Inputs.ProjectEnvironmentReferenceListGetArgs>? _environmentReferenceLists;

        /// <summary>
        /// List of environments associated with the project.
        /// * `environment_reference_list.#.kind` - (Optional) The kind name. Default value is `environment`
        /// * `environment_reference_list.#.uuid` - (Required) The UUID of an environment.
        /// * `environment_reference_list.#.name` - (Optional/Computed) The name of an environment.
        /// </summary>
        public InputList<Inputs.ProjectEnvironmentReferenceListGetArgs> EnvironmentReferenceLists
        {
            get => _environmentReferenceLists ?? (_environmentReferenceLists = new InputList<Inputs.ProjectEnvironmentReferenceListGetArgs>());
            set => _environmentReferenceLists = value;
        }

        [Input("externalNetworkLists")]
        private InputList<Inputs.ProjectExternalNetworkListGetArgs>? _externalNetworkLists;

        /// <summary>
        /// List of external networks associated with the project.
        /// * `external_network_list.#.uuid` - (Required) The UUID of a network.
        /// * `external_network_list.#.name` - (Optional/Computed) The name of a network.
        /// </summary>
        public InputList<Inputs.ProjectExternalNetworkListGetArgs> ExternalNetworkLists
        {
            get => _externalNetworkLists ?? (_externalNetworkLists = new InputList<Inputs.ProjectExternalNetworkListGetArgs>());
            set => _externalNetworkLists = value;
        }

        [Input("externalUserGroupReferenceLists")]
        private InputList<Inputs.ProjectExternalUserGroupReferenceListGetArgs>? _externalUserGroupReferenceLists;

        /// <summary>
        /// List of directory service user groups. These groups are not managed by Nutanix.
        /// * `external_user_group_reference_list.#.kind` - (Optional) The kind name. Default value is `user_group`
        /// * `external_user_group_reference_list.#.uuid` - (Required) The UUID of a user_group
        /// * `external_user_group_reference_list.#.name` - (Optional/Computed) The name of a user_group
        /// </summary>
        public InputList<Inputs.ProjectExternalUserGroupReferenceListGetArgs> ExternalUserGroupReferenceLists
        {
            get => _externalUserGroupReferenceLists ?? (_externalUserGroupReferenceLists = new InputList<Inputs.ProjectExternalUserGroupReferenceListGetArgs>());
            set => _externalUserGroupReferenceLists = value;
        }

        [Input("isDefault")]
        public Input<bool>? IsDefault { get; set; }

        [Input("metadata")]
        private InputMap<string>? _metadata;
        public InputMap<string> Metadata
        {
            get => _metadata ?? (_metadata = new InputMap<string>());
            set => _metadata = value;
        }

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

        [Input("ownerReference")]
        private InputMap<string>? _ownerReference;
        public InputMap<string> OwnerReference
        {
            get => _ownerReference ?? (_ownerReference = new InputMap<string>());
            set => _ownerReference = value;
        }

        [Input("projectReference")]
        private InputMap<string>? _projectReference;
        public InputMap<string> ProjectReference
        {
            get => _projectReference ?? (_projectReference = new InputMap<string>());
            set => _projectReference = value;
        }

        /// <summary>
        /// The status for a resource domain (limits and values)
        /// * `resource_domain.resources` - (Required) Array of the utilization/limit for resource types
        /// * `resource_domain.resources.#.limit` - (Required) The resource consumption limit (unspecified is unlimited)
        /// * `resource_domain.resources.#.resource_type` - (Required) The type of resource (for example storage, CPUs)
        /// </summary>
        [Input("resourceDomain")]
        public Input<Inputs.ProjectResourceDomainGetArgs>? ResourceDomain { get; set; }

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

        [Input("subnetReferenceLists")]
        private InputList<Inputs.ProjectSubnetReferenceListGetArgs>? _subnetReferenceLists;

        /// <summary>
        /// List of subnets for the project.
        /// * `subnet_reference_list.#.kind` - (Optional) The kind name. Default value is `subnet`
        /// * `subnet_reference_list.#.uuid` - (Required) The UUID of a subnet
        /// * `subnet_reference_list.#.name` - (Optional/Computed) The name of a subnet.
        /// </summary>
        public InputList<Inputs.ProjectSubnetReferenceListGetArgs> SubnetReferenceLists
        {
            get => _subnetReferenceLists ?? (_subnetReferenceLists = new InputList<Inputs.ProjectSubnetReferenceListGetArgs>());
            set => _subnetReferenceLists = value;
        }

        [Input("userReferenceLists")]
        private InputList<Inputs.ProjectUserReferenceListGetArgs>? _userReferenceLists;

        /// <summary>
        /// List of users in the project.
        /// * `user_reference_list.#.kind` - (Optional) The kind name. Default value is `user`
        /// * `user_reference_list.#.uuid` - (Required) The UUID of a user
        /// * `user_reference_list.#.name` - (Optional/Computed) The name of a user.
        /// </summary>
        public InputList<Inputs.ProjectUserReferenceListGetArgs> UserReferenceLists
        {
            get => _userReferenceLists ?? (_userReferenceLists = new InputList<Inputs.ProjectUserReferenceListGetArgs>());
            set => _userReferenceLists = value;
        }

        public ProjectState()
        {
        }
    }
}
