// *** 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 GetUser
    {
        /// <summary>
        /// Provides a datasource to retrieve a user based on the input parameters.
        /// </summary>
        public static Task<GetUserResult> InvokeAsync(GetUserArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetUserResult>("nutanix:index/getUser:getUser", args ?? new GetUserArgs(), options.WithDefaults());

        /// <summary>
        /// Provides a datasource to retrieve a user based on the input parameters.
        /// </summary>
        public static Output<GetUserResult> Invoke(GetUserInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetUserResult>("nutanix:index/getUser:getUser", args ?? new GetUserInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetUserArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private List<Inputs.GetUserCategoryArgs>? _categories;
        public List<Inputs.GetUserCategoryArgs> Categories
        {
            get => _categories ?? (_categories = new List<Inputs.GetUserCategoryArgs>());
            set => _categories = value;
        }

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

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

        [Input("userId")]
        public string? UserId { get; set; }

        [Input("userName")]
        public string? UserName { get; set; }

        public GetUserArgs()
        {
        }
    }

    public sealed class GetUserInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private InputList<Inputs.GetUserCategoryInputArgs>? _categories;
        public InputList<Inputs.GetUserCategoryInputArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.GetUserCategoryInputArgs>());
            set => _categories = value;
        }

        [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;
        }

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

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

        public GetUserInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetUserResult
    {
        public readonly ImmutableArray<Outputs.GetUserAccessControlPolicyReferenceListResult> AccessControlPolicyReferenceLists;
        /// <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 Access Control Policy.
        /// * `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.GetUserCategoryResult> Categories;
        public readonly ImmutableArray<Outputs.GetUserDirectoryServiceUserResult> DirectoryServiceUsers;
        public readonly string DisplayName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<Outputs.GetUserIdentityProviderUserResult> IdentityProviderUsers;
        public readonly ImmutableDictionary<string, string> Metadata;
        public readonly ImmutableDictionary<string, string> OwnerReference;
        public readonly ImmutableDictionary<string, string>? ProjectReference;
        public readonly ImmutableArray<Outputs.GetUserProjectReferenceListResult> ProjectReferenceLists;
        public readonly string State;
        public readonly string? UserId;
        public readonly string? UserName;
        public readonly string UserType;

        [OutputConstructor]
        private GetUserResult(
            ImmutableArray<Outputs.GetUserAccessControlPolicyReferenceListResult> accessControlPolicyReferenceLists,

            string apiVersion,

            ImmutableArray<Outputs.GetUserCategoryResult> categories,

            ImmutableArray<Outputs.GetUserDirectoryServiceUserResult> directoryServiceUsers,

            string displayName,

            string id,

            ImmutableArray<Outputs.GetUserIdentityProviderUserResult> identityProviderUsers,

            ImmutableDictionary<string, string> metadata,

            ImmutableDictionary<string, string> ownerReference,

            ImmutableDictionary<string, string>? projectReference,

            ImmutableArray<Outputs.GetUserProjectReferenceListResult> projectReferenceLists,

            string state,

            string? userId,

            string? userName,

            string userType)
        {
            AccessControlPolicyReferenceLists = accessControlPolicyReferenceLists;
            ApiVersion = apiVersion;
            Categories = categories;
            DirectoryServiceUsers = directoryServiceUsers;
            DisplayName = displayName;
            Id = id;
            IdentityProviderUsers = identityProviderUsers;
            Metadata = metadata;
            OwnerReference = ownerReference;
            ProjectReference = projectReference;
            ProjectReferenceLists = projectReferenceLists;
            State = state;
            UserId = userId;
            UserName = userName;
            UserType = userType;
        }
    }
}
