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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class OrganizationMemberResponse(UniversalBaseModel):
    """
    Response model for organization member details.
    """

    created_at: str = pydantic.Field()
    """
    Membership created timestamp
    """

    email: typing.Optional[str] = pydantic.Field(default=None)
    """
    User email
    """

    membership_id: str = pydantic.Field()
    """
    The WorkOS organization membership ID
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    User display name
    """

    role_slug: str = pydantic.Field()
    """
    Membership role slug
    """

    status: str = pydantic.Field()
    """
    Membership status
    """

    updated_at: str = pydantic.Field()
    """
    Membership updated timestamp
    """

    user_id: str = pydantic.Field()
    """
    The WorkOS user ID
    """

    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
