# 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 KnowledgeSourceWikiFilter(object):
    _types = {
        "wiki_tokens": List[str],
        "node_tokens": List[str],
        "space_ids": List[str],
    }

    def __init__(self, d=None):
        self.wiki_tokens: Optional[List[str]] = None
        self.node_tokens: Optional[List[str]] = None
        self.space_ids: Optional[List[str]] = None
        init(self, d, self._types)

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


class KnowledgeSourceWikiFilterBuilder(object):
    def __init__(self) -> None:
        self._knowledge_source_wiki_filter = KnowledgeSourceWikiFilter()

    def wiki_tokens(self, wiki_tokens: List[str]) -> "KnowledgeSourceWikiFilterBuilder":
        self._knowledge_source_wiki_filter.wiki_tokens = wiki_tokens
        return self

    def node_tokens(self, node_tokens: List[str]) -> "KnowledgeSourceWikiFilterBuilder":
        self._knowledge_source_wiki_filter.node_tokens = node_tokens
        return self

    def space_ids(self, space_ids: List[str]) -> "KnowledgeSourceWikiFilterBuilder":
        self._knowledge_source_wiki_filter.space_ids = space_ids
        return self

    def build(self) -> "KnowledgeSourceWikiFilter":
        return self._knowledge_source_wiki_filter
