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

from __future__ import annotations
import pydantic
from typing_extensions import Annotated, TypedDict
from unkey.py.types import BaseModel


class RatelimitResponseTypedDict(TypedDict):
    id: str
    r"""Unique identifier for this rate limit configuration."""
    name: str
    r"""Human-readable name for this rate limit."""
    limit: int
    r"""Maximum requests allowed within the time window."""
    duration: int
    r"""Rate limit window duration in milliseconds."""
    auto_apply: bool
    r"""Whether this rate limit was automatically applied when verifying the key."""


class RatelimitResponse(BaseModel):
    id: str
    r"""Unique identifier for this rate limit configuration."""

    name: str
    r"""Human-readable name for this rate limit."""

    limit: int
    r"""Maximum requests allowed within the time window."""

    duration: int
    r"""Rate limit window duration in milliseconds."""

    auto_apply: Annotated[bool, pydantic.Field(alias="autoApply")]
    r"""Whether this rate limit was automatically applied when verifying the key."""
