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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Range(UncheckedBaseModel):
    """
    The range of a number value between the specified lower and upper bounds.
    """

    min: typing.Optional[str] = pydantic.Field(default=None)
    """
    The lower bound of the number range. At least one of `min` or `max` must be specified.
    If unspecified, the results will have no minimum value.
    """

    max: typing.Optional[str] = pydantic.Field(default=None)
    """
    The upper bound of the number range. At least one of `min` or `max` must be specified.
    If unspecified, the results will have no maximum value.
    """

    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
