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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .identifier_value import IdentifierValue, IdentifierValueGuard
from .invoice_adjustment_status_enum import InvoiceAdjustmentStatusEnum


@JsonMap({"id_": "id"})
class InvoiceAdjustmentCreated(BaseModel):
    """Details of invoice adjustment created.

    :param created: created
    :type created: bool
    :param id_: id_, defaults to None
    :type id_: IdentifierValue, optional
    :param status: status of invoice adjustment, defaults to None
    :type status: InvoiceAdjustmentStatusEnum, optional
    :param created_at: Long date-time format following ISO-8601, defaults to None
    :type created_at: str, optional
    """

    def __init__(
        self,
        created: bool,
        id_: IdentifierValue = None,
        status: InvoiceAdjustmentStatusEnum = None,
        created_at: str = None,
    ):
        self.created = created
        if id_ is not None:
            self.id_ = IdentifierValueGuard.return_one_of(id_)
        if status is not None:
            self.status = self._enum_matching(
                status, InvoiceAdjustmentStatusEnum.list(), "status"
            )
        if created_at is not None:
            self.created_at = created_at
