# 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__ = [
    'GetOrganizationApplicationUserResult',
    'AwaitableGetOrganizationApplicationUserResult',
    'get_organization_application_user',
    'get_organization_application_user_output',
]

@pulumi.output_type
class GetOrganizationApplicationUserResult:
    """
    A collection of values returned by getOrganizationApplicationUser.
    """
    def __init__(__self__, email=None, id=None, is_super_admin=None, name=None, organization_id=None, timeouts=None, user_id=None):
        if email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        pulumi.set(__self__, "email", email)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_super_admin and not isinstance(is_super_admin, bool):
            raise TypeError("Expected argument 'is_super_admin' to be a bool")
        pulumi.set(__self__, "is_super_admin", is_super_admin)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if timeouts and not isinstance(timeouts, dict):
            raise TypeError("Expected argument 'timeouts' to be a dict")
        pulumi.set(__self__, "timeouts", timeouts)
        if user_id and not isinstance(user_id, str):
            raise TypeError("Expected argument 'user_id' to be a str")
        pulumi.set(__self__, "user_id", user_id)

    @_builtins.property
    @pulumi.getter
    def email(self) -> _builtins.str:
        """
        User Email.
        """
        return pulumi.get(self, "email")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        Resource ID composed as: `organization_id/user_id`.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="isSuperAdmin")
    @_utilities.deprecated("""This field is no longer accepted by the API. For administrative tasks, assign application users the organization admin role instead using the `OrganizationPermission` resource.""")
    def is_super_admin(self) -> _builtins.bool:
        """
        Alters super admin state of the organization application user. The default value is `false`. **Deprecated**: This field is no longer accepted by the API. For administrative tasks, assign application users the organization admin role instead using the `OrganizationPermission` resource.
        """
        return pulumi.get(self, "is_super_admin")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        Name.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> _builtins.str:
        """
        ID of an organization.
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter
    def timeouts(self) -> Optional['outputs.GetOrganizationApplicationUserTimeoutsResult']:
        return pulumi.get(self, "timeouts")

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> _builtins.str:
        """
        User ID.
        """
        return pulumi.get(self, "user_id")


class AwaitableGetOrganizationApplicationUserResult(GetOrganizationApplicationUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOrganizationApplicationUserResult(
            email=self.email,
            id=self.id,
            is_super_admin=self.is_super_admin,
            name=self.name,
            organization_id=self.organization_id,
            timeouts=self.timeouts,
            user_id=self.user_id)


def get_organization_application_user(organization_id: Optional[_builtins.str] = None,
                                      timeouts: Optional[Union['GetOrganizationApplicationUserTimeoutsArgs', 'GetOrganizationApplicationUserTimeoutsArgsDict']] = None,
                                      user_id: Optional[_builtins.str] = None,
                                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationApplicationUserResult:
    """
    Gets information about an application user.


    :param _builtins.str organization_id: ID of an organization.
    :param _builtins.str user_id: User ID.
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['timeouts'] = timeouts
    __args__['userId'] = user_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getOrganizationApplicationUser:getOrganizationApplicationUser', __args__, opts=opts, typ=GetOrganizationApplicationUserResult).value

    return AwaitableGetOrganizationApplicationUserResult(
        email=pulumi.get(__ret__, 'email'),
        id=pulumi.get(__ret__, 'id'),
        is_super_admin=pulumi.get(__ret__, 'is_super_admin'),
        name=pulumi.get(__ret__, 'name'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        timeouts=pulumi.get(__ret__, 'timeouts'),
        user_id=pulumi.get(__ret__, 'user_id'))
def get_organization_application_user_output(organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                                             timeouts: Optional[pulumi.Input[Optional[Union['GetOrganizationApplicationUserTimeoutsArgs', 'GetOrganizationApplicationUserTimeoutsArgsDict']]]] = None,
                                             user_id: Optional[pulumi.Input[_builtins.str]] = None,
                                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOrganizationApplicationUserResult]:
    """
    Gets information about an application user.


    :param _builtins.str organization_id: ID of an organization.
    :param _builtins.str user_id: User ID.
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['timeouts'] = timeouts
    __args__['userId'] = user_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getOrganizationApplicationUser:getOrganizationApplicationUser', __args__, opts=opts, typ=GetOrganizationApplicationUserResult)
    return __ret__.apply(lambda __response__: GetOrganizationApplicationUserResult(
        email=pulumi.get(__response__, 'email'),
        id=pulumi.get(__response__, 'id'),
        is_super_admin=pulumi.get(__response__, 'is_super_admin'),
        name=pulumi.get(__response__, 'name'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        timeouts=pulumi.get(__response__, 'timeouts'),
        user_id=pulumi.get(__response__, 'user_id')))
