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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
import datetime as dt
from .lse_fields import LseFields
from .organization_membership import OrganizationMembership
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class LseUser(UncheckedBaseModel):
    """
    A ModelSerializer that takes additional arguments for
    "fields", "omit" and "expand" in order to
    control which fields are displayed, and whether to replace simple
    values with complex, nested serializations
    """

    active_organization: typing.Optional[int] = None
    active_organization_meta: typing.Optional[str] = None
    allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Allow sending newsletters to user
    """

    avatar: typing.Optional[str] = None
    custom_hotkeys: typing.Optional[typing.Optional[typing.Any]] = pydantic.Field(default=None)
    """
    Custom keyboard shortcuts configuration for the user interface
    """

    date_joined: typing.Optional[dt.datetime] = None
    email: typing.Optional[str] = None
    first_name: typing.Optional[str] = None
    id: typing.Optional[int] = None
    initials: typing.Optional[str] = None
    last_activity: typing.Optional[dt.datetime] = None
    last_name: typing.Optional[str] = None
    lse_fields: typing.Optional[LseFields] = None
    org_membership: typing.Optional[typing.List[OrganizationMembership]] = None
    organization_membership: typing.Optional[OrganizationMembership] = None
    pause: typing.Optional[str] = None
    phone: typing.Optional[str] = None
    username: str

    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
