"""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 EmbeddingPresignVerifyEmbeddingPresignTokenRequestTypedDict(TypedDict):
    token: str


class EmbeddingPresignVerifyEmbeddingPresignTokenRequest(BaseModel):
    token: str


class EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerErrorIssueTypedDict(
    TypedDict
):
    message: str


class EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerErrorIssue(BaseModel):
    message: str


class EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[
        List[EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerErrorIssue]
    ] = None


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

    data: EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerErrorData = field(
        hash=False
    )

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


class EmbeddingPresignVerifyEmbeddingPresignTokenForbiddenIssue(BaseModel):
    message: str


class EmbeddingPresignVerifyEmbeddingPresignTokenForbiddenErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[
        List[EmbeddingPresignVerifyEmbeddingPresignTokenForbiddenIssue]
    ] = None


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

    data: EmbeddingPresignVerifyEmbeddingPresignTokenForbiddenErrorData = field(
        hash=False
    )

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


class EmbeddingPresignVerifyEmbeddingPresignTokenUnauthorizedIssue(BaseModel):
    message: str


class EmbeddingPresignVerifyEmbeddingPresignTokenUnauthorizedErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[
        List[EmbeddingPresignVerifyEmbeddingPresignTokenUnauthorizedIssue]
    ] = None


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

    data: EmbeddingPresignVerifyEmbeddingPresignTokenUnauthorizedErrorData = field(
        hash=False
    )

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


class EmbeddingPresignVerifyEmbeddingPresignTokenBadRequestIssue(BaseModel):
    message: str


class EmbeddingPresignVerifyEmbeddingPresignTokenBadRequestErrorData(BaseModel):
    message: str

    code: str

    issues: Optional[
        List[EmbeddingPresignVerifyEmbeddingPresignTokenBadRequestIssue]
    ] = None


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

    data: EmbeddingPresignVerifyEmbeddingPresignTokenBadRequestErrorData = field(
        hash=False
    )

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

    success: bool


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

    success: bool
