# 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 .distance_traveled_object_response_body import DistanceTraveledObjectResponseBody
from .driver_with_timezone_eld_settings_object_response_body import DriverWithTimezoneEldSettingsObjectResponseBody
from .duty_status_duration_object_response_body import DutyStatusDurationObjectResponseBody
from .log_meta_data_object_response_body import LogMetaDataObjectResponseBody
from .pending_duty_status_durations_object_response_body import PendingDutyStatusDurationsObjectResponseBody


class HosDailyLogsObjectResponseBody(UniversalBaseModel):
    distance_traveled: typing_extensions.Annotated[
        typing.Optional[DistanceTraveledObjectResponseBody],
        FieldMetadata(alias="distanceTraveled"),
        pydantic.Field(alias="distanceTraveled"),
    ] = None
    driver: DriverWithTimezoneEldSettingsObjectResponseBody
    duty_status_durations: typing_extensions.Annotated[
        typing.Optional[DutyStatusDurationObjectResponseBody],
        FieldMetadata(alias="dutyStatusDurations"),
        pydantic.Field(alias="dutyStatusDurations"),
    ] = None
    end_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="endTime"),
        pydantic.Field(
            alias="endTime",
            description="The end time of the daily log in RFC 3339 format. This will be calculated using timezone of the driver.",
        ),
    ]
    log_meta_data: typing_extensions.Annotated[
        typing.Optional[LogMetaDataObjectResponseBody],
        FieldMetadata(alias="logMetaData"),
        pydantic.Field(alias="logMetaData"),
    ] = None
    pending_duty_status_durations: typing_extensions.Annotated[
        typing.Optional[PendingDutyStatusDurationsObjectResponseBody],
        FieldMetadata(alias="pendingDutyStatusDurations"),
        pydantic.Field(alias="pendingDutyStatusDurations"),
    ] = None
    start_time: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="startTime"),
        pydantic.Field(
            alias="startTime",
            description="The start time of the daily log in RFC 3339 format. This will be calculated using timezone of the driver.",
        ),
    ]

    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
