# 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 .object_field_data import ObjectFieldData


class BankAccountForUpdate(object):
    _types = {
        "bank_name": str,
        "branch_name": str,
        "bank_account_number": str,
        "account_holder": str,
        "country_region_id": str,
        "bank_account_usages": List[str],
        "bank_account_type": str,
        "custom_fields": List[ObjectFieldData],
    }

    def __init__(self, d=None):
        self.bank_name: Optional[str] = None
        self.branch_name: Optional[str] = None
        self.bank_account_number: Optional[str] = None
        self.account_holder: Optional[str] = None
        self.country_region_id: Optional[str] = None
        self.bank_account_usages: Optional[List[str]] = None
        self.bank_account_type: Optional[str] = None
        self.custom_fields: Optional[List[ObjectFieldData]] = None
        init(self, d, self._types)

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


class BankAccountForUpdateBuilder(object):
    def __init__(self) -> None:
        self._bank_account_for_update = BankAccountForUpdate()

    def bank_name(self, bank_name: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.bank_name = bank_name
        return self

    def branch_name(self, branch_name: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.branch_name = branch_name
        return self

    def bank_account_number(self, bank_account_number: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.bank_account_number = bank_account_number
        return self

    def account_holder(self, account_holder: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.account_holder = account_holder
        return self

    def country_region_id(self, country_region_id: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.country_region_id = country_region_id
        return self

    def bank_account_usages(self, bank_account_usages: List[str]) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.bank_account_usages = bank_account_usages
        return self

    def bank_account_type(self, bank_account_type: str) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.bank_account_type = bank_account_type
        return self

    def custom_fields(self, custom_fields: List[ObjectFieldData]) -> "BankAccountForUpdateBuilder":
        self._bank_account_for_update.custom_fields = custom_fields
        return self

    def build(self) -> "BankAccountForUpdate":
        return self._bank_account_for_update
