# 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 TableImg(object):
    _types = {
        "type": str,
        "base64": str,
        "url": str,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.base64: Optional[str] = None
        self.url: Optional[str] = None
        init(self, d, self._types)

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


class TableImgBuilder(object):
    def __init__(self) -> None:
        self._table_img = TableImg()

    def type(self, type: str) -> "TableImgBuilder":
        self._table_img.type = type
        return self

    def base64(self, base64: str) -> "TableImgBuilder":
        self._table_img.base64 = base64
        return self

    def url(self, url: str) -> "TableImgBuilder":
        self._table_img.url = url
        return self

    def build(self) -> "TableImg":
        return self._table_img
