# 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 OrganizationInvitationResponse(UniversalBaseModel):
    """
    Response model for organization invitation details.
    """

    accepted_user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Accepted WorkOS user ID
    """

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

    email: str = pydantic.Field()
    """
    Invitee email
    """

    expires_at: str = pydantic.Field()
    """
    Invitation expiration timestamp
    """

    id: str = pydantic.Field()
    """
    The WorkOS invitation ID
    """

    inviter_user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Inviter WorkOS user ID
    """

    role_slug: typing.Optional[str] = pydantic.Field(default=None)
    """
    Invitation role slug
    """

    state: str = pydantic.Field()
    """
    Invitation state
    """

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

    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
