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

from .utils.json_map import JsonMap
from .base import BaseModel


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

    :param accrual_amount: Accrual amount of the time off policy., defaults to None
    :type accrual_amount: str, optional
    :param accrual_unit: Accrual unit of the time off policy., defaults to None
    :type accrual_unit: str, optional
    :param total: Total time off policy., defaults to None
    :type total: str, optional
    :param unit_amount: Unit amount of the time off policy., defaults to None
    :type unit_amount: float, optional
    :param unit: Unit of the time off policy., defaults to None
    :type unit: str, optional
    :param accrued: Accrued time off policy., defaults to None
    :type accrued: str, optional
    """

    def __init__(
        self,
        accrual_amount: str = None,
        accrual_unit: str = None,
        total: str = None,
        unit_amount: float = None,
        unit: str = None,
        accrued: str = None,
    ):
        if accrual_amount is not None:
            self.accrual_amount = accrual_amount
        if accrual_unit is not None:
            self.accrual_unit = accrual_unit
        if total is not None:
            self.total = total
        if unit_amount is not None:
            self.unit_amount = unit_amount
        if unit is not None:
            self.unit = unit
        if accrued is not None:
            self.accrued = accrued


@JsonMap({"id_": "id", "type_": "type"})
class EmployeeTimeoffsPoliciesItem(BaseModel):
    """EmployeeTimeoffsPoliciesItem

    :param id_: Unique identifier for the time off policy.
    :type id_: str
    :param type_: Type of time off policy.
    :type type_: str
    :param name: Name of the time off policy.
    :type name: str
    :param description: Description of the time off policy.
    :type description: str
    :param unit_amount: Unit amount of the time off policy.
    :type unit_amount: float
    :param used: Used time off policy.
    :type used: float
    :param tracking_start_date: Start date of the time off policy.
    :type tracking_start_date: str
    :param tracking_end_date: End date of the time off policy.
    :type tracking_end_date: any
    :param entitlement: entitlement
    :type entitlement: Entitlement
    """

    def __init__(
        self,
        id_: str,
        type_: str,
        name: str,
        description: str,
        unit_amount: float,
        used: float,
        tracking_start_date: str,
        tracking_end_date: any,
        entitlement: Entitlement,
    ):
        self.id_ = id_
        self.type_ = type_
        self.name = name
        self.description = description
        self.unit_amount = unit_amount
        self.used = used
        self.tracking_start_date = tracking_start_date
        self.tracking_end_date = tracking_end_date
        self.entitlement = self._define_object(entitlement, Entitlement)
