# 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 .tag_i18n_name import TagI18nName


class TagInfo(object):
    _types = {
        "id": str,
        "tenant_id": str,
        "tag_type": str,
        "name": str,
        "i18n_names": List[TagI18nName],
        "creator_id": str,
        "create_time": str,
        "update_time": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.tenant_id: Optional[str] = None
        self.tag_type: Optional[str] = None
        self.name: Optional[str] = None
        self.i18n_names: Optional[List[TagI18nName]] = None
        self.creator_id: Optional[str] = None
        self.create_time: Optional[str] = None
        self.update_time: Optional[str] = None
        init(self, d, self._types)

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


class TagInfoBuilder(object):
    def __init__(self) -> None:
        self._tag_info = TagInfo()

    def id(self, id: str) -> "TagInfoBuilder":
        self._tag_info.id = id
        return self

    def tenant_id(self, tenant_id: str) -> "TagInfoBuilder":
        self._tag_info.tenant_id = tenant_id
        return self

    def tag_type(self, tag_type: str) -> "TagInfoBuilder":
        self._tag_info.tag_type = tag_type
        return self

    def name(self, name: str) -> "TagInfoBuilder":
        self._tag_info.name = name
        return self

    def i18n_names(self, i18n_names: List[TagI18nName]) -> "TagInfoBuilder":
        self._tag_info.i18n_names = i18n_names
        return self

    def creator_id(self, creator_id: str) -> "TagInfoBuilder":
        self._tag_info.creator_id = creator_id
        return self

    def create_time(self, create_time: str) -> "TagInfoBuilder":
        self._tag_info.create_time = create_time
        return self

    def update_time(self, update_time: str) -> "TagInfoBuilder":
        self._tag_info.update_time = update_time
        return self

    def build(self) -> "TagInfo":
        return self._tag_info
