# 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 SubIndicator(object):
    _types = {
        "field_id": str,
        "indicator_id": str,
        "option_id": str,
        "score": str,
        "text": str,
        "richtext": str,
    }

    def __init__(self, d=None):
        self.field_id: Optional[str] = None
        self.indicator_id: Optional[str] = None
        self.option_id: Optional[str] = None
        self.score: Optional[str] = None
        self.text: Optional[str] = None
        self.richtext: Optional[str] = None
        init(self, d, self._types)

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


class SubIndicatorBuilder(object):
    def __init__(self) -> None:
        self._sub_indicator = SubIndicator()

    def field_id(self, field_id: str) -> "SubIndicatorBuilder":
        self._sub_indicator.field_id = field_id
        return self

    def indicator_id(self, indicator_id: str) -> "SubIndicatorBuilder":
        self._sub_indicator.indicator_id = indicator_id
        return self

    def option_id(self, option_id: str) -> "SubIndicatorBuilder":
        self._sub_indicator.option_id = option_id
        return self

    def score(self, score: str) -> "SubIndicatorBuilder":
        self._sub_indicator.score = score
        return self

    def text(self, text: str) -> "SubIndicatorBuilder":
        self._sub_indicator.text = text
        return self

    def richtext(self, richtext: str) -> "SubIndicatorBuilder":
        self._sub_indicator.richtext = richtext
        return self

    def build(self) -> "SubIndicator":
        return self._sub_indicator
