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

from __future__ import annotations
from enum import Enum
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .requester_time_off import RequesterTimeOff


class EmployeeTimeoffsItemResponseType(Enum):
    """An enumeration representing different categories.

    :cvar VACATION: "VACATION"
    :vartype VACATION: str
    :cvar SICK_LEAVE: "SICK_LEAVE"
    :vartype SICK_LEAVE: str
    :cvar OTHER: "OTHER"
    :vartype OTHER: str
    """

    VACATION = "VACATION"
    SICK_LEAVE = "SICK_LEAVE"
    OTHER = "OTHER"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(
            map(
                lambda x: x.value,
                EmployeeTimeoffsItemResponseType._member_map_.values(),
            )
        )


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

    :param id_: id_, defaults to None
    :type id_: str, optional
    :param time_off_id: time_off_id, defaults to None
    :type time_off_id: str, optional
    :param filename: filename, defaults to None
    :type filename: str, optional
    :param created_at: created_at, defaults to None
    :type created_at: str, optional
    :param updated_at: updated_at, defaults to None
    :type updated_at: str, optional
    """

    def __init__(
        self,
        id_: str = None,
        time_off_id: str = None,
        filename: str = None,
        created_at: str = None,
        updated_at: str = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if time_off_id is not None:
            self.time_off_id = time_off_id
        if filename is not None:
            self.filename = filename
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at


@JsonMap({"type_": "type"})
class EmployeeTimeoffsItemResponse(BaseModel):
    """EmployeeTimeoffsItemResponse

    :param time_off_id: time_off_id, defaults to None
    :type time_off_id: str, optional
    :param time_off_type_id: time_off_type_id, defaults to None
    :type time_off_type_id: str, optional
    :param policy_id: policy_id, defaults to None
    :type policy_id: str, optional
    :param policy_name: policy_name, defaults to None
    :type policy_name: str, optional
    :param policy_type_name: policy_type_name, defaults to None
    :type policy_type_name: str, optional
    :param reason: reason, defaults to None
    :type reason: str, optional
    :param type_: Time off type., defaults to None
    :type type_: EmployeeTimeoffsItemResponseType, optional
    :param requested_at: requested_at, defaults to None
    :type requested_at: str, optional
    :param reviewed_at: reviewed_at, defaults to None
    :type reviewed_at: str, optional
    :param with_multiple_dates: with_multiple_dates, defaults to None
    :type with_multiple_dates: bool, optional
    :param single_date: single_date, defaults to None
    :type single_date: str, optional
    :param created_at: created_at, defaults to None
    :type created_at: str, optional
    :param updated_at: updated_at, defaults to None
    :type updated_at: str, optional
    :param denial_reason: denial_reason, defaults to None
    :type denial_reason: bool, optional
    :param requester: requester, defaults to None
    :type requester: RequesterTimeOff, optional
    :param days_used_start_year: days_used_start_year, defaults to None
    :type days_used_start_year: str, optional
    :param days_used_end_year: days_used_end_year, defaults to None
    :type days_used_end_year: str, optional
    :param days_used: days_used, defaults to None
    :type days_used: str, optional
    :param start_date: start_date, defaults to None
    :type start_date: str, optional
    :param end_date: end_date, defaults to None
    :type end_date: str, optional
    :param is_start_date_half_day: is_start_date_half_day, defaults to None
    :type is_start_date_half_day: bool, optional
    :param is_end_date_half_day: is_end_date_half_day, defaults to None
    :type is_end_date_half_day: bool, optional
    :param attachments: attachments, defaults to None
    :type attachments: List[EmployeeTimeoffsItemResponseAttachments], optional
    :param change_request: change_request, defaults to None
    :type change_request: str, optional
    :param is_updated: is_updated, defaults to None
    :type is_updated: bool, optional
    :param applied_changes: applied_changes, defaults to None
    :type applied_changes: List[any], optional
    :param can_request_changes: can_request_changes, defaults to None
    :type can_request_changes: bool, optional
    """

    def __init__(
        self,
        time_off_id: str = None,
        time_off_type_id: str = None,
        policy_id: str = None,
        policy_name: str = None,
        policy_type_name: str = None,
        reason: str = None,
        type_: EmployeeTimeoffsItemResponseType = None,
        requested_at: str = None,
        reviewed_at: str = None,
        with_multiple_dates: bool = None,
        single_date: str = None,
        created_at: str = None,
        updated_at: str = None,
        denial_reason: bool = None,
        requester: RequesterTimeOff = None,
        days_used_start_year: str = None,
        days_used_end_year: str = None,
        days_used: str = None,
        start_date: str = None,
        end_date: str = None,
        is_start_date_half_day: bool = None,
        is_end_date_half_day: bool = None,
        attachments: List[EmployeeTimeoffsItemResponseAttachments] = None,
        change_request: str = None,
        is_updated: bool = None,
        applied_changes: List[any] = None,
        can_request_changes: bool = None,
    ):
        if time_off_id is not None:
            self.time_off_id = time_off_id
        if time_off_type_id is not None:
            self.time_off_type_id = time_off_type_id
        if policy_id is not None:
            self.policy_id = policy_id
        if policy_name is not None:
            self.policy_name = policy_name
        if policy_type_name is not None:
            self.policy_type_name = policy_type_name
        if reason is not None:
            self.reason = reason
        if type_ is not None:
            self.type_ = self._enum_matching(
                type_, EmployeeTimeoffsItemResponseType.list(), "type_"
            )
        if requested_at is not None:
            self.requested_at = requested_at
        if reviewed_at is not None:
            self.reviewed_at = reviewed_at
        if with_multiple_dates is not None:
            self.with_multiple_dates = with_multiple_dates
        if single_date is not None:
            self.single_date = single_date
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if denial_reason is not None:
            self.denial_reason = denial_reason
        if requester is not None:
            self.requester = self._define_object(requester, RequesterTimeOff)
        if days_used_start_year is not None:
            self.days_used_start_year = days_used_start_year
        if days_used_end_year is not None:
            self.days_used_end_year = days_used_end_year
        if days_used is not None:
            self.days_used = days_used
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date
        if is_start_date_half_day is not None:
            self.is_start_date_half_day = is_start_date_half_day
        if is_end_date_half_day is not None:
            self.is_end_date_half_day = is_end_date_half_day
        if attachments is not None:
            self.attachments = self._define_list(
                attachments, EmployeeTimeoffsItemResponseAttachments
            )
        if change_request is not None:
            self.change_request = change_request
        if is_updated is not None:
            self.is_updated = is_updated
        if applied_changes is not None:
            self.applied_changes = applied_changes
        if can_request_changes is not None:
            self.can_request_changes = can_request_changes
