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

from __future__ import annotations
from anncsu.common.errors import AnncsuBaseError as AnncsuError
from anncsu.common.types import BaseModel
import httpx
from typing import Optional


class ServiceUnavailableErrorData(BaseModel):
    status: Optional[str] = None


class ServiceUnavailableError(AnncsuError):
    r"""Il server non è disponibile."""

    data: ServiceUnavailableErrorData

    def __init__(
        self,
        data: ServiceUnavailableErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        message = body or raw_response.text
        super().__init__(message, raw_response, body)
        self.data = data
