# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class RuleActionItem(object):
    _types = {
        "type": int,
        "input": str,
    }

    def __init__(self, d=None):
        self.type: Optional[int] = None
        self.input: Optional[str] = None
        init(self, d, self._types)

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


class RuleActionItemBuilder(object):
    def __init__(self) -> None:
        self._rule_action_item = RuleActionItem()

    def type(self, type: int) -> "RuleActionItemBuilder":
        self._rule_action_item.type = type
        return self

    def input(self, input: str) -> "RuleActionItemBuilder":
        self._rule_action_item.input = input
        return self

    def build(self) -> "RuleActionItem":
        return self._rule_action_item
