# Code generated by Lark OpenAPI.

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


class VerifFilterRule(object):
    _types = {
        "filter_conditions": List[VerifFilterCondition],
        "filter_relationship": str,
    }

    def __init__(self, d=None):
        self.filter_conditions: Optional[List[VerifFilterCondition]] = None
        self.filter_relationship: Optional[str] = None
        init(self, d, self._types)

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


class VerifFilterRuleBuilder(object):
    def __init__(self) -> None:
        self._verif_filter_rule = VerifFilterRule()

    def filter_conditions(self, filter_conditions: List[VerifFilterCondition]) -> "VerifFilterRuleBuilder":
        self._verif_filter_rule.filter_conditions = filter_conditions
        return self

    def filter_relationship(self, filter_relationship: str) -> "VerifFilterRuleBuilder":
        self._verif_filter_rule.filter_relationship = filter_relationship
        return self

    def build(self) -> "VerifFilterRule":
        return self._verif_filter_rule
