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

import datetime as dt
import typing

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


class InvitationDetailsResponse(UniversalBaseModel):
    """
    Schema for invitation details response.
    """

    invitation_id: str = pydantic.Field()
    """
    Invitation ID
    """

    email: str = pydantic.Field()
    """
    Email address invited
    """

    user_id: str = pydantic.Field()
    """
    User ID of invited user
    """

    organization_id: str = pydantic.Field()
    """
    Organization ID
    """

    role_id: str = pydantic.Field()
    """
    Role assigned to invitation
    """

    invitation_link: str = pydantic.Field()
    """
    Full invitation URL for the user
    """

    expires_at: dt.datetime = pydantic.Field()
    """
    When the invitation expires
    """

    created_at: dt.datetime = pydantic.Field()
    """
    When the invitation was created
    """

    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
