ó
è?F[c           @   s6   d  Z  d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(   s0   
A set of results returned by SendMessageBatch.
t   ResultEntryc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  
    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(   t   None(   t   selft   namet   attrst
   connection(    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyt   startElement0   s    c         C   sš   | d k r | |  d <n} | d k r2 | |  d <nd | d k rK | |  d <nK | d k rd | |  d <n2 | d	 k r} | |  d
 <n | d k r– | |  d <n  d  S(   Nt   Idt   idt	   MessageIdt
   message_idt   MD5OfMessageBodyt   message_md5t   SenderFaultt   sender_faultt   Codet
   error_codet   Messaget   error_message(    (   R   R   t   valueR   (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyt
   endElement3   s    (   t   __name__t
   __module__t   __doc__R   R   (    (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyR       s   	t   BatchResultsc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   sC  
    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(   N(   t   parentt   resultst   errors(   R   R   (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyt   __init__L   s    		c         C   sY   | j  d ƒ r, t ƒ  } |  j j | ƒ | S| d k rU t ƒ  } |  j j | ƒ | Sd  S(   Nt   MessageBatchResultEntryt   BatchResultErrorEntry(   t   endswithR    R   t   appendR   R   (   R   R   R   R   t   entry(    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyR   Q   s    		c         C   s   t  |  | | ƒ d  S(   N(   t   setattr(   R   R   R   R   (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyR   \   s    (   R   R   R   R   R   R   (    (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyR   A   s   			N(   R   t   dictR    t   objectR   (    (    (    s4   lib/python2.7/site-packages/boto/sqs/batchresults.pyt   <module>   s   &