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

from __future__ import annotations
from enum import Enum
import pydantic
from typing_extensions import Annotated, TypedDict
from unkey_py import utils
from unkey_py.types import BaseModel


class ErrDeleteProtectedCode(str, Enum):
    r"""A machine readable error code."""

    DELETE_PROTECTED = "DELETE_PROTECTED"


class ErrDeleteProtectedErrorTypedDict(TypedDict):
    code: ErrDeleteProtectedCode
    r"""A machine readable error code."""
    docs: str
    r"""A link to our documentation with more details about this error code"""
    message: str
    r"""A human readable explanation of what went wrong"""
    request_id: str
    r"""Please always include the requestId in your error report"""


class ErrDeleteProtectedError(BaseModel):
    code: ErrDeleteProtectedCode
    r"""A machine readable error code."""

    docs: str
    r"""A link to our documentation with more details about this error code"""

    message: str
    r"""A human readable explanation of what went wrong"""

    request_id: Annotated[str, pydantic.Field(alias="requestId")]
    r"""Please always include the requestId in your error report"""


class ErrDeleteProtectedData(BaseModel):
    error: ErrDeleteProtectedError


class ErrDeleteProtected(Exception):
    data: ErrDeleteProtectedData

    def __init__(self, data: ErrDeleteProtectedData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, ErrDeleteProtectedData)
