"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from outpost_sdk import utils
from outpost_sdk.types import BaseModel
import pydantic
from typing import Any, Dict, Optional
from typing_extensions import Annotated


class BadRequestErrorData(BaseModel):
    message: Optional[str] = None

    additional_properties: Annotated[
        Optional[Dict[str, Any]], pydantic.Field(exclude=True)
    ] = None


class BadRequestError(Exception):
    r"""A collection of codes that generally means the end user got something wrong in making the request"""

    data: BadRequestErrorData

    def __init__(self, data: BadRequestErrorData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, BadRequestErrorData)
