# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .preview_node import PreviewNode


class PreviewInstanceResponseBody(object):
    _types = {
        "preview_nodes": List[PreviewNode],
    }

    def __init__(self, d=None):
        self.preview_nodes: Optional[List[PreviewNode]] = None
        init(self, d, self._types)

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


class PreviewInstanceResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._preview_instance_response_body = PreviewInstanceResponseBody()

    def preview_nodes(self, preview_nodes: List[PreviewNode]) -> "PreviewInstanceResponseBodyBuilder":
        self._preview_instance_response_body.preview_nodes = preview_nodes
        return self

    def build(self) -> "PreviewInstanceResponseBody":
        return self._preview_instance_response_body
