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

from __future__ import annotations
from ascend_sdk.models.components import (
    httpmetadata as components_httpmetadata,
    listpushsubscriptionsresponse as components_listpushsubscriptionsresponse,
    status as components_status,
)
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import FieldMetadata, QueryParamMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class SubscriberListPushSubscriptionsRequestTypedDict(TypedDict):
    filter_: NotRequired[str]
    r"""A CEL string to filter results; See the [CEL Search](https://developer.apexclearing.com/apex-fintech-solutions/docs/cel-search) page in Guides for more information; If empty, all subscriptions the user has permission to view will be returned; Filter options include:
    `name`
    `subscription_id`
    `client_id`
    `correspondent_id`
    `display_name`
    `event_types`
    `state`
    `http_callback.url`
    `http_callback.timeout_seconds`
    """
    page_size: NotRequired[int]
    r"""The number of entries to return in a single page; Default = 100; Maximum = 1000"""
    page_token: NotRequired[str]
    r"""Page token used for pagination; Supplying a page token returns the next page of results"""


class SubscriberListPushSubscriptionsRequest(BaseModel):
    filter_: Annotated[
        Optional[str],
        pydantic.Field(alias="filter"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""A CEL string to filter results; See the [CEL Search](https://developer.apexclearing.com/apex-fintech-solutions/docs/cel-search) page in Guides for more information; If empty, all subscriptions the user has permission to view will be returned; Filter options include:
    `name`
    `subscription_id`
    `client_id`
    `correspondent_id`
    `display_name`
    `event_types`
    `state`
    `http_callback.url`
    `http_callback.timeout_seconds`
    """

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""The number of entries to return in a single page; Default = 100; Maximum = 1000"""

    page_token: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Page token used for pagination; Supplying a page token returns the next page of results"""


class SubscriberListPushSubscriptionsResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    list_push_subscriptions_response: NotRequired[
        components_listpushsubscriptionsresponse.ListPushSubscriptionsResponseTypedDict
    ]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: The request was not well formed."""


class SubscriberListPushSubscriptionsResponse(BaseModel):
    http_meta: Annotated[
        Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True)
    ] = None

    list_push_subscriptions_response: Optional[
        components_listpushsubscriptionsresponse.ListPushSubscriptionsResponse
    ] = None
    r"""OK"""

    status: Optional[components_status.Status] = None
    r"""INVALID_ARGUMENT: The request was not well formed."""
