# 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 .cumulative_operating_hours_response_body import CumulativeOperatingHoursResponseBody
from .def_remaining_response_body import DefRemainingResponseBody
from .distance_response_body import DistanceResponseBody
from .engine_status_response_body import EngineStatusResponseBody
from .equipment_header_with_additional_fields_response_body import EquipmentHeaderWithAdditionalFieldsResponseBody
from .fuel_remaining_response_body import FuelRemainingResponseBody
from .location_response_body import LocationResponseBody


class AempEquipmentWithAdditionalFieldsResponseBody(UniversalBaseModel):
    """
    Contains equipment fields.
    """

    cumulative_operating_hours: typing_extensions.Annotated[
        typing.Optional[CumulativeOperatingHoursResponseBody],
        FieldMetadata(alias="CumulativeOperatingHours"),
        pydantic.Field(alias="CumulativeOperatingHours"),
    ] = None
    def_remaining: typing_extensions.Annotated[
        typing.Optional[DefRemainingResponseBody],
        FieldMetadata(alias="DEFRemaining"),
        pydantic.Field(alias="DEFRemaining"),
    ] = None
    distance: typing_extensions.Annotated[
        typing.Optional[DistanceResponseBody], FieldMetadata(alias="Distance"), pydantic.Field(alias="Distance")
    ] = None
    engine_status: typing_extensions.Annotated[
        typing.Optional[EngineStatusResponseBody],
        FieldMetadata(alias="EngineStatus"),
        pydantic.Field(alias="EngineStatus"),
    ] = None
    equipment_header: typing_extensions.Annotated[
        EquipmentHeaderWithAdditionalFieldsResponseBody,
        FieldMetadata(alias="EquipmentHeader"),
        pydantic.Field(alias="EquipmentHeader"),
    ]
    fuel_remaining: typing_extensions.Annotated[
        typing.Optional[FuelRemainingResponseBody],
        FieldMetadata(alias="FuelRemaining"),
        pydantic.Field(alias="FuelRemaining"),
    ] = None
    location: typing_extensions.Annotated[
        LocationResponseBody, FieldMetadata(alias="Location"), pydantic.Field(alias="Location")
    ]

    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
