<reponame>pierskarsenbarg/pulumi-nutanix<gh_stars>0// *** 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 GetRoles
    {
        /// <summary>
        /// Describes a list of roles.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Nutanix.GetRoles.InvokeAsync());
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRolesResult> InvokeAsync(GetRolesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRolesResult>("nutanix:index/getRoles:getRoles", args ?? new GetRolesArgs(), options.WithDefaults());

        /// <summary>
        /// Describes a list of roles.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Nutanix.GetRoles.InvokeAsync());
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRolesResult> Invoke(GetRolesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRolesResult>("nutanix:index/getRoles:getRoles", args ?? new GetRolesInvokeArgs(), options.WithDefaults());
    }


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

        public GetRolesArgs()
        {
        }
    }

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

        public GetRolesInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetRolesResult
    {
        /// <summary>
        /// The version of the API.
        /// * `state`: - The state of the role.
        /// </summary>
        public readonly string ApiVersion;
        public readonly ImmutableArray<Outputs.GetRolesEntityResult> Entities;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<Outputs.GetRolesMetadataResult> Metadatas;

        [OutputConstructor]
        private GetRolesResult(
            string apiVersion,

            ImmutableArray<Outputs.GetRolesEntityResult> entities,

            string id,

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