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

    detail: Optional[str] = None


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

    data: PrognazareaPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazareaPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazareaPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazareaPostNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazareaPostBadRequestErrorData

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