# 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 Formula(object):
    _types = {
        "formula_id": int,
        "formula_name": str,
        "formula_details": str,
    }

    def __init__(self, d=None):
        self.formula_id: Optional[int] = None
        self.formula_name: Optional[str] = None
        self.formula_details: Optional[str] = None
        init(self, d, self._types)

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


class FormulaBuilder(object):
    def __init__(self) -> None:
        self._formula = Formula()

    def formula_id(self, formula_id: int) -> "FormulaBuilder":
        self._formula.formula_id = formula_id
        return self

    def formula_name(self, formula_name: str) -> "FormulaBuilder":
        self._formula.formula_name = formula_name
        return self

    def formula_details(self, formula_details: str) -> "FormulaBuilder":
        self._formula.formula_details = formula_details
        return self

    def build(self) -> "Formula":
        return self._formula
