# 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 .knowledge_source_message_filter import KnowledgeSourceMessageFilter
from .knowledge_source_message_reject import KnowledgeSourceMessageReject


class EnterpriseKnowledgeSourceMessageParam(object):
    _types = {
        "searchable": bool,
        "filter": KnowledgeSourceMessageFilter,
        "reject": KnowledgeSourceMessageReject,
    }

    def __init__(self, d=None):
        self.searchable: Optional[bool] = None
        self.filter: Optional[KnowledgeSourceMessageFilter] = None
        self.reject: Optional[KnowledgeSourceMessageReject] = None
        init(self, d, self._types)

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


class EnterpriseKnowledgeSourceMessageParamBuilder(object):
    def __init__(self) -> None:
        self._enterprise_knowledge_source_message_param = EnterpriseKnowledgeSourceMessageParam()

    def searchable(self, searchable: bool) -> "EnterpriseKnowledgeSourceMessageParamBuilder":
        self._enterprise_knowledge_source_message_param.searchable = searchable
        return self

    def filter(self, filter: KnowledgeSourceMessageFilter) -> "EnterpriseKnowledgeSourceMessageParamBuilder":
        self._enterprise_knowledge_source_message_param.filter = filter
        return self

    def reject(self, reject: KnowledgeSourceMessageReject) -> "EnterpriseKnowledgeSourceMessageParamBuilder":
        self._enterprise_knowledge_source_message_param.reject = reject
        return self

    def build(self) -> "EnterpriseKnowledgeSourceMessageParam":
        return self._enterprise_knowledge_source_message_param
