# 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 .person_name import PersonName
from .enum import Enum
from .nationality import Nationality
from .citizenship_status import CitizenshipStatus
from .enum import Enum
from .enum import Enum
from .phone import Phone
from .address import Address
from .email import Email
from .work_experience_info import WorkExperienceInfo
from .education import Education
from .bank_account import BankAccount
from .national_id import NationalId
from .dependent import Dependent
from .emergency_contact import EmergencyContact
from .education import Education
from .education import Education
from .personal_profile import PersonalProfile
from .enum import Enum
from .enum import Enum
from .custom_field_data import CustomFieldData
from .resident_tax import ResidentTax
from .enum import Enum


class PersonInfoBt(object):
    _types = {
        "person_id": str,
        "phone_number": str,
        "legal_name": str,
        "additional_name": str,
        "preferred_name": str,
        "preferred_local_full_name": str,
        "preferred_english_full_name": str,
        "name_list": List[PersonName],
        "gender": Enum,
        "date_of_birth": str,
        "nationality_id": str,
        "nationality_id_v2": str,
        "additional_nationalities": List[Nationality],
        "citizenship_status": List[CitizenshipStatus],
        "race": Enum,
        "marital_status": Enum,
        "phone_list": List[Phone],
        "address_list": List[Address],
        "email_list": List[Email],
        "work_experience_list": List[WorkExperienceInfo],
        "education_list": List[Education],
        "bank_account_list": List[BankAccount],
        "national_id_list": List[NationalId],
        "dependent_list": List[Dependent],
        "emergency_contact_list": List[EmergencyContact],
        "date_entered_workforce": str,
        "working_years": int,
        "profile_image_id": str,
        "email_address": str,
        "age": int,
        "highest_level_of_education": Education,
        "highest_degree_of_education": Education,
        "personal_profile": List[PersonalProfile],
        "native_region": str,
        "hukou_type": Enum,
        "hukou_location": str,
        "political_affiliations": List[Enum],
        "talent_id": str,
        "custom_fields": List[CustomFieldData],
        "national_id_number": str,
        "family_address": str,
        "born_country_region": str,
        "is_disabled": bool,
        "disable_card_number": str,
        "is_martyr_family": bool,
        "martyr_card_number": str,
        "is_old_alone": bool,
        "resident_taxes": List[ResidentTax],
        "first_entry_time": str,
        "leave_time": str,
        "religion": Enum,
        "working_years_v2": float,
    }

    def __init__(self, d=None):
        self.person_id: Optional[str] = None
        self.phone_number: Optional[str] = None
        self.legal_name: Optional[str] = None
        self.additional_name: Optional[str] = None
        self.preferred_name: Optional[str] = None
        self.preferred_local_full_name: Optional[str] = None
        self.preferred_english_full_name: Optional[str] = None
        self.name_list: Optional[List[PersonName]] = None
        self.gender: Optional[Enum] = None
        self.date_of_birth: Optional[str] = None
        self.nationality_id: Optional[str] = None
        self.nationality_id_v2: Optional[str] = None
        self.additional_nationalities: Optional[List[Nationality]] = None
        self.citizenship_status: Optional[List[CitizenshipStatus]] = None
        self.race: Optional[Enum] = None
        self.marital_status: Optional[Enum] = None
        self.phone_list: Optional[List[Phone]] = None
        self.address_list: Optional[List[Address]] = None
        self.email_list: Optional[List[Email]] = None
        self.work_experience_list: Optional[List[WorkExperienceInfo]] = None
        self.education_list: Optional[List[Education]] = None
        self.bank_account_list: Optional[List[BankAccount]] = None
        self.national_id_list: Optional[List[NationalId]] = None
        self.dependent_list: Optional[List[Dependent]] = None
        self.emergency_contact_list: Optional[List[EmergencyContact]] = None
        self.date_entered_workforce: Optional[str] = None
        self.working_years: Optional[int] = None
        self.profile_image_id: Optional[str] = None
        self.email_address: Optional[str] = None
        self.age: Optional[int] = None
        self.highest_level_of_education: Optional[Education] = None
        self.highest_degree_of_education: Optional[Education] = None
        self.personal_profile: Optional[List[PersonalProfile]] = None
        self.native_region: Optional[str] = None
        self.hukou_type: Optional[Enum] = None
        self.hukou_location: Optional[str] = None
        self.political_affiliations: Optional[List[Enum]] = None
        self.talent_id: Optional[str] = None
        self.custom_fields: Optional[List[CustomFieldData]] = None
        self.national_id_number: Optional[str] = None
        self.family_address: Optional[str] = None
        self.born_country_region: Optional[str] = None
        self.is_disabled: Optional[bool] = None
        self.disable_card_number: Optional[str] = None
        self.is_martyr_family: Optional[bool] = None
        self.martyr_card_number: Optional[str] = None
        self.is_old_alone: Optional[bool] = None
        self.resident_taxes: Optional[List[ResidentTax]] = None
        self.first_entry_time: Optional[str] = None
        self.leave_time: Optional[str] = None
        self.religion: Optional[Enum] = None
        self.working_years_v2: Optional[float] = None
        init(self, d, self._types)

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


class PersonInfoBtBuilder(object):
    def __init__(self) -> None:
        self._person_info_bt = PersonInfoBt()

    def person_id(self, person_id: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.person_id = person_id
        return self

    def phone_number(self, phone_number: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.phone_number = phone_number
        return self

    def legal_name(self, legal_name: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.legal_name = legal_name
        return self

    def additional_name(self, additional_name: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.additional_name = additional_name
        return self

    def preferred_name(self, preferred_name: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.preferred_name = preferred_name
        return self

    def preferred_local_full_name(self, preferred_local_full_name: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.preferred_local_full_name = preferred_local_full_name
        return self

    def preferred_english_full_name(self, preferred_english_full_name: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.preferred_english_full_name = preferred_english_full_name
        return self

    def name_list(self, name_list: List[PersonName]) -> "PersonInfoBtBuilder":
        self._person_info_bt.name_list = name_list
        return self

    def gender(self, gender: Enum) -> "PersonInfoBtBuilder":
        self._person_info_bt.gender = gender
        return self

    def date_of_birth(self, date_of_birth: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.date_of_birth = date_of_birth
        return self

    def nationality_id(self, nationality_id: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.nationality_id = nationality_id
        return self

    def nationality_id_v2(self, nationality_id_v2: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.nationality_id_v2 = nationality_id_v2
        return self

    def additional_nationalities(self, additional_nationalities: List[Nationality]) -> "PersonInfoBtBuilder":
        self._person_info_bt.additional_nationalities = additional_nationalities
        return self

    def citizenship_status(self, citizenship_status: List[CitizenshipStatus]) -> "PersonInfoBtBuilder":
        self._person_info_bt.citizenship_status = citizenship_status
        return self

    def race(self, race: Enum) -> "PersonInfoBtBuilder":
        self._person_info_bt.race = race
        return self

    def marital_status(self, marital_status: Enum) -> "PersonInfoBtBuilder":
        self._person_info_bt.marital_status = marital_status
        return self

    def phone_list(self, phone_list: List[Phone]) -> "PersonInfoBtBuilder":
        self._person_info_bt.phone_list = phone_list
        return self

    def address_list(self, address_list: List[Address]) -> "PersonInfoBtBuilder":
        self._person_info_bt.address_list = address_list
        return self

    def email_list(self, email_list: List[Email]) -> "PersonInfoBtBuilder":
        self._person_info_bt.email_list = email_list
        return self

    def work_experience_list(self, work_experience_list: List[WorkExperienceInfo]) -> "PersonInfoBtBuilder":
        self._person_info_bt.work_experience_list = work_experience_list
        return self

    def education_list(self, education_list: List[Education]) -> "PersonInfoBtBuilder":
        self._person_info_bt.education_list = education_list
        return self

    def bank_account_list(self, bank_account_list: List[BankAccount]) -> "PersonInfoBtBuilder":
        self._person_info_bt.bank_account_list = bank_account_list
        return self

    def national_id_list(self, national_id_list: List[NationalId]) -> "PersonInfoBtBuilder":
        self._person_info_bt.national_id_list = national_id_list
        return self

    def dependent_list(self, dependent_list: List[Dependent]) -> "PersonInfoBtBuilder":
        self._person_info_bt.dependent_list = dependent_list
        return self

    def emergency_contact_list(self, emergency_contact_list: List[EmergencyContact]) -> "PersonInfoBtBuilder":
        self._person_info_bt.emergency_contact_list = emergency_contact_list
        return self

    def date_entered_workforce(self, date_entered_workforce: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.date_entered_workforce = date_entered_workforce
        return self

    def working_years(self, working_years: int) -> "PersonInfoBtBuilder":
        self._person_info_bt.working_years = working_years
        return self

    def profile_image_id(self, profile_image_id: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.profile_image_id = profile_image_id
        return self

    def email_address(self, email_address: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.email_address = email_address
        return self

    def age(self, age: int) -> "PersonInfoBtBuilder":
        self._person_info_bt.age = age
        return self

    def highest_level_of_education(self, highest_level_of_education: Education) -> "PersonInfoBtBuilder":
        self._person_info_bt.highest_level_of_education = highest_level_of_education
        return self

    def highest_degree_of_education(self, highest_degree_of_education: Education) -> "PersonInfoBtBuilder":
        self._person_info_bt.highest_degree_of_education = highest_degree_of_education
        return self

    def personal_profile(self, personal_profile: List[PersonalProfile]) -> "PersonInfoBtBuilder":
        self._person_info_bt.personal_profile = personal_profile
        return self

    def native_region(self, native_region: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.native_region = native_region
        return self

    def hukou_type(self, hukou_type: Enum) -> "PersonInfoBtBuilder":
        self._person_info_bt.hukou_type = hukou_type
        return self

    def hukou_location(self, hukou_location: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.hukou_location = hukou_location
        return self

    def political_affiliations(self, political_affiliations: List[Enum]) -> "PersonInfoBtBuilder":
        self._person_info_bt.political_affiliations = political_affiliations
        return self

    def talent_id(self, talent_id: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.talent_id = talent_id
        return self

    def custom_fields(self, custom_fields: List[CustomFieldData]) -> "PersonInfoBtBuilder":
        self._person_info_bt.custom_fields = custom_fields
        return self

    def national_id_number(self, national_id_number: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.national_id_number = national_id_number
        return self

    def family_address(self, family_address: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.family_address = family_address
        return self

    def born_country_region(self, born_country_region: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.born_country_region = born_country_region
        return self

    def is_disabled(self, is_disabled: bool) -> "PersonInfoBtBuilder":
        self._person_info_bt.is_disabled = is_disabled
        return self

    def disable_card_number(self, disable_card_number: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.disable_card_number = disable_card_number
        return self

    def is_martyr_family(self, is_martyr_family: bool) -> "PersonInfoBtBuilder":
        self._person_info_bt.is_martyr_family = is_martyr_family
        return self

    def martyr_card_number(self, martyr_card_number: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.martyr_card_number = martyr_card_number
        return self

    def is_old_alone(self, is_old_alone: bool) -> "PersonInfoBtBuilder":
        self._person_info_bt.is_old_alone = is_old_alone
        return self

    def resident_taxes(self, resident_taxes: List[ResidentTax]) -> "PersonInfoBtBuilder":
        self._person_info_bt.resident_taxes = resident_taxes
        return self

    def first_entry_time(self, first_entry_time: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.first_entry_time = first_entry_time
        return self

    def leave_time(self, leave_time: str) -> "PersonInfoBtBuilder":
        self._person_info_bt.leave_time = leave_time
        return self

    def religion(self, religion: Enum) -> "PersonInfoBtBuilder":
        self._person_info_bt.religion = religion
        return self

    def working_years_v2(self, working_years_v2: float) -> "PersonInfoBtBuilder":
        self._person_info_bt.working_years_v2 = working_years_v2
        return self

    def build(self) -> "PersonInfoBt":
        return self._person_info_bt
