# 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 lark_oapi.event.context import EventContext
from .subscriber import Subscriber


class P2MailUserMailboxEventMessageReceivedV1Data(object):
    _types = {
        "mail_address": str,
        "message_id": str,
        "mailbox_type": int,
        "subscriber": Subscriber,
    }

    def __init__(self, d=None):
        self.mail_address: Optional[str] = None
        self.message_id: Optional[str] = None
        self.mailbox_type: Optional[int] = None
        self.subscriber: Optional[Subscriber] = None
        init(self, d, self._types)


class P2MailUserMailboxEventMessageReceivedV1(EventContext):
    _types = {
        "event": P2MailUserMailboxEventMessageReceivedV1Data
    }

    def __init__(self, d=None):
        super().__init__(d)
        self._types.update(super()._types)
        self.event: Optional[P2MailUserMailboxEventMessageReceivedV1Data] = None
        init(self, d, self._types)
