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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .time_range_object_request_body_days_of_week_item import TimeRangeObjectRequestBodyDaysOfWeekItem


class TimeRangeObjectRequestBody(UniversalBaseModel):
    """
    A daily time range. If start time of day is greater than end time of day, then the time range applies overnight from the specified day of week into the following day.
    """

    days_of_week: typing_extensions.Annotated[
        typing.List[TimeRangeObjectRequestBodyDaysOfWeekItem],
        FieldMetadata(alias="daysOfWeek"),
        pydantic.Field(alias="daysOfWeek", description="Which days this timezone applies to."),
    ]
    end_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="endTime"),
        pydantic.Field(
            alias="endTime",
            description="The time of day at which the time range starts. In 24 hour kitchen clock format.",
        ),
    ]
    start_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="startTime"),
        pydantic.Field(
            alias="startTime",
            description="The time of day at which the time range starts. In 24 hour kitchen clock format.",
        ),
    ]
    timezone: str = pydantic.Field()
    """
    The timezone of the time range uses [IANA timezone database](https://www.iana.org/time-zones) keys (e.g. `America/Los_Angeles`, `America/New_York`, `Europe/London`, etc.). You can find a mapping of common timezone formats to IANA timezone keys [here](https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html).
    """

    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
