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

    detail: Optional[str] = None


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

    data: ElencoOdonimiPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoOdonimiPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoOdonimiPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoOdonimiPostNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoOdonimiPostBadRequestErrorData

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