# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .seat_type import SeatType


class WorkspaceMemberResponseModel(UncheckedBaseModel):
    """
    Public workspace member fields exposed via GET /v1/workspace/members.
    """

    user_id: str = pydantic.Field()
    """
    The user ID of the workspace member.
    """

    email: str = pydantic.Field()
    """
    The email address of the workspace member.
    """

    first_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The first name of the workspace member, if available.
    """

    seat_type: typing.Optional[SeatType] = pydantic.Field(default=None)
    """
    The seat type (role) of the workspace member.
    """

    is_owner: bool = pydantic.Field()
    """
    Whether the member is the workspace owner.
    """

    is_locked: bool = pydantic.Field()
    """
    Whether the member's account is locked in this workspace.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
