# 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 CloudOneDriveDataSource(UniversalBaseModel):
    supports_access_control: typing.Optional[bool] = None
    user_principal_name: str = pydantic.Field()
    """
    The user principal name to use for authentication.
    """

    folder_path: typing.Optional[str] = pydantic.Field(default=None)
    """
    The path of the OneDrive folder to read from.
    """

    folder_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the OneDrive folder to read from.
    """

    client_id: str = pydantic.Field()
    """
    The client ID to use for authentication.
    """

    client_secret: str = pydantic.Field()
    """
    The client secret to use for authentication.
    """

    tenant_id: str = pydantic.Field()
    """
    The tenant ID to use for authentication.
    """

    required_exts: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    The list of required file extensions.
    """

    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
