# coding=utf-8
# *** 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! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetRolesResult',
    'AwaitableGetRolesResult',
    'get_roles',
    'get_roles_output',
]

@pulumi.output_type
class GetRolesResult:
    """
    A collection of values returned by getRoles.
    """
    def __init__(__self__, id=None, privileges=None, role_ids=None, specials=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if privileges and not isinstance(privileges, list):
            raise TypeError("Expected argument 'privileges' to be a list")
        pulumi.set(__self__, "privileges", privileges)
        if role_ids and not isinstance(role_ids, list):
            raise TypeError("Expected argument 'role_ids' to be a list")
        pulumi.set(__self__, "role_ids", role_ids)
        if specials and not isinstance(specials, list):
            raise TypeError("Expected argument 'specials' to be a list")
        pulumi.set(__self__, "specials", specials)

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def privileges(self) -> Sequence[Sequence[str]]:
        """
        The role privileges.
        """
        return pulumi.get(self, "privileges")

    @property
    @pulumi.getter(name="roleIds")
    def role_ids(self) -> Sequence[str]:
        """
        The role identifiers.
        """
        return pulumi.get(self, "role_ids")

    @property
    @pulumi.getter
    def specials(self) -> Sequence[bool]:
        """
        Whether the role is special (built-in).
        """
        return pulumi.get(self, "specials")


class AwaitableGetRolesResult(GetRolesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRolesResult(
            id=self.id,
            privileges=self.privileges,
            role_ids=self.role_ids,
            specials=self.specials)


def get_roles(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRolesResult:
    """
    Retrieves information about all the available roles.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    available_roles = proxmoxve.Permission.get_roles()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('proxmoxve:Permission/getRoles:getRoles', __args__, opts=opts, typ=GetRolesResult).value

    return AwaitableGetRolesResult(
        id=pulumi.get(__ret__, 'id'),
        privileges=pulumi.get(__ret__, 'privileges'),
        role_ids=pulumi.get(__ret__, 'role_ids'),
        specials=pulumi.get(__ret__, 'specials'))


@_utilities.lift_output_func(get_roles)
def get_roles_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRolesResult]:
    """
    Retrieves information about all the available roles.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    available_roles = proxmoxve.Permission.get_roles()
    ```
    """
    ...
