# 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 .feed_group_rule_cond_item import FeedGroupRuleCondItem


class FeedGroupRuleCond(object):
    _types = {
        "match_type": str,
        "condition_items": List[FeedGroupRuleCondItem],
    }

    def __init__(self, d=None):
        self.match_type: Optional[str] = None
        self.condition_items: Optional[List[FeedGroupRuleCondItem]] = None
        init(self, d, self._types)

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


class FeedGroupRuleCondBuilder(object):
    def __init__(self) -> None:
        self._feed_group_rule_cond = FeedGroupRuleCond()

    def match_type(self, match_type: str) -> "FeedGroupRuleCondBuilder":
        self._feed_group_rule_cond.match_type = match_type
        return self

    def condition_items(self, condition_items: List[FeedGroupRuleCondItem]) -> "FeedGroupRuleCondBuilder":
        self._feed_group_rule_cond.condition_items = condition_items
        return self

    def build(self) -> "FeedGroupRuleCond":
        return self._feed_group_rule_cond
