# 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 .v_1_asset_cable import V1AssetCable
from .v_1_asset_current_location import V1AssetCurrentLocation


class V1AssetCurrentLocationsResponse(UniversalBaseModel):
    """
    Basic information of an asset
    """

    asset_serial_number: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="assetSerialNumber"),
        pydantic.Field(alias="assetSerialNumber", description="Asset serial number"),
    ] = None
    cable: typing.Optional[V1AssetCable] = None
    engine_hours: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="engineHours"),
        pydantic.Field(alias="engineHours", description="Engine hours"),
    ] = None
    id: int = pydantic.Field()
    """
    Asset ID
    """

    location: typing.Optional[typing.List[V1AssetCurrentLocation]] = pydantic.Field(default=None)
    """
    Current location of an asset
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Asset name
    """

    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
