# 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 BpmFormErrorMessage(object):
    _types = {
        "code": int,
        "message": str,
    }

    def __init__(self, d=None):
        self.code: Optional[int] = None
        self.message: Optional[str] = None
        init(self, d, self._types)

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


class BpmFormErrorMessageBuilder(object):
    def __init__(self) -> None:
        self._bpm_form_error_message = BpmFormErrorMessage()

    def code(self, code: int) -> "BpmFormErrorMessageBuilder":
        self._bpm_form_error_message.code = code
        return self

    def message(self, message: str) -> "BpmFormErrorMessageBuilder":
        self._bpm_form_error_message.message = message
        return self

    def build(self) -> "BpmFormErrorMessage":
        return self._bpm_form_error_message
