def build_configurable_data_source_enum() -> ConfigurableComponent:
    """
    Build an enum of configurable data sources.
    But conditional on if the corresponding reader is available.
    """
    enum_members = []

    try:
        from llama_index.readers.discord import DiscordReader  # pants: no-infer-dep

        enum_members.append(
            (
                "DISCORD",
                DataSource(
                    name="Discord",
                    component_type=DiscordReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.elasticsearch import (
            ElasticsearchReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "ELASTICSEARCH",
                DataSource(
                    name="Elasticsearch",
                    component_type=ElasticsearchReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.notion import NotionPageReader  # pants: no-infer-dep

        enum_members.append(
            (
                "NOTION_PAGE",
                DataSource(
                    name="Notion Page",
                    component_type=NotionPageReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.slack import SlackReader  # pants: no-infer-dep

        enum_members.append(
            (
                "SLACK",
                DataSource(
                    name="Slack",
                    component_type=SlackReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.twitter import (
            TwitterTweetReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "TWITTER",
                DataSource(
                    name="Twitter",
                    component_type=TwitterTweetReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.web import SimpleWebPageReader  # pants: no-infer-dep

        enum_members.append(
            (
                "SIMPLE_WEB_PAGE",
                DataSource(
                    name="Simple Web Page",
                    component_type=SimpleWebPageReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.web import TrafilaturaWebReader  # pants: no-infer-dep

        enum_members.append(
            (
                "TRAFILATURA_WEB_PAGE",
                DataSource(
                    name="Trafilatura Web Page",
                    component_type=TrafilaturaWebReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.web import (
            BeautifulSoupWebReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "BEAUTIFUL_SOUP_WEB_PAGE",
                DataSource(
                    name="Beautiful Soup Web Page",
                    component_type=BeautifulSoupWebReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.web import RssReader  # pants: no-infer-dep

        enum_members.append(
            (
                "RSS",
                DataSource(
                    name="RSS",
                    component_type=RssReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.wikipedia import WikipediaReader  # pants: no-infer-dep

        enum_members.append(
            (
                "WIKIPEDIA",
                DataSource(
                    name="Wikipedia",
                    component_type=WikipediaReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.youtube_transcript import (
            YoutubeTranscriptReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "YOUTUBE_TRANSCRIPT",
                DataSource(
                    name="Youtube Transcript",
                    component_type=YoutubeTranscriptReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.google import GoogleDocsReader  # pants: no-infer-dep

        enum_members.append(
            (
                "GOOGLE_DOCS",
                DataSource(
                    name="Google Docs",
                    component_type=GoogleDocsReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.google import GoogleSheetsReader  # pants: no-infer-dep

        enum_members.append(
            (
                "GOOGLE_SHEETS",
                DataSource(
                    name="Google Sheets",
                    component_type=GoogleSheetsReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.s3 import S3Reader  # pants: no-infer-dep

        enum_members.append(
            (
                "S3",
                DataSource(
                    name="S3",
                    component_type=S3Reader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.azstorage_blob import (
            AzStorageBlobReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "AZURE_STORAGE_BLOB",
                DataSource(
                    name="Azure Storage Blob",
                    component_type=AzStorageBlobReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.gcs import GCSReader  # pants: no-infer-dep

        enum_members.append(
            (
                "GCS",
                DataSource(
                    name="GCS",
                    component_type=GCSReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.google import GoogleDriveReader  # pants: no-infer-dep

        enum_members.append(
            (
                "GOOGLE_DRIVE",
                DataSource(
                    name="Google Drive",
                    component_type=GoogleDriveReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.microsoft_onedrive import (
            OneDriveReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "MICROSOFT_ONEDRIVE",
                DataSource(
                    name="Microsoft OneDrive",
                    component_type=OneDriveReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    try:
        from llama_index.readers.microsoft_sharepoint import (
            SharePointReader,
        )  # pants: no-infer-dep

        enum_members.append(
            (
                "MICROSOFT_SHAREPOINT",
                DataSource(
                    name="Microsoft Sharepoint",
                    component_type=SharePointReader,
                ),
            )
        )
    except (ImportError, ValidationError):
        pass

    enum_members.append(
        (
            "READER",
            DataSource(
                name="Reader",
                component_type=ReaderConfig,
            ),
        )
    )

    enum_members.append(
        (
            "DOCUMENT_GROUP",
            DataSource(
                name="Document Group",
                component_type=DocumentGroup,
            ),
        )
    )

    enum_members.append(
        (
            "TEXT_NODE",
            DataSource(
                name="Text Node",
                component_type=TextNode,
            ),
        )
    )

    enum_members.append(
        (
            "DOCUMENT",
            DataSource(
                name="Document",
                component_type=Document,
            ),
        )
    )

    return ConfigurableComponent("ConfigurableDataSources", enum_members)  # type: ignore

    Build an enum of configurable data sources.
    But conditional on if the corresponding reader is available.
    
llama-index-core/llama_index/core/ingestion/data_sources.py