# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .block import Block


class CreateDocumentBlockChildrenRequestBody(object):
    _types = {
        "children": List[Block],
        "index": int,
    }

    def __init__(self, d=None):
        self.children: Optional[List[Block]] = None
        self.index: Optional[int] = None
        init(self, d, self._types)

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


class CreateDocumentBlockChildrenRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._create_document_block_children_request_body = CreateDocumentBlockChildrenRequestBody()

    def children(self, children: List[Block]) -> "CreateDocumentBlockChildrenRequestBodyBuilder":
        self._create_document_block_children_request_body.children = children
        return self

    def index(self, index: int) -> "CreateDocumentBlockChildrenRequestBodyBuilder":
        self._create_document_block_children_request_body.index = index
        return self

    def build(self) -> "CreateDocumentBlockChildrenRequestBody":
        return self._create_document_block_children_request_body
