# 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 MailFlowRuleInfo(object):
    _types = {
        "id": str,
        "name": str,
        "action_category": int,
    }

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

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


class MailFlowRuleInfoBuilder(object):
    def __init__(self) -> None:
        self._mail_flow_rule_info = MailFlowRuleInfo()

    def id(self, id: str) -> "MailFlowRuleInfoBuilder":
        self._mail_flow_rule_info.id = id
        return self

    def name(self, name: str) -> "MailFlowRuleInfoBuilder":
        self._mail_flow_rule_info.name = name
        return self

    def action_category(self, action_category: int) -> "MailFlowRuleInfoBuilder":
        self._mail_flow_rule_info.action_category = action_category
        return self

    def build(self) -> "MailFlowRuleInfo":
        return self._mail_flow_rule_info
