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

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

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


class CreateTagBuilder(object):
    def __init__(self) -> None:
        self._create_tag = CreateTag()

    def tag_type(self, tag_type: str) -> "CreateTagBuilder":
        self._create_tag.tag_type = tag_type
        return self

    def name(self, name: str) -> "CreateTagBuilder":
        self._create_tag.name = name
        return self

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

    def build(self) -> "CreateTag":
        return self._create_tag
