# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class FormulaParam(object):
    _types = {
        "ref_type": int,
        "id": str,
    }

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

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


class FormulaParamBuilder(object):
    def __init__(self) -> None:
        self._formula_param = FormulaParam()

    def ref_type(self, ref_type: int) -> "FormulaParamBuilder":
        self._formula_param.ref_type = ref_type
        return self

    def id(self, id: str) -> "FormulaParamBuilder":
        self._formula_param.id = id
        return self

    def build(self) -> "FormulaParam":
        return self._formula_param
