# coding: utf-8

"""
    SmartyMeet Dev03 API REST

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 1.0.1
    Contact: developer@smartymeet.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from smartytalent_client.models.resource_timestamps_schema import ResourceTimestampsSchema
from smartytalent_client.models.talent_alumni_schema import TalentAlumniSchema
from smartytalent_client.models.talent_attributes_desired_contract_length_schema import TalentAttributesDesiredContractLengthSchema
from smartytalent_client.models.talent_attributes_desired_employment_type_schema import TalentAttributesDesiredEmploymentTypeSchema
from smartytalent_client.models.talent_attributes_desired_role_schema import TalentAttributesDesiredRoleSchema
from smartytalent_client.models.talent_attributes_employment_type_schema import TalentAttributesEmploymentTypeSchema
from smartytalent_client.models.talent_attributes_social_link_schema import TalentAttributesSocialLinkSchema
from smartytalent_client.models.talent_availability_received_criteria_schema import TalentAvailabilityReceivedCriteriaSchema
from smartytalent_client.models.talent_received_criteria_schema import TalentReceivedCriteriaSchema
from smartytalent_client.models.talent_referral_schema import TalentReferralSchema
from typing import Optional, Set
from typing_extensions import Self
from pydantic_core import to_jsonable_python

class TalentAttributesSchema(BaseModel):
    """
    TalentAttributesSchema
    """ # noqa: E501
    status: Optional[StrictStr] = None
    name: StrictStr
    email: StrictStr
    secondary_email: Optional[StrictStr] = Field(default=None, alias="secondaryEmail")
    timestamps: Optional[ResourceTimestampsSchema] = None
    work_email: Optional[StrictStr] = Field(default=None, alias="workEmail")
    phone: Optional[StrictStr] = None
    work_phone: Optional[StrictStr] = Field(default=None, alias="workPhone")
    profile_picture_url: Optional[StrictStr] = Field(default=None, alias="profilePictureUrl")
    availability: Optional[Dict[str, TalentAvailabilityReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed availability criteria. Keys are locale codes (e.g. en-US, pl-PL).")
    desired_contract_length: Optional[TalentAttributesDesiredContractLengthSchema] = Field(default=None, alias="desiredContractLength")
    employment_type: Optional[TalentAttributesEmploymentTypeSchema] = Field(default=None, alias="employmentType")
    experience_and_seniority: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed experience and seniority criteria.", alias="experienceAndSeniority")
    break_reason: Optional[StrictStr] = Field(default=None, alias="breakReason")
    quick_insights: Optional[Dict[str, StrictStr]] = Field(default=None, description="Language-keyed quick insights. Keys are locale codes (e.g. en-US, pl-PL).", alias="quickInsights")
    languages_spoken: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed languages spoken criteria.", alias="languagesSpoken")
    social_links: Optional[List[TalentAttributesSocialLinkSchema]] = Field(default=None, alias="socialLinks")
    desired_employment_type: Optional[List[TalentAttributesDesiredEmploymentTypeSchema]] = Field(default=None, alias="desiredEmploymentType")
    desired_role: Optional[List[TalentAttributesDesiredRoleSchema]] = Field(default=None, alias="desiredRole")
    work_preferences: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed work preferences criteria.", alias="workPreferences")
    location_preferences: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed location preferences criteria.", alias="locationPreferences")
    work_authorization: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed work authorization criteria.", alias="workAuthorization")
    skills_and_expertise: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed skills and expertise criteria.", alias="skillsAndExpertise")
    certifications: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed certifications criteria.")
    licenses: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed licenses criteria.")
    professional_experience: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed professional experience criteria.", alias="professionalExperience")
    industry_experience: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed industry experience criteria.", alias="industryExperience")
    company_type_experience: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed company type experience criteria.", alias="companyTypeExperience")
    job_positions: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed job positions criteria.", alias="jobPositions")
    job_tendencies: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed job tendencies criteria.", alias="jobTendencies")
    education: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed education criteria.")
    projects_and_achievements: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed projects and achievements criteria.", alias="projectsAndAchievements")
    personality_and_soft_skills: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed personality and soft skills criteria.", alias="personalityAndSoftSkills")
    hobbies_and_interests: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Language-keyed hobbies and interests. Keys are locale codes (e.g. en-US, pl-PL).", alias="hobbiesAndInterests")
    references: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed references criteria.")
    keywords: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Language-keyed keywords. Keys are locale codes (e.g. en-US, pl-PL).")
    performance_reviews: Optional[List[Dict[str, Any]]] = Field(default=None, alias="performanceReviews")
    personality_tests: Optional[Dict[str, Any]] = Field(default=None, alias="personalityTests")
    salary_expectation: Optional[Dict[str, TalentReceivedCriteriaSchema]] = Field(default=None, description="Language-keyed salary expectation criteria.", alias="salaryExpectation")
    relocation_willingness: Optional[StrictBool] = Field(default=None, alias="relocationWillingness")
    requires_sponsorship: Optional[StrictBool] = Field(default=None, alias="requiresSponsorship")
    career_break: Optional[StrictBool] = Field(default=None, alias="careerBreak")
    is_talent_pool: Optional[StrictBool] = Field(default=None, alias="isTalentPool")
    ttl: Optional[StrictStr] = None
    alumni: Optional[TalentAlumniSchema] = None
    referral: Optional[TalentReferralSchema] = None
    age: Optional[StrictStr] = None
    gender: Optional[StrictStr] = None
    settings: Optional[Dict[str, Any]] = None
    short_code: Optional[StrictStr] = Field(default=None, alias="shortCode")
    source: Optional[StrictStr] = None
    __properties: ClassVar[List[str]] = ["status", "name", "email", "secondaryEmail", "timestamps", "workEmail", "phone", "workPhone", "profilePictureUrl", "availability", "desiredContractLength", "employmentType", "experienceAndSeniority", "breakReason", "quickInsights", "languagesSpoken", "socialLinks", "desiredEmploymentType", "desiredRole", "workPreferences", "locationPreferences", "workAuthorization", "skillsAndExpertise", "certifications", "licenses", "professionalExperience", "industryExperience", "companyTypeExperience", "jobPositions", "jobTendencies", "education", "projectsAndAchievements", "personalityAndSoftSkills", "hobbiesAndInterests", "references", "keywords", "performanceReviews", "personalityTests", "salaryExpectation", "relocationWillingness", "requiresSponsorship", "careerBreak", "isTalentPool", "ttl", "alumni", "referral", "age", "gender", "settings", "shortCode", "source"]

    @field_validator('status')
    def status_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['active', 'inactive', 'pending', 'archived', 'failed']):
            raise ValueError("must be one of enum values ('active', 'inactive', 'pending', 'archived', 'failed')")
        return value

    model_config = ConfigDict(
        validate_by_name=True,
        validate_by_alias=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.model_dump(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(to_jsonable_python(self.to_dict()))

    @classmethod
    def from_json(cls, json_str: str) -> Optional[Self]:
        """Create an instance of TalentAttributesSchema from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        # override the default output from pydantic by calling `to_dict()` of timestamps
        if self.timestamps:
            _dict['timestamps'] = self.timestamps.to_dict()
        # override the default output from pydantic by calling `to_dict()` of each value in availability (dict)
        _field_dict = {}
        if self.availability:
            for _key_availability in self.availability:
                if self.availability[_key_availability]:
                    _field_dict[_key_availability] = self.availability[_key_availability].to_dict()
            _dict['availability'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of desired_contract_length
        if self.desired_contract_length:
            _dict['desiredContractLength'] = self.desired_contract_length.to_dict()
        # override the default output from pydantic by calling `to_dict()` of employment_type
        if self.employment_type:
            _dict['employmentType'] = self.employment_type.to_dict()
        # override the default output from pydantic by calling `to_dict()` of each value in experience_and_seniority (dict)
        _field_dict = {}
        if self.experience_and_seniority:
            for _key_experience_and_seniority in self.experience_and_seniority:
                if self.experience_and_seniority[_key_experience_and_seniority]:
                    _field_dict[_key_experience_and_seniority] = self.experience_and_seniority[_key_experience_and_seniority].to_dict()
            _dict['experienceAndSeniority'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in languages_spoken (dict)
        _field_dict = {}
        if self.languages_spoken:
            for _key_languages_spoken in self.languages_spoken:
                if self.languages_spoken[_key_languages_spoken]:
                    _field_dict[_key_languages_spoken] = self.languages_spoken[_key_languages_spoken].to_dict()
            _dict['languagesSpoken'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each item in social_links (list)
        _items = []
        if self.social_links:
            for _item_social_links in self.social_links:
                if _item_social_links:
                    _items.append(_item_social_links.to_dict())
            _dict['socialLinks'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in desired_employment_type (list)
        _items = []
        if self.desired_employment_type:
            for _item_desired_employment_type in self.desired_employment_type:
                if _item_desired_employment_type:
                    _items.append(_item_desired_employment_type.to_dict())
            _dict['desiredEmploymentType'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in desired_role (list)
        _items = []
        if self.desired_role:
            for _item_desired_role in self.desired_role:
                if _item_desired_role:
                    _items.append(_item_desired_role.to_dict())
            _dict['desiredRole'] = _items
        # override the default output from pydantic by calling `to_dict()` of each value in work_preferences (dict)
        _field_dict = {}
        if self.work_preferences:
            for _key_work_preferences in self.work_preferences:
                if self.work_preferences[_key_work_preferences]:
                    _field_dict[_key_work_preferences] = self.work_preferences[_key_work_preferences].to_dict()
            _dict['workPreferences'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in location_preferences (dict)
        _field_dict = {}
        if self.location_preferences:
            for _key_location_preferences in self.location_preferences:
                if self.location_preferences[_key_location_preferences]:
                    _field_dict[_key_location_preferences] = self.location_preferences[_key_location_preferences].to_dict()
            _dict['locationPreferences'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in work_authorization (dict)
        _field_dict = {}
        if self.work_authorization:
            for _key_work_authorization in self.work_authorization:
                if self.work_authorization[_key_work_authorization]:
                    _field_dict[_key_work_authorization] = self.work_authorization[_key_work_authorization].to_dict()
            _dict['workAuthorization'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in skills_and_expertise (dict)
        _field_dict = {}
        if self.skills_and_expertise:
            for _key_skills_and_expertise in self.skills_and_expertise:
                if self.skills_and_expertise[_key_skills_and_expertise]:
                    _field_dict[_key_skills_and_expertise] = self.skills_and_expertise[_key_skills_and_expertise].to_dict()
            _dict['skillsAndExpertise'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in certifications (dict)
        _field_dict = {}
        if self.certifications:
            for _key_certifications in self.certifications:
                if self.certifications[_key_certifications]:
                    _field_dict[_key_certifications] = self.certifications[_key_certifications].to_dict()
            _dict['certifications'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in licenses (dict)
        _field_dict = {}
        if self.licenses:
            for _key_licenses in self.licenses:
                if self.licenses[_key_licenses]:
                    _field_dict[_key_licenses] = self.licenses[_key_licenses].to_dict()
            _dict['licenses'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in professional_experience (dict)
        _field_dict = {}
        if self.professional_experience:
            for _key_professional_experience in self.professional_experience:
                if self.professional_experience[_key_professional_experience]:
                    _field_dict[_key_professional_experience] = self.professional_experience[_key_professional_experience].to_dict()
            _dict['professionalExperience'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in industry_experience (dict)
        _field_dict = {}
        if self.industry_experience:
            for _key_industry_experience in self.industry_experience:
                if self.industry_experience[_key_industry_experience]:
                    _field_dict[_key_industry_experience] = self.industry_experience[_key_industry_experience].to_dict()
            _dict['industryExperience'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in company_type_experience (dict)
        _field_dict = {}
        if self.company_type_experience:
            for _key_company_type_experience in self.company_type_experience:
                if self.company_type_experience[_key_company_type_experience]:
                    _field_dict[_key_company_type_experience] = self.company_type_experience[_key_company_type_experience].to_dict()
            _dict['companyTypeExperience'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in job_positions (dict)
        _field_dict = {}
        if self.job_positions:
            for _key_job_positions in self.job_positions:
                if self.job_positions[_key_job_positions]:
                    _field_dict[_key_job_positions] = self.job_positions[_key_job_positions].to_dict()
            _dict['jobPositions'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in job_tendencies (dict)
        _field_dict = {}
        if self.job_tendencies:
            for _key_job_tendencies in self.job_tendencies:
                if self.job_tendencies[_key_job_tendencies]:
                    _field_dict[_key_job_tendencies] = self.job_tendencies[_key_job_tendencies].to_dict()
            _dict['jobTendencies'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in education (dict)
        _field_dict = {}
        if self.education:
            for _key_education in self.education:
                if self.education[_key_education]:
                    _field_dict[_key_education] = self.education[_key_education].to_dict()
            _dict['education'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in projects_and_achievements (dict)
        _field_dict = {}
        if self.projects_and_achievements:
            for _key_projects_and_achievements in self.projects_and_achievements:
                if self.projects_and_achievements[_key_projects_and_achievements]:
                    _field_dict[_key_projects_and_achievements] = self.projects_and_achievements[_key_projects_and_achievements].to_dict()
            _dict['projectsAndAchievements'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in personality_and_soft_skills (dict)
        _field_dict = {}
        if self.personality_and_soft_skills:
            for _key_personality_and_soft_skills in self.personality_and_soft_skills:
                if self.personality_and_soft_skills[_key_personality_and_soft_skills]:
                    _field_dict[_key_personality_and_soft_skills] = self.personality_and_soft_skills[_key_personality_and_soft_skills].to_dict()
            _dict['personalityAndSoftSkills'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in references (dict)
        _field_dict = {}
        if self.references:
            for _key_references in self.references:
                if self.references[_key_references]:
                    _field_dict[_key_references] = self.references[_key_references].to_dict()
            _dict['references'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of each value in salary_expectation (dict)
        _field_dict = {}
        if self.salary_expectation:
            for _key_salary_expectation in self.salary_expectation:
                if self.salary_expectation[_key_salary_expectation]:
                    _field_dict[_key_salary_expectation] = self.salary_expectation[_key_salary_expectation].to_dict()
            _dict['salaryExpectation'] = _field_dict
        # override the default output from pydantic by calling `to_dict()` of alumni
        if self.alumni:
            _dict['alumni'] = self.alumni.to_dict()
        # override the default output from pydantic by calling `to_dict()` of referral
        if self.referral:
            _dict['referral'] = self.referral.to_dict()
        # set to None if profile_picture_url (nullable) is None
        # and model_fields_set contains the field
        if self.profile_picture_url is None and "profile_picture_url" in self.model_fields_set:
            _dict['profilePictureUrl'] = None

        # set to None if ttl (nullable) is None
        # and model_fields_set contains the field
        if self.ttl is None and "ttl" in self.model_fields_set:
            _dict['ttl'] = None

        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of TalentAttributesSchema from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "status": obj.get("status"),
            "name": obj.get("name"),
            "email": obj.get("email"),
            "secondaryEmail": obj.get("secondaryEmail"),
            "timestamps": ResourceTimestampsSchema.from_dict(obj["timestamps"]) if obj.get("timestamps") is not None else None,
            "workEmail": obj.get("workEmail"),
            "phone": obj.get("phone"),
            "workPhone": obj.get("workPhone"),
            "profilePictureUrl": obj.get("profilePictureUrl"),
            "availability": dict(
                (_k, TalentAvailabilityReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["availability"].items()
            )
            if obj.get("availability") is not None
            else None,
            "desiredContractLength": TalentAttributesDesiredContractLengthSchema.from_dict(obj["desiredContractLength"]) if obj.get("desiredContractLength") is not None else None,
            "employmentType": TalentAttributesEmploymentTypeSchema.from_dict(obj["employmentType"]) if obj.get("employmentType") is not None else None,
            "experienceAndSeniority": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["experienceAndSeniority"].items()
            )
            if obj.get("experienceAndSeniority") is not None
            else None,
            "breakReason": obj.get("breakReason"),
            "quickInsights": obj.get("quickInsights"),
            "languagesSpoken": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["languagesSpoken"].items()
            )
            if obj.get("languagesSpoken") is not None
            else None,
            "socialLinks": [TalentAttributesSocialLinkSchema.from_dict(_item) for _item in obj["socialLinks"]] if obj.get("socialLinks") is not None else None,
            "desiredEmploymentType": [TalentAttributesDesiredEmploymentTypeSchema.from_dict(_item) for _item in obj["desiredEmploymentType"]] if obj.get("desiredEmploymentType") is not None else None,
            "desiredRole": [TalentAttributesDesiredRoleSchema.from_dict(_item) for _item in obj["desiredRole"]] if obj.get("desiredRole") is not None else None,
            "workPreferences": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["workPreferences"].items()
            )
            if obj.get("workPreferences") is not None
            else None,
            "locationPreferences": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["locationPreferences"].items()
            )
            if obj.get("locationPreferences") is not None
            else None,
            "workAuthorization": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["workAuthorization"].items()
            )
            if obj.get("workAuthorization") is not None
            else None,
            "skillsAndExpertise": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["skillsAndExpertise"].items()
            )
            if obj.get("skillsAndExpertise") is not None
            else None,
            "certifications": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["certifications"].items()
            )
            if obj.get("certifications") is not None
            else None,
            "licenses": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["licenses"].items()
            )
            if obj.get("licenses") is not None
            else None,
            "professionalExperience": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["professionalExperience"].items()
            )
            if obj.get("professionalExperience") is not None
            else None,
            "industryExperience": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["industryExperience"].items()
            )
            if obj.get("industryExperience") is not None
            else None,
            "companyTypeExperience": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["companyTypeExperience"].items()
            )
            if obj.get("companyTypeExperience") is not None
            else None,
            "jobPositions": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["jobPositions"].items()
            )
            if obj.get("jobPositions") is not None
            else None,
            "jobTendencies": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["jobTendencies"].items()
            )
            if obj.get("jobTendencies") is not None
            else None,
            "education": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["education"].items()
            )
            if obj.get("education") is not None
            else None,
            "projectsAndAchievements": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["projectsAndAchievements"].items()
            )
            if obj.get("projectsAndAchievements") is not None
            else None,
            "personalityAndSoftSkills": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["personalityAndSoftSkills"].items()
            )
            if obj.get("personalityAndSoftSkills") is not None
            else None,
            "hobbiesAndInterests": obj.get("hobbiesAndInterests"),
            "references": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["references"].items()
            )
            if obj.get("references") is not None
            else None,
            "keywords": obj.get("keywords"),
            "performanceReviews": obj.get("performanceReviews"),
            "personalityTests": obj.get("personalityTests"),
            "salaryExpectation": dict(
                (_k, TalentReceivedCriteriaSchema.from_dict(_v))
                for _k, _v in obj["salaryExpectation"].items()
            )
            if obj.get("salaryExpectation") is not None
            else None,
            "relocationWillingness": obj.get("relocationWillingness"),
            "requiresSponsorship": obj.get("requiresSponsorship"),
            "careerBreak": obj.get("careerBreak"),
            "isTalentPool": obj.get("isTalentPool"),
            "ttl": obj.get("ttl"),
            "alumni": TalentAlumniSchema.from_dict(obj["alumni"]) if obj.get("alumni") is not None else None,
            "referral": TalentReferralSchema.from_dict(obj["referral"]) if obj.get("referral") is not None else None,
            "age": obj.get("age"),
            "gender": obj.get("gender"),
            "settings": obj.get("settings"),
            "shortCode": obj.get("shortCode"),
            "source": obj.get("source")
        })
        return _obj


