� K�g���d�ddlZddlZddlmZddlmZejd��Zd�Zd d�Z d d�Z dS) �N)� xform_name�)�ResourceLoadExceptionz \[(.*)\]$c���|jj�At|d��r|���nt |jj�d����tj||jj��S)aE Get a data member from a parent using a JMESPath search query, loading the parent if required. If the parent cannot be loaded and no data is present then an exception is raised. :type parent: ServiceResource :param parent: The resource instance to which contains data we are interested in. :type path: string :param path: The JMESPath expression to query :raises ResourceLoadException: When no data is present and the resource cannot be loaded. :returns: The queried data or ``None``. N�loadz has no load method!) �meta�data�hasattrrr� __class__�__name__�jmespath�search)�parent�paths �f/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/boto3/resources/params.py�get_data_memberrsm�� �{��� �6�6� "� "� � �K�K�M�M�M�M�'��#�,�B�B�B��� � �?�4���!1� 2� 2�2�c�6�|�i}|jD]�}|j}|j}|dkr#t|t |j����}nA|dkrt ||j��}n%|dvr|j}n|dkr�htd|�����t||||����|S)aX Handle request parameters that can be filled in from identifiers, resource data members or constants. By passing ``params``, you can invoke this method multiple times and build up a parameter dict over time, which is particularly useful for reverse JMESPath expressions that append to lists. :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type request_model: :py:class:`~boto3.resources.model.Request` :param request_model: The action request model. :type params: dict :param params: If set, then add to this existing dict. It is both edited in-place and returned. :type index: int :param index: The position of an item within a list :rtype: dict :return: Pre-filled parameters to be sent to the request operation. N� identifierr )�string�integer�boolean�inputzUnsupported source type: ) �params�source�target�getattrr�namerr�value�NotImplementedError�build_param_structure)r� request_modelr�index�paramrrrs r�create_request_parametersr%3s���*�~����%�<�<�������� �\� !� !��F�J�u�z�$:�$:�;�;�E�E� �v� � �$�F�E�J�7�7�E�E� �7� 7� 7��K�E�E� �w� � � �%�&J�&�&J�&J�K�K� K��f�f�e�U�;�;�;�;� �Mrc��|}|�d��}t|��D�]�\}}t�|��}|�rK|�d��ro|�d��dkr |dd�}nWt |�d����}|dt t|��dz�� �}n d}|dd�}||vst||t��sg||<|�t ||��}t ||��|kr4||� i��t ||��|k�4|t |��dz kr ||||<��^|||}��n||vri||<|t |��dz kr|||<���||}���dS)a This method provides a basic reverse JMESPath implementation that lets you go from a JMESPath-like string to a possibly deeply nested object. The ``params`` are mutated in-place, so subsequent calls can modify the same element by its index. >>> build_param_structure(params, 'test[0]', 1) >>> print(params) {'test': [1]} >>> build_param_structure(params, 'foo.bar[0].baz', 'hello world') >>> print(params) {'test': [1], 'foo': {'bar': [{'baz': 'hello, world'}]}} �.��*N�����z[]�����) �split� enumerate�INDEX_REr�group�int�len�str� isinstance�list�append) rrrr#�pos�parts�i�part�results rr!r!ds��� �C� �L�L�� � �E��U�#�#�* �* ���4�����&�&�� �' ��|�|�A��� !��<�<��?�?�c�)�)�����9�D�D� �� � �Q���0�0�E�� 9�3�s�5�z�z�D�'8�#9�#9�"9� 9�:�D�D����C�R�C�y���3���j��T��D�&A�&A����D� ��}��C��I�����c�$�i�.�.�E�)�)��D� � � ��$�$�$��c�$�i�.�.�E�)�)� �C��J�J��N�"�"�#(��D� �%� � ��$�i��&����3�����D� ��C��J�J��N�"�"�!��D� � ��$�i���U* �* r)NN)N) �rer �botocorer� exceptionsr�compiler.rr%r!�rr�<module>r@s��� � � � �����������.�.�.�.�.�.� �2�:�l� #� #��3�3�3�6.�.�.�.�bC �C �C �C �C �C r
Memory