"""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
from typing import List, Optional
from typing_extensions import TypedDict


class DocumentAttachmentDeleteRequestTypedDict(TypedDict):
    id: str


class DocumentAttachmentDeleteRequest(BaseModel):
    id: str


class DocumentAttachmentDeleteInternalServerErrorIssueTypedDict(TypedDict):
    message: str


class DocumentAttachmentDeleteInternalServerErrorIssue(BaseModel):
    message: str


class DocumentAttachmentDeleteInternalServerErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentAttachmentDeleteInternalServerErrorIssue]] = None


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

    data: DocumentAttachmentDeleteInternalServerErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentAttachmentDeleteInternalServerErrorData,
        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 DocumentAttachmentDeleteForbiddenIssueTypedDict(TypedDict):
    message: str


class DocumentAttachmentDeleteForbiddenIssue(BaseModel):
    message: str


class DocumentAttachmentDeleteForbiddenErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentAttachmentDeleteForbiddenIssue]] = None


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

    data: DocumentAttachmentDeleteForbiddenErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentAttachmentDeleteForbiddenErrorData,
        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 DocumentAttachmentDeleteUnauthorizedIssueTypedDict(TypedDict):
    message: str


class DocumentAttachmentDeleteUnauthorizedIssue(BaseModel):
    message: str


class DocumentAttachmentDeleteUnauthorizedErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentAttachmentDeleteUnauthorizedIssue]] = None


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

    data: DocumentAttachmentDeleteUnauthorizedErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentAttachmentDeleteUnauthorizedErrorData,
        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 DocumentAttachmentDeleteBadRequestIssueTypedDict(TypedDict):
    message: str


class DocumentAttachmentDeleteBadRequestIssue(BaseModel):
    message: str


class DocumentAttachmentDeleteBadRequestErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[DocumentAttachmentDeleteBadRequestIssue]] = None


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

    data: DocumentAttachmentDeleteBadRequestErrorData = field(hash=False)

    def __init__(
        self,
        data: DocumentAttachmentDeleteBadRequestErrorData,
        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 DocumentAttachmentDeleteResponseTypedDict(TypedDict):
    r"""Successful response"""

    success: bool


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

    success: bool
