# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .bpm_dataengine_i18n import BpmDataengineI18n


class FormFieldVariableEnumValue(object):
    _types = {
        "value": str,
        "name": BpmDataengineI18n,
        "desc": BpmDataengineI18n,
    }

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

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


class FormFieldVariableEnumValueBuilder(object):
    def __init__(self) -> None:
        self._form_field_variable_enum_value = FormFieldVariableEnumValue()

    def value(self, value: str) -> "FormFieldVariableEnumValueBuilder":
        self._form_field_variable_enum_value.value = value
        return self

    def name(self, name: BpmDataengineI18n) -> "FormFieldVariableEnumValueBuilder":
        self._form_field_variable_enum_value.name = name
        return self

    def desc(self, desc: BpmDataengineI18n) -> "FormFieldVariableEnumValueBuilder":
        self._form_field_variable_enum_value.desc = desc
        return self

    def build(self) -> "FormFieldVariableEnumValue":
        return self._form_field_variable_enum_value
