# 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 .reverse_geo import ReverseGeo
from .time import Time
from .vehicle_location_address import VehicleLocationAddress
from .vehicle_location_heading import VehicleLocationHeading
from .vehicle_location_is_ecu_speed import VehicleLocationIsEcuSpeed
from .vehicle_location_latitude import VehicleLocationLatitude
from .vehicle_location_longitude import VehicleLocationLongitude
from .vehicle_location_speed import VehicleLocationSpeed
from .vehicle_stats_decorations import VehicleStatsDecorations


class VehicleStatsListGps(UniversalBaseModel):
    """
    GPS location data for the vehicle.
    """

    address: typing.Optional[VehicleLocationAddress] = None
    decorations: typing.Optional[VehicleStatsDecorations] = None
    heading_degrees: typing_extensions.Annotated[
        typing.Optional[VehicleLocationHeading],
        FieldMetadata(alias="headingDegrees"),
        pydantic.Field(alias="headingDegrees"),
    ] = None
    is_ecu_speed: typing_extensions.Annotated[
        typing.Optional[VehicleLocationIsEcuSpeed],
        FieldMetadata(alias="isEcuSpeed"),
        pydantic.Field(alias="isEcuSpeed"),
    ] = None
    latitude: VehicleLocationLatitude
    longitude: VehicleLocationLongitude
    reverse_geo: typing_extensions.Annotated[
        typing.Optional[ReverseGeo], FieldMetadata(alias="reverseGeo"), pydantic.Field(alias="reverseGeo")
    ] = None
    speed_miles_per_hour: typing_extensions.Annotated[
        typing.Optional[VehicleLocationSpeed],
        FieldMetadata(alias="speedMilesPerHour"),
        pydantic.Field(alias="speedMilesPerHour"),
    ] = None
    time: Time

    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
