# 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 I18nText(object):
    _types = {
        "default_value": str,
        "i18n_value": Dict[str, str],
        "default_locale": str,
    }

    def __init__(self, d=None):
        self.default_value: Optional[str] = None
        self.i18n_value: Optional[Dict[str, str]] = None
        self.default_locale: Optional[str] = None
        init(self, d, self._types)

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


class I18nTextBuilder(object):
    def __init__(self) -> None:
        self._i18n_text = I18nText()

    def default_value(self, default_value: str) -> "I18nTextBuilder":
        self._i18n_text.default_value = default_value
        return self

    def i18n_value(self, i18n_value: Dict[str, str]) -> "I18nTextBuilder":
        self._i18n_text.i18n_value = i18n_value
        return self

    def default_locale(self, default_locale: str) -> "I18nTextBuilder":
        self._i18n_text.default_locale = default_locale
        return self

    def build(self) -> "I18nText":
        return self._i18n_text
