"""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 FolderDeleteFolderRequestTypedDict(TypedDict):
    folder_id: str


class FolderDeleteFolderRequest(BaseModel):
    folder_id: Annotated[str, pydantic.Field(alias="folderId")]


class FolderDeleteFolderInternalServerErrorIssueTypedDict(TypedDict):
    message: str


class FolderDeleteFolderInternalServerErrorIssue(BaseModel):
    message: str


class FolderDeleteFolderInternalServerErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[FolderDeleteFolderInternalServerErrorIssue]] = None


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

    data: FolderDeleteFolderInternalServerErrorData = field(hash=False)

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


class FolderDeleteFolderForbiddenIssue(BaseModel):
    message: str


class FolderDeleteFolderForbiddenErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[FolderDeleteFolderForbiddenIssue]] = None


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

    data: FolderDeleteFolderForbiddenErrorData = field(hash=False)

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


class FolderDeleteFolderUnauthorizedIssue(BaseModel):
    message: str


class FolderDeleteFolderUnauthorizedErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[FolderDeleteFolderUnauthorizedIssue]] = None


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

    data: FolderDeleteFolderUnauthorizedErrorData = field(hash=False)

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


class FolderDeleteFolderBadRequestIssue(BaseModel):
    message: str


class FolderDeleteFolderBadRequestErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[List[FolderDeleteFolderBadRequestIssue]] = None


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

    data: FolderDeleteFolderBadRequestErrorData = field(hash=False)

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

    success: bool


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

    success: bool
