# 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 .specific_relationship import SpecificRelationship


class ReferralRecommendInfo(object):
    _types = {
        "relationship": int,
        "familiarity": int,
        "comment": str,
        "specific_relationship": SpecificRelationship,
        "work_ability_familiarity": int,
        "match_degree": int,
    }

    def __init__(self, d=None):
        self.relationship: Optional[int] = None
        self.familiarity: Optional[int] = None
        self.comment: Optional[str] = None
        self.specific_relationship: Optional[SpecificRelationship] = None
        self.work_ability_familiarity: Optional[int] = None
        self.match_degree: Optional[int] = None
        init(self, d, self._types)

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


class ReferralRecommendInfoBuilder(object):
    def __init__(self) -> None:
        self._referral_recommend_info = ReferralRecommendInfo()

    def relationship(self, relationship: int) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.relationship = relationship
        return self

    def familiarity(self, familiarity: int) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.familiarity = familiarity
        return self

    def comment(self, comment: str) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.comment = comment
        return self

    def specific_relationship(self, specific_relationship: SpecificRelationship) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.specific_relationship = specific_relationship
        return self

    def work_ability_familiarity(self, work_ability_familiarity: int) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.work_ability_familiarity = work_ability_familiarity
        return self

    def match_degree(self, match_degree: int) -> "ReferralRecommendInfoBuilder":
        self._referral_recommend_info.match_degree = match_degree
        return self

    def build(self) -> "ReferralRecommendInfo":
        return self._referral_recommend_info
