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

from __future__ import annotations
import dataclasses
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from orb import utils
from typing import Optional, Union



@dataclasses.dataclass
class AddAmendmentCreditLedgerEntryRequestParamsAmount:
    pass

class AddAmendmentCreditLedgerEntryRequestParamsEntryType(str, Enum):
    AMENDMENT = 'amendment'



@dataclasses.dataclass
class AddAmendmentCreditLedgerEntryRequestParamsMetadata:
    r"""User-specified key/value pairs for the ledger entry resource."""
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class AddAmendmentCreditLedgerEntryRequestParams:
    amount: Union[float, str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
    r"""The number of credits to effect. Note that this is required for increment, decrement or void operations."""
    block_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('block_id') }})
    r"""The ID of the block to reverse a decrement from."""
    entry_type: AddAmendmentCreditLedgerEntryRequestParamsEntryType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entry_type') }})
    description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description') }})
    r"""Optional metadata that can be specified when adding ledger results via the API. For example, this can be used to note an increment refers to trial credits, or for noting corrections as a result of an incident, etc."""
    metadata: Optional[AddAmendmentCreditLedgerEntryRequestParamsMetadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }})
    r"""User-specified key/value pairs for the ledger entry resource."""
    

