# 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 UserMailEntity(object):
    _types = {
        "type": int,
        "email_address": str,
        "entity_id": str,
        "user_id": str,
    }

    def __init__(self, d=None):
        self.type: Optional[int] = None
        self.email_address: Optional[str] = None
        self.entity_id: Optional[str] = None
        self.user_id: Optional[str] = None
        init(self, d, self._types)

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


class UserMailEntityBuilder(object):
    def __init__(self) -> None:
        self._user_mail_entity = UserMailEntity()

    def type(self, type: int) -> "UserMailEntityBuilder":
        self._user_mail_entity.type = type
        return self

    def email_address(self, email_address: str) -> "UserMailEntityBuilder":
        self._user_mail_entity.email_address = email_address
        return self

    def entity_id(self, entity_id: str) -> "UserMailEntityBuilder":
        self._user_mail_entity.entity_id = entity_id
        return self

    def user_id(self, user_id: str) -> "UserMailEntityBuilder":
        self._user_mail_entity.user_id = user_id
        return self

    def build(self) -> "UserMailEntity":
        return self._user_mail_entity
