# 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 .goa_gateway_tiny_response_response_body import GoaGatewayTinyResponseResponseBody
from .vehicle_with_gateway_tiny_response_response_body_asset_type import (
    VehicleWithGatewayTinyResponseResponseBodyAssetType,
)


class VehicleWithGatewayTinyResponseResponseBody(UniversalBaseModel):
    """
    A minified vehicle object. This object is only returned if the route is assigned to the vehicle.
    """

    asset_type: typing_extensions.Annotated[
        typing.Optional[VehicleWithGatewayTinyResponseResponseBodyAssetType],
        FieldMetadata(alias="assetType"),
        pydantic.Field(
            alias="assetType",
            description="The type of the asset.  Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle`",
        ),
    ] = 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
    gateway: typing.Optional[GoaGatewayTinyResponseResponseBody] = None
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the vehicle
    """

    license_plate: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="licensePlate"),
        pydantic.Field(alias="licensePlate", description="The license plate of the vehicle."),
    ] = None
    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the vehicle
    """

    vin: typing.Optional[str] = pydantic.Field(default=None)
    """
    The VIN of the vehicle.
    """

    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
