# 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_knowledge_chunk_setting import DataAssetKnowledgeChunkSetting
from .data_asset_import_knowledge_file import DataAssetImportKnowledgeFile
from .data_asset_import_knowledge_lark_doc import DataAssetImportKnowledgeLarkDoc
from .data_asset_import_knowledge_wiki import DataAssetImportKnowledgeWiki
from .data_asset_import_knowledge_helpdesk import DataAssetImportKnowledgeHelpdesk


class DataAssetImportKnowledgeSetting(object):
    _types = {
        "chunk_setting": DataAssetKnowledgeChunkSetting,
        "file": DataAssetImportKnowledgeFile,
        "lark_doc": DataAssetImportKnowledgeLarkDoc,
        "lark_wiki_space": DataAssetImportKnowledgeWiki,
        "lark_helpdesk": DataAssetImportKnowledgeHelpdesk,
    }

    def __init__(self, d=None):
        self.chunk_setting: Optional[DataAssetKnowledgeChunkSetting] = None
        self.file: Optional[DataAssetImportKnowledgeFile] = None
        self.lark_doc: Optional[DataAssetImportKnowledgeLarkDoc] = None
        self.lark_wiki_space: Optional[DataAssetImportKnowledgeWiki] = None
        self.lark_helpdesk: Optional[DataAssetImportKnowledgeHelpdesk] = None
        init(self, d, self._types)

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


class DataAssetImportKnowledgeSettingBuilder(object):
    def __init__(self) -> None:
        self._data_asset_import_knowledge_setting = DataAssetImportKnowledgeSetting()

    def chunk_setting(self, chunk_setting: DataAssetKnowledgeChunkSetting) -> "DataAssetImportKnowledgeSettingBuilder":
        self._data_asset_import_knowledge_setting.chunk_setting = chunk_setting
        return self

    def file(self, file: DataAssetImportKnowledgeFile) -> "DataAssetImportKnowledgeSettingBuilder":
        self._data_asset_import_knowledge_setting.file = file
        return self

    def lark_doc(self, lark_doc: DataAssetImportKnowledgeLarkDoc) -> "DataAssetImportKnowledgeSettingBuilder":
        self._data_asset_import_knowledge_setting.lark_doc = lark_doc
        return self

    def lark_wiki_space(self,
                        lark_wiki_space: DataAssetImportKnowledgeWiki) -> "DataAssetImportKnowledgeSettingBuilder":
        self._data_asset_import_knowledge_setting.lark_wiki_space = lark_wiki_space
        return self

    def lark_helpdesk(self,
                      lark_helpdesk: DataAssetImportKnowledgeHelpdesk) -> "DataAssetImportKnowledgeSettingBuilder":
        self._data_asset_import_knowledge_setting.lark_helpdesk = lark_helpdesk
        return self

    def build(self) -> "DataAssetImportKnowledgeSetting":
        return self._data_asset_import_knowledge_setting
