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

from __future__ import annotations
from opperai import utils
from opperai.types import BaseModel
from typing import Any, Optional


class NotFoundErrorData(BaseModel):
    detail: Any
    r"""The detail of the error"""

    type: Optional[str] = "NotFoundError"

    message: Optional[str] = "The resource was not found"


class NotFoundError(Exception):
    data: NotFoundErrorData

    def __init__(self, data: NotFoundErrorData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, NotFoundErrorData)
