# 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_content import I18nContent


class AcctItem(object):
    _types = {
        "id": str,
        "i18n_names": List[I18nContent],
        "category_id": str,
        "data_type": int,
        "decimal_places": int,
        "active_status": int,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.i18n_names: Optional[List[I18nContent]] = None
        self.category_id: Optional[str] = None
        self.data_type: Optional[int] = None
        self.decimal_places: Optional[int] = None
        self.active_status: Optional[int] = None
        init(self, d, self._types)

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


class AcctItemBuilder(object):
    def __init__(self) -> None:
        self._acct_item = AcctItem()

    def id(self, id: str) -> "AcctItemBuilder":
        self._acct_item.id = id
        return self

    def i18n_names(self, i18n_names: List[I18nContent]) -> "AcctItemBuilder":
        self._acct_item.i18n_names = i18n_names
        return self

    def category_id(self, category_id: str) -> "AcctItemBuilder":
        self._acct_item.category_id = category_id
        return self

    def data_type(self, data_type: int) -> "AcctItemBuilder":
        self._acct_item.data_type = data_type
        return self

    def decimal_places(self, decimal_places: int) -> "AcctItemBuilder":
        self._acct_item.decimal_places = decimal_places
        return self

    def active_status(self, active_status: int) -> "AcctItemBuilder":
        self._acct_item.active_status = active_status
        return self

    def build(self) -> "AcctItem":
        return self._acct_item
