# 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_custom_field import ProfileSettingCustomField


class ProfileSettingResidentTax(object):
    _types = {
        "year_resident_tax": str,
        "tax_country_region": str,
        "resident_status": str,
        "custom_fields": List[ProfileSettingCustomField],
    }

    def __init__(self, d=None):
        self.year_resident_tax: Optional[str] = None
        self.tax_country_region: Optional[str] = None
        self.resident_status: Optional[str] = None
        self.custom_fields: Optional[List[ProfileSettingCustomField]] = None
        init(self, d, self._types)

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


class ProfileSettingResidentTaxBuilder(object):
    def __init__(self) -> None:
        self._profile_setting_resident_tax = ProfileSettingResidentTax()

    def year_resident_tax(self, year_resident_tax: str) -> "ProfileSettingResidentTaxBuilder":
        self._profile_setting_resident_tax.year_resident_tax = year_resident_tax
        return self

    def tax_country_region(self, tax_country_region: str) -> "ProfileSettingResidentTaxBuilder":
        self._profile_setting_resident_tax.tax_country_region = tax_country_region
        return self

    def resident_status(self, resident_status: str) -> "ProfileSettingResidentTaxBuilder":
        self._profile_setting_resident_tax.resident_status = resident_status
        return self

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

    def build(self) -> "ProfileSettingResidentTax":
        return self._profile_setting_resident_tax
