# 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 .field_variable_value_to_for_review import FieldVariableValueToForReview
from .field_variable_sub_vlaue_for_review import FieldVariableSubVlaueForReview


class ProcessFormVariableV2(object):
    _types = {
        "variable_api_name": str,
        "variable_value": FieldVariableValueToForReview,
        "sub_values": List[FieldVariableSubVlaueForReview],
    }

    def __init__(self, d=None):
        self.variable_api_name: Optional[str] = None
        self.variable_value: Optional[FieldVariableValueToForReview] = None
        self.sub_values: Optional[List[FieldVariableSubVlaueForReview]] = None
        init(self, d, self._types)

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


class ProcessFormVariableV2Builder(object):
    def __init__(self) -> None:
        self._process_form_variable_v2 = ProcessFormVariableV2()

    def variable_api_name(self, variable_api_name: str) -> "ProcessFormVariableV2Builder":
        self._process_form_variable_v2.variable_api_name = variable_api_name
        return self

    def variable_value(self, variable_value: FieldVariableValueToForReview) -> "ProcessFormVariableV2Builder":
        self._process_form_variable_v2.variable_value = variable_value
        return self

    def sub_values(self, sub_values: List[FieldVariableSubVlaueForReview]) -> "ProcessFormVariableV2Builder":
        self._process_form_variable_v2.sub_values = sub_values
        return self

    def build(self) -> "ProcessFormVariableV2":
        return self._process_form_variable_v2
