# 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 .score_dimension_config import ScoreDimensionConfig
from .interview_dimension_option import InterviewDimensionOption
from .dimension_ability import DimensionAbility
from .related_dimension_config import RelatedDimensionConfig


class InterviewFeedbackFormDimension(object):
    _types = {
        "id": str,
        "name": I18n,
        "description": I18n,
        "type": int,
        "enabled": bool,
        "sequence": int,
        "is_required": bool,
        "weight": float,
        "score_dimension_config": ScoreDimensionConfig,
        "option_items": List[InterviewDimensionOption],
        "display_not_evident": bool,
        "ability_list": List[DimensionAbility],
        "related_dimension_config": RelatedDimensionConfig,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.description: Optional[I18n] = None
        self.type: Optional[int] = None
        self.enabled: Optional[bool] = None
        self.sequence: Optional[int] = None
        self.is_required: Optional[bool] = None
        self.weight: Optional[float] = None
        self.score_dimension_config: Optional[ScoreDimensionConfig] = None
        self.option_items: Optional[List[InterviewDimensionOption]] = None
        self.display_not_evident: Optional[bool] = None
        self.ability_list: Optional[List[DimensionAbility]] = None
        self.related_dimension_config: Optional[RelatedDimensionConfig] = None
        init(self, d, self._types)

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


class InterviewFeedbackFormDimensionBuilder(object):
    def __init__(self) -> None:
        self._interview_feedback_form_dimension = InterviewFeedbackFormDimension()

    def id(self, id: str) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.id = id
        return self

    def name(self, name: I18n) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.name = name
        return self

    def description(self, description: I18n) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.description = description
        return self

    def type(self, type: int) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.type = type
        return self

    def enabled(self, enabled: bool) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.enabled = enabled
        return self

    def sequence(self, sequence: int) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.sequence = sequence
        return self

    def is_required(self, is_required: bool) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.is_required = is_required
        return self

    def weight(self, weight: float) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.weight = weight
        return self

    def score_dimension_config(self,
                               score_dimension_config: ScoreDimensionConfig) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.score_dimension_config = score_dimension_config
        return self

    def option_items(self, option_items: List[InterviewDimensionOption]) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.option_items = option_items
        return self

    def display_not_evident(self, display_not_evident: bool) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.display_not_evident = display_not_evident
        return self

    def ability_list(self, ability_list: List[DimensionAbility]) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.ability_list = ability_list
        return self

    def related_dimension_config(self,
                                 related_dimension_config: RelatedDimensionConfig) -> "InterviewFeedbackFormDimensionBuilder":
        self._interview_feedback_form_dimension.related_dimension_config = related_dimension_config
        return self

    def build(self) -> "InterviewFeedbackFormDimension":
        return self._interview_feedback_form_dimension
