# 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
from ..core.unchecked_base_model import UncheckedBaseModel
from .actor_identity import ActorIdentity
from .favorite_item import FavoriteItem
from .flags import Flags
from .user_organization_config import UserOrganizationConfig


class Me(UncheckedBaseModel):
    id: typing.Optional[str] = None
    doc_type: typing.Optional[typing.Literal["user"]] = None
    created_by: ActorIdentity
    updated_by: ActorIdentity
    created_at: typing.Optional[dt.datetime] = None
    updated_at: typing.Optional[dt.datetime] = None
    is_seed: typing.Optional[bool] = None
    first_name: str
    last_name: str
    email_address: str
    inbox_welcome_message_sent: typing.Optional[bool] = None
    consent: typing.Optional[typing.Dict[str, typing.Optional[bool]]] = None
    use_cases: typing.Optional[typing.List[str]] = None
    lead_id: typing.Optional[str] = None
    organizations: typing.Optional[typing.Dict[str, UserOrganizationConfig]] = None
    favorites: typing.Optional[typing.List[FavoriteItem]] = None
    flags: Flags
    permissions: typing.Optional[typing.Dict[str, bool]] = None

    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
