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

from __future__ import annotations
from dataclasses import dataclass, field
from documenso_sdk.models import DocumensoError
from documenso_sdk.types import BaseModel
import httpx
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, TypedDict


class DocumentDeleteRequestTypedDict(TypedDict):
    document_id: float


class DocumentDeleteRequest(BaseModel):
    document_id: Annotated[float, pydantic.Field(alias="documentId")]


class DocumentDeleteInternalServerErrorIssueTypedDict(TypedDict):
    message: str


class DocumentDeleteInternalServerErrorIssue(BaseModel):
    message: str


class DocumentDeleteInternalServerErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentDeleteInternalServerErrorIssue]] = None


@dataclass(unsafe_hash=True)
class DocumentDeleteInternalServerError(DocumensoError):
    r"""Internal server error"""

    data: DocumentDeleteInternalServerErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentDeleteInternalServerErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        fallback = body or raw_response.text
        message = str(data.message) or fallback
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)


class DocumentDeleteForbiddenIssueTypedDict(TypedDict):
    message: str


class DocumentDeleteForbiddenIssue(BaseModel):
    message: str


class DocumentDeleteForbiddenErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentDeleteForbiddenIssue]] = None


@dataclass(unsafe_hash=True)
class DocumentDeleteForbiddenError(DocumensoError):
    r"""Insufficient access"""

    data: DocumentDeleteForbiddenErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentDeleteForbiddenErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        fallback = body or raw_response.text
        message = str(data.message) or fallback
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)


class DocumentDeleteUnauthorizedIssueTypedDict(TypedDict):
    message: str


class DocumentDeleteUnauthorizedIssue(BaseModel):
    message: str


class DocumentDeleteUnauthorizedErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentDeleteUnauthorizedIssue]] = None


@dataclass(unsafe_hash=True)
class DocumentDeleteUnauthorizedError(DocumensoError):
    r"""Authorization not provided"""

    data: DocumentDeleteUnauthorizedErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentDeleteUnauthorizedErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        fallback = body or raw_response.text
        message = str(data.message) or fallback
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)


class DocumentDeleteBadRequestIssueTypedDict(TypedDict):
    message: str


class DocumentDeleteBadRequestIssue(BaseModel):
    message: str


class DocumentDeleteBadRequestErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentDeleteBadRequestIssue]] = None


@dataclass(unsafe_hash=True)
class DocumentDeleteBadRequestError(DocumensoError):
    r"""Invalid input data"""

    data: DocumentDeleteBadRequestErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentDeleteBadRequestErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        fallback = body or raw_response.text
        message = str(data.message) or fallback
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)


class DocumentDeleteResponseTypedDict(TypedDict):
    r"""Successful response"""

    success: bool


class DocumentDeleteResponse(BaseModel):
    r"""Successful response"""

    success: bool
