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

from __future__ import annotations
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
from unkey_py.types import BaseModel


class DeleteOverrideRequestBodyTypedDict(TypedDict):
    identifier: str
    r"""Identifier of your user, this can be their userId, an email, an ip or anything else. Wildcards ( * ) can be used to match multiple identifiers, More info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules"""
    namespace_id: NotRequired[str]
    r"""The id of the namespace. Either namespaceId or namespaceName must be provided"""
    namespace_name: NotRequired[str]
    r"""The name of the namespace. Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes."""


class DeleteOverrideRequestBody(BaseModel):
    identifier: str
    r"""Identifier of your user, this can be their userId, an email, an ip or anything else. Wildcards ( * ) can be used to match multiple identifiers, More info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules"""

    namespace_id: Annotated[Optional[str], pydantic.Field(alias="namespaceId")] = None
    r"""The id of the namespace. Either namespaceId or namespaceName must be provided"""

    namespace_name: Annotated[Optional[str], pydantic.Field(alias="namespaceName")] = (
        None
    )
    r"""The name of the namespace. Namespaces group different limits together for better analytics. You might have a namespace for your public API and one for internal tRPC routes."""


class DeleteOverrideResponseBodyTypedDict(TypedDict):
    r"""Successfully deleted a ratelimit override"""


class DeleteOverrideResponseBody(BaseModel):
    r"""Successfully deleted a ratelimit override"""


class DeleteOverrideResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    object: NotRequired[DeleteOverrideResponseBodyTypedDict]
    r"""Successfully deleted a ratelimit override"""


class DeleteOverrideResponse(BaseModel):
    http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None

    object: Optional[DeleteOverrideResponseBody] = None
    r"""Successfully deleted a ratelimit override"""
