# 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 import I18n
from .tag_item import TagItem


class Question(object):
    _types = {
        "question_id": str,
        "name": I18n,
        "tag_items": List[TagItem],
    }

    def __init__(self, d=None):
        self.question_id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.tag_items: Optional[List[TagItem]] = None
        init(self, d, self._types)

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


class QuestionBuilder(object):
    def __init__(self) -> None:
        self._question = Question()

    def question_id(self, question_id: str) -> "QuestionBuilder":
        self._question.question_id = question_id
        return self

    def name(self, name: I18n) -> "QuestionBuilder":
        self._question.name = name
        return self

    def tag_items(self, tag_items: List[TagItem]) -> "QuestionBuilder":
        self._question.tag_items = tag_items
        return self

    def build(self) -> "Question":
        return self._question
