# 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 MatchRule(object):
    _types = {
        "left_value": str,
        "operator": str,
        "right_values": List[str],
    }

    def __init__(self, d=None):
        self.left_value: Optional[str] = None
        self.operator: Optional[str] = None
        self.right_values: Optional[List[str]] = None
        init(self, d, self._types)

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


class MatchRuleBuilder(object):
    def __init__(self) -> None:
        self._match_rule = MatchRule()

    def left_value(self, left_value: str) -> "MatchRuleBuilder":
        self._match_rule.left_value = left_value
        return self

    def operator(self, operator: str) -> "MatchRuleBuilder":
        self._match_rule.operator = operator
        return self

    def right_values(self, right_values: List[str]) -> "MatchRuleBuilder":
        self._match_rule.right_values = right_values
        return self

    def build(self) -> "MatchRule":
        return self._match_rule
