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

    detail: Optional[str] = None


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

    data: ElencoAccessiGetQueryParamInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoAccessiGetQueryParamUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoAccessiGetQueryParamMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoAccessiGetQueryParamNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoAccessiGetQueryParamBadRequestErrorData

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