# 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 .eor_timeoffs_base_item import EorTimeoffsBaseItem


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

    :param year: year, defaults to None
    :type year: float, optional
    :param days_requested: Days off requested by employee., defaults to None
    :type days_requested: float, optional
    :param current_approved: Days off approved., defaults to None
    :type current_approved: float, optional
    :param yearly_limit: Total number of days off allowed per year., defaults to None
    :type yearly_limit: float, optional
    :param over_annual_limit: Too many days off requested by employee., defaults to None
    :type over_annual_limit: bool, optional
    :param yearly_requests: Total number of time off requests this year., defaults to None
    :type yearly_requests: float, optional
    :param requests: List of time offs.
    :type requests: List[EorTimeoffsBaseItem]
    """

    def __init__(
        self,
        requests: List[EorTimeoffsBaseItem],
        year: float = None,
        days_requested: float = None,
        current_approved: float = None,
        yearly_limit: float = None,
        over_annual_limit: bool = None,
        yearly_requests: float = None,
    ):
        if year is not None:
            self.year = year
        if days_requested is not None:
            self.days_requested = days_requested
        if current_approved is not None:
            self.current_approved = current_approved
        if yearly_limit is not None:
            self.yearly_limit = yearly_limit
        if over_annual_limit is not None:
            self.over_annual_limit = over_annual_limit
        if yearly_requests is not None:
            self.yearly_requests = yearly_requests
        self.requests = self._define_list(requests, EorTimeoffsBaseItem)
