
    Yf                     B    d Z ddlmZ ddlmZ dZ G d de          ZdS )zAMQP Messages.   )GenericContent)Basic)Messagec                   j     e Zd ZdZej        Zg dZd	 fd	ZdZe	d             Z
e	d             Z xZS )
r   a  A Message for use with the Channel.basic_* methods.

    Expected arg types

        body: string
        children: (not supported)

    Keyword properties may include:

        content_type: shortstr
            MIME content type

        content_encoding: shortstr
            MIME content encoding

        application_headers: table
            Message header field table, a dict with string keys,
            and string | int | Decimal | datetime | dict values.

        delivery_mode: octet
            Non-persistent (1) or persistent (2)

        priority: octet
            The message priority, 0 to 9

        correlation_id: shortstr
            The application correlation identifier

        reply_to: shortstr
            The destination to reply to

        expiration: shortstr
            Message expiration specification

        message_id: shortstr
            The application message identifier

        timestamp: unsigned long
            The message timestamp

        type: shortstr
            The message type name

        user_id: shortstr
            The creating user id

        app_id: shortstr
            The creating application id

        cluster_id: shortstr
            Intra-cluster routing identifier

        Unicode bodies are encoded according to the 'content_encoding'
        argument. If that's None, it's set to 'UTF-8' automatically.

        Example::

            msg = Message('hello world',
                            content_type='text/plain',
                            application_headers={'foo': 7})
    ))content_types)content_encodingr   )application_headersF)delivery_modeo)priorityr   )correlation_idr   )reply_tor   )
expirationr   )
message_idr   )	timestampL)typer   )user_idr   )app_idr   )
cluster_idr    Nc                 d     t                      j        di | d | _        || _        || _        d S )N )super__init__delivery_infobodychannel)selfr   childrenr    
properties	__class__s        D/var/www/html/env/lib/python3.11/site-packages/amqp/basic_message.pyr   zMessage.__init__g   s:    &&:&&&!	    )r   r   r    c                 6    | j                             d          S )Nr
   )r#   getr!   s    r%   headerszMessage.headerst   s    ""#8999r&   c                 6    | j                             d          S )Ndelivery_tag)r   r(   r)   s    r%   r,   zMessage.delivery_tagx   s    !%%n555r&   )r   NN)__name__
__module____qualname____doc__r   CLASS_ID
PROPERTIESr   	__slots__propertyr*   r,   __classcell__)r$   s   @r%   r   r      s        < <| ~H
  J"     
I : : X: 6 6 X6 6 6 6 6r&   r   N)r0   serializationr   specr   __all__r   r   r&   r%   <module>r9      st      ) ) ) ) ) )      
h6 h6 h6 h6 h6n h6 h6 h6 h6 h6r&   