# 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 builtins
import copy
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

__all__ = [
    'GetUserResult',
    'AwaitableGetUserResult',
    'get_user',
    'get_user_output',
]

@pulumi.output_type
class GetUserResult:
    """
    A collection of values returned by getUser.
    """
    def __init__(__self__, created_time=None, description=None, display_name=None, email=None, id=None, identity_type=None, password=None, password_reset_required=None, phone=None, source=None, updated_time=None, user_id=None, user_name=None):
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        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 identity_type and not isinstance(identity_type, str):
            raise TypeError("Expected argument 'identity_type' to be a str")
        pulumi.set(__self__, "identity_type", identity_type)
        if password and not isinstance(password, str):
            raise TypeError("Expected argument 'password' to be a str")
        pulumi.set(__self__, "password", password)
        if password_reset_required and not isinstance(password_reset_required, bool):
            raise TypeError("Expected argument 'password_reset_required' to be a bool")
        pulumi.set(__self__, "password_reset_required", password_reset_required)
        if phone and not isinstance(phone, str):
            raise TypeError("Expected argument 'phone' to be a str")
        pulumi.set(__self__, "phone", phone)
        if source and not isinstance(source, str):
            raise TypeError("Expected argument 'source' to be a str")
        pulumi.set(__self__, "source", source)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        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)
        if user_name and not isinstance(user_name, str):
            raise TypeError("Expected argument 'user_name' to be a str")
        pulumi.set(__self__, "user_name", user_name)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        用户描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> builtins.str:
        """
        用户显示名。
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def email(self) -> builtins.str:
        """
        邮箱。
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> builtins.str:
        """
        身份类型。
        """
        return pulumi.get(self, "identity_type")

    @property
    @pulumi.getter
    def password(self) -> builtins.str:
        """
        密码。密码长度8-32位字符,包含大写字母、小写字母、数字和物特殊符号至少3种。
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="passwordResetRequired")
    def password_reset_required(self) -> builtins.bool:
        """
        首次登陆需不需要重置密码。
        """
        return pulumi.get(self, "password_reset_required")

    @property
    @pulumi.getter
    def phone(self) -> builtins.str:
        """
        手机号。
        """
        return pulumi.get(self, "phone")

    @property
    @pulumi.getter
    def source(self) -> builtins.str:
        """
        用户来源。
        """
        return pulumi.get(self, "source")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> builtins.str:
        """
        用户id。
        """
        return pulumi.get(self, "user_id")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        用户名。
        """
        return pulumi.get(self, "user_name")


class AwaitableGetUserResult(GetUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUserResult(
            created_time=self.created_time,
            description=self.description,
            display_name=self.display_name,
            email=self.email,
            id=self.id,
            identity_type=self.identity_type,
            password=self.password,
            password_reset_required=self.password_reset_required,
            phone=self.phone,
            source=self.source,
            updated_time=self.updated_time,
            user_id=self.user_id,
            user_name=self.user_name)


def get_user(id: Optional[builtins.str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
    """
    Data Source schema for Byteplus::CloudIdentity::User


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:cloudidentity/getUser:getUser', __args__, opts=opts, typ=GetUserResult).value

    return AwaitableGetUserResult(
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        display_name=pulumi.get(__ret__, 'display_name'),
        email=pulumi.get(__ret__, 'email'),
        id=pulumi.get(__ret__, 'id'),
        identity_type=pulumi.get(__ret__, 'identity_type'),
        password=pulumi.get(__ret__, 'password'),
        password_reset_required=pulumi.get(__ret__, 'password_reset_required'),
        phone=pulumi.get(__ret__, 'phone'),
        source=pulumi.get(__ret__, 'source'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        user_id=pulumi.get(__ret__, 'user_id'),
        user_name=pulumi.get(__ret__, 'user_name'))
def get_user_output(id: Optional[pulumi.Input[builtins.str]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetUserResult]:
    """
    Data Source schema for Byteplus::CloudIdentity::User


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:cloudidentity/getUser:getUser', __args__, opts=opts, typ=GetUserResult)
    return __ret__.apply(lambda __response__: GetUserResult(
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        display_name=pulumi.get(__response__, 'display_name'),
        email=pulumi.get(__response__, 'email'),
        id=pulumi.get(__response__, 'id'),
        identity_type=pulumi.get(__response__, 'identity_type'),
        password=pulumi.get(__response__, 'password'),
        password_reset_required=pulumi.get(__response__, 'password_reset_required'),
        phone=pulumi.get(__response__, 'phone'),
        source=pulumi.get(__response__, 'source'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        user_id=pulumi.get(__response__, 'user_id'),
        user_name=pulumi.get(__response__, 'user_name')))
