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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .block_config_item_number_default_value import BlockConfigItemNumberDefaultValue
from .block_config_item_number_minimum_value import BlockConfigItemNumberMinimumValue
from .block_config_item_number_maximum_value import BlockConfigItemNumberMaximumValue
from .block_config_item_number_value import BlockConfigItemNumberValue
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class BlockConfigItemNumber(UncheckedBaseModel):
    id: str
    display_name: str
    type: typing.Literal["number"] = "number"
    default_value: typing.Optional[BlockConfigItemNumberDefaultValue] = None
    minimum_value: typing.Optional[BlockConfigItemNumberMinimumValue] = None
    maximum_value: typing.Optional[BlockConfigItemNumberMaximumValue] = None
    value: typing.Optional[BlockConfigItemNumberValue] = None

    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
