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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .marital_status_enum import MaritalStatusEnum


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

    :param first_name: First name of the employee., defaults to None
    :type first_name: str, optional
    :param middle_name: Middle name of the employee., defaults to None
    :type middle_name: str, optional
    :param last_name: Last name of the employee., defaults to None
    :type last_name: str, optional
    :param date_of_birth: Short date in format ISO-8601 (YYYY-MM-DD). For example 2022-12-31., defaults to None
    :type date_of_birth: str, optional
    :param gender: Employee's gender., defaults to None
    :type gender: str, optional
    :param marital_status: marital_status, defaults to None
    :type marital_status: MaritalStatusEnum, optional
    :param employee_number: Employee's number., defaults to None
    :type employee_number: str, optional
    """

    def __init__(
        self,
        first_name: str = None,
        middle_name: str = None,
        last_name: str = None,
        date_of_birth: str = None,
        gender: str = None,
        marital_status: MaritalStatusEnum = None,
        employee_number: str = None,
    ):
        if first_name is not None:
            self.first_name = first_name
        if middle_name is not None:
            self.middle_name = middle_name
        if last_name is not None:
            self.last_name = last_name
        if date_of_birth is not None:
            self.date_of_birth = self._pattern_matching(
                date_of_birth, "^\d{4}-\d{2}-\d{2}$", "date_of_birth"
            )
        if gender is not None:
            self.gender = gender
        if marital_status is not None:
            self.marital_status = self._enum_matching(
                marital_status, MaritalStatusEnum.list(), "marital_status"
            )
        if employee_number is not None:
            self.employee_number = employee_number
