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

    detail: Optional[str] = None


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

    data: ElencoodonimiprogPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoodonimiprogPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoodonimiprogPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoodonimiprogPostNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoodonimiprogPostBadRequestErrorData

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