"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .channelcredentialsdto import ChannelCredentialsDto, ChannelCredentialsDtoTypedDict
from enum import Enum
from novu_py.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class SubscriberChannelDtoProviderID(str, Enum):
    r"""The ID of the chat or push provider."""

    SLACK = "slack"
    DISCORD = "discord"
    MSTEAMS = "msteams"
    MATTERMOST = "mattermost"
    RYVER = "ryver"
    ZULIP = "zulip"
    GRAFANA_ON_CALL = "grafana-on-call"
    GETSTREAM = "getstream"
    ROCKET_CHAT = "rocket-chat"
    WHATSAPP_BUSINESS = "whatsapp-business"
    CHAT_WEBHOOK = "chat-webhook"
    NOVU_SLACK = "novu-slack"
    FCM = "fcm"
    APNS = "apns"
    EXPO = "expo"
    ONE_SIGNAL = "one-signal"
    PUSHPAD = "pushpad"
    PUSH_WEBHOOK = "push-webhook"
    PUSHER_BEAMS = "pusher-beams"
    APPIO = "appio"


class SubscriberChannelDtoTypedDict(TypedDict):
    provider_id: SubscriberChannelDtoProviderID
    r"""The ID of the chat or push provider."""
    credentials: ChannelCredentialsDtoTypedDict
    r"""Credentials for the channel."""
    integration_identifier: NotRequired[str]
    r"""An optional identifier for the integration."""


class SubscriberChannelDto(BaseModel):
    provider_id: Annotated[
        SubscriberChannelDtoProviderID, pydantic.Field(alias="providerId")
    ]
    r"""The ID of the chat or push provider."""

    credentials: ChannelCredentialsDto
    r"""Credentials for the channel."""

    integration_identifier: Annotated[
        Optional[str], pydantic.Field(alias="integrationIdentifier")
    ] = None
    r"""An optional identifier for the integration."""
