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

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

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


class PatchTagBuilder(object):
    def __init__(self) -> None:
        self._patch_tag = PatchTag()

    def id(self, id: str) -> "PatchTagBuilder":
        self._patch_tag.id = id
        return self

    def name(self, name: str) -> "PatchTagBuilder":
        self._patch_tag.name = name
        return self

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

    def build(self) -> "PatchTag":
        return self._patch_tag
