# 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 .dimension_option import DimensionOption
from .dimension_option import DimensionOption
from .recommended_job_level import RecommendedJobLevel
from .question_assessment import QuestionAssessment


class DimensionAssessment(object):
    _types = {
        "interview_feedback_form_dimension_id": str,
        "dimension_name": I18n,
        "dimension_type": int,
        "weight": float,
        "dimension_content": str,
        "dimension_option": DimensionOption,
        "dimension_options": List[DimensionOption],
        "dimension_score": int,
        "recommended_job_level": RecommendedJobLevel,
        "question_assessments": List[QuestionAssessment],
    }

    def __init__(self, d=None):
        self.interview_feedback_form_dimension_id: Optional[str] = None
        self.dimension_name: Optional[I18n] = None
        self.dimension_type: Optional[int] = None
        self.weight: Optional[float] = None
        self.dimension_content: Optional[str] = None
        self.dimension_option: Optional[DimensionOption] = None
        self.dimension_options: Optional[List[DimensionOption]] = None
        self.dimension_score: Optional[int] = None
        self.recommended_job_level: Optional[RecommendedJobLevel] = None
        self.question_assessments: Optional[List[QuestionAssessment]] = None
        init(self, d, self._types)

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


class DimensionAssessmentBuilder(object):
    def __init__(self) -> None:
        self._dimension_assessment = DimensionAssessment()

    def interview_feedback_form_dimension_id(self,
                                             interview_feedback_form_dimension_id: str) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.interview_feedback_form_dimension_id = interview_feedback_form_dimension_id
        return self

    def dimension_name(self, dimension_name: I18n) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_name = dimension_name
        return self

    def dimension_type(self, dimension_type: int) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_type = dimension_type
        return self

    def weight(self, weight: float) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.weight = weight
        return self

    def dimension_content(self, dimension_content: str) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_content = dimension_content
        return self

    def dimension_option(self, dimension_option: DimensionOption) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_option = dimension_option
        return self

    def dimension_options(self, dimension_options: List[DimensionOption]) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_options = dimension_options
        return self

    def dimension_score(self, dimension_score: int) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.dimension_score = dimension_score
        return self

    def recommended_job_level(self, recommended_job_level: RecommendedJobLevel) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.recommended_job_level = recommended_job_level
        return self

    def question_assessments(self, question_assessments: List[QuestionAssessment]) -> "DimensionAssessmentBuilder":
        self._dimension_assessment.question_assessments = question_assessments
        return self

    def build(self) -> "DimensionAssessment":
        return self._dimension_assessment
