"""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 DeleteKeyRequestBodyTypedDict(TypedDict):
    key_id: str
    r"""The id of the key to revoke"""
    permanent: NotRequired[bool]
    r"""By default Unkey soft deletes keys, so they may be recovered later. If you want to permanently delete it, set permanent=true. This might be necessary if you run into CONFLICT errors during key migration."""


class DeleteKeyRequestBody(BaseModel):
    key_id: Annotated[str, pydantic.Field(alias="keyId")]
    r"""The id of the key to revoke"""

    permanent: Optional[bool] = False
    r"""By default Unkey soft deletes keys, so they may be recovered later. If you want to permanently delete it, set permanent=true. This might be necessary if you run into CONFLICT errors during key migration."""


class DeleteKeyResponseBodyTypedDict(TypedDict):
    r"""The key was successfully revoked, it may take up to 30s for this to take effect in all regions"""


class DeleteKeyResponseBody(BaseModel):
    r"""The key was successfully revoked, it may take up to 30s for this to take effect in all regions"""


class DeleteKeyResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    object: NotRequired[DeleteKeyResponseBodyTypedDict]
    r"""The key was successfully revoked, it may take up to 30s for this to take effect in all regions"""


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

    object: Optional[DeleteKeyResponseBody] = None
    r"""The key was successfully revoked, it may take up to 30s for this to take effect in all regions"""
