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

    detail: Optional[str] = None


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

    data: EsisteOdonimoPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteOdonimoPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteOdonimoPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: EsisteOdonimoPostBadRequestErrorData

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