# This file was auto-generated by Fern from our API Definition.

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
from .knowledge_base_type import KnowledgeBaseType
import typing
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class KnowledgeBaseProperties(UniversalBaseModel):
    name: str = pydantic.Field()
    """
    The name of the knowledge base
    """

    type: KnowledgeBaseType = pydantic.Field()
    """
    The type of the knowledge base. Can not be changed once created.
    """

    url: typing.Optional[str] = pydantic.Field(default=None)
    """
    The URL to pull content from for RSS and URL knowledge bases.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
