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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .identifier_value import IdentifierValue, IdentifierValueGuard
from .profile_type_enum import ProfileTypeEnum


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

    :param id_: id_
    :type id_: IdentifierValue
    :param name: name
    :type name: str
    :param pic_url: pic_url, defaults to None
    :type pic_url: str, optional
    :param profile_type: profile_type
    :type profile_type: ProfileTypeEnum
    :param is_employee: Only valid for requester. True if requester is an employee., defaults to None
    :type is_employee: bool, optional
    """

    def __init__(
        self,
        id_: IdentifierValue,
        name: str,
        profile_type: ProfileTypeEnum,
        pic_url: str = None,
        is_employee: bool = None,
    ):
        self.id_ = IdentifierValueGuard.return_one_of(id_)
        self.name = name
        if pic_url is not None:
            self.pic_url = pic_url
        self.profile_type = self._enum_matching(
            profile_type, ProfileTypeEnum.list(), "profile_type"
        )
        if is_employee is not None:
            self.is_employee = is_employee
