# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .profile_setting_phone import ProfileSettingPhone
from .profile_setting_file import ProfileSettingFile
from .profile_setting_custom_field import ProfileSettingCustomField
from .profile_setting_address import ProfileSettingAddress


class ProfileSettingDependent(object):
    _types = {
        "legal_name": str,
        "date_of_birth": str,
        "relationship_with_dependent": str,
        "gender": str,
        "phone": ProfileSettingPhone,
        "job": str,
        "child_birth_certificates": List[ProfileSettingFile],
        "employer": str,
        "custom_fields": List[ProfileSettingCustomField],
        "address": ProfileSettingAddress,
    }

    def __init__(self, d=None):
        self.legal_name: Optional[str] = None
        self.date_of_birth: Optional[str] = None
        self.relationship_with_dependent: Optional[str] = None
        self.gender: Optional[str] = None
        self.phone: Optional[ProfileSettingPhone] = None
        self.job: Optional[str] = None
        self.child_birth_certificates: Optional[List[ProfileSettingFile]] = None
        self.employer: Optional[str] = None
        self.custom_fields: Optional[List[ProfileSettingCustomField]] = None
        self.address: Optional[ProfileSettingAddress] = None
        init(self, d, self._types)

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


class ProfileSettingDependentBuilder(object):
    def __init__(self) -> None:
        self._profile_setting_dependent = ProfileSettingDependent()

    def legal_name(self, legal_name: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.legal_name = legal_name
        return self

    def date_of_birth(self, date_of_birth: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.date_of_birth = date_of_birth
        return self

    def relationship_with_dependent(self, relationship_with_dependent: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.relationship_with_dependent = relationship_with_dependent
        return self

    def gender(self, gender: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.gender = gender
        return self

    def phone(self, phone: ProfileSettingPhone) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.phone = phone
        return self

    def job(self, job: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.job = job
        return self

    def child_birth_certificates(self, child_birth_certificates: List[
        ProfileSettingFile]) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.child_birth_certificates = child_birth_certificates
        return self

    def employer(self, employer: str) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.employer = employer
        return self

    def custom_fields(self, custom_fields: List[ProfileSettingCustomField]) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.custom_fields = custom_fields
        return self

    def address(self, address: ProfileSettingAddress) -> "ProfileSettingDependentBuilder":
        self._profile_setting_dependent.address = address
        return self

    def build(self) -> "ProfileSettingDependent":
        return self._profile_setting_dependent
