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

from __future__ import annotations
from typing import Union
from .utils.json_map import JsonMap
from .base import BaseModel
from .base import OneOfBaseModel
from .hris_direct_employee_details import HrisDirectEmployeeDetails
from .hris_team_information import HrisTeamInformation
from .hris_compensation import HrisCompensation
from .hris_job_information_title_id import HrisJobInformationTitleId
from .hris_job_information_title_name import HrisJobInformationTitleName
from .hris_contract_part_time import HrisContractPartTime
from .hris_contract_full_time import HrisContractFullTime


class HrisDirectEmployeeJobInformationGuard(OneOfBaseModel):
    class_list = {
        "HrisJobInformationTitleId": HrisJobInformationTitleId,
        "HrisJobInformationTitleName": HrisJobInformationTitleName,
    }


HrisDirectEmployeeJobInformation = Union[
    HrisJobInformationTitleId, HrisJobInformationTitleName
]


class HrisDirectEmployeeContractGuard(OneOfBaseModel):
    class_list = {
        "HrisContractPartTime": HrisContractPartTime,
        "HrisContractFullTime": HrisContractFullTime,
    }


HrisDirectEmployeeContract = Union[HrisContractPartTime, HrisContractFullTime]


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

    :param vacation_accrual_start_date: vacation_accrual_start_date
    :type vacation_accrual_start_date: str
    :param vacation_yearly_policy: vacation_yearly_policy
    :type vacation_yearly_policy: float
    """

    def __init__(self, vacation_accrual_start_date: str, vacation_yearly_policy: float):
        self.vacation_accrual_start_date = vacation_accrual_start_date
        self.vacation_yearly_policy = vacation_yearly_policy


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

    :param employee_details: employee_details
    :type employee_details: HrisDirectEmployeeDetails
    :param team_information: team_information
    :type team_information: HrisTeamInformation
    :param job_information: job_information
    :type job_information: HrisDirectEmployeeJobInformation
    :param compensation: compensation
    :type compensation: HrisCompensation
    :param contract: contract
    :type contract: HrisDirectEmployeeContract
    :param vacation_info: vacation_info, defaults to None
    :type vacation_info: HrisDirectEmployeeVacationInfo, optional
    """

    def __init__(
        self,
        employee_details: HrisDirectEmployeeDetails,
        team_information: HrisTeamInformation,
        job_information: HrisDirectEmployeeJobInformation,
        compensation: HrisCompensation,
        contract: HrisDirectEmployeeContract,
        vacation_info: HrisDirectEmployeeVacationInfo = None,
    ):
        self.employee_details = self._define_object(
            employee_details, HrisDirectEmployeeDetails
        )
        self.team_information = self._define_object(
            team_information, HrisTeamInformation
        )
        self.job_information = HrisDirectEmployeeJobInformationGuard.return_one_of(
            job_information
        )
        self.compensation = self._define_object(compensation, HrisCompensation)
        self.contract = HrisDirectEmployeeContractGuard.return_one_of(contract)
        if vacation_info is not None:
            self.vacation_info = self._define_object(
                vacation_info, HrisDirectEmployeeVacationInfo
            )
