# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ExternalInstanceForm(object):
    _types = {
        "name": str,
        "value": str,
    }

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

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


class ExternalInstanceFormBuilder(object):
    def __init__(self) -> None:
        self._external_instance_form = ExternalInstanceForm()

    def name(self, name: str) -> "ExternalInstanceFormBuilder":
        self._external_instance_form.name = name
        return self

    def value(self, value: str) -> "ExternalInstanceFormBuilder":
        self._external_instance_form.value = value
        return self

    def build(self) -> "ExternalInstanceForm":
        return self._external_instance_form
