# 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 DataAssetImportKnowledgeFile(object):
    _types = {
        "title": str,
        "token": str,
        "content": str,
        "mime_type": str,
        "url": str,
    }

    def __init__(self, d=None):
        self.title: Optional[str] = None
        self.token: Optional[str] = None
        self.content: Optional[str] = None
        self.mime_type: Optional[str] = None
        self.url: Optional[str] = None
        init(self, d, self._types)

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


class DataAssetImportKnowledgeFileBuilder(object):
    def __init__(self) -> None:
        self._data_asset_import_knowledge_file = DataAssetImportKnowledgeFile()

    def title(self, title: str) -> "DataAssetImportKnowledgeFileBuilder":
        self._data_asset_import_knowledge_file.title = title
        return self

    def token(self, token: str) -> "DataAssetImportKnowledgeFileBuilder":
        self._data_asset_import_knowledge_file.token = token
        return self

    def content(self, content: str) -> "DataAssetImportKnowledgeFileBuilder":
        self._data_asset_import_knowledge_file.content = content
        return self

    def mime_type(self, mime_type: str) -> "DataAssetImportKnowledgeFileBuilder":
        self._data_asset_import_knowledge_file.mime_type = mime_type
        return self

    def url(self, url: str) -> "DataAssetImportKnowledgeFileBuilder":
        self._data_asset_import_knowledge_file.url = url
        return self

    def build(self) -> "DataAssetImportKnowledgeFile":
        return self._data_asset_import_knowledge_file
