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

from __future__ import annotations
from typing import Optional
from unstructured_client import utils
from unstructured_client.types import BaseModel


class ServerErrorData(BaseModel):
    detail: Optional[str] = None


class ServerError(Exception):
    data: ServerErrorData

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

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