o
    È·e»  ã                   @   s(   d Z G dd„ deƒZG dd„ deƒZdS )z0
A set of results returned by SendMessageBatch.
c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚResultEntrya  
    The result (successful or unsuccessful) of a single
    message within a send_message_batch request.

    In the case of a successful result, this dict-like
    object will contain the following items:

    :ivar id: A string containing the user-supplied ID of the message.
    :ivar message_id: A string containing the SQS ID of the new message.
    :ivar message_md5: A string containing the MD5 hash of the message body.

    In the case of an error, this object will contain the following
    items:

    :ivar id: A string containing the user-supplied ID of the message.
    :ivar sender_fault: A boolean value.
    :ivar error_code: A string containing a short description of the error.
    :ivar error_message: A string containing a description of the error.
    c                 C   s   d S ©N© )ÚselfÚnameÚattrsÚ
connectionr   r   úL/var/www/ideatree/venv/lib/python3.10/site-packages/boto/sqs/batchresults.pyÚstartElement0   s   zResultEntry.startElementc                 C   s|   |dkr
|| d< d S |dkr|| d< d S |dkr|| d< d S |dkr(|| d< d S |d	kr2|| d
< d S |dkr<|| d< d S d S )NÚIdÚidÚ	MessageIdÚ
message_idÚMD5OfMessageBodyÚmessage_md5ÚSenderFaultÚsender_faultÚCodeÚ
error_codeÚMessageÚerror_messager   ©r   r   Úvaluer   r   r   r   Ú
endElement3   s   ÿzResultEntry.endElementN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r   r   r   r   r      s    r   c                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚBatchResultsaC  
    A container for the results of a send_message_batch request.

    :ivar results: A list of successful results.  Each item in the
        list will be an instance of :class:`ResultEntry`.

    :ivar errors: A list of unsuccessful results.  Each item in the
        list will be an instance of :class:`ResultEntry`.
    c                 C   s   || _ g | _g | _d S r   )ÚparentÚresultsÚerrors)r   r   r   r   r   Ú__init__L   s   
zBatchResults.__init__c                 C   sB   |  d¡rtƒ }| j |¡ |S |dkrtƒ }| j |¡ |S d S )NÚMessageBatchResultEntryÚBatchResultErrorEntry)Úendswithr   r   Úappendr    )r   r   r   r   Úentryr   r   r   r	   Q   s   
zBatchResults.startElementc                 C   s   t | ||ƒ d S r   )Úsetattrr   r   r   r   r   \   s   zBatchResults.endElementN)r   r   r   r   r!   r	   r   r   r   r   r   r   A   s
    
r   N)r   Údictr   Úobjectr   r   r   r   r   Ú<module>   s   &