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

from __future__ import annotations

import typing

import pydantic
from ...core.pydantic_utilities import UniversalBaseModel
from ...types.date_definition_params_field_configuration import DateDefinitionParamsFieldConfiguration
from ...types.number_definition_params_field_configuration import NumberDefinitionParamsFieldConfiguration
from ...types.rating_definition_params_field_configuration import RatingDefinitionParamsFieldConfiguration
from ...types.select_definition_params_field_configuration import SelectDefinitionParamsFieldConfiguration
from ...types.select_multi_definition_params_field_configuration import SelectMultiDefinitionParamsFieldConfiguration
from ...types.toggle_definition_params_field_configuration import ToggleDefinitionParamsFieldConfiguration
from ...types.user_multi_definition_params_field_configuration import UserMultiDefinitionParamsFieldConfiguration
from ...types.user_single_definition_params_field_configuration import UserSingleDefinitionParamsFieldConfiguration


class CreateFieldDefinitionParamsData_Date(UniversalBaseModel):
    field_type: typing.Literal["date"] = "date"
    field_configuration: DateDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_LongText(UniversalBaseModel):
    field_type: typing.Literal["long_text"] = "long_text"
    name: str

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


class CreateFieldDefinitionParamsData_Number(UniversalBaseModel):
    field_type: typing.Literal["number"] = "number"
    field_configuration: NumberDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_Rating(UniversalBaseModel):
    field_type: typing.Literal["rating"] = "rating"
    field_configuration: RatingDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_Select(UniversalBaseModel):
    field_type: typing.Literal["select"] = "select"
    field_configuration: SelectDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_SelectMulti(UniversalBaseModel):
    field_type: typing.Literal["select_multi"] = "select_multi"
    field_configuration: SelectMultiDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_Text(UniversalBaseModel):
    field_type: typing.Literal["text"] = "text"
    name: str

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


class CreateFieldDefinitionParamsData_Toggle(UniversalBaseModel):
    field_type: typing.Literal["toggle"] = "toggle"
    field_configuration: typing.Optional[ToggleDefinitionParamsFieldConfiguration] = None
    name: str

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


class CreateFieldDefinitionParamsData_UserMulti(UniversalBaseModel):
    field_type: typing.Literal["user_multi"] = "user_multi"
    field_configuration: UserMultiDefinitionParamsFieldConfiguration
    name: str

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


class CreateFieldDefinitionParamsData_UserSingle(UniversalBaseModel):
    field_type: typing.Literal["user_single"] = "user_single"
    field_configuration: UserSingleDefinitionParamsFieldConfiguration
    name: str

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


CreateFieldDefinitionParamsData = typing.Union[
    CreateFieldDefinitionParamsData_Date,
    CreateFieldDefinitionParamsData_LongText,
    CreateFieldDefinitionParamsData_Number,
    CreateFieldDefinitionParamsData_Rating,
    CreateFieldDefinitionParamsData_Select,
    CreateFieldDefinitionParamsData_SelectMulti,
    CreateFieldDefinitionParamsData_Text,
    CreateFieldDefinitionParamsData_Toggle,
    CreateFieldDefinitionParamsData_UserMulti,
    CreateFieldDefinitionParamsData_UserSingle,
]
