# 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 .hos_break import HosBreak
from .hos_cycle import HosCycle
from .hos_drive import HosDrive
from .hos_shift import HosShift


class HosClocks(UniversalBaseModel):
    """
    Remaining durations and start times (where applicable) for various HOS rules. See [this page](https://www.samsara.com/fleet/eld-compliance/hours-of-service) for more information on HOS rules.
    """

    break_: typing_extensions.Annotated[
        typing.Optional[HosBreak], FieldMetadata(alias="break"), pydantic.Field(alias="break")
    ] = None
    cycle: typing.Optional[HosCycle] = None
    drive: typing.Optional[HosDrive] = None
    shift: typing.Optional[HosShift] = 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
