# 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 .i18n import I18n
from .ability import Ability


class QuestionAssessment(object):
    _types = {
        "question_type": int,
        "title": I18n,
        "description": I18n,
        "content": str,
        "abilities": List[Ability],
    }

    def __init__(self, d=None):
        self.question_type: Optional[int] = None
        self.title: Optional[I18n] = None
        self.description: Optional[I18n] = None
        self.content: Optional[str] = None
        self.abilities: Optional[List[Ability]] = None
        init(self, d, self._types)

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


class QuestionAssessmentBuilder(object):
    def __init__(self) -> None:
        self._question_assessment = QuestionAssessment()

    def question_type(self, question_type: int) -> "QuestionAssessmentBuilder":
        self._question_assessment.question_type = question_type
        return self

    def title(self, title: I18n) -> "QuestionAssessmentBuilder":
        self._question_assessment.title = title
        return self

    def description(self, description: I18n) -> "QuestionAssessmentBuilder":
        self._question_assessment.description = description
        return self

    def content(self, content: str) -> "QuestionAssessmentBuilder":
        self._question_assessment.content = content
        return self

    def abilities(self, abilities: List[Ability]) -> "QuestionAssessmentBuilder":
        self._question_assessment.abilities = abilities
        return self

    def build(self) -> "QuestionAssessment":
        return self._question_assessment
