# 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 OpenDisplayFeedRule(object):
    _types = {
        "main_rule": str,
        "msg_types": List[str],
    }

    def __init__(self, d=None):
        self.main_rule: Optional[str] = None
        self.msg_types: Optional[List[str]] = None
        init(self, d, self._types)

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


class OpenDisplayFeedRuleBuilder(object):
    def __init__(self) -> None:
        self._open_display_feed_rule = OpenDisplayFeedRule()

    def main_rule(self, main_rule: str) -> "OpenDisplayFeedRuleBuilder":
        self._open_display_feed_rule.main_rule = main_rule
        return self

    def msg_types(self, msg_types: List[str]) -> "OpenDisplayFeedRuleBuilder":
        self._open_display_feed_rule.msg_types = msg_types
        return self

    def build(self) -> "OpenDisplayFeedRule":
        return self._open_display_feed_rule
