# Code generated by Lark OpenAPI.

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


class TableCellMergeInfo(object):
    _types = {
        "row_span": int,
        "col_span": int,
    }

    def __init__(self, d=None):
        self.row_span: Optional[int] = None
        self.col_span: Optional[int] = None
        init(self, d, self._types)

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


class TableCellMergeInfoBuilder(object):
    def __init__(self) -> None:
        self._table_cell_merge_info = TableCellMergeInfo()

    def row_span(self, row_span: int) -> "TableCellMergeInfoBuilder":
        self._table_cell_merge_info.row_span = row_span
        return self

    def col_span(self, col_span: int) -> "TableCellMergeInfoBuilder":
        self._table_cell_merge_info.col_span = col_span
        return self

    def build(self) -> "TableCellMergeInfo":
        return self._table_cell_merge_info
