"""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 ElencoAccessiGetPathParamInternalServerErrorData(BaseModel):
    title: Optional[str] = None

    detail: Optional[str] = None


class ElencoAccessiGetPathParamInternalServerError(AnncsuError):
    r"""Internal Server Error"""

    data: ElencoAccessiGetPathParamInternalServerErrorData

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


class ElencoAccessiGetPathParamUnprocessableEntityErrorData(BaseModel):
    title: Optional[str] = None

    detail: Optional[str] = None


class ElencoAccessiGetPathParamUnprocessableEntityError(AnncsuError):
    r"""Unprocessable Entity - error in json"""

    data: ElencoAccessiGetPathParamUnprocessableEntityErrorData

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


class ElencoAccessiGetPathParamMethodNotAllowedErrorData(BaseModel):
    title: Optional[str] = None

    detail: Optional[str] = None


class ElencoAccessiGetPathParamMethodNotAllowedError(AnncsuError):
    r"""Method Not Allowed"""

    data: ElencoAccessiGetPathParamMethodNotAllowedErrorData

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


class ElencoAccessiGetPathParamNotFoundErrorData(BaseModel):
    title: Optional[str] = None

    detail: Optional[str] = None


class ElencoAccessiGetPathParamNotFoundError(AnncsuError):
    r"""Not found"""

    data: ElencoAccessiGetPathParamNotFoundErrorData

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


class ElencoAccessiGetPathParamBadRequestErrorData(BaseModel):
    title: Optional[str] = None

    detail: Optional[str] = None


class ElencoAccessiGetPathParamBadRequestError(AnncsuError):
    r"""Bad Request"""

    data: ElencoAccessiGetPathParamBadRequestErrorData

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