# 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_import_knowledge_setting import DataAssetImportKnowledgeSetting


class CreateAppDataAssetRequestBody(object):
    _types = {
        "connect_type": str,
        "source_type": str,
        "import_knowledge_setting": DataAssetImportKnowledgeSetting,
        "description": Dict[str, str],
    }

    def __init__(self, d=None):
        self.connect_type: Optional[str] = None
        self.source_type: Optional[str] = None
        self.import_knowledge_setting: Optional[DataAssetImportKnowledgeSetting] = None
        self.description: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class CreateAppDataAssetRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._create_app_data_asset_request_body = CreateAppDataAssetRequestBody()

    def connect_type(self, connect_type: str) -> "CreateAppDataAssetRequestBodyBuilder":
        self._create_app_data_asset_request_body.connect_type = connect_type
        return self

    def source_type(self, source_type: str) -> "CreateAppDataAssetRequestBodyBuilder":
        self._create_app_data_asset_request_body.source_type = source_type
        return self

    def import_knowledge_setting(self,
                                 import_knowledge_setting: DataAssetImportKnowledgeSetting) -> "CreateAppDataAssetRequestBodyBuilder":
        self._create_app_data_asset_request_body.import_knowledge_setting = import_knowledge_setting
        return self

    def description(self, description: Dict[str, str]) -> "CreateAppDataAssetRequestBodyBuilder":
        self._create_app_data_asset_request_body.description = description
        return self

    def build(self) -> "CreateAppDataAssetRequestBody":
        return self._create_app_data_asset_request_body
