# 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 .eld_settings_object_response_body import EldSettingsObjectResponseBody


class DriverWithTimezoneEldSettingsObjectResponseBody(UniversalBaseModel):
    """
    The driver the log applies to.
    """

    eld_settings: typing_extensions.Annotated[
        typing.Optional[EldSettingsObjectResponseBody],
        FieldMetadata(alias="eldSettings"),
        pydantic.Field(alias="eldSettings"),
    ] = None
    external_ids: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]],
        FieldMetadata(alias="externalIds"),
        pydantic.Field(alias="externalIds", description="A map of external ids"),
    ] = None
    id: str = pydantic.Field()
    """
    ID of the driver
    """

    name: str = pydantic.Field()
    """
    Name of the driver
    """

    timezone: typing.Optional[str] = pydantic.Field(default=None)
    """
    Home terminal timezone, in order to indicate what time zone should be used to calculate the ELD logs. Driver timezones use [IANA timezone database](https://www.iana.org/time-zones) keys (e.g. `America/Los_Angeles`, `America/New_York`, `Europe/London`, etc.). You can find a mapping of common timezone formats to IANA timezone keys [here](https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html).
    """

    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
