<reponame>pierskarsenbarg/pulumi-nutanix<filename>sdk/dotnet/GetUsers.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;
using Pulumi;

namespace PiersKarsenbarg.Nutanix
{
    public static class GetUsers
    {
        /// <summary>
        /// Provides a datasource to retrieve all the users.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = PiersKarsenbarg.Nutanix;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var user = new Nutanix.User("user", new Nutanix.UserArgs
        ///         {
        ///             DirectoryServiceUser = new Nutanix.Inputs.UserDirectoryServiceUserArgs
        ///             {
        ///                 DirectoryServiceReference = new Nutanix.Inputs.UserDirectoryServiceUserDirectoryServiceReferenceArgs
        ///                 {
        ///                     Uuid = "&lt;directory-service-uuid&gt;",
        ///                 },
        ///                 UserPrincipalName = "envkt@example.com",
        ///             },
        ///         });
        ///         var users = Output.Create(Nutanix.GetUser.InvokeAsync());
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetUsersResult> InvokeAsync(GetUsersArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetUsersResult>("nutanix:index/getUsers:getUsers", args ?? new GetUsersArgs(), options.WithDefaults());

        /// <summary>
        /// Provides a datasource to retrieve all the users.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = PiersKarsenbarg.Nutanix;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var user = new Nutanix.User("user", new Nutanix.UserArgs
        ///         {
        ///             DirectoryServiceUser = new Nutanix.Inputs.UserDirectoryServiceUserArgs
        ///             {
        ///                 DirectoryServiceReference = new Nutanix.Inputs.UserDirectoryServiceUserDirectoryServiceReferenceArgs
        ///                 {
        ///                     Uuid = "&lt;directory-service-uuid&gt;",
        ///                 },
        ///                 UserPrincipalName = "envkt@example.com",
        ///             },
        ///         });
        ///         var users = Output.Create(Nutanix.GetUser.InvokeAsync());
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetUsersResult>("nutanix:index/getUsers:getUsers", args ?? new GetUsersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetUsersArgs : Pulumi.InvokeArgs
    {
        [Input("metadatas")]
        private List<Inputs.GetUsersMetadataArgs>? _metadatas;
        public List<Inputs.GetUsersMetadataArgs> Metadatas
        {
            get => _metadatas ?? (_metadatas = new List<Inputs.GetUsersMetadataArgs>());
            set => _metadatas = value;
        }

        public GetUsersArgs()
        {
        }
    }

    public sealed class GetUsersInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("metadatas")]
        private InputList<Inputs.GetUsersMetadataInputArgs>? _metadatas;
        public InputList<Inputs.GetUsersMetadataInputArgs> Metadatas
        {
            get => _metadatas ?? (_metadatas = new InputList<Inputs.GetUsersMetadataInputArgs>());
            set => _metadatas = value;
        }

        public GetUsersInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetUsersResult
    {
        /// <summary>
        /// The version of the API.
        /// * `state`: - The state of the entity.
        /// * `name`: - The name of the user.
        /// * `user_type`: - The name of the user.
        /// * `display_name`: - The display name of the user (common name) provided by the directory service.
        /// * `project_reference_list`: - A list of projects the user is part of. See #reference for more details.
        /// * `access_control_policy_reference_list`: - List of ACP references. See #reference for more details.
        /// * `directory_service_user`: - (Optional) The directory service user configuration. See below for more information.
        /// * `identity_provider_user`: - (Optional) (Optional) The identity provider user configuration. See below for more information.
        /// * `categories`: - (Optional) Categories for the user.
        /// * `project_reference`: - (Optional) The reference to a project.
        /// * `owner_reference`: - (Optional) The reference to a user.
        /// </summary>
        public readonly string ApiVersion;
        public readonly ImmutableArray<Outputs.GetUsersEntityResult> Entities;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<Outputs.GetUsersMetadataResult> Metadatas;

        [OutputConstructor]
        private GetUsersResult(
            string apiVersion,

            ImmutableArray<Outputs.GetUsersEntityResult> entities,

            string id,

            ImmutableArray<Outputs.GetUsersMetadataResult> metadatas)
        {
            ApiVersion = apiVersion;
            Entities = entities;
            Id = id;
            Metadatas = metadatas;
        }
    }
}
