# 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
from .block_id_to_image_url import BlockIdToImageUrl


class ConvertDocumentResponseBody(object):
    _types = {
        "first_level_block_ids": List[str],
        "blocks": List[Block],
        "block_id_to_image_urls": List[BlockIdToImageUrl],
    }

    def __init__(self, d=None):
        self.first_level_block_ids: Optional[List[str]] = None
        self.blocks: Optional[List[Block]] = None
        self.block_id_to_image_urls: Optional[List[BlockIdToImageUrl]] = None
        init(self, d, self._types)

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


class ConvertDocumentResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._convert_document_response_body = ConvertDocumentResponseBody()

    def first_level_block_ids(self, first_level_block_ids: List[str]) -> "ConvertDocumentResponseBodyBuilder":
        self._convert_document_response_body.first_level_block_ids = first_level_block_ids
        return self

    def blocks(self, blocks: List[Block]) -> "ConvertDocumentResponseBodyBuilder":
        self._convert_document_response_body.blocks = blocks
        return self

    def block_id_to_image_urls(self,
                               block_id_to_image_urls: List[BlockIdToImageUrl]) -> "ConvertDocumentResponseBodyBuilder":
        self._convert_document_response_body.block_id_to_image_urls = block_id_to_image_urls
        return self

    def build(self) -> "ConvertDocumentResponseBody":
        return self._convert_document_response_body
