# 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 import FeedGroupRule


class FeedGroupRules(object):
    _types = {
        "rules": List[FeedGroupRule],
    }

    def __init__(self, d=None):
        self.rules: Optional[List[FeedGroupRule]] = None
        init(self, d, self._types)

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


class FeedGroupRulesBuilder(object):
    def __init__(self) -> None:
        self._feed_group_rules = FeedGroupRules()

    def rules(self, rules: List[FeedGroupRule]) -> "FeedGroupRulesBuilder":
        self._feed_group_rules.rules = rules
        return self

    def build(self) -> "FeedGroupRules":
        return self._feed_group_rules
