# 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 .rule import Rule


class CreateUserMailboxRuleResponseBody(object):
    _types = {
        "rule": Rule,
    }

    def __init__(self, d=None):
        self.rule: Optional[Rule] = None
        init(self, d, self._types)

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


class CreateUserMailboxRuleResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._create_user_mailbox_rule_response_body = CreateUserMailboxRuleResponseBody()

    def rule(self, rule: Rule) -> "CreateUserMailboxRuleResponseBodyBuilder":
        self._create_user_mailbox_rule_response_body.rule = rule
        return self

    def build(self) -> "CreateUserMailboxRuleResponseBody":
        return self._create_user_mailbox_rule_response_body
