# 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 .params import Params


class Action(object):
    _types = {
        "action": str,
        "params": Params,
    }

    def __init__(self, d=None):
        self.action: Optional[str] = None
        self.params: Optional[Params] = None
        init(self, d, self._types)

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


class ActionBuilder(object):
    def __init__(self) -> None:
        self._action = Action()

    def action(self, action: str) -> "ActionBuilder":
        self._action.action = action
        return self

    def params(self, params: Params) -> "ActionBuilder":
        self._action.params = params
        return self

    def build(self) -> "Action":
        return self._action
