# 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 .indicator_option import IndicatorOption


class Indicator(object):
    _types = {
        "id": str,
        "name": I18n,
        "type": str,
        "options": List[IndicatorOption],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.type: Optional[str] = None
        self.options: Optional[List[IndicatorOption]] = None
        init(self, d, self._types)

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


class IndicatorBuilder(object):
    def __init__(self) -> None:
        self._indicator = Indicator()

    def id(self, id: str) -> "IndicatorBuilder":
        self._indicator.id = id
        return self

    def name(self, name: I18n) -> "IndicatorBuilder":
        self._indicator.name = name
        return self

    def type(self, type: str) -> "IndicatorBuilder":
        self._indicator.type = type
        return self

    def options(self, options: List[IndicatorOption]) -> "IndicatorBuilder":
        self._indicator.options = options
        return self

    def build(self) -> "Indicator":
        return self._indicator
