# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class Dependent(object):
    _types = {
        "id": str,
        "name": str,
        "relationship": str,
        "gender": int,
        "date_of_birth": str,
        "nationality_id": str,
        "national_id_list": str,
        "spouses_working_status": str,
        "is_this_person_covered_by_health_insurance": bool,
        "is_this_person_allowed_for_tax_deduction": bool,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[str] = None
        self.relationship: Optional[str] = None
        self.gender: Optional[int] = None
        self.date_of_birth: Optional[str] = None
        self.nationality_id: Optional[str] = None
        self.national_id_list: Optional[str] = None
        self.spouses_working_status: Optional[str] = None
        self.is_this_person_covered_by_health_insurance: Optional[bool] = None
        self.is_this_person_allowed_for_tax_deduction: Optional[bool] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "DependentBuilder":
        return DependentBuilder()


class DependentBuilder(object):
    def __init__(self) -> None:
        self._dependent = Dependent()

    def id(self, id: str) -> "DependentBuilder":
        self._dependent.id = id
        return self

    def name(self, name: str) -> "DependentBuilder":
        self._dependent.name = name
        return self

    def relationship(self, relationship: str) -> "DependentBuilder":
        self._dependent.relationship = relationship
        return self

    def gender(self, gender: int) -> "DependentBuilder":
        self._dependent.gender = gender
        return self

    def date_of_birth(self, date_of_birth: str) -> "DependentBuilder":
        self._dependent.date_of_birth = date_of_birth
        return self

    def nationality_id(self, nationality_id: str) -> "DependentBuilder":
        self._dependent.nationality_id = nationality_id
        return self

    def national_id_list(self, national_id_list: str) -> "DependentBuilder":
        self._dependent.national_id_list = national_id_list
        return self

    def spouses_working_status(self, spouses_working_status: str) -> "DependentBuilder":
        self._dependent.spouses_working_status = spouses_working_status
        return self

    def is_this_person_covered_by_health_insurance(self,
                                                   is_this_person_covered_by_health_insurance: bool) -> "DependentBuilder":
        self._dependent.is_this_person_covered_by_health_insurance = is_this_person_covered_by_health_insurance
        return self

    def is_this_person_allowed_for_tax_deduction(self,
                                                 is_this_person_allowed_for_tax_deduction: bool) -> "DependentBuilder":
        self._dependent.is_this_person_allowed_for_tax_deduction = is_this_person_allowed_for_tax_deduction
        return self

    def build(self) -> "Dependent":
        return self._dependent
