# 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


class V1HumidityResponseSensors(UniversalBaseModel):
    humidity: typing.Optional[int] = pydantic.Field(default=None)
    """
    Currently reported relative humidity in percent, from 0-100.
    """

    humidity_time: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="humidityTime"),
        pydantic.Field(
            alias="humidityTime", description="The timestamp of reported relative humidity, specified in RFC 3339 time."
        ),
    ] = None
    id: typing.Optional[int] = pydantic.Field(default=None)
    """
    ID of the sensor.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the sensor.
    """

    trailer_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="trailerId"),
        pydantic.Field(
            alias="trailerId",
            description="ID of the trailer associated with the sensor for the data point. If no trailer is connected, this parameter will not be reported.",
        ),
    ] = None
    vehicle_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="vehicleId"),
        pydantic.Field(
            alias="vehicleId",
            description="ID of the vehicle associated with the sensor for the data point. If no vehicle is connected, this parameter will not be reported.",
        ),
    ] = 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
