# 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 .basic_user_info import BasicUserInfo


class ReferralBasicInfo(object):
    _types = {
        "id": str,
        "application_id": str,
        "referral_type": int,
        "user_info": BasicUserInfo,
        "create_time": str,
        "referral_method": int,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.application_id: Optional[str] = None
        self.referral_type: Optional[int] = None
        self.user_info: Optional[BasicUserInfo] = None
        self.create_time: Optional[str] = None
        self.referral_method: Optional[int] = None
        init(self, d, self._types)

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


class ReferralBasicInfoBuilder(object):
    def __init__(self) -> None:
        self._referral_basic_info = ReferralBasicInfo()

    def id(self, id: str) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.id = id
        return self

    def application_id(self, application_id: str) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.application_id = application_id
        return self

    def referral_type(self, referral_type: int) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.referral_type = referral_type
        return self

    def user_info(self, user_info: BasicUserInfo) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.user_info = user_info
        return self

    def create_time(self, create_time: str) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.create_time = create_time
        return self

    def referral_method(self, referral_method: int) -> "ReferralBasicInfoBuilder":
        self._referral_basic_info.referral_method = referral_method
        return self

    def build(self) -> "ReferralBasicInfo":
        return self._referral_basic_info
