# 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 CloudSlackDataSource(UniversalBaseModel):
    supports_access_control: typing.Optional[bool] = None
    slack_token: str = pydantic.Field()
    """
    Slack Bot Token.
    """

    channel_ids: typing.Optional[str] = pydantic.Field(default=None)
    """
    Slack Channel.
    """

    latest_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    Latest date.
    """

    earliest_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    Earliest date.
    """

    earliest_date_timestamp: typing.Optional[float] = pydantic.Field(default=None)
    """
    Earliest date timestamp.
    """

    latest_date_timestamp: typing.Optional[float] = pydantic.Field(default=None)
    """
    Latest date timestamp.
    """

    channel_patterns: typing.Optional[str] = pydantic.Field(default=None)
    """
    Slack Channel name pattern.
    """

    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
