# 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 .bpm_dataengine_i18n import BpmDataengineI18n
from .bpm_form_error_message import BpmFormErrorMessage
from .bpm_dataengine_i18n import BpmDataengineI18n


class BatchCheckFormInstanceI18nResult(object):
    _types = {
        "success": bool,
        "field_validate_error_messages": str,
        "form_validate_error_messages": List[BpmDataengineI18n],
        "system_error_message": BpmFormErrorMessage,
        "advanced_field_check_result_list": str,
        "err_message_for_export": List[BpmDataengineI18n],
        "no_permisson_apis": List[list],
    }

    def __init__(self, d=None):
        self.success: Optional[bool] = None
        self.field_validate_error_messages: Optional[str] = None
        self.form_validate_error_messages: Optional[List[BpmDataengineI18n]] = None
        self.system_error_message: Optional[BpmFormErrorMessage] = None
        self.advanced_field_check_result_list: Optional[str] = None
        self.err_message_for_export: Optional[List[BpmDataengineI18n]] = None
        self.no_permisson_apis: Optional[List[list]] = None
        init(self, d, self._types)

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


class BatchCheckFormInstanceI18nResultBuilder(object):
    def __init__(self) -> None:
        self._batch_check_form_instance_i18n_result = BatchCheckFormInstanceI18nResult()

    def success(self, success: bool) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.success = success
        return self

    def field_validate_error_messages(self,
                                      field_validate_error_messages: str) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.field_validate_error_messages = field_validate_error_messages
        return self

    def form_validate_error_messages(self, form_validate_error_messages: List[
        BpmDataengineI18n]) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.form_validate_error_messages = form_validate_error_messages
        return self

    def system_error_message(self,
                             system_error_message: BpmFormErrorMessage) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.system_error_message = system_error_message
        return self

    def advanced_field_check_result_list(self,
                                         advanced_field_check_result_list: str) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.advanced_field_check_result_list = advanced_field_check_result_list
        return self

    def err_message_for_export(self, err_message_for_export: List[
        BpmDataengineI18n]) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.err_message_for_export = err_message_for_export
        return self

    def no_permisson_apis(self, no_permisson_apis: List[list]) -> "BatchCheckFormInstanceI18nResultBuilder":
        self._batch_check_form_instance_i18n_result.no_permisson_apis = no_permisson_apis
        return self

    def build(self) -> "BatchCheckFormInstanceI18nResult":
        return self._batch_check_form_instance_i18n_result
