# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetUsersResult',
    'AwaitableGetUsersResult',
    'get_users',
    'get_users_output',
]

@pulumi.output_type
class GetUsersResult:
    """
    A collection of values returned by getUsers.
    """
    def __init__(__self__, compound_search_operator=None, delay_read_seconds=None, group_id=None, id=None, include_groups=None, include_roles=None, searches=None, users=None):
        if compound_search_operator and not isinstance(compound_search_operator, str):
            raise TypeError("Expected argument 'compound_search_operator' to be a str")
        pulumi.set(__self__, "compound_search_operator", compound_search_operator)
        if delay_read_seconds and not isinstance(delay_read_seconds, str):
            raise TypeError("Expected argument 'delay_read_seconds' to be a str")
        pulumi.set(__self__, "delay_read_seconds", delay_read_seconds)
        if group_id and not isinstance(group_id, str):
            raise TypeError("Expected argument 'group_id' to be a str")
        pulumi.set(__self__, "group_id", group_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if include_groups and not isinstance(include_groups, bool):
            raise TypeError("Expected argument 'include_groups' to be a bool")
        pulumi.set(__self__, "include_groups", include_groups)
        if include_roles and not isinstance(include_roles, bool):
            raise TypeError("Expected argument 'include_roles' to be a bool")
        pulumi.set(__self__, "include_roles", include_roles)
        if searches and not isinstance(searches, list):
            raise TypeError("Expected argument 'searches' to be a list")
        pulumi.set(__self__, "searches", searches)
        if users and not isinstance(users, list):
            raise TypeError("Expected argument 'users' to be a list")
        pulumi.set(__self__, "users", users)

    @_builtins.property
    @pulumi.getter(name="compoundSearchOperator")
    def compound_search_operator(self) -> Optional[_builtins.str]:
        """
        Search operator used when joining multiple search clauses
        """
        return pulumi.get(self, "compound_search_operator")

    @_builtins.property
    @pulumi.getter(name="delayReadSeconds")
    def delay_read_seconds(self) -> Optional[_builtins.str]:
        """
        Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
        """
        return pulumi.get(self, "delay_read_seconds")

    @_builtins.property
    @pulumi.getter(name="groupId")
    def group_id(self) -> Optional[_builtins.str]:
        """
        Find users based on group membership using the id of the group.
        """
        return pulumi.get(self, "group_id")

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

    @_builtins.property
    @pulumi.getter(name="includeGroups")
    def include_groups(self) -> Optional[_builtins.bool]:
        """
        Fetch group memberships for each user
        """
        return pulumi.get(self, "include_groups")

    @_builtins.property
    @pulumi.getter(name="includeRoles")
    def include_roles(self) -> Optional[_builtins.bool]:
        """
        Fetch user roles for each user
        """
        return pulumi.get(self, "include_roles")

    @_builtins.property
    @pulumi.getter
    def searches(self) -> Optional[Sequence['outputs.GetUsersSearchResult']]:
        """
        Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
        """
        return pulumi.get(self, "searches")

    @_builtins.property
    @pulumi.getter
    def users(self) -> Sequence['outputs.GetUsersUserResult']:
        """
        collection of users retrieved from Okta.
        """
        return pulumi.get(self, "users")


class AwaitableGetUsersResult(GetUsersResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUsersResult(
            compound_search_operator=self.compound_search_operator,
            delay_read_seconds=self.delay_read_seconds,
            group_id=self.group_id,
            id=self.id,
            include_groups=self.include_groups,
            include_roles=self.include_roles,
            searches=self.searches,
            users=self.users)


def get_users(compound_search_operator: Optional[_builtins.str] = None,
              delay_read_seconds: Optional[_builtins.str] = None,
              group_id: Optional[_builtins.str] = None,
              include_groups: Optional[_builtins.bool] = None,
              include_roles: Optional[_builtins.bool] = None,
              searches: Optional[Sequence[Union['GetUsersSearchArgs', 'GetUsersSearchArgsDict']]] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUsersResult:
    """
    Get a list of users from Okta.


    :param _builtins.str compound_search_operator: Search operator used when joining multiple search clauses
    :param _builtins.str delay_read_seconds: Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    :param _builtins.str group_id: Find users based on group membership using the id of the group.
    :param _builtins.bool include_groups: Fetch group memberships for each user
    :param _builtins.bool include_roles: Fetch user roles for each user
    :param Sequence[Union['GetUsersSearchArgs', 'GetUsersSearchArgsDict']] searches: Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    """
    __args__ = dict()
    __args__['compoundSearchOperator'] = compound_search_operator
    __args__['delayReadSeconds'] = delay_read_seconds
    __args__['groupId'] = group_id
    __args__['includeGroups'] = include_groups
    __args__['includeRoles'] = include_roles
    __args__['searches'] = searches
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:user/getUsers:getUsers', __args__, opts=opts, typ=GetUsersResult).value

    return AwaitableGetUsersResult(
        compound_search_operator=pulumi.get(__ret__, 'compound_search_operator'),
        delay_read_seconds=pulumi.get(__ret__, 'delay_read_seconds'),
        group_id=pulumi.get(__ret__, 'group_id'),
        id=pulumi.get(__ret__, 'id'),
        include_groups=pulumi.get(__ret__, 'include_groups'),
        include_roles=pulumi.get(__ret__, 'include_roles'),
        searches=pulumi.get(__ret__, 'searches'),
        users=pulumi.get(__ret__, 'users'))
def get_users_output(compound_search_operator: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     delay_read_seconds: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     group_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     include_groups: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
                     include_roles: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
                     searches: Optional[pulumi.Input[Optional[Sequence[Union['GetUsersSearchArgs', 'GetUsersSearchArgsDict']]]]] = None,
                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetUsersResult]:
    """
    Get a list of users from Okta.


    :param _builtins.str compound_search_operator: Search operator used when joining multiple search clauses
    :param _builtins.str delay_read_seconds: Force delay of the users read by N seconds. Useful when eventual consistency of users information needs to be allowed for.
    :param _builtins.str group_id: Find users based on group membership using the id of the group.
    :param _builtins.bool include_groups: Fetch group memberships for each user
    :param _builtins.bool include_roles: Fetch user roles for each user
    :param Sequence[Union['GetUsersSearchArgs', 'GetUsersSearchArgsDict']] searches: Filter to find user/users. Each filter will be concatenated with the compound search operator. Please be aware profile properties must match what is in Okta, which is likely camel case. Expression is a free form expression filter https://developer.okta.com/docs/reference/core-okta-api/#filter . The set name/value/comparison properties will be ignored if expression is present
    """
    __args__ = dict()
    __args__['compoundSearchOperator'] = compound_search_operator
    __args__['delayReadSeconds'] = delay_read_seconds
    __args__['groupId'] = group_id
    __args__['includeGroups'] = include_groups
    __args__['includeRoles'] = include_roles
    __args__['searches'] = searches
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:user/getUsers:getUsers', __args__, opts=opts, typ=GetUsersResult)
    return __ret__.apply(lambda __response__: GetUsersResult(
        compound_search_operator=pulumi.get(__response__, 'compound_search_operator'),
        delay_read_seconds=pulumi.get(__response__, 'delay_read_seconds'),
        group_id=pulumi.get(__response__, 'group_id'),
        id=pulumi.get(__response__, 'id'),
        include_groups=pulumi.get(__response__, 'include_groups'),
        include_roles=pulumi.get(__response__, 'include_roles'),
        searches=pulumi.get(__response__, 'searches'),
        users=pulumi.get(__response__, 'users')))
