ó T!¶\c@s}ddlZddlmZddlmZd„Zddd„Zd„Zde fd „ƒYZ d e fd „ƒYZ dS( iÿÿÿÿN(t xform_namei(tget_data_membercCs%x|D]}|dkrtSqWtS(sÍ 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. N(tNonetFalsetTrue(titerabletelement((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyt all_not_nones  c Csýg}xð|D]è}|j}|j}|dkrItj|j|ƒ}n“|dkrmtj|j|ƒ}no|dkr”t|t|jƒƒ}nH|dkrµt||jƒ}n'|dkrÇq nt dj |ƒƒ‚|j t|ƒ|fƒq W|S(sË 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. tresponsetrequestParametert identifiertdatatinputsUnsupported source type: {0}( tsourcettargettjmespathtsearchtpathtgetattrRtnameRtNotImplementedErrortformattappend( t identifierstparenttparamst raw_responsetresultsR R Rtvalue((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pytbuild_identifiers s$        cCsñd}|j|ƒ}|j}|r¥x~|jdƒD]j}|jdƒ}|jdkrh|j|}q4|jdkrƒ|j}q4tdj |j|ƒƒ‚q4Wn|jdkr½i}n0|jdkrÕg}n|jdkríi}n|S(s 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 t.s [0123456789]$t structuretlists(Search path hits shape type {0} from {1}tmapN( Rtoperation_modelt output_shapetsplittstript type_nametmemberstmemberRR(t search_pathtoperation_namet service_modelRR"tshapetitem((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pytbuild_empty_responseOs(     t RawHandlercBs eZdZd„Zd„ZRS(sG 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 cCs ||_dS(N(R)(tselfR)((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyt__init__‹scCs4|jr0|jdkr0tj|j|ƒ}n|S(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. t$(R)RR(R0RRR((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyt__call__Žs (t__name__t __module__t__doc__R1R3(((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyR/€s  tResourceHandlercBs,eZdZdd„Zd„Zd„ZRS(sf 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). cCs1||_||_||_||_||_dS(N(R)tfactorytresource_modelR*tservice_context(R0R)R8R9R:R*((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyR1·s     cCs|jj}|jjj|ƒ}|jjd|d|d|jƒ}|}d}|jrrt j |j|ƒ}nt t |jj |||ƒƒ} g| jƒD]} t| tƒr | ^q } | r)g}x¼tt| dƒƒD]>} d} |r|| } n|j|j||| | ƒƒqäWnct| jƒƒrV|j||| |ƒ}n6d}|jdk rŒt|j|j|jjƒ}n|S(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. t resource_nametsingle_resource_json_definitionR:iN(R9ttypeR:tresource_json_definitionstgetR8tload_from_definitionRR)RRtdictRRtvaluest isinstanceR trangetlenRthandle_response_itemRR*R.R+(R0RRRR;tjson_definitiont resource_clsRtsearch_responseRtvtpluraltit response_item((s9/tmp/pip-install-usGedi/boto3/boto3/resources/response.pyR3¿sB       .   c Cs†i|jjd6}xE|jƒD]7\}}t|tƒrM|jdƒ}n|||s  / 1