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

from __future__ import annotations

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import UniversalBaseModel
from .date_definition_field_configuration import DateDefinitionFieldConfiguration
from .long_text_definition_field_configuration import LongTextDefinitionFieldConfiguration
from .number_definition_field_configuration import NumberDefinitionFieldConfiguration
from .rating_definition_field_configuration import RatingDefinitionFieldConfiguration
from .select_definition_field_configuration import SelectDefinitionFieldConfiguration
from .select_multi_definition_field_configuration import SelectMultiDefinitionFieldConfiguration
from .text_definition_field_configuration import TextDefinitionFieldConfiguration
from .toggle_definition_field_configuration import ToggleDefinitionFieldConfiguration
from .user import User
from .user_multi_definition_field_configuration import UserMultiDefinitionFieldConfiguration
from .user_single_definition_field_configuration import UserSingleDefinitionFieldConfiguration


class FieldDefinitionWithIncludes_Date(UniversalBaseModel):
    field_type: typing.Literal["date"] = "date"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: DateDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_LongText(UniversalBaseModel):
    field_type: typing.Literal["long_text"] = "long_text"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: LongTextDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_Number(UniversalBaseModel):
    field_type: typing.Literal["number"] = "number"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: NumberDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_Rating(UniversalBaseModel):
    field_type: typing.Literal["rating"] = "rating"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: RatingDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_Select(UniversalBaseModel):
    field_type: typing.Literal["select"] = "select"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: SelectDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_SelectMulti(UniversalBaseModel):
    field_type: typing.Literal["select_multi"] = "select_multi"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: SelectMultiDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_Text(UniversalBaseModel):
    field_type: typing.Literal["text"] = "text"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: TextDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_Toggle(UniversalBaseModel):
    field_type: typing.Literal["toggle"] = "toggle"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: ToggleDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_UserMulti(UniversalBaseModel):
    field_type: typing.Literal["user_multi"] = "user_multi"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: UserMultiDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


class FieldDefinitionWithIncludes_UserSingle(UniversalBaseModel):
    field_type: typing.Literal["user_single"] = "user_single"
    creator: typing.Optional[User] = None
    created_at: dt.datetime
    creator_id: str
    field_configuration: UserSingleDefinitionFieldConfiguration
    id: str
    mutable: bool
    name: str
    updated_at: dt.datetime

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2


FieldDefinitionWithIncludes = typing.Union[
    FieldDefinitionWithIncludes_Date,
    FieldDefinitionWithIncludes_LongText,
    FieldDefinitionWithIncludes_Number,
    FieldDefinitionWithIncludes_Rating,
    FieldDefinitionWithIncludes_Select,
    FieldDefinitionWithIncludes_SelectMulti,
    FieldDefinitionWithIncludes_Text,
    FieldDefinitionWithIncludes_Toggle,
    FieldDefinitionWithIncludes_UserMulti,
    FieldDefinitionWithIncludes_UserSingle,
]
