# 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 .current_duty_status_hos_status_type import CurrentDutyStatusHosStatusType


class CurrentDutyStatus(UniversalBaseModel):
    """
    The current HOS status type and time the driver started being in this status.
    """

    hos_status_type: typing_extensions.Annotated[
        typing.Optional[CurrentDutyStatusHosStatusType],
        FieldMetadata(alias="hosStatusType"),
        pydantic.Field(
            alias="hosStatusType",
            description="The Hours of Service status type.  If the driver app is disconnected, an empty string will be returned. To reconnect the app and return updated values, drivers should have the app open with good cell service. Valid values: `offDuty`, `sleeperBed`, `driving`, `onDuty`, `yardMove`, `personalConveyance`.",
        ),
    ] = 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
