# 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.update_date_definition_params_field_configuration import UpdateDateDefinitionParamsFieldConfiguration
from ...types.update_number_definition_params_field_configuration import UpdateNumberDefinitionParamsFieldConfiguration
from ...types.update_rating_definition_params_field_configuration import UpdateRatingDefinitionParamsFieldConfiguration
from ...types.update_select_definition_params_field_configuration import UpdateSelectDefinitionParamsFieldConfiguration
from ...types.update_select_multi_definition_params_field_configuration import (
    UpdateSelectMultiDefinitionParamsFieldConfiguration,
)
from ...types.update_toggle_definition_params_field_configuration import UpdateToggleDefinitionParamsFieldConfiguration
from ...types.update_user_multi_definition_params_field_configuration import (
    UpdateUserMultiDefinitionParamsFieldConfiguration,
)
from ...types.update_user_single_definition_params_field_configuration import (
    UpdateUserSingleDefinitionParamsFieldConfiguration,
)


class UpdateFieldDefinitionParamsData_Date(UniversalBaseModel):
    field_type: typing.Literal["date"] = "date"
    field_configuration: typing.Optional[UpdateDateDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


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

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


class UpdateFieldDefinitionParamsData_Number(UniversalBaseModel):
    field_type: typing.Literal["number"] = "number"
    field_configuration: typing.Optional[UpdateNumberDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


class UpdateFieldDefinitionParamsData_Rating(UniversalBaseModel):
    field_type: typing.Literal["rating"] = "rating"
    field_configuration: typing.Optional[UpdateRatingDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


class UpdateFieldDefinitionParamsData_Select(UniversalBaseModel):
    field_type: typing.Literal["select"] = "select"
    field_configuration: typing.Optional[UpdateSelectDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


class UpdateFieldDefinitionParamsData_SelectMulti(UniversalBaseModel):
    field_type: typing.Literal["select_multi"] = "select_multi"
    field_configuration: typing.Optional[UpdateSelectMultiDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


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

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


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

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


class UpdateFieldDefinitionParamsData_UserMulti(UniversalBaseModel):
    field_type: typing.Literal["user_multi"] = "user_multi"
    field_configuration: typing.Optional[UpdateUserMultiDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


class UpdateFieldDefinitionParamsData_UserSingle(UniversalBaseModel):
    field_type: typing.Literal["user_single"] = "user_single"
    field_configuration: typing.Optional[UpdateUserSingleDefinitionParamsFieldConfiguration] = None
    name: typing.Optional[str] = None

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


UpdateFieldDefinitionParamsData = typing.Union[
    UpdateFieldDefinitionParamsData_Date,
    UpdateFieldDefinitionParamsData_LongText,
    UpdateFieldDefinitionParamsData_Number,
    UpdateFieldDefinitionParamsData_Rating,
    UpdateFieldDefinitionParamsData_Select,
    UpdateFieldDefinitionParamsData_SelectMulti,
    UpdateFieldDefinitionParamsData_Text,
    UpdateFieldDefinitionParamsData_Toggle,
    UpdateFieldDefinitionParamsData_UserMulti,
    UpdateFieldDefinitionParamsData_UserSingle,
]
