# coding: utf-8
"""Waylay Broker models.

This code was generated from the OpenAPI documentation of 'Waylay Broker'

Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

"""

from __future__ import annotations

from typing import List

from pydantic import (
    ConfigDict,
    Field,
    StrictInt,
    StrictStr,
)
from typing_extensions import (
    Annotated,  # >=3.11
)
from waylay.sdk.api._models import BaseModel as WaylayBaseModel

from ..models.aggregate import Aggregate
from ..models.grouping import Grouping
from ..models.timeseries_filter import TimeseriesFilter


class SeriesQueryResponse(WaylayBaseModel):
    """SeriesQueryResponse."""

    var_from: StrictInt | None = Field(
        default=None,
        description="Timestamp expressed as milliseconds since 00:00:00 UTC on 1 January 1970,  not counting leap seconds.",
        alias="from",
    )
    until: StrictInt | None = Field(
        default=None,
        description="Timestamp expressed as milliseconds since 00:00:00 UTC on 1 January 1970,  not counting leap seconds.",
    )
    metric: StrictStr = Field(
        description="Key that identifies a single timeseries for a given _Resource_. Corresponds with the top-level keys of _Message Events_  that are processed by the broker for that _Resource_."
    )
    aggregates: List[Aggregate] | None = None
    grouping: Grouping
    resources: List[StrictStr]
    filter: TimeseriesFilter | None = None
    limit: Annotated[int, Field(strict=True, ge=1)] | None = None

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
        extra="ignore",
    )
