# 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 .my_ai_card_value import MyAiCardValue


class MyAiCardAction(object):
    _types = {
        "tag": str,
        "value": MyAiCardValue,
    }

    def __init__(self, d=None):
        self.tag: Optional[str] = None
        self.value: Optional[MyAiCardValue] = None
        init(self, d, self._types)

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


class MyAiCardActionBuilder(object):
    def __init__(self) -> None:
        self._my_ai_card_action = MyAiCardAction()

    def tag(self, tag: str) -> "MyAiCardActionBuilder":
        self._my_ai_card_action.tag = tag
        return self

    def value(self, value: MyAiCardValue) -> "MyAiCardActionBuilder":
        self._my_ai_card_action.value = value
        return self

    def build(self) -> "MyAiCardAction":
        return self._my_ai_card_action
