# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ApprovalForm(object):
    _types = {
        "form_content": str,
        "widget_relation": str,
    }

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

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


class ApprovalFormBuilder(object):
    def __init__(self) -> None:
        self._approval_form = ApprovalForm()

    def form_content(self, form_content: str) -> "ApprovalFormBuilder":
        self._approval_form.form_content = form_content
        return self

    def widget_relation(self, widget_relation: str) -> "ApprovalFormBuilder":
        self._approval_form.widget_relation = widget_relation
        return self

    def build(self) -> "ApprovalForm":
        return self._approval_form
