# 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 FeedCardDisplayRuleFailedItem(object):
    _types = {
        "id": str,
        "error_code": int,
        "error_message": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.error_code: Optional[int] = None
        self.error_message: Optional[str] = None
        init(self, d, self._types)

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


class FeedCardDisplayRuleFailedItemBuilder(object):
    def __init__(self) -> None:
        self._feed_card_display_rule_failed_item = FeedCardDisplayRuleFailedItem()

    def id(self, id: str) -> "FeedCardDisplayRuleFailedItemBuilder":
        self._feed_card_display_rule_failed_item.id = id
        return self

    def error_code(self, error_code: int) -> "FeedCardDisplayRuleFailedItemBuilder":
        self._feed_card_display_rule_failed_item.error_code = error_code
        return self

    def error_message(self, error_message: str) -> "FeedCardDisplayRuleFailedItemBuilder":
        self._feed_card_display_rule_failed_item.error_message = error_message
        return self

    def build(self) -> "FeedCardDisplayRuleFailedItem":
        return self._feed_card_display_rule_failed_item
