# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class I18nResourceText(object):
    _types = {
        "key": str,
        "value": str,
    }

    def __init__(self, d=None):
        self.key: Optional[str] = None
        self.value: Optional[str] = None
        init(self, d, self._types)

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


class I18nResourceTextBuilder(object):
    def __init__(self) -> None:
        self._i18n_resource_text = I18nResourceText()

    def key(self, key: str) -> "I18nResourceTextBuilder":
        self._i18n_resource_text.key = key
        return self

    def value(self, value: str) -> "I18nResourceTextBuilder":
        self._i18n_resource_text.value = value
        return self

    def build(self) -> "I18nResourceText":
        return self._i18n_resource_text
