§
    @xÅjv-  ã                   ón   — d dl Z d dlmZ ddlmZ d„ Zdd„Zd„ Z G d„ d	¦  «        Z G d
„ d¦  «        Z	dS )é    N)Ú
xform_nameé   )Úget_data_memberc                 ó   — | D ]}|€ dS ŒdS )zÍ
    Return True if all elements of the iterable are not None (or if the
    iterable is empty). This is like the built-in ``all``, except checks
    against None, so 0 and False are allowable values.
    NFT© )ÚiterableÚelements     úIC:\Projects\Historical\venv\Lib\site-packages\boto3/resources/response.pyÚall_not_noner      s)   € ð ð ð ˆØˆ?Ø�5�5ð àˆ4ó    c                 ó¸  — g }| D ]Ô}|j         }|j        }|dk    rt          j        |j        |¦  «        }n|dk    rt          j        |j        |¦  «        }n^|dk    r#t          |t          |j        ¦  «        ¦  «        }n5|dk    rt          ||j        ¦  «        }n|dk    rŒžt          d|› �¦  «        ‚| 
                    t          |¦  «        |f¦  «         ŒÕ|S )aË  
    Builds a mapping of identifier names to values based on the
    identifier source location, type, and target. Identifier
    values may be scalars or lists depending on the source type
    and location.

    :type identifiers: list
    :param identifiers: List of :py:class:`~boto3.resources.model.Parameter`
                        definitions
    :type parent: ServiceResource
    :param parent: The resource instance to which this action is attached.
    :type params: dict
    :param params: Request parameters sent to the service.
    :type raw_response: dict
    :param raw_response: Low-level operation response.
    :rtype: list
    :return: An ordered list of ``(name, value)`` identifier tuples.
    ÚresponseÚrequestParameterÚ
identifierÚdataÚinputzUnsupported source type: )ÚsourceÚtargetÚjmespathÚsearchÚpathÚgetattrr   Únamer   ÚNotImplementedErrorÚappend)	ÚidentifiersÚparentÚparamsÚraw_responseÚresultsr   r   r   Úvalues	            r
   Úbuild_identifiersr"       sû   € ð& €Gà!ð 4ð 4ˆ
ØÔ"ˆØÔ"ˆà�ZÒÐÝ”O J¤O°\ÑBÔBˆEˆEØÐ)Ò)Ð)Ý”O J¤O°VÑ<Ô<ˆEˆEØ�|Ò#Ð#Ý˜F¥J¨z¬Ñ$?Ô$?Ñ@Ô@ˆEˆEØ�vÒÐõ $ F¨J¬OÑ<Ô<ˆEˆEØ�wÒÐàå%Ð&JÀ&Ð&JÐ&JÑKÔKÐKà�Š�
 6Ñ*Ô*¨EÐ2Ñ3Ô3Ð3Ð3à€Nr   c                 ó|  — d}|                      |¦  «        }|j        }| rr|                      d¦  «        D ]\}|                     d¦  «        }|j        dk    r|j        |         }Œ0|j        dk    r|j        }ŒCt          d|j        › d|› �¦  «        ‚|j        dk    ri }n|j        dk    rg }n|j        dk    ri }|S )	a�  
    Creates an appropriate empty response for the type that is expected,
    based on the service model's shape type. For example, a value that
    is normally a list would then return an empty list. A structure would
    return an empty dict, and a number would return None.

    :type search_path: string
    :param search_path: JMESPath expression to search in the response
    :type operation_name: string
    :param operation_name: Name of the underlying service operation.
    :type service_model: :ref:`botocore.model.ServiceModel`
    :param service_model: The Botocore service model
    :rtype: dict, list, or None
    :return: An appropriate empty value
    Nú.z[0123456789]$Ú	structureÚlistzSearch path hits shape type z from Úmap)Úoperation_modelÚoutput_shapeÚsplitÚstripÚ	type_nameÚmembersÚmemberr   )Úsearch_pathÚoperation_nameÚservice_modelr   r(   ÚshapeÚitems          r
   Úbuild_empty_responser4   N   sõ   € ð  €Hà#×3Ò3°NÑCÔC€OØÔ(€Eàð ð
  ×%Ò% cÑ*Ô*ð 
	ð 
	ˆDØ—:’:˜oÑ.Ô.ˆDàŒ +Ò-Ð-Øœ dÔ+��Ø” FÒ*Ð*Øœ��å)ØP°5´?ÐPÐPÈ$ÐPÐPñô ð ð
 „˜+Ò%Ð%ØˆˆØ	Œ˜FÒ	"Ð	"ØˆˆØ	Œ˜EÒ	!Ð	!Øˆà€Or   c                   ó   — e Zd ZdZd„ Zd„ ZdS )Ú
RawHandleraG  
    A raw action response handler. This passed through the response
    dictionary, optionally after performing a JMESPath search if one
    has been defined for the action.

    :type search_path: string
    :param search_path: JMESPath expression to search in the response
    :rtype: dict
    :return: Service response
    c                 ó   — || _         d S ©N)r/   )Úselfr/   s     r
   Ú__init__zRawHandler.__init__‹   s   € Ø&ˆÔÐÐr   c                 ó^   — | j         r%| j         dk    rt          j        | j         |¦  «        }|S )á,  
        :type parent: ServiceResource
        :param parent: The resource instance to which this action is attached.
        :type params: dict
        :param params: Request parameters sent to the service.
        :type response: dict
        :param response: Low-level operation response.
        ú$)r/   r   r   )r9   r   r   r   s       r
   Ú__call__zRawHandler.__call__Ž   s6   € ð Ôð 	C Ô 0°CÒ 7Ð 7Ý” tÔ'7¸ÑBÔBˆHàˆr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r:   r>   r   r   r
   r6   r6      s<   € € € € € ð	ð 	ð'ð 'ð 'ðð ð ð ð r   r6   c                   ó(   — e Zd ZdZ	 dd„Zd„ Zd„ ZdS )ÚResourceHandleraf  
    Creates a new resource or list of new resources from the low-level
    response based on the given response resource definition.

    :type search_path: string
    :param search_path: JMESPath expression to search in the response

    :type factory: ResourceFactory
    :param factory: The factory that created the resource class to which
                    this action is attached.

    :type resource_model: :py:class:`~boto3.resources.model.ResponseResource`
    :param resource_model: Response resource model.

    :type service_context: :py:class:`~boto3.utils.ServiceContext`
    :param service_context: Context about the AWS service

    :type operation_name: string
    :param operation_name: Name of the underlying service operation, if it
                           exists.

    :rtype: ServiceResource or list
    :return: New resource instance(s).
    Nc                 óL   — || _         || _        || _        || _        || _        d S r8   )r/   ÚfactoryÚresource_modelr0   Úservice_context)r9   r/   rF   rG   rH   r0   s         r
   r:   zResourceHandler.__init__¸   s1   € ð 'ˆÔØˆŒØ,ˆÔØ,ˆÔØ.ˆÔÐÐr   c           	      ó
  — | j         j        }| j        j                             |¦  «        }| j                             ||| j        ¬¦  «        }|}d}| j        rt          j	        | j        |¦  «        }t          t          | j         j        |||¦  «        ¦  «        }	d„ |	                     ¦   «         D ¦   «         }
|
r_g }t          t          |
d         ¦  «        ¦  «        D ]9}d}|r||         }|                     |                      |||	|¦  «        ¦  «         Œ:nht%          |	                     ¦   «         ¦  «        r|                      |||	|¦  «        }n.d}| j        �%t)          | j        | j        | j        j        ¦  «        }|S )r<   )Úresource_nameÚsingle_resource_json_definitionrH   Nc                 ó<   — g | ]}t          |t          ¦  «        ¯|‘ŒS r   )Ú
isinstancer&   )Ú.0Úvs     r
   ú
<listcomp>z,ResourceHandler.__call__.<locals>.<listcomp>ð   s'   € ÐIÐIÐI˜µZÀÅ4Ñ5HÔ5HÐI�!ÐIÐIÐIr   r   )rG   ÚtyperH   Úresource_json_definitionsÚgetrF   Úload_from_definitionr/   r   r   Údictr"   r   ÚvaluesÚrangeÚlenr   Úhandle_response_itemr   r0   r4   r1   )r9   r   r   r   rJ   Újson_definitionÚresource_clsr   Úsearch_responser   ÚpluralÚiÚresponse_items                r
   r>   zResourceHandler.__call__Æ   sÖ  € ð Ô+Ô0ˆØÔ.ÔH×LÒLØñ
ô 
ˆð
 ”|×8Ò8Ø'Ø,;Ø Ô0ð 9ñ 
ô 
ˆð
  ˆØˆð Ôð 	NÝ&œo¨dÔ.>ÀÑMÔMˆOõ ÝØÔ#Ô/°¸Àñô ñ
ô 
ˆð JÐI˜[×/Ò/Ñ1Ô1ÐIÑIÔIˆàð $	ØˆHõ �3˜v aœy™>œ>Ñ*Ô*ð ð �ð !%�Ø"ð 7Ø$3°AÔ$6�MØ—’Ø×-Ò-Ø$ f¨k¸=ñô ñô ð ð ðõ ˜+×,Ò,Ñ.Ô.Ñ/Ô/ð 	ð ×0Ò0Ø˜f k°?ñô ˆHˆHð ˆHØÔ"Ð.õ 0ØÔ$ØÔ'ØÔ(Ô6ñô �ð ˆr   c                 óà   — d|j         j        i}|                     ¦   «         D ]4\  }}t          |t          ¦  «        r|                     d¦  «        }|||<   Œ5 |di |¤Ž}|�||j         _        |S )a�  
        Handles the creation of a single response item by setting
        parameters and creating the appropriate resource instance.

        :type resource_cls: ServiceResource subclass
        :param resource_cls: The resource class to instantiate.
        :type parent: ServiceResource
        :param parent: The resource instance to which this action is attached.
        :type identifiers: dict
        :param identifiers: Map of identifier names to value or values.
        :type resource_data: dict or None
        :param resource_data: Data for resource attributes.
        :rtype: ServiceResource
        :return: New resource instance.
        Úclientr   Nr   )Úmetara   ÚitemsrM   r&   Úpopr   )	r9   r[   r   r   Úresource_dataÚkwargsr   r!   Úresources	            r
   rY   z$ResourceHandler.handle_response_item  sŒ   € ð& �f”kÔ(ð
ˆð '×,Ò,Ñ.Ô.ð 	!ð 	!‰KˆD�%å˜%¥Ñ&Ô&ð %ØŸ	š	 !™œ�à ˆF�4‰LˆLà�<Ð)Ð) &Ð)Ð)ˆàÐ$Ø!.ˆHŒMÔàˆr   r8   )r?   r@   rA   rB   r:   r>   rY   r   r   r
   rD   rD   ž   sY   € € € € € ðð ð> ð/ð /ð /ð /ðRð Rð Rðh"ð "ð "ð "ð "r   rD   )NN)
r   Úbotocorer   r   r   r   r"   r4   r6   rD   r   r   r
   ú<module>ri      sÌ   ðð €€€Ø Ð Ð Ð Ð Ð à #Ð #Ð #Ð #Ð #Ð #ð	ð 	ð 	ð+ð +ð +ð +ð\.ð .ð .ðbð ð ð ð ñ ô ð ð>^ð ^ð ^ð ^ð ^ñ ^ô ^ð ^ð ^ð ^r   