# 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 .doc_chunk_bbox_item import DocChunkBboxItem


class DocChunkPosition(object):
    _types = {
        "page_numbers": List[int],
        "bboxes": List[DocChunkBboxItem],
    }

    def __init__(self, d=None):
        self.page_numbers: Optional[List[int]] = None
        self.bboxes: Optional[List[DocChunkBboxItem]] = None
        init(self, d, self._types)

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


class DocChunkPositionBuilder(object):
    def __init__(self) -> None:
        self._doc_chunk_position = DocChunkPosition()

    def page_numbers(self, page_numbers: List[int]) -> "DocChunkPositionBuilder":
        self._doc_chunk_position.page_numbers = page_numbers
        return self

    def bboxes(self, bboxes: List[DocChunkBboxItem]) -> "DocChunkPositionBuilder":
        self._doc_chunk_position.bboxes = bboxes
        return self

    def build(self) -> "DocChunkPosition":
        return self._doc_chunk_position
