# This file was generated by liblab | https://liblab.com/

from typing import Union
from .utils.json_map import JsonMap
from .base import BaseModel
from .base import OneOfBaseModel


class AdjustmentToUpdateAmountGuard(OneOfBaseModel):
    class_list = {"str": str, "float": float}


AdjustmentToUpdateAmount = Union[str, float]


@JsonMap({})
class AdjustmentToUpdate(BaseModel):
    """Details of adjustment to update

    :param amount: Amount of adjustment., defaults to None
    :type amount: AdjustmentToUpdateAmount, optional
    :param title: Title of adjustment., defaults to None
    :type title: str, optional
    :param description: Description of adjustment., defaults to None
    :type description: str, optional
    :param file: File of adjustment., defaults to None
    :type file: str, optional
    """

    def __init__(
        self,
        amount: AdjustmentToUpdateAmount = None,
        title: str = None,
        description: str = None,
        file: str = None,
    ):
        if amount is not None:
            self.amount = AdjustmentToUpdateAmountGuard.return_one_of(amount)
        if title is not None:
            self.title = title
        if description is not None:
            self.description = description
        if file is not None:
            self.file = file
