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

    detail: Optional[str] = None


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

    data: EsisteAccessoPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteAccessoPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteAccessoPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteAccessoPostBadRequestErrorData

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