# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .lump_sum_payment_detail_for_update import LumpSumPaymentDetailForUpdate


class LumpSumPaymentForUpdate(object):
    _types = {
        "id": str,
        "total_amount": str,
        "binding_period": int,
        "currency_id": str,
        "issuance_frequency": int,
        "remark": str,
        "reference_period_start_date": str,
        "reference_period_end_date": str,
        "details": List[LumpSumPaymentDetailForUpdate],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.total_amount: Optional[str] = None
        self.binding_period: Optional[int] = None
        self.currency_id: Optional[str] = None
        self.issuance_frequency: Optional[int] = None
        self.remark: Optional[str] = None
        self.reference_period_start_date: Optional[str] = None
        self.reference_period_end_date: Optional[str] = None
        self.details: Optional[List[LumpSumPaymentDetailForUpdate]] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "LumpSumPaymentForUpdateBuilder":
        return LumpSumPaymentForUpdateBuilder()


class LumpSumPaymentForUpdateBuilder(object):
    def __init__(self) -> None:
        self._lump_sum_payment_for_update = LumpSumPaymentForUpdate()

    def id(self, id: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.id = id
        return self

    def total_amount(self, total_amount: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.total_amount = total_amount
        return self

    def binding_period(self, binding_period: int) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.binding_period = binding_period
        return self

    def currency_id(self, currency_id: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.currency_id = currency_id
        return self

    def issuance_frequency(self, issuance_frequency: int) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.issuance_frequency = issuance_frequency
        return self

    def remark(self, remark: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.remark = remark
        return self

    def reference_period_start_date(self, reference_period_start_date: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.reference_period_start_date = reference_period_start_date
        return self

    def reference_period_end_date(self, reference_period_end_date: str) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.reference_period_end_date = reference_period_end_date
        return self

    def details(self, details: List[LumpSumPaymentDetailForUpdate]) -> "LumpSumPaymentForUpdateBuilder":
        self._lump_sum_payment_for_update.details = details
        return self

    def build(self) -> "LumpSumPaymentForUpdate":
        return self._lump_sum_payment_for_update
