# 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 ItemCategory(object):
    _types = {
        "id": str,
        "name": str,
        "i18n_names": List[I18nContent],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[str] = None
        self.i18n_names: Optional[List[I18nContent]] = None
        init(self, d, self._types)

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


class ItemCategoryBuilder(object):
    def __init__(self) -> None:
        self._item_category = ItemCategory()

    def id(self, id: str) -> "ItemCategoryBuilder":
        self._item_category.id = id
        return self

    def name(self, name: str) -> "ItemCategoryBuilder":
        self._item_category.name = name
        return self

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

    def build(self) -> "ItemCategory":
        return self._item_category
