# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class ScoreCalculationConfig(object):
    _types = {
        "enabled": bool,
        "calculation_mode": int,
    }

    def __init__(self, d=None):
        self.enabled: Optional[bool] = None
        self.calculation_mode: Optional[int] = None
        init(self, d, self._types)

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


class ScoreCalculationConfigBuilder(object):
    def __init__(self) -> None:
        self._score_calculation_config = ScoreCalculationConfig()

    def enabled(self, enabled: bool) -> "ScoreCalculationConfigBuilder":
        self._score_calculation_config.enabled = enabled
        return self

    def calculation_mode(self, calculation_mode: int) -> "ScoreCalculationConfigBuilder":
        self._score_calculation_config.calculation_mode = calculation_mode
        return self

    def build(self) -> "ScoreCalculationConfig":
        return self._score_calculation_config
