# 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 .i18n import I18n


class SocialInsurance(object):
    _types = {
        "id": str,
        "name": I18n,
        "insurance_type": str,
        "active": bool,
        "is_system": bool,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.insurance_type: Optional[str] = None
        self.active: Optional[bool] = None
        self.is_system: Optional[bool] = None
        init(self, d, self._types)

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


class SocialInsuranceBuilder(object):
    def __init__(self) -> None:
        self._social_insurance = SocialInsurance()

    def id(self, id: str) -> "SocialInsuranceBuilder":
        self._social_insurance.id = id
        return self

    def name(self, name: I18n) -> "SocialInsuranceBuilder":
        self._social_insurance.name = name
        return self

    def insurance_type(self, insurance_type: str) -> "SocialInsuranceBuilder":
        self._social_insurance.insurance_type = insurance_type
        return self

    def active(self, active: bool) -> "SocialInsuranceBuilder":
        self._social_insurance.active = active
        return self

    def is_system(self, is_system: bool) -> "SocialInsuranceBuilder":
        self._social_insurance.is_system = is_system
        return self

    def build(self) -> "SocialInsurance":
        return self._social_insurance
