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

    detail: Optional[str] = None


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

    data: ElencoaccessiprogPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoaccessiprogPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoaccessiprogPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoaccessiprogPostNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: ElencoaccessiprogPostBadRequestErrorData

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