# 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 .sensor import Sensor
from .vehicle_sensor_configuration_area_position import VehicleSensorConfigurationAreaPosition


class VehicleSensorConfigurationArea(UniversalBaseModel):
    """
    The sensor configuration for an area of the vehicle
    """

    cargo_sensors: typing_extensions.Annotated[
        typing.Optional[typing.List[Sensor]],
        FieldMetadata(alias="cargoSensors"),
        pydantic.Field(alias="cargoSensors", description="Cargo sensors configured in this position of the vehicle"),
    ] = None
    humidity_sensors: typing_extensions.Annotated[
        typing.Optional[typing.List[Sensor]],
        FieldMetadata(alias="humiditySensors"),
        pydantic.Field(
            alias="humiditySensors", description="Humidity sensors configured in this position of the vehicle"
        ),
    ] = None
    position: typing.Optional[VehicleSensorConfigurationAreaPosition] = pydantic.Field(default=None)
    """
    Position of the area on vehicle
    """

    temperature_sensors: typing_extensions.Annotated[
        typing.Optional[typing.List[Sensor]],
        FieldMetadata(alias="temperatureSensors"),
        pydantic.Field(
            alias="temperatureSensors", description="Temperature sensors configured in this position of the vehicle"
        ),
    ] = None

    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
