# 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 .open_display_feed_rule import OpenDisplayFeedRule


class FeedCardDisplayRuleUpdater(object):
    _types = {
        "id": str,
        "display_feed_rule": OpenDisplayFeedRule,
        "display_feed_rule_update_type": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.display_feed_rule: Optional[OpenDisplayFeedRule] = None
        self.display_feed_rule_update_type: Optional[str] = None
        init(self, d, self._types)

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


class FeedCardDisplayRuleUpdaterBuilder(object):
    def __init__(self) -> None:
        self._feed_card_display_rule_updater = FeedCardDisplayRuleUpdater()

    def id(self, id: str) -> "FeedCardDisplayRuleUpdaterBuilder":
        self._feed_card_display_rule_updater.id = id
        return self

    def display_feed_rule(self, display_feed_rule: OpenDisplayFeedRule) -> "FeedCardDisplayRuleUpdaterBuilder":
        self._feed_card_display_rule_updater.display_feed_rule = display_feed_rule
        return self

    def display_feed_rule_update_type(self, display_feed_rule_update_type: str) -> "FeedCardDisplayRuleUpdaterBuilder":
        self._feed_card_display_rule_updater.display_feed_rule_update_type = display_feed_rule_update_type
        return self

    def build(self) -> "FeedCardDisplayRuleUpdater":
        return self._feed_card_display_rule_updater
