# 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 .aily_knowledge_message import AilyKnowledgeMessage
from .aily_knowledge_ask_process_data import AilyKnowledgeAskProcessData
from .aily_knowledge_faq import AilyKnowledgeFaq


class AskAppKnowledgeResponseBody(object):
    _types = {
        "status": str,
        "finish_type": str,
        "message": AilyKnowledgeMessage,
        "process_data": AilyKnowledgeAskProcessData,
        "faq_result": AilyKnowledgeFaq,
        "has_answer": bool,
    }

    def __init__(self, d=None):
        self.status: Optional[str] = None
        self.finish_type: Optional[str] = None
        self.message: Optional[AilyKnowledgeMessage] = None
        self.process_data: Optional[AilyKnowledgeAskProcessData] = None
        self.faq_result: Optional[AilyKnowledgeFaq] = None
        self.has_answer: Optional[bool] = None
        init(self, d, self._types)

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


class AskAppKnowledgeResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._ask_app_knowledge_response_body = AskAppKnowledgeResponseBody()

    def status(self, status: str) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.status = status
        return self

    def finish_type(self, finish_type: str) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.finish_type = finish_type
        return self

    def message(self, message: AilyKnowledgeMessage) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.message = message
        return self

    def process_data(self, process_data: AilyKnowledgeAskProcessData) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.process_data = process_data
        return self

    def faq_result(self, faq_result: AilyKnowledgeFaq) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.faq_result = faq_result
        return self

    def has_answer(self, has_answer: bool) -> "AskAppKnowledgeResponseBodyBuilder":
        self._ask_app_knowledge_response_body.has_answer = has_answer
        return self

    def build(self) -> "AskAppKnowledgeResponseBody":
        return self._ask_app_knowledge_response_body
