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

from __future__ import annotations
from novu_py.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ChannelCredentialsTypedDict(TypedDict):
    webhook_url: NotRequired[str]
    r"""Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider."""
    channel: NotRequired[str]
    r"""Channel specification for Mattermost chat notifications."""
    device_tokens: NotRequired[List[str]]
    r"""Contains an array of the subscriber device tokens for a given provider. Used on Push integrations."""
    alert_uid: NotRequired[str]
    r"""Alert UID for Grafana on-call webhook payload."""
    title: NotRequired[str]
    r"""Title to be used with Grafana on-call webhook."""
    image_url: NotRequired[str]
    r"""Image URL property for Grafana on-call webhook."""
    state: NotRequired[str]
    r"""State property for Grafana on-call webhook."""
    external_url: NotRequired[str]
    r"""Link to upstream details property for Grafana on-call webhook."""


class ChannelCredentials(BaseModel):
    webhook_url: Annotated[Optional[str], pydantic.Field(alias="webhookUrl")] = None
    r"""Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider."""

    channel: Optional[str] = None
    r"""Channel specification for Mattermost chat notifications."""

    device_tokens: Annotated[
        Optional[List[str]], pydantic.Field(alias="deviceTokens")
    ] = None
    r"""Contains an array of the subscriber device tokens for a given provider. Used on Push integrations."""

    alert_uid: Annotated[Optional[str], pydantic.Field(alias="alertUid")] = None
    r"""Alert UID for Grafana on-call webhook payload."""

    title: Optional[str] = None
    r"""Title to be used with Grafana on-call webhook."""

    image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None
    r"""Image URL property for Grafana on-call webhook."""

    state: Optional[str] = None
    r"""State property for Grafana on-call webhook."""

    external_url: Annotated[Optional[str], pydantic.Field(alias="externalUrl")] = None
    r"""Link to upstream details property for Grafana on-call webhook."""
