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

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



@dataclasses.dataclass
class ValidationErrorsValidationErrors(Exception):
    

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


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class ValidationErrors(Exception):
    idempotency_key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('idempotency_key'), 'exclude': lambda f: f is None }})
    r"""The passed idempotency_key corresponding to the validation_errors"""
    validation_errors: Optional[list[ValidationErrorsValidationErrors]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('validation_errors'), 'exclude': lambda f: f is None }})
    r"""An array of objects corresponding to validation failures for each idempotency_key."""
    

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