# 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 .address import Address
from .email import Email
from .people_client_legal_entity import PeopleClientLegalEntity
from .employment_detail import EmploymentDetail
from .people_custom_field import PeopleCustomField


@JsonMap({"id_": "id"})
class DataDirectManager(BaseModel):
    """The direct manager of the employee.

    :param id_: id_, defaults to None
    :type id_: str, optional
    :param last_name: last_name, defaults to None
    :type last_name: str, optional
    :param first_name: first_name, defaults to None
    :type first_name: str, optional
    :param work_email: work_email, defaults to None
    :type work_email: str, optional
    :param worker_id: worker_id, defaults to None
    :type worker_id: str, optional
    """

    def __init__(
        self,
        id_: str = None,
        last_name: str = None,
        first_name: str = None,
        work_email: str = None,
        worker_id: str = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if last_name is not None:
            self.last_name = last_name
        if first_name is not None:
            self.first_name = first_name
        if work_email is not None:
            self.work_email = work_email
        if worker_id is not None:
            self.worker_id = worker_id


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

    :param id_: id_, defaults to None
    :type id_: str, optional
    :param last_name: last_name, defaults to None
    :type last_name: str, optional
    :param first_name: first_name, defaults to None
    :type first_name: str, optional
    :param work_email: work_email, defaults to None
    :type work_email: str, optional
    """

    def __init__(
        self,
        id_: str = None,
        last_name: str = None,
        first_name: str = None,
        work_email: str = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if last_name is not None:
            self.last_name = last_name
        if first_name is not None:
            self.first_name = first_name
        if work_email is not None:
            self.work_email = work_email


@JsonMap({"id_": "id"})
class DataDepartment(BaseModel):
    """The department of the employee.

    :param id_: Unique identifier of this resource., defaults to None
    :type id_: str, optional
    :param name: name, defaults to None
    :type name: str, optional
    :param parent: parent, defaults to None
    :type parent: str, optional
    """

    def __init__(self, id_: str = None, name: str = None, parent: str = None):
        if id_ is not None:
            self.id_ = id_
        if name is not None:
            self.name = name
        if parent is not None:
            self.parent = parent


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

    :param id_: Unique identifier for the employee., defaults to None
    :type id_: str, optional
    :param created_at: The creation timestamp of the employee record., defaults to None
    :type created_at: str, optional
    :param first_name: The first name of the employee., defaults to None
    :type first_name: str, optional
    :param last_name: The last name of the employee., defaults to None
    :type last_name: str, optional
    :param full_name: The full name of the employee., defaults to None
    :type full_name: str, optional
    :param addresses: addresses, defaults to None
    :type addresses: List[Address], optional
    :param emails: An array of the employee's email addresses., defaults to None
    :type emails: List[Email], optional
    :param birth_date: The birth date of the employee., defaults to None
    :type birth_date: str, optional
    :param start_date: The date the employee started working., defaults to None
    :type start_date: str, optional
    :param nationality: The nationality of the employee., defaults to None
    :type nationality: str, optional
    :param client_legal_entity: client_legal_entity, defaults to None
    :type client_legal_entity: PeopleClientLegalEntity, optional
    :param state: The state of the employee., defaults to None
    :type state: str, optional
    :param seniority: The seniority level of the employee., defaults to None
    :type seniority: str, optional
    :param completion_date: The completion date of the task or project., defaults to None
    :type completion_date: str, optional
    :param direct_manager: The direct manager of the employee., defaults to None
    :type direct_manager: DataDirectManager, optional
    :param direct_reports: The direct reports to the employee., defaults to None
    :type direct_reports: List[DataDirectReports], optional
    :param direct_reports_count: The count of direct reports to the employee., defaults to None
    :type direct_reports_count: int, optional
    :param employments: employments, defaults to None
    :type employments: List[EmploymentDetail], optional
    :param hiring_status: The current hiring status of the employee., defaults to None
    :type hiring_status: str, optional
    :param new_hiring_status: The new hiring status of the employee., defaults to None
    :type new_hiring_status: str, optional
    :param hiring_type: The type of hiring of the employee., defaults to None
    :type hiring_type: str, optional
    :param job_title: The job title of the employee., defaults to None
    :type job_title: str, optional
    :param country: The country of the employee., defaults to None
    :type country: str, optional
    :param timezone: The timezone of the employee., defaults to None
    :type timezone: str, optional
    :param department: The department of the employee., defaults to None
    :type department: DataDepartment, optional
    :param work_location: The work location of the employee., defaults to None
    :type work_location: str, optional
    :param updated_at: Long date-time format following ISO-8601, defaults to None
    :type updated_at: str, optional
    :param custom_fields: custom_fields, defaults to None
    :type custom_fields: List[PeopleCustomField], optional
    """

    def __init__(
        self,
        id_: str = None,
        created_at: str = None,
        first_name: str = None,
        last_name: str = None,
        full_name: str = None,
        addresses: List[Address] = None,
        emails: List[Email] = None,
        birth_date: str = None,
        start_date: str = None,
        nationality: str = None,
        client_legal_entity: PeopleClientLegalEntity = None,
        state: str = None,
        seniority: str = None,
        completion_date: str = None,
        direct_manager: DataDirectManager = None,
        direct_reports: List[DataDirectReports] = None,
        direct_reports_count: int = None,
        employments: List[EmploymentDetail] = None,
        hiring_status: str = None,
        new_hiring_status: str = None,
        hiring_type: str = None,
        job_title: str = None,
        country: str = None,
        timezone: str = None,
        department: DataDepartment = None,
        work_location: str = None,
        updated_at: str = None,
        custom_fields: List[PeopleCustomField] = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if created_at is not None:
            self.created_at = created_at
        if first_name is not None:
            self.first_name = first_name
        if last_name is not None:
            self.last_name = last_name
        if full_name is not None:
            self.full_name = full_name
        if addresses is not None:
            self.addresses = self._define_list(addresses, Address)
        if emails is not None:
            self.emails = self._define_list(emails, Email)
        if birth_date is not None:
            self.birth_date = birth_date
        if start_date is not None:
            self.start_date = start_date
        if nationality is not None:
            self.nationality = nationality
        if client_legal_entity is not None:
            self.client_legal_entity = self._define_object(
                client_legal_entity, PeopleClientLegalEntity
            )
        if state is not None:
            self.state = state
        if seniority is not None:
            self.seniority = seniority
        if completion_date is not None:
            self.completion_date = completion_date
        if direct_manager is not None:
            self.direct_manager = self._define_object(direct_manager, DataDirectManager)
        if direct_reports is not None:
            self.direct_reports = self._define_list(direct_reports, DataDirectReports)
        if direct_reports_count is not None:
            self.direct_reports_count = direct_reports_count
        if employments is not None:
            self.employments = self._define_list(employments, EmploymentDetail)
        if hiring_status is not None:
            self.hiring_status = hiring_status
        if new_hiring_status is not None:
            self.new_hiring_status = new_hiring_status
        if hiring_type is not None:
            self.hiring_type = hiring_type
        if job_title is not None:
            self.job_title = job_title
        if country is not None:
            self.country = country
        if timezone is not None:
            self.timezone = timezone
        if department is not None:
            self.department = self._define_object(department, DataDepartment)
        if work_location is not None:
            self.work_location = work_location
        if updated_at is not None:
            self.updated_at = updated_at
        if custom_fields is not None:
            self.custom_fields = self._define_list(custom_fields, PeopleCustomField)


@JsonMap({})
class PeopleByIdContainer(BaseModel):
    """PeopleByIdContainer

    :param data: data
    :type data: PeopleByIdContainerData
    """

    def __init__(self, data: PeopleByIdContainerData):
        self.data = self._define_object(data, PeopleByIdContainerData)
