# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .alternate_email_item import AlternateEmailItem
from .worker_legal_entity import WorkerLegalEntity


@JsonMap({"id_": "id"})
class WorkerOfContract(BaseModel):
    """WorkerOfContract

    :param id_: Unique identifier of this resource., defaults to None
    :type id_: str, optional
    :param full_name: Worker's full name., defaults to None
    :type full_name: str, optional
    :param email: User's email address., defaults to None
    :type email: str, optional
    :param alternate_email: List of alternate email addresses., defaults to None
    :type alternate_email: List[AlternateEmailItem], optional
    :param nationality: Worker's nationality., defaults to None
    :type nationality: str, optional
    :param image: image, defaults to None
    :type image: str, optional
    :param legal_entity: legal_entity, defaults to None
    :type legal_entity: WorkerLegalEntity, optional
    :param date_of_birth: Long date-time format following ISO-8601, defaults to None
    :type date_of_birth: str, optional
    :param expected_email: Worker's email address., defaults to None
    :type expected_email: str, optional
    :param first_name: Worker's first name, defaults to None
    :type first_name: str, optional
    :param last_name: Worker's last name, defaults to None
    :type last_name: str, optional
    :param country: Worker's country (location not nationality), defaults to None
    :type country: str, optional
    """

    def __init__(
        self,
        id_: str = None,
        full_name: str = None,
        email: str = None,
        alternate_email: List[AlternateEmailItem] = None,
        nationality: str = None,
        image: str = None,
        legal_entity: WorkerLegalEntity = None,
        date_of_birth: str = None,
        expected_email: str = None,
        first_name: str = None,
        last_name: str = None,
        country: str = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if full_name is not None:
            self.full_name = full_name
        if email is not None:
            self.email = email
        if alternate_email is not None:
            self.alternate_email = self._define_list(
                alternate_email, AlternateEmailItem
            )
        if nationality is not None:
            self.nationality = nationality
        if image is not None:
            self.image = image
        if legal_entity is not None:
            self.legal_entity = self._define_object(legal_entity, WorkerLegalEntity)
        if date_of_birth is not None:
            self.date_of_birth = date_of_birth
        if expected_email is not None:
            self.expected_email = expected_email
        if first_name is not None:
            self.first_name = first_name
        if last_name is not None:
            self.last_name = last_name
        if country is not None:
            self.country = country
