# 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 .bank_card_entity import BankCardEntity


class BankCard(object):
    _types = {
        "entities": List[BankCardEntity],
    }

    def __init__(self, d=None):
        self.entities: Optional[List[BankCardEntity]] = None
        init(self, d, self._types)

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


class BankCardBuilder(object):
    def __init__(self) -> None:
        self._bank_card = BankCard()

    def entities(self, entities: List[BankCardEntity]) -> "BankCardBuilder":
        self._bank_card.entities = entities
        return self

    def build(self) -> "BankCard":
        return self._bank_card
