# 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,
    StrictStr,
)
from typing_extensions import (
    Annotated,  # >=3.11
)
from waylay.sdk.api._models import BaseModel as WaylayBaseModel

from ..models.message_query_from import MessageQueryFrom
from ..models.message_query_until import MessageQueryUntil
from ..models.message_query_window import MessageQueryWindow


class MessageQuery(WaylayBaseModel):
    """MessageQuery."""

    resources: Annotated[List[StrictStr], Field(min_length=1)] = Field(
        description="The list of resources to retrieve the messages for"
    )
    limit: Annotated[int, Field(strict=True, ge=1)] = Field(
        description="The number of messages per resource to retrieve"
    )
    var_from: MessageQueryFrom | None = Field(default=None, alias="from")
    until: MessageQueryUntil | None = None
    window: MessageQueryWindow | None = None

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