# 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 DatasetSourceSetting(object):
    _types = {
        "api_id": str,
        "api_name": str,
        "label": Dict[str, str],
    }

    def __init__(self, d=None):
        self.api_id: Optional[str] = None
        self.api_name: Optional[str] = None
        self.label: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class DatasetSourceSettingBuilder(object):
    def __init__(self) -> None:
        self._dataset_source_setting = DatasetSourceSetting()

    def api_id(self, api_id: str) -> "DatasetSourceSettingBuilder":
        self._dataset_source_setting.api_id = api_id
        return self

    def api_name(self, api_name: str) -> "DatasetSourceSettingBuilder":
        self._dataset_source_setting.api_name = api_name
        return self

    def label(self, label: Dict[str, str]) -> "DatasetSourceSettingBuilder":
        self._dataset_source_setting.label = label
        return self

    def build(self) -> "DatasetSourceSetting":
        return self._dataset_source_setting
