# 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_sensors_history_series_field import V1SensorsHistorySeriesField


class V1SensorsHistorySeries(UniversalBaseModel):
    """
    V1Sensor ID and field to query.
    """

    field: V1SensorsHistorySeriesField = pydantic.Field()
    """
    Field to query.
    """

    widget_id: typing_extensions.Annotated[
        int, FieldMetadata(alias="widgetId"), pydantic.Field(alias="widgetId", description="V1Sensor ID to query.")
    ]

    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
