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

    detail: Optional[str] = None


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

    data: PrognazaccPostInternalServerErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazaccPostUnprocessableEntityErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazaccPostMethodNotAllowedErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazaccPostNotFoundErrorData

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


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

    detail: Optional[str] = None


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

    data: PrognazaccPostBadRequestErrorData

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