# 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 .data_asset_chunk_source_info import DataAssetChunkSourceInfo


class DataAssetChunk(object):
    _types = {
        "content": str,
        "data_asset_id": str,
        "score": float,
        "data_asset_label": Dict[str, str],
        "data_asset_source_url": str,
        "data_asset_data_source_type": str,
        "data_asset_connect_type": str,
        "source_info": DataAssetChunkSourceInfo,
    }

    def __init__(self, d=None):
        self.content: Optional[str] = None
        self.data_asset_id: Optional[str] = None
        self.score: Optional[float] = None
        self.data_asset_label: Optional[Dict[str, str]] = None
        self.data_asset_source_url: Optional[str] = None
        self.data_asset_data_source_type: Optional[str] = None
        self.data_asset_connect_type: Optional[str] = None
        self.source_info: Optional[DataAssetChunkSourceInfo] = None
        init(self, d, self._types)

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


class DataAssetChunkBuilder(object):
    def __init__(self) -> None:
        self._data_asset_chunk = DataAssetChunk()

    def content(self, content: str) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.content = content
        return self

    def data_asset_id(self, data_asset_id: str) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.data_asset_id = data_asset_id
        return self

    def score(self, score: float) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.score = score
        return self

    def data_asset_label(self, data_asset_label: Dict[str, str]) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.data_asset_label = data_asset_label
        return self

    def data_asset_source_url(self, data_asset_source_url: str) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.data_asset_source_url = data_asset_source_url
        return self

    def data_asset_data_source_type(self, data_asset_data_source_type: str) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.data_asset_data_source_type = data_asset_data_source_type
        return self

    def data_asset_connect_type(self, data_asset_connect_type: str) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.data_asset_connect_type = data_asset_connect_type
        return self

    def source_info(self, source_info: DataAssetChunkSourceInfo) -> "DataAssetChunkBuilder":
        self._data_asset_chunk.source_info = source_info
        return self

    def build(self) -> "DataAssetChunk":
        return self._data_asset_chunk
