# 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 ImageDetail(object):
    _types = {
        "base64": str,
        "caption": str,
        "links": List[str],
        "token": str,
    }

    def __init__(self, d=None):
        self.base64: Optional[str] = None
        self.caption: Optional[str] = None
        self.links: Optional[List[str]] = None
        self.token: Optional[str] = None
        init(self, d, self._types)

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


class ImageDetailBuilder(object):
    def __init__(self) -> None:
        self._image_detail = ImageDetail()

    def base64(self, base64: str) -> "ImageDetailBuilder":
        self._image_detail.base64 = base64
        return self

    def caption(self, caption: str) -> "ImageDetailBuilder":
        self._image_detail.caption = caption
        return self

    def links(self, links: List[str]) -> "ImageDetailBuilder":
        self._image_detail.links = links
        return self

    def token(self, token: str) -> "ImageDetailBuilder":
        self._image_detail.token = token
        return self

    def build(self) -> "ImageDetail":
        return self._image_detail
