"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .listresource_event_ import ListResourceEvent, ListResourceEventTypedDict
from polar_sdk.types import BaseModel
from polar_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from typing import Callable, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class MetersEventsRequestTypedDict(TypedDict):
    id: str
    r"""The meter ID."""
    page: NotRequired[int]
    r"""Page number, defaults to 1."""
    limit: NotRequired[int]
    r"""Size of a page, defaults to 10. Maximum is 100."""


class MetersEventsRequest(BaseModel):
    id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The meter ID."""

    page: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 1
    r"""Page number, defaults to 1."""

    limit: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 10
    r"""Size of a page, defaults to 10. Maximum is 100."""


class MetersEventsResponseTypedDict(TypedDict):
    result: ListResourceEventTypedDict


class MetersEventsResponse(BaseModel):
    next: Callable[[], Optional[MetersEventsResponse]]

    result: ListResourceEvent
