# 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 .i18n import I18n


class AccountReferrer(object):
    _types = {
        "id": str,
        "name": I18n,
        "email": str,
        "mobile": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.email: Optional[str] = None
        self.mobile: Optional[str] = None
        init(self, d, self._types)

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


class AccountReferrerBuilder(object):
    def __init__(self) -> None:
        self._account_referrer = AccountReferrer()

    def id(self, id: str) -> "AccountReferrerBuilder":
        self._account_referrer.id = id
        return self

    def name(self, name: I18n) -> "AccountReferrerBuilder":
        self._account_referrer.name = name
        return self

    def email(self, email: str) -> "AccountReferrerBuilder":
        self._account_referrer.email = email
        return self

    def mobile(self, mobile: str) -> "AccountReferrerBuilder":
        self._account_referrer.mobile = mobile
        return self

    def build(self) -> "AccountReferrer":
        return self._account_referrer
