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

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


class CatalogAvailabilityPeriod(UncheckedBaseModel):
    """
    Represents a time period of availability.
    """

    start_local_time: typing.Optional[str] = pydantic.Field(default=None)
    """
    The start time of an availability period, specified in local time using partial-time
    RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
    Note that the seconds value is always :00, but it is appended for conformance to the RFC.
    """

    end_local_time: typing.Optional[str] = pydantic.Field(default=None)
    """
    The end time of an availability period, specified in local time using partial-time
    RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
    Note that the seconds value is always :00, but it is appended for conformance to the RFC.
    """

    day_of_week: typing.Optional[DayOfWeek] = pydantic.Field(default=None)
    """
    The day of the week for this availability period.
    See [DayOfWeek](#type-dayofweek) for possible values
    """

    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
