# 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

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

@pulumi.output_type
class GetUserResult:
    """
    A collection of values returned by getUser.
    """
    def __init__(__self__, acls=None, comment=None, email=None, enabled=None, expiration_date=None, first_name=None, groups=None, id=None, keys=None, last_name=None, user_id=None):
        if acls and not isinstance(acls, list):
            raise TypeError("Expected argument 'acls' to be a list")
        pulumi.set(__self__, "acls", acls)
        if comment and not isinstance(comment, str):
            raise TypeError("Expected argument 'comment' to be a str")
        pulumi.set(__self__, "comment", comment)
        if email and not isinstance(email, str):
            raise TypeError("Expected argument 'email' to be a str")
        pulumi.set(__self__, "email", email)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if expiration_date and not isinstance(expiration_date, str):
            raise TypeError("Expected argument 'expiration_date' to be a str")
        pulumi.set(__self__, "expiration_date", expiration_date)
        if first_name and not isinstance(first_name, str):
            raise TypeError("Expected argument 'first_name' to be a str")
        pulumi.set(__self__, "first_name", first_name)
        if groups and not isinstance(groups, list):
            raise TypeError("Expected argument 'groups' to be a list")
        pulumi.set(__self__, "groups", groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if keys and not isinstance(keys, str):
            raise TypeError("Expected argument 'keys' to be a str")
        pulumi.set(__self__, "keys", keys)
        if last_name and not isinstance(last_name, str):
            raise TypeError("Expected argument 'last_name' to be a str")
        pulumi.set(__self__, "last_name", last_name)
        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)

    @property
    @pulumi.getter
    def acls(self) -> Sequence['outputs.GetUserAclResult']:
        """
        The access control list.
        """
        return pulumi.get(self, "acls")

    @property
    @pulumi.getter
    def comment(self) -> str:
        """
        The user comment.
        """
        return pulumi.get(self, "comment")

    @property
    @pulumi.getter
    def email(self) -> str:
        """
        The user's email address.
        """
        return pulumi.get(self, "email")

    @property
    @pulumi.getter
    def enabled(self) -> bool:
        """
        Whether the user account is enabled.
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="expirationDate")
    def expiration_date(self) -> str:
        """
        The user account's expiration date (RFC 3339).
        """
        return pulumi.get(self, "expiration_date")

    @property
    @pulumi.getter(name="firstName")
    def first_name(self) -> str:
        """
        The user's first name.
        """
        return pulumi.get(self, "first_name")

    @property
    @pulumi.getter
    def groups(self) -> Sequence[str]:
        """
        The user's groups.
        """
        return pulumi.get(self, "groups")

    @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 keys(self) -> str:
        """
        The user's keys.
        """
        return pulumi.get(self, "keys")

    @property
    @pulumi.getter(name="lastName")
    def last_name(self) -> str:
        """
        The user's last name.
        """
        return pulumi.get(self, "last_name")

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


class AwaitableGetUserResult(GetUserResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUserResult(
            acls=self.acls,
            comment=self.comment,
            email=self.email,
            enabled=self.enabled,
            expiration_date=self.expiration_date,
            first_name=self.first_name,
            groups=self.groups,
            id=self.id,
            keys=self.keys,
            last_name=self.last_name,
            user_id=self.user_id)


def get_user(user_id: Optional[str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
    """
    Retrieves information about a specific user.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    operations_user = proxmoxve.Permission.get_user(user_id="operation@pam")
    ```
    <!--End PulumiCodeChooser -->


    :param str user_id: The user identifier.
    """
    __args__ = dict()
    __args__['userId'] = user_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('proxmoxve:Permission/getUser:getUser', __args__, opts=opts, typ=GetUserResult).value

    return AwaitableGetUserResult(
        acls=pulumi.get(__ret__, 'acls'),
        comment=pulumi.get(__ret__, 'comment'),
        email=pulumi.get(__ret__, 'email'),
        enabled=pulumi.get(__ret__, 'enabled'),
        expiration_date=pulumi.get(__ret__, 'expiration_date'),
        first_name=pulumi.get(__ret__, 'first_name'),
        groups=pulumi.get(__ret__, 'groups'),
        id=pulumi.get(__ret__, 'id'),
        keys=pulumi.get(__ret__, 'keys'),
        last_name=pulumi.get(__ret__, 'last_name'),
        user_id=pulumi.get(__ret__, 'user_id'))


@_utilities.lift_output_func(get_user)
def get_user_output(user_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUserResult]:
    """
    Retrieves information about a specific user.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    operations_user = proxmoxve.Permission.get_user(user_id="operation@pam")
    ```
    <!--End PulumiCodeChooser -->


    :param str user_id: The user identifier.
    """
    ...
