# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .trip_asset_response_body_type import TripAssetResponseBodyType


class TripAssetResponseBody(UniversalBaseModel):
    """
    Asset that the location readings are tied to
    """

    id: str = pydantic.Field()
    """
    Unique ID for the asset object that is reporting the location.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`.
    """

    type: typing.Optional[TripAssetResponseBodyType] = pydantic.Field(default=None)
    """
    Type for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`.  Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle`
    """

    vin: typing.Optional[str] = pydantic.Field(default=None)
    """
    VIN for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`.
    """

    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
