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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .source_sync_microsoft_365_settings_transcription_method import SourceSyncMicrosoft365SettingsTranscriptionMethod


class SourceSyncMicrosoft365Settings(UncheckedBaseModel):
    source_archetype_id: typing.Literal["com.microsoft.365"] = "com.microsoft.365"
    filter_options: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Narrow down resources you sync from SharePoint and OneDrive. Ensure you include fetch_filters method on Source Sync Archetype.
    """

    file_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter by specific file types. Leave empty to sync all file types.
    """

    transcription_method: typing.Optional[SourceSyncMicrosoft365SettingsTranscriptionMethod] = pydantic.Field(
        default=None
    )
    """
    Method for extracting text from PDFs.
    """

    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
