# 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 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

__all__ = [
    'GetTeamMemberResult',
    'AwaitableGetTeamMemberResult',
    'get_team_member',
    'get_team_member_output',
]

@pulumi.output_type
class GetTeamMemberResult:
    """
    A collection of values returned by getTeamMember.
    """
    def __init__(__self__, access_groups=None, id=None, projects=None, role=None, team_id=None, user_id=None):
        if access_groups and not isinstance(access_groups, list):
            raise TypeError("Expected argument 'access_groups' to be a list")
        pulumi.set(__self__, "access_groups", access_groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if projects and not isinstance(projects, list):
            raise TypeError("Expected argument 'projects' to be a list")
        pulumi.set(__self__, "projects", projects)
        if role and not isinstance(role, str):
            raise TypeError("Expected argument 'role' to be a str")
        pulumi.set(__self__, "role", role)
        if team_id and not isinstance(team_id, str):
            raise TypeError("Expected argument 'team_id' to be a str")
        pulumi.set(__self__, "team_id", team_id)
        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(name="accessGroups")
    def access_groups(self) -> Sequence[str]:
        return pulumi.get(self, "access_groups")

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

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

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

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

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


class AwaitableGetTeamMemberResult(GetTeamMemberResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTeamMemberResult(
            access_groups=self.access_groups,
            id=self.id,
            projects=self.projects,
            role=self.role,
            team_id=self.team_id,
            user_id=self.user_id)


def get_team_member(team_id: Optional[str] = None,
                    user_id: Optional[str] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTeamMemberResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['teamId'] = team_id
    __args__['userId'] = user_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vercel:index/getTeamMember:getTeamMember', __args__, opts=opts, typ=GetTeamMemberResult).value

    return AwaitableGetTeamMemberResult(
        access_groups=pulumi.get(__ret__, 'access_groups'),
        id=pulumi.get(__ret__, 'id'),
        projects=pulumi.get(__ret__, 'projects'),
        role=pulumi.get(__ret__, 'role'),
        team_id=pulumi.get(__ret__, 'team_id'),
        user_id=pulumi.get(__ret__, 'user_id'))
def get_team_member_output(team_id: Optional[pulumi.Input[str]] = None,
                           user_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTeamMemberResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['teamId'] = team_id
    __args__['userId'] = user_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('vercel:index/getTeamMember:getTeamMember', __args__, opts=opts, typ=GetTeamMemberResult)
    return __ret__.apply(lambda __response__: GetTeamMemberResult(
        access_groups=pulumi.get(__response__, 'access_groups'),
        id=pulumi.get(__response__, 'id'),
        projects=pulumi.get(__response__, 'projects'),
        role=pulumi.get(__response__, 'role'),
        team_id=pulumi.get(__response__, 'team_id'),
        user_id=pulumi.get(__response__, 'user_id')))
