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

from __future__ import annotations
from enum import Enum
from outpost_sdk.types import BaseModel
from outpost_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from typing import List, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


class ListTenantDestinationsGlobalsTypedDict(TypedDict):
    tenant_id: NotRequired[str]


class ListTenantDestinationsGlobals(BaseModel):
    tenant_id: Annotated[
        Optional[str],
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ] = None


class ListTenantDestinationsTypeEnum2(str, Enum):
    WEBHOOK = "webhook"
    AWS_SQS = "aws_sqs"
    RABBITMQ = "rabbitmq"
    HOOKDECK = "hookdeck"
    AWS_KINESIS = "aws_kinesis"


class ListTenantDestinationsTypeEnum1(str, Enum):
    WEBHOOK = "webhook"
    AWS_SQS = "aws_sqs"
    RABBITMQ = "rabbitmq"
    HOOKDECK = "hookdeck"
    AWS_KINESIS = "aws_kinesis"


TypeTypedDict = TypeAliasType(
    "TypeTypedDict",
    Union[ListTenantDestinationsTypeEnum1, List[ListTenantDestinationsTypeEnum2]],
)
r"""Filter destinations by type(s)."""


Type = TypeAliasType(
    "Type",
    Union[ListTenantDestinationsTypeEnum1, List[ListTenantDestinationsTypeEnum2]],
)
r"""Filter destinations by type(s)."""


ListTenantDestinationsTopicsTypedDict = TypeAliasType(
    "ListTenantDestinationsTopicsTypedDict", Union[str, List[str]]
)
r"""Filter destinations by supported topic(s)."""


ListTenantDestinationsTopics = TypeAliasType(
    "ListTenantDestinationsTopics", Union[str, List[str]]
)
r"""Filter destinations by supported topic(s)."""


class ListTenantDestinationsRequestTypedDict(TypedDict):
    tenant_id: NotRequired[str]
    r"""The ID of the tenant. Required when using AdminApiKey authentication."""
    type: NotRequired[TypeTypedDict]
    r"""Filter destinations by type(s)."""
    topics: NotRequired[ListTenantDestinationsTopicsTypedDict]
    r"""Filter destinations by supported topic(s)."""


class ListTenantDestinationsRequest(BaseModel):
    tenant_id: Annotated[
        Optional[str],
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ] = None
    r"""The ID of the tenant. Required when using AdminApiKey authentication."""

    type: Annotated[
        Optional[Type],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter destinations by type(s)."""

    topics: Annotated[
        Optional[ListTenantDestinationsTopics],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter destinations by supported topic(s)."""
