# 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_object_response_body import ReverseGeoObjectResponseBody


class TrailerStatGpsTypeResponseBody(UniversalBaseModel):
    """
    GPS location data for the trailer.
    """

    heading_degrees: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="headingDegrees"),
        pydantic.Field(alias="headingDegrees", description="Heading of the trailer in degrees."),
    ] = None
    latitude: float = pydantic.Field()
    """
    GPS latitude represented in degrees.
    """

    longitude: float = pydantic.Field()
    """
    GPS longitude represented in degrees.
    """

    reverse_geo: typing_extensions.Annotated[
        typing.Optional[ReverseGeoObjectResponseBody],
        FieldMetadata(alias="reverseGeo"),
        pydantic.Field(alias="reverseGeo"),
    ] = None
    speed_miles_per_hour: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="speedMilesPerHour"),
        pydantic.Field(alias="speedMilesPerHour", description="GPS speed of the trailer in miles per hour."),
    ] = None
    time: str = pydantic.Field()
    """
    UTC timestamp in RFC 3339 format.
    """

    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
