# 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 OpenWidgetInstance(object):
    _types = {
        "instance_code": str,
        "status": str,
        "create_time": int,
        "update_time": int,
        "form_content": str,
    }

    def __init__(self, d=None):
        self.instance_code: Optional[str] = None
        self.status: Optional[str] = None
        self.create_time: Optional[int] = None
        self.update_time: Optional[int] = None
        self.form_content: Optional[str] = None
        init(self, d, self._types)

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


class OpenWidgetInstanceBuilder(object):
    def __init__(self) -> None:
        self._open_widget_instance = OpenWidgetInstance()

    def instance_code(self, instance_code: str) -> "OpenWidgetInstanceBuilder":
        self._open_widget_instance.instance_code = instance_code
        return self

    def status(self, status: str) -> "OpenWidgetInstanceBuilder":
        self._open_widget_instance.status = status
        return self

    def create_time(self, create_time: int) -> "OpenWidgetInstanceBuilder":
        self._open_widget_instance.create_time = create_time
        return self

    def update_time(self, update_time: int) -> "OpenWidgetInstanceBuilder":
        self._open_widget_instance.update_time = update_time
        return self

    def form_content(self, form_content: str) -> "OpenWidgetInstanceBuilder":
        self._open_widget_instance.form_content = form_content
        return self

    def build(self) -> "OpenWidgetInstance":
        return self._open_widget_instance
