# 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_qa_reference import KnowledgeQaReference


class KnowledgeQaAnswerResponse(object):
    _types = {
        "answer": str,
        "reasoning_content": str,
        "status_code": int,
        "status_message": str,
        "references": KnowledgeQaReference,
    }

    def __init__(self, d=None):
        self.answer: Optional[str] = None
        self.reasoning_content: Optional[str] = None
        self.status_code: Optional[int] = None
        self.status_message: Optional[str] = None
        self.references: Optional[KnowledgeQaReference] = None
        init(self, d, self._types)

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


class KnowledgeQaAnswerResponseBuilder(object):
    def __init__(self) -> None:
        self._knowledge_qa_answer_response = KnowledgeQaAnswerResponse()

    def answer(self, answer: str) -> "KnowledgeQaAnswerResponseBuilder":
        self._knowledge_qa_answer_response.answer = answer
        return self

    def reasoning_content(self, reasoning_content: str) -> "KnowledgeQaAnswerResponseBuilder":
        self._knowledge_qa_answer_response.reasoning_content = reasoning_content
        return self

    def status_code(self, status_code: int) -> "KnowledgeQaAnswerResponseBuilder":
        self._knowledge_qa_answer_response.status_code = status_code
        return self

    def status_message(self, status_message: str) -> "KnowledgeQaAnswerResponseBuilder":
        self._knowledge_qa_answer_response.status_message = status_message
        return self

    def references(self, references: KnowledgeQaReference) -> "KnowledgeQaAnswerResponseBuilder":
        self._knowledge_qa_answer_response.references = references
        return self

    def build(self) -> "KnowledgeQaAnswerResponse":
        return self._knowledge_qa_answer_response
