# 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 KnowledgeQaEnterpriseReference(object):
    _types = {
        "id": str,
        "source_type": int,
        "title": str,
        "content": str,
        "url": str,
    }

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

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


class KnowledgeQaEnterpriseReferenceBuilder(object):
    def __init__(self) -> None:
        self._knowledge_qa_enterprise_reference = KnowledgeQaEnterpriseReference()

    def id(self, id: str) -> "KnowledgeQaEnterpriseReferenceBuilder":
        self._knowledge_qa_enterprise_reference.id = id
        return self

    def source_type(self, source_type: int) -> "KnowledgeQaEnterpriseReferenceBuilder":
        self._knowledge_qa_enterprise_reference.source_type = source_type
        return self

    def title(self, title: str) -> "KnowledgeQaEnterpriseReferenceBuilder":
        self._knowledge_qa_enterprise_reference.title = title
        return self

    def content(self, content: str) -> "KnowledgeQaEnterpriseReferenceBuilder":
        self._knowledge_qa_enterprise_reference.content = content
        return self

    def url(self, url: str) -> "KnowledgeQaEnterpriseReferenceBuilder":
        self._knowledge_qa_enterprise_reference.url = url
        return self

    def build(self) -> "KnowledgeQaEnterpriseReference":
        return self._knowledge_qa_enterprise_reference
