# 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 .address_response_response_body import AddressResponseResponseBody


class SpeedingIntervalLocationResponseResponseBody(UniversalBaseModel):
    """
    Location object of the closest location point to the interval.
    """

    accuracy_meters: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="accuracyMeters"),
        pydantic.Field(
            alias="accuracyMeters",
            description="Radial accuracy of gps location in meters. This will only return if strong GPS is not available.",
        ),
    ] = None
    address: AddressResponseResponseBody
    heading_degrees: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="headingDegrees"),
        pydantic.Field(
            alias="headingDegrees", description="Heading of the asset in degrees. May be 0 if the asset is not moving."
        ),
    ]
    latitude: float = pydantic.Field()
    """
    Latitude of the closest location point to the interval.
    """

    longitude: float = pydantic.Field()
    """
    Longitude of the closest location point to the interval.
    """

    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
