# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class BoolRuleValue(object):
    _types = {
        "type": str,
        "number": str,
        "text": str,
        "time_period": str,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.number: Optional[str] = None
        self.text: Optional[str] = None
        self.time_period: Optional[str] = None
        init(self, d, self._types)

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


class BoolRuleValueBuilder(object):
    def __init__(self) -> None:
        self._bool_rule_value = BoolRuleValue()

    def type(self, type: str) -> "BoolRuleValueBuilder":
        self._bool_rule_value.type = type
        return self

    def number(self, number: str) -> "BoolRuleValueBuilder":
        self._bool_rule_value.number = number
        return self

    def text(self, text: str) -> "BoolRuleValueBuilder":
        self._bool_rule_value.text = text
        return self

    def time_period(self, time_period: str) -> "BoolRuleValueBuilder":
        self._bool_rule_value.time_period = time_period
        return self

    def build(self) -> "BoolRuleValue":
        return self._bool_rule_value
