"""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 ListTenantEventsGlobalsTypedDict(TypedDict):
    tenant_id: NotRequired[str]


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


DestinationIDTypedDict = TypeAliasType("DestinationIDTypedDict", Union[str, List[str]])
r"""Filter events by destination ID(s)."""


DestinationID = TypeAliasType("DestinationID", Union[str, List[str]])
r"""Filter events by destination ID(s)."""


class ListTenantEventsStatus(str, Enum):
    r"""Filter events by delivery status."""

    SUCCESS = "success"
    FAILED = "failed"


class ListTenantEventsRequestTypedDict(TypedDict):
    tenant_id: NotRequired[str]
    r"""The ID of the tenant. Required when using AdminApiKey authentication."""
    destination_id: NotRequired[DestinationIDTypedDict]
    r"""Filter events by destination ID(s)."""
    status: NotRequired[ListTenantEventsStatus]
    r"""Filter events by delivery status."""


class ListTenantEventsRequest(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."""

    destination_id: Annotated[
        Optional[DestinationID],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter events by destination ID(s)."""

    status: Annotated[
        Optional[ListTenantEventsStatus],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Filter events by delivery status."""
