# 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 .referral_basic_info import ReferralBasicInfo
from .referral_recommend_info import ReferralRecommendInfo


class ReferralInfoV2(object):
    _types = {
        "basic_info": ReferralBasicInfo,
        "recommend_info": ReferralRecommendInfo,
    }

    def __init__(self, d=None):
        self.basic_info: Optional[ReferralBasicInfo] = None
        self.recommend_info: Optional[ReferralRecommendInfo] = None
        init(self, d, self._types)

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


class ReferralInfoV2Builder(object):
    def __init__(self) -> None:
        self._referral_info_v2 = ReferralInfoV2()

    def basic_info(self, basic_info: ReferralBasicInfo) -> "ReferralInfoV2Builder":
        self._referral_info_v2.basic_info = basic_info
        return self

    def recommend_info(self, recommend_info: ReferralRecommendInfo) -> "ReferralInfoV2Builder":
        self._referral_info_v2.recommend_info = recommend_info
        return self

    def build(self) -> "ReferralInfoV2":
        return self._referral_info_v2
