# 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 .driver_ruleset_object_response_body_break import DriverRulesetObjectResponseBodyBreak
from .driver_ruleset_object_response_body_cycle import DriverRulesetObjectResponseBodyCycle
from .driver_ruleset_object_response_body_restart import DriverRulesetObjectResponseBodyRestart
from .driver_ruleset_object_response_body_shift import DriverRulesetObjectResponseBodyShift


class DriverRulesetObjectResponseBody(UniversalBaseModel):
    break_: typing_extensions.Annotated[
        typing.Optional[DriverRulesetObjectResponseBodyBreak],
        FieldMetadata(alias="break"),
        pydantic.Field(
            alias="break",
            description="The rest break required setting of the ELD ruleset applied to this driver.  Valid values: `Property (off-duty/sleeper)`, `Explosives/HazMat (on-duty)`",
        ),
    ] = None
    cycle: typing.Optional[DriverRulesetObjectResponseBodyCycle] = pydantic.Field(default=None)
    """
    The cycle of the ELD ruleset applied to this driver.  Valid values: `USA 60 hour / 7 day`, `USA 70 hour / 8 day`, `AK 80 hour / 8 day`, `AK 70 hour / 7 day`, `CA 80 hour / 8 day`, `CA 112 hour / 8 day`, `FL 80 hour / 8 day`, `FL 70 hour / 7 day`, `NE 80 hour / 8 day`, `NE 70 hour / 7 day`, `NC 80 hour / 8 day`, `NC 70 hour / 7 day`, `OK 70 hour / 8 day`, `OK 60 hour / 7 day`, `OR 80 hour / 8 day`, `OR 70 hour / 7 day`, `SC 80 hour / 8 day`, `SC 70 hour / 7 day`, `TX 70 hour / 7 day`, `WI 80 hour / 8 day`, `WI 70 hour / 7 day`, `Canada South Cycle 1 (70 hour / 7 day)`, `Canada South Cycle 2 (120 hour / 14 day)`, `Canada North Cycle 1 (80 hour / 7 day)`, `Canada North Cycle 2 (120 hour / 14 day)`
    """

    jurisdiction: typing.Optional[str] = pydantic.Field(default=None)
    """
    The jurisdiction of the ELD ruleset applied to this driver. These are specified by either `CS` or `CN` for Canada South and Canada North, respectively, or the ISO 3166-2 postal code for the supported state or territory.
    """

    restart: typing.Optional[DriverRulesetObjectResponseBodyRestart] = pydantic.Field(default=None)
    """
    The restart of the ELD ruleset applied to this driver.  Valid values: `34-hour Restart`, `24-hour Restart`, `36-hour Restart`, `72-hour Restart`
    """

    shift: typing.Optional[DriverRulesetObjectResponseBodyShift] = pydantic.Field(default=None)
    """
    The shift of the ELD ruleset applied to this driver.  Valid values: `US Interstate Property`, `US Interstate Passenger`
    """

    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
