from __future__ import annotations

from collections.abc import Mapping
from typing import Any
from typing import Type
from typing_extensions import Literal

from . import amqp_object as amqp_object
from .compat import str_or_bytes as str_or_bytes
from .exchange_type import ExchangeType

PROTOCOL_VERSION: Any
PORT: int

ACCESS_REFUSED: Literal[403]
CHANNEL_ERROR: Literal[504]
COMMAND_INVALID: Literal[503]
CONNECTION_FORCED: Literal[320]
CONTENT_TOO_LARGE: Literal[311]
FRAME_BODY: Literal[3]
FRAME_END: Literal[206]
FRAME_END_SIZE: Literal[1]
FRAME_ERROR: Literal[501]
FRAME_HEADER: Literal[2]
FRAME_HEADER_SIZE: Literal[7]
FRAME_HEARTBEAT: Literal[8]
FRAME_MAX_SIZE: Literal[131072]
FRAME_METHOD: Literal[1]
FRAME_MIN_SIZE: Literal[4096]
INTERNAL_ERROR: Literal[541]
INVALID_PATH: Literal[402]
NOT_ALLOWED: Literal[530]
NOT_FOUND: Literal[404]
NOT_IMPLEMENTED: Literal[540]
NO_CONSUMERS: Literal[313]
NO_ROUTE: Literal[312]
PERSISTENT_DELIVERY_MODE: Literal[2]
PRECONDITION_FAILED: Literal[406]
REPLY_SUCCESS: Literal[200]
RESOURCE_ERROR: Literal[506]
RESOURCE_LOCKED: Literal[405]
SYNTAX_ERROR: Literal[502]
TRANSIENT_DELIVERY_MODE: Literal[1]
UNEXPECTED_FRAME: Literal[505]

class Connection(amqp_object.Class):

    INDEX: Literal[0x000A]
    NAME: Literal["Connection"]
    class Start(amqp_object.Method):

        INDEX: Literal[0x000A000A]
        NAME: Literal["Connection.Start"]

        version_major: int = ...
        version_minor: int = ...
        server_properties: Mapping[str, Any] | None = ...
        mechanisms: str = ...
        locales: str = ...
        def __init__(
            self,
            version_major: int = ...,
            version_minor: int = ...,
            server_properties: Mapping[str, Any] | None = ...,
            mechanisms: str = ...,
            locales: str = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Start: ...
        def encode(self) -> list[bytes]: ...
    class StartOk(amqp_object.Method):

        INDEX: Literal[0x000A000B]
        NAME: Literal["Connection.StartOk"]

        client_properties: Mapping[str, Any] | None = ...
        mechanism: str = ...
        response: str | None = ...
        locale: str = ...
        def __init__(
            self,
            client_properties: Mapping[str, Any] | None = ...,
            mechanism: str = ...,
            response: str | None = ...,
            locale: str = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.StartOk: ...
        def encode(self) -> list[bytes]: ...
    class Secure(amqp_object.Method):

        INDEX: Literal[0x000A0014]
        NAME: Literal["Connection.Secure"]

        challenge: str | None = ...
        def __init__(self, challenge: str | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Secure: ...
        def encode(self) -> list[bytes]: ...
    class SecureOk(amqp_object.Method):

        INDEX: Literal[0x000A0015]
        NAME: Literal["Connection.SecureOk"]

        response: str | None = ...
        def __init__(self, response: str | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.SecureOk: ...
        def encode(self) -> list[bytes]: ...
    class Tune(amqp_object.Method):

        INDEX: Literal[0x000A001E]
        NAME: Literal["Connection.Tune"]

        channel_max: int = ...
        frame_max: int = ...
        heartbeat: int = ...
        def __init__(self, channel_max: int = ..., frame_max: int = ..., heartbeat: int = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Tune: ...
        def encode(self) -> list[bytes]: ...
    class TuneOk(amqp_object.Method):

        INDEX: Literal[0x000A001F]
        NAME: Literal["Connection.TuneOk"]

        channel_max: int = ...
        frame_max: int = ...
        heartbeat: int = ...
        def __init__(self, channel_max: int = ..., frame_max: int = ..., heartbeat: int = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.TuneOk: ...
        def encode(self) -> list[bytes]: ...
    class Open(amqp_object.Method):

        INDEX: Literal[0x000A0028]
        NAME: Literal["Connection.Open"]

        virtual_host: str = ...
        capabilities: str = ...
        insist: bool = ...
        def __init__(self, virtual_host: str = ..., capabilities: str = ..., insist: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Open: ...
        def encode(self) -> list[bytes]: ...
    class OpenOk(amqp_object.Method):

        INDEX: Literal[0x000A0029]
        NAME: Literal["Connection.OpenOk"]

        known_hosts: str = ...
        def __init__(self, known_hosts: str = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.OpenOk: ...
        def encode(self) -> list[bytes]: ...
    class Close(amqp_object.Method):

        INDEX: Literal[0x000A0032]
        NAME: Literal["Connection.Close"]

        reply_code: int | None = ...
        reply_text: str = ...
        class_id: int | None = ...
        method_id: int | None = ...
        def __init__(
            self, reply_code: int | None = ..., reply_text: str = ..., class_id: int | None = ..., method_id: int | None = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Close: ...
        def encode(self) -> list[bytes]: ...
    class CloseOk(amqp_object.Method):

        INDEX: Literal[0x000A0033]
        NAME: Literal["Connection.CloseOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.CloseOk: ...
        def encode(self) -> list[bytes]: ...
    class Blocked(amqp_object.Method):

        INDEX: Literal[0x000A003C]
        NAME: Literal["Connection.Blocked"]

        reason: str = ...
        def __init__(self, reason: str = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Blocked: ...
        def encode(self) -> list[bytes]: ...
    class Unblocked(amqp_object.Method):

        INDEX: Literal[0x000A003D]
        NAME: Literal["Connection.Unblocked"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Connection.Unblocked: ...
        def encode(self) -> list[bytes]: ...

class Channel(amqp_object.Class):

    INDEX: Literal[0x0014]
    NAME: Literal["Channel"]
    class Open(amqp_object.Method):

        INDEX: Literal[0x0014000A]
        NAME: Literal["Channel.Open"]

        out_of_band: str = ...
        def __init__(self, out_of_band: str = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.Open: ...
        def encode(self) -> list[bytes]: ...
    class OpenOk(amqp_object.Method):

        INDEX: Literal[0x0014000B]
        NAME: Literal["Channel.OpenOk"]

        channel_id: str = ...
        def __init__(self, channel_id: str = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.OpenOk: ...
        def encode(self) -> list[bytes]: ...
    class Flow(amqp_object.Method):

        INDEX: Literal[0x00140014]
        NAME: Literal["Channel.Flow"]

        active: bool | None = ...
        def __init__(self, active: bool | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.Flow: ...
        def encode(self) -> list[bytes]: ...
    class FlowOk(amqp_object.Method):

        INDEX: Literal[0x00140015]
        NAME: Literal["Channel.FlowOk"]

        active: bool | None = ...
        def __init__(self, active: bool | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.FlowOk: ...
        def encode(self) -> list[bytes]: ...
    class Close(amqp_object.Method):

        INDEX: Literal[0x00140028]
        NAME: Literal["Channel.Close"]

        reply_code: int | None = ...
        reply_text: str = ...
        class_id: int | None = ...
        method_id: int | None = ...
        def __init__(
            self, reply_code: int | None = ..., reply_text: str = ..., class_id: int | None = ..., method_id: int | None = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.Close: ...
        def encode(self) -> list[bytes]: ...
    class CloseOk(amqp_object.Method):

        INDEX: Literal[0x00140029]
        NAME: Literal["Channel.CloseOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Channel.CloseOk: ...
        def encode(self) -> list[bytes]: ...

class Access(amqp_object.Class):

    INDEX: Literal[0x001E]
    NAME: Literal["Access"]
    class Request(amqp_object.Method):

        INDEX: Literal[0x001E000A]
        NAME: Literal["Access.Request"]

        realm: str = ...
        exclusive: bool = ...
        passive: bool = ...
        active: bool = ...
        write: bool = ...
        read: bool = ...
        def __init__(
            self,
            realm: str = ...,
            exclusive: bool = ...,
            passive: bool = ...,
            active: bool = ...,
            write: bool = ...,
            read: bool = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Access.Request: ...
        def encode(self) -> list[bytes]: ...
    class RequestOk(amqp_object.Method):

        INDEX: Literal[0x001E000B]
        NAME: Literal["Access.RequestOk"]

        ticket: int = ...
        def __init__(self, ticket: int = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Access.RequestOk: ...
        def encode(self) -> list[bytes]: ...

class Exchange(amqp_object.Class):

    INDEX: Literal[0x0028]
    NAME: Literal["Exchange"]
    class Declare(amqp_object.Method):

        INDEX: Literal[0x0028000A]
        NAME: Literal["Exchange.Declare"]

        ticket: int = ...
        exchange: str | None = ...
        type: str = ...
        passive: bool = ...
        durable: bool = ...
        auto_delete: bool = ...
        internal: bool = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            exchange: str | None = ...,
            type: ExchangeType = ...,
            passive: bool = ...,
            durable: bool = ...,
            auto_delete: bool = ...,
            internal: bool = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.Declare: ...
        def encode(self) -> list[bytes]: ...
    class DeclareOk(amqp_object.Method):

        INDEX: Literal[0x0028000B]
        NAME: Literal["Exchange.DeclareOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.DeclareOk: ...
        def encode(self) -> list[bytes]: ...
    class Delete(amqp_object.Method):

        INDEX: Literal[0x00280014]
        NAME: Literal["Exchange.Delete"]

        ticket: int = ...
        exchange: str | None = ...
        if_unused: bool = ...
        nowait: bool = ...
        def __init__(self, ticket: int = ..., exchange: str | None = ..., if_unused: bool = ..., nowait: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.Delete: ...
        def encode(self) -> list[bytes]: ...
    class DeleteOk(amqp_object.Method):

        INDEX: Literal[0x00280015]
        NAME: Literal["Exchange.DeleteOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.DeleteOk: ...
        def encode(self) -> list[bytes]: ...
    class Bind(amqp_object.Method):

        INDEX: Literal[0x0028001E]
        NAME: Literal["Exchange.Bind"]

        ticket: int = ...
        destination: str | None = ...
        source: str | None = ...
        routing_key: str = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            destination: str | None = ...,
            source: str | None = ...,
            routing_key: str = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.Bind: ...
        def encode(self) -> list[bytes]: ...
    class BindOk(amqp_object.Method):

        INDEX: Literal[0x0028001F]
        NAME: Literal["Exchange.BindOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.BindOk: ...
        def encode(self) -> list[bytes]: ...
    class Unbind(amqp_object.Method):

        INDEX: Literal[0x00280028]
        NAME: Literal["Exchange.Unbind"]

        ticket: int = ...
        destination: str | None = ...
        source: str | None = ...
        routing_key: str = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            destination: str | None = ...,
            source: str | None = ...,
            routing_key: str = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.Unbind: ...
        def encode(self) -> list[bytes]: ...
    class UnbindOk(amqp_object.Method):

        INDEX: Literal[0x00280033]
        NAME: Literal["Exchange.UnbindOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Exchange.UnbindOk: ...
        def encode(self) -> list[bytes]: ...

class Queue(amqp_object.Class):

    INDEX: Literal[0x0032]
    NAME: Literal["Queue"]
    class Declare(amqp_object.Method):

        INDEX: Literal[0x0032000A]
        NAME: Literal["Queue.Declare"]

        ticket: int = ...
        queue: str = ...
        passive: bool = ...
        durable: bool = ...
        exclusive: bool = ...
        auto_delete: bool = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            queue: str = ...,
            passive: bool = ...,
            durable: bool = ...,
            exclusive: bool = ...,
            auto_delete: bool = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.Declare: ...
        def encode(self) -> list[bytes]: ...
    class DeclareOk(amqp_object.Method):

        INDEX: Literal[0x0032000B]
        NAME: Literal["Queue.DeclareOk"]

        queue: str | None = ...
        message_count: int | None = ...
        consumer_count: int | None = ...
        def __init__(
            self, queue: str | None = ..., message_count: int | None = ..., consumer_count: int | None = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.DeclareOk: ...
        def encode(self) -> list[bytes]: ...
    class Bind(amqp_object.Method):

        INDEX: Literal[0x00320014]
        NAME: Literal["Queue.Bind"]

        ticket: int = ...
        queue: str = ...
        exchange: str | None = ...
        routing_key: str = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            queue: str = ...,
            exchange: str | None = ...,
            routing_key: str = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.Bind: ...
        def encode(self) -> list[bytes]: ...
    class BindOk(amqp_object.Method):

        INDEX: Literal[0x00320015]
        NAME: Literal["Queue.BindOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.BindOk: ...
        def encode(self) -> list[bytes]: ...
    class Purge(amqp_object.Method):

        INDEX: Literal[0x0032001E]
        NAME: Literal["Queue.Purge"]

        ticket: int = ...
        queue: str = ...
        nowait: bool = ...
        def __init__(self, ticket: int = ..., queue: str = ..., nowait: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.Purge: ...
        def encode(self) -> list[bytes]: ...
    class PurgeOk(amqp_object.Method):

        INDEX: Literal[0x0032001F]
        NAME: Literal["Queue.PurgeOk"]

        message_count: int | None = ...
        def __init__(self, message_count: int | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.PurgeOk: ...
        def encode(self) -> list[bytes]: ...
    class Delete(amqp_object.Method):

        INDEX: Literal[0x00320028]
        NAME: Literal["Queue.Delete"]

        ticket: int = ...
        queue: str = ...
        if_unused: bool = ...
        if_empty: bool = ...
        nowait: bool = ...
        def __init__(
            self, ticket: int = ..., queue: str = ..., if_unused: bool = ..., if_empty: bool = ..., nowait: bool = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.Delete: ...
        def encode(self) -> list[bytes]: ...
    class DeleteOk(amqp_object.Method):

        INDEX: Literal[0x00320029]
        NAME: Literal["Queue.DeleteOk"]

        message_count: int | None = ...
        def __init__(self, message_count: int | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.DeleteOk: ...
        def encode(self) -> list[bytes]: ...
    class Unbind(amqp_object.Method):

        INDEX: Literal[0x00320032]
        NAME: Literal["Queue.Unbind"]

        ticket: int = ...
        queue: str = ...
        exchange: str | None = ...
        routing_key: str = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            queue: str = ...,
            exchange: str | None = ...,
            routing_key: str = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.Unbind: ...
        def encode(self) -> list[bytes]: ...
    class UnbindOk(amqp_object.Method):

        INDEX: Literal[0x00320033]
        NAME: Literal["Queue.UnbindOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Queue.UnbindOk: ...
        def encode(self) -> list[bytes]: ...

class Basic(amqp_object.Class):

    INDEX: Literal[0x003C]
    NAME: Literal["Basic"]
    class Qos(amqp_object.Method):

        INDEX: Literal[0x003C000A]
        NAME: Literal["Basic.Qos"]

        prefetch_size: int = ...
        prefetch_count: int = ...
        global_qos: bool = ...
        def __init__(self, prefetch_size: int = ..., prefetch_count: int = ..., global_qos: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Qos: ...
        def encode(self) -> list[bytes]: ...
    class QosOk(amqp_object.Method):

        INDEX: Literal[0x003C000B]
        NAME: Literal["Basic.QosOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.QosOk: ...
        def encode(self) -> list[bytes]: ...
    class Consume(amqp_object.Method):

        INDEX: Literal[0x003C0014]
        NAME: Literal["Basic.Consume"]

        ticket: int = ...
        queue: str = ...
        consumer_tag: str = ...
        no_local: bool = ...
        no_ack: bool = ...
        exclusive: bool = ...
        nowait: bool = ...
        arguments: Mapping[str, Any] | None = ...
        def __init__(
            self,
            ticket: int = ...,
            queue: str = ...,
            consumer_tag: str = ...,
            no_local: bool = ...,
            no_ack: bool = ...,
            exclusive: bool = ...,
            nowait: bool = ...,
            arguments: Mapping[str, Any] | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Consume: ...
        def encode(self) -> list[bytes]: ...
    class ConsumeOk(amqp_object.Method):

        INDEX: Literal[0x003C0015]
        NAME: Literal["Basic.ConsumeOk"]

        consumer_tag: int | None = ...
        def __init__(self, consumer_tag: int | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.ConsumeOk: ...
        def encode(self) -> list[bytes]: ...
    class Cancel(amqp_object.Method):

        INDEX: Literal[0x003C001E]
        NAME: Literal["Basic.Cancel"]

        consumer_tag: int | None = ...
        nowait: bool = ...
        def __init__(self, consumer_tag: int | None = ..., nowait: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Cancel: ...
        def encode(self) -> list[bytes]: ...
    class CancelOk(amqp_object.Method):

        INDEX: Literal[0x003C001F]
        NAME: Literal["Basic.CancelOk"]

        consumer_tag: int | None = ...
        def __init__(self, consumer_tag: int | None = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.CancelOk: ...
        def encode(self) -> list[bytes]: ...
    class Publish(amqp_object.Method):

        INDEX: Literal[0x003C0028]
        NAME: Literal["Basic.Publish"]

        ticket: int = ...
        exchange: str = ...
        routing_key: str = ...
        mandatory: bool = ...
        immediate: bool = ...
        def __init__(
            self, ticket: int = ..., exchange: str = ..., routing_key: str = ..., mandatory: bool = ..., immediate: bool = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Publish: ...
        def encode(self) -> list[bytes]: ...
    class Return(amqp_object.Method):

        INDEX: Literal[0x003C0032]
        NAME: Literal["Basic.Return"]

        reply_code: int | None = ...
        reply_text: str = ...
        exchange: str | None = ...
        routing_key: str | None = ...
        def __init__(
            self, reply_code: int | None = ..., reply_text: str = ..., exchange: str | None = ..., routing_key: str | None = ...
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Return: ...
        def encode(self) -> list[bytes]: ...
    class Deliver(amqp_object.Method):

        INDEX: Literal[0x003C003C]
        NAME: Literal["Basic.Deliver"]

        consumer_tag: str | None = ...
        delivery_tag: int | None = ...
        redelivered: bool = ...
        exchange: str | None = ...
        routing_key: str | None = ...
        def __init__(
            self,
            consumer_tag: str | None = ...,
            delivery_tag: int | None = ...,
            redelivered: bool = ...,
            exchange: str | None = ...,
            routing_key: str | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Deliver: ...
        def encode(self) -> list[bytes]: ...
    class Get(amqp_object.Method):

        INDEX: Literal[0x003C0046]
        NAME: Literal["Basic.Get"]

        ticket: int = ...
        queue: str = ...
        no_ack: bool = ...
        def __init__(self, ticket: int = ..., queue: str = ..., no_ack: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Get: ...
        def encode(self) -> list[bytes]: ...
    class GetOk(amqp_object.Method):

        INDEX: Literal[0x003C0047]
        NAME: Literal["Basic.GetOk"]

        delivery_tag: int | None = ...
        redelivered: bool = ...
        exchange: str | None = ...
        routing_key: str | None = ...
        message_count: int | None = ...
        def __init__(
            self,
            delivery_tag: int | None = ...,
            redelivered: bool = ...,
            exchange: str | None = ...,
            routing_key: str | None = ...,
            message_count: int | None = ...,
        ) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.GetOk: ...
        def encode(self) -> list[bytes]: ...
    class GetEmpty(amqp_object.Method):

        INDEX: Literal[0x003C0048]
        NAME: Literal["Basic.GetEmpty"]

        cluster_id: str = ...
        def __init__(self, cluster_id: str = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.GetEmpty: ...
        def encode(self) -> list[bytes]: ...
    class Ack(amqp_object.Method):

        INDEX: Literal[0x003C0050]
        NAME: Literal["Basic.Ack"]

        delivery_tag: int = ...
        multiple: bool = ...
        def __init__(self, delivery_tag: int = ..., multiple: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Ack: ...
        def encode(self) -> list[bytes]: ...
    class Reject(amqp_object.Method):

        INDEX: Literal[0x003C005A]
        NAME: Literal["Basic.Reject"]

        delivery_tag: int | None = ...
        requeue: bool = ...
        def __init__(self, delivery_tag: int | None = ..., requeue: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Reject: ...
        def encode(self) -> list[bytes]: ...
    class RecoverAsync(amqp_object.Method):

        INDEX: Literal[0x003C0064]
        NAME: Literal["Basic.RecoverAsync"]

        requeue: bool = ...
        def __init__(self, requeue: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.RecoverAsync: ...
        def encode(self) -> list[bytes]: ...
    class Recover(amqp_object.Method):

        INDEX: Literal[0x003C006E]
        NAME: Literal["Basic.Recover"]

        requeue: bool = ...
        def __init__(self, requeue: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Recover: ...
        def encode(self) -> list[bytes]: ...
    class RecoverOk(amqp_object.Method):

        INDEX: Literal[0x003C006F]
        NAME: Literal["Basic.RecoverOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.RecoverOk: ...
        def encode(self) -> list[bytes]: ...
    class Nack(amqp_object.Method):

        INDEX: Literal[0x003C0078]
        NAME: Literal["Basic.Nack"]

        delivery_tag: int = ...
        multiple: bool = ...
        requeue: bool = ...
        def __init__(self, delivery_tag: int = ..., multiple: bool = ..., requeue: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Basic.Nack: ...
        def encode(self) -> list[bytes]: ...

class Tx(amqp_object.Class):

    INDEX: Literal[0x005A]
    NAME: Literal["Tx"]
    class Select(amqp_object.Method):

        INDEX: Literal[0x005A000A]
        NAME: Literal["Tx.Select"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.Select: ...
        def encode(self) -> list[bytes]: ...
    class SelectOk(amqp_object.Method):

        INDEX: Literal[0x005A000B]
        NAME: Literal["Tx.SelectOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.SelectOk: ...
        def encode(self) -> list[bytes]: ...
    class Commit(amqp_object.Method):

        INDEX: Literal[0x005A0014]
        NAME: Literal["Tx.Commit"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.Commit: ...
        def encode(self) -> list[bytes]: ...
    class CommitOk(amqp_object.Method):

        INDEX: Literal[0x005A0015]
        NAME: Literal["Tx.CommitOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.CommitOk: ...
        def encode(self) -> list[bytes]: ...
    class Rollback(amqp_object.Method):

        INDEX: Literal[0x005A001E]
        NAME: Literal["Tx.Rollback"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.Rollback: ...
        def encode(self) -> list[bytes]: ...
    class RollbackOk(amqp_object.Method):

        INDEX: Literal[0x005A001F]
        NAME: Literal["Tx.RollbackOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Tx.RollbackOk: ...
        def encode(self) -> list[bytes]: ...

class Confirm(amqp_object.Class):

    INDEX: Literal[0x0055]
    NAME: Literal["Confirm"]
    class Select(amqp_object.Method):

        INDEX: Literal[0x0055000A]
        NAME: Literal["Confirm.Select"]

        nowait: bool = ...
        def __init__(self, nowait: bool = ...) -> None: ...
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Confirm.Select: ...
        def encode(self) -> list[bytes]: ...
    class SelectOk(amqp_object.Method):

        INDEX: Literal[0x0055000B]
        NAME: Literal["Confirm.SelectOk"]
        @property
        def synchronous(self) -> bool: ...
        def decode(self, encoded: bytes, offset: int = ...) -> Confirm.SelectOk: ...
        def encode(self) -> list[bytes]: ...

class BasicProperties(amqp_object.Properties):

    CLASS: Type[Basic] = ...

    INDEX: Literal[0x003C]
    NAME: Literal["BasicProperties"]

    FLAG_CONTENT_TYPE: int = ...
    FLAG_CONTENT_ENCODING: int = ...
    FLAG_HEADERS: int = ...
    FLAG_DELIVERY_MODE: int = ...
    FLAG_PRIORITY: int = ...
    FLAG_CORRELATION_ID: int = ...
    FLAG_REPLY_TO: int = ...
    FLAG_EXPIRATION: int = ...
    FLAG_MESSAGE_ID: int = ...
    FLAG_TIMESTAMP: int = ...
    FLAG_TYPE: int = ...
    FLAG_USER_ID: int = ...
    FLAG_APP_ID: int = ...
    FLAG_CLUSTER_ID: int = ...

    content_type: str | None = ...
    content_encoding: str | None = ...
    headers: Mapping[str, Any] | None = ...
    delivery_mode: int | None = ...
    priority: int | None = ...
    correlation_id: str | None = ...
    reply_to: str | None = ...
    expiration: str | None = ...
    message_id: str | None = ...
    timestamp: int | None = ...
    type: str | None = ...
    user_id: str | None = ...
    app_id: str | None = ...
    cluster_id: str | None = ...
    def __init__(
        self,
        content_type: str | None = ...,
        content_encoding: str | None = ...,
        headers: Mapping[str, Any] | None = ...,
        delivery_mode: int | None = ...,
        priority: int | None = ...,
        correlation_id: str | None = ...,
        reply_to: str | None = ...,
        expiration: str | None = ...,
        message_id: str | None = ...,
        timestamp: int | None = ...,
        type: str | None = ...,
        user_id: str | None = ...,
        app_id: str | None = ...,
        cluster_id: str | None = ...,
    ) -> None: ...
    def decode(self, encoded: bytes, offset: int = ...) -> BasicProperties: ...
    def encode(self) -> list[bytes]: ...

methods: Mapping[int, amqp_object.Method]
props: Mapping[int, amqp_object.Properties]

def has_content(methodNumber: int) -> bool: ...
