# 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 .address_for_update import AddressForUpdate
from .object_field_data import ObjectFieldData


class ResidentTaxForUpdate(object):
    _types = {
        "tax_country_region": str,
        "resident_status": str,
        "tax_address": AddressForUpdate,
        "resident_status_specification": str,
        "year_resident_tax": str,
        "custom_fields": List[ObjectFieldData],
    }

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

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


class ResidentTaxForUpdateBuilder(object):
    def __init__(self) -> None:
        self._resident_tax_for_update = ResidentTaxForUpdate()

    def tax_country_region(self, tax_country_region: str) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.tax_country_region = tax_country_region
        return self

    def resident_status(self, resident_status: str) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.resident_status = resident_status
        return self

    def tax_address(self, tax_address: AddressForUpdate) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.tax_address = tax_address
        return self

    def resident_status_specification(self, resident_status_specification: str) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.resident_status_specification = resident_status_specification
        return self

    def year_resident_tax(self, year_resident_tax: str) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.year_resident_tax = year_resident_tax
        return self

    def custom_fields(self, custom_fields: List[ObjectFieldData]) -> "ResidentTaxForUpdateBuilder":
        self._resident_tax_for_update.custom_fields = custom_fields
        return self

    def build(self) -> "ResidentTaxForUpdate":
        return self._resident_tax_for_update
