# 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 .employee_base_entity import EmployeeBaseEntity
from .employee_work_entity import EmployeeWorkEntity
from .employee_personal_and_social_relationship_entity import EmployeePersonalAndSocialRelationshipEntity
from .employee_education_and_work_experience_entity import EmployeeEducationAndWorkExperienceEntity


class EmployeeEntity(object):
    _types = {
        "base_info": EmployeeBaseEntity,
        "work_info": EmployeeWorkEntity,
        "personal_and_social_relationship": EmployeePersonalAndSocialRelationshipEntity,
        "education_and_work_experience": EmployeeEducationAndWorkExperienceEntity,
    }

    def __init__(self, d=None):
        self.base_info: Optional[EmployeeBaseEntity] = None
        self.work_info: Optional[EmployeeWorkEntity] = None
        self.personal_and_social_relationship: Optional[EmployeePersonalAndSocialRelationshipEntity] = None
        self.education_and_work_experience: Optional[EmployeeEducationAndWorkExperienceEntity] = None
        init(self, d, self._types)

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


class EmployeeEntityBuilder(object):
    def __init__(self) -> None:
        self._employee_entity = EmployeeEntity()

    def base_info(self, base_info: EmployeeBaseEntity) -> "EmployeeEntityBuilder":
        self._employee_entity.base_info = base_info
        return self

    def work_info(self, work_info: EmployeeWorkEntity) -> "EmployeeEntityBuilder":
        self._employee_entity.work_info = work_info
        return self

    def personal_and_social_relationship(self,
                                         personal_and_social_relationship: EmployeePersonalAndSocialRelationshipEntity) -> "EmployeeEntityBuilder":
        self._employee_entity.personal_and_social_relationship = personal_and_social_relationship
        return self

    def education_and_work_experience(self,
                                      education_and_work_experience: EmployeeEducationAndWorkExperienceEntity) -> "EmployeeEntityBuilder":
        self._employee_entity.education_and_work_experience = education_and_work_experience
        return self

    def build(self) -> "EmployeeEntity":
        return self._employee_entity
