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

from __future__ import annotations
from .httppushcallbackcreate import (
    HTTPPushCallbackCreate,
    HTTPPushCallbackCreateTypedDict,
)
from ascend_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class PushSubscriptionCreateTypedDict(TypedDict):
    r"""Configuration information about a push subscription"""

    display_name: str
    r"""The user-defined name for the subscription"""
    event_types: List[str]
    r"""Filter for event types; [\"\*\"] matches all values; Suffix wildcards using \"\*\" (e.g. [\"account.\*\"]) are supported"""
    client_id: NotRequired[str]
    r"""The client that owns the subscription. A client subscription will receive events for it and all of its correspondents. This can only be set at creation time and is mutually exclusive with correspondent_id."""
    correspondent_id: NotRequired[str]
    r"""The correspondent that owns the subscription. A correspondent subscription will receive events only for itself. This can only be set at creation time and is mutually exclusive with client_id."""
    http_callback: NotRequired[HTTPPushCallbackCreateTypedDict]
    r"""Configuration information about an HTTP target callback"""


class PushSubscriptionCreate(BaseModel):
    r"""Configuration information about a push subscription"""

    display_name: str
    r"""The user-defined name for the subscription"""

    event_types: List[str]
    r"""Filter for event types; [\"\*\"] matches all values; Suffix wildcards using \"\*\" (e.g. [\"account.\*\"]) are supported"""

    client_id: Optional[str] = None
    r"""The client that owns the subscription. A client subscription will receive events for it and all of its correspondents. This can only be set at creation time and is mutually exclusive with correspondent_id."""

    correspondent_id: Optional[str] = None
    r"""The correspondent that owns the subscription. A correspondent subscription will receive events only for itself. This can only be set at creation time and is mutually exclusive with client_id."""

    http_callback: Optional[HTTPPushCallbackCreate] = None
    r"""Configuration information about an HTTP target callback"""
