"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Final, Optional



@dataclasses.dataclass
class FourHundredAndTwentyNineErrorHeaders(Exception):
    

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


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class FourHundredAndTwentyNineError(Exception):
    STATUS: Final[int] = dataclasses.field(default=429, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
    TYPE: Final[str] = dataclasses.field(default='https://docs.withorb.com/reference/error-responses#429-too-many-requests', metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    detail: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('detail') }})
    headers: Optional[FourHundredAndTwentyNineErrorHeaders] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('headers') }})
    title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }})
    

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