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

from __future__ import annotations
from attio.errors import SDKError
from attio.models import delete_v2_notes_note_id_op as models_delete_v2_notes_note_id_op
from attio.types import BaseModel
from dataclasses import dataclass, field
import httpx
from typing import Optional


class DeleteV2NotesNoteIDNotFoundErrorData(BaseModel):
    status_code: float
    type: models_delete_v2_notes_note_id_op.DeleteV2NotesNoteIDType
    code: models_delete_v2_notes_note_id_op.DeleteV2NotesNoteIDCode
    message: str


@dataclass(unsafe_hash=True)
class DeleteV2NotesNoteIDNotFoundError(SDKError):
    r"""Not Found"""

    data: DeleteV2NotesNoteIDNotFoundErrorData = field(hash=False)

    def __init__(
        self,
        data: DeleteV2NotesNoteIDNotFoundErrorData,
        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)
