# 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 UserInfo(object):
    _types = {
        "type": str,
        "owner_user_id": str,
        "public_mailbox_id": str,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.owner_user_id: Optional[str] = None
        self.public_mailbox_id: Optional[str] = None
        init(self, d, self._types)

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


class UserInfoBuilder(object):
    def __init__(self) -> None:
        self._user_info = UserInfo()

    def type(self, type: str) -> "UserInfoBuilder":
        self._user_info.type = type
        return self

    def owner_user_id(self, owner_user_id: str) -> "UserInfoBuilder":
        self._user_info.owner_user_id = owner_user_id
        return self

    def public_mailbox_id(self, public_mailbox_id: str) -> "UserInfoBuilder":
        self._user_info.public_mailbox_id = public_mailbox_id
        return self

    def build(self) -> "UserInfo":
        return self._user_info
