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

from __future__ import annotations
from .rabbitmqconfig import RabbitMQConfig, RabbitMQConfigTypedDict
from .rabbitmqcredentials import RabbitMQCredentials, RabbitMQCredentialsTypedDict
from .topics_union import TopicsUnion, TopicsUnionTypedDict
from enum import Enum
from outpost_sdk.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class DestinationCreateRabbitMQType(str, Enum):
    r"""Type of the destination. Must be 'rabbitmq'."""

    RABBITMQ = "rabbitmq"


class DestinationCreateRabbitMQTypedDict(TypedDict):
    type: DestinationCreateRabbitMQType
    r"""Type of the destination. Must be 'rabbitmq'."""
    topics: TopicsUnionTypedDict
    r"""\"*\" or an array of enabled topics."""
    config: RabbitMQConfigTypedDict
    credentials: RabbitMQCredentialsTypedDict
    id: NotRequired[str]
    r"""Optional user-provided ID. A UUID will be generated if empty."""


class DestinationCreateRabbitMQ(BaseModel):
    type: DestinationCreateRabbitMQType
    r"""Type of the destination. Must be 'rabbitmq'."""

    topics: TopicsUnion
    r"""\"*\" or an array of enabled topics."""

    config: RabbitMQConfig

    credentials: RabbitMQCredentials

    id: Optional[str] = None
    r"""Optional user-provided ID. A UUID will be generated if empty."""
