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

from __future__ import annotations

import typing

import pydantic
import typing_extensions
from ...core.unchecked_base_model import UncheckedBaseModel, UnionMetadata
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(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_LongText(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_Number(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_Rating(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_Select(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_SelectMulti(UncheckedBaseModel):
    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)


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

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)


class UpdateFieldDefinitionParamsData_Toggle(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_UserMulti(UncheckedBaseModel):
    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)


class UpdateFieldDefinitionParamsData_UserSingle(UncheckedBaseModel):
    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)


UpdateFieldDefinitionParamsData = typing_extensions.Annotated[
    typing.Union[
        UpdateFieldDefinitionParamsData_Date,
        UpdateFieldDefinitionParamsData_LongText,
        UpdateFieldDefinitionParamsData_Number,
        UpdateFieldDefinitionParamsData_Rating,
        UpdateFieldDefinitionParamsData_Select,
        UpdateFieldDefinitionParamsData_SelectMulti,
        UpdateFieldDefinitionParamsData_Text,
        UpdateFieldDefinitionParamsData_Toggle,
        UpdateFieldDefinitionParamsData_UserMulti,
        UpdateFieldDefinitionParamsData_UserSingle,
    ],
    UnionMetadata(discriminant="field_type"),
]
