# 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, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

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

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

    @property
    @pulumi.getter
    def admins(self) -> Sequence[int]:
        return pulumi.get(self, "admins")

    @property
    @pulumi.getter
    def apps(self) -> Sequence[int]:
        return pulumi.get(self, "apps")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetRolesFilterResult']]:
        return pulumi.get(self, "filters")

    @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 name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def users(self) -> Sequence[int]:
        return pulumi.get(self, "users")


class AwaitableGetRolesResult(GetRolesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRolesResult(
            admins=self.admins,
            apps=self.apps,
            filters=self.filters,
            id=self.id,
            name=self.name,
            users=self.users)


def get_roles(admins: Optional[Sequence[int]] = None,
              apps: Optional[Sequence[int]] = None,
              filters: Optional[Sequence[pulumi.InputType['GetRolesFilterArgs']]] = None,
              name: Optional[str] = None,
              users: Optional[Sequence[int]] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRolesResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['admins'] = admins
    __args__['apps'] = apps
    __args__['filters'] = filters
    __args__['name'] = name
    __args__['users'] = users
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('onelogin:roles/getRoles:getRoles', __args__, opts=opts, typ=GetRolesResult).value

    return AwaitableGetRolesResult(
        admins=pulumi.get(__ret__, 'admins'),
        apps=pulumi.get(__ret__, 'apps'),
        filters=pulumi.get(__ret__, 'filters'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        users=pulumi.get(__ret__, 'users'))


@_utilities.lift_output_func(get_roles)
def get_roles_output(admins: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
                     apps: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
                     filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetRolesFilterArgs']]]]] = None,
                     name: Optional[pulumi.Input[Optional[str]]] = None,
                     users: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRolesResult]:
    """
    Use this data source to access information about an existing resource.
    """
    ...
