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

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


class CloudConfluenceDataSource(UniversalBaseModel):
    supports_access_control: typing.Optional[bool] = None
    server_url: str = pydantic.Field()
    """
    The server URL of the Confluence instance.
    """

    authentication_mechanism: str = pydantic.Field()
    """
    Type of Authentication for connecting to Confluence APIs.
    """

    user_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The username to use for authentication.
    """

    api_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    The API token to use for authentication.
    """

    space_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    The space key to read from.
    """

    page_ids: typing.Optional[str] = pydantic.Field(default=None)
    """
    The page IDs of the Confluence to read from.
    """

    cql: typing.Optional[str] = pydantic.Field(default=None)
    """
    The CQL query to use for fetching pages.
    """

    label: typing.Optional[str] = pydantic.Field(default=None)
    """
    The label to use for fetching pages.
    """

    class_name: typing.Optional[str] = None

    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
