// *** 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 GetRole
    {
        /// <summary>
        /// Describes a Role.
        /// </summary>
        public static Task<GetRoleResult> InvokeAsync(GetRoleArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRoleResult>("nutanix:index/getRole:getRole", args ?? new GetRoleArgs(), options.WithDefaults());

        /// <summary>
        /// Describes a Role.
        /// </summary>
        public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRoleResult>("nutanix:index/getRole:getRole", args ?? new GetRoleInvokeArgs(), options.WithDefaults());
    }


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

        [Input("roleId")]
        public string? RoleId { get; set; }

        [Input("roleName")]
        public string? RoleName { get; set; }

        public GetRoleArgs()
        {
        }
    }

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

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

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

        public GetRoleInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetRoleResult
    {
        /// <summary>
        /// The version of the API.
        /// * `state`: - The state of the role.
        /// </summary>
        public readonly string ApiVersion;
        public readonly ImmutableArray<Outputs.GetRoleCategoryResult> Categories;
        public readonly string Description;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableDictionary<string, string> Metadata;
        public readonly string Name;
        public readonly ImmutableDictionary<string, string> OwnerReference;
        public readonly ImmutableArray<Outputs.GetRolePermissionReferenceListResult> PermissionReferenceLists;
        public readonly ImmutableDictionary<string, string> ProjectReference;
        public readonly string? RoleId;
        public readonly string? RoleName;
        public readonly string State;

        [OutputConstructor]
        private GetRoleResult(
            string apiVersion,

            ImmutableArray<Outputs.GetRoleCategoryResult> categories,

            string description,

            string id,

            ImmutableDictionary<string, string> metadata,

            string name,

            ImmutableDictionary<string, string> ownerReference,

            ImmutableArray<Outputs.GetRolePermissionReferenceListResult> permissionReferenceLists,

            ImmutableDictionary<string, string> projectReference,

            string? roleId,

            string? roleName,

            string state)
        {
            ApiVersion = apiVersion;
            Categories = categories;
            Description = description;
            Id = id;
            Metadata = metadata;
            Name = name;
            OwnerReference = ownerReference;
            PermissionReferenceLists = permissionReferenceLists;
            ProjectReference = projectReference;
            RoleId = roleId;
            RoleName = roleName;
            State = state;
        }
    }
}
