
    vKg                     j    S SK r S SKrS SKJr  SSKJr  \ R                  " S5      rS rS	S jr	S
S jr
g)    N)
xform_name   )ResourceLoadExceptionz	\[(.*)\]$c                    U R                   R                  cD  [        U S5      (       a  U R                  5         O"[	        U R
                  R                   S35      e[        R                  " XR                   R                  5      $ )a  
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``.
loadz has no load method!)	metadatahasattrr   r   	__class____name__jmespathsearch)parentpaths     V/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/boto3/resources/params.pyget_data_memberr      sj      {{66""KKM'##,,--AB  ??4!1!122    c                 T   Uc  0 nUR                    H  nUR                  nUR                  nUS:X  a   [        U [	        UR
                  5      5      nOEUS:X  a  [        XR                  5      nO)US;   a  UR                  nOUS:X  a  Mx  [        SU 35      e[        X&Xs5        M     U$ )a  
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.

identifierr	   )stringintegerbooleaninputzUnsupported source type: )paramssourcetargetgetattrr   namer   r   valueNotImplementedErrorbuild_param_structure)r   request_modelr   indexparamr   r   r   s           r   create_request_parametersr%   3   s    * ~%%\!FJuzz$:;Ev $FJJ7E77KKEw%(A&&JKKfe;) &, Mr   c                    U nUR                  S5      n[        U5       GHC  u  pg[        R                  U5      nU(       a  UR	                  S5      (       aQ  UR	                  S5      S:X  a  USS nO=[        UR	                  S5      5      nUS[        [        U5      S-   5      *  nOSnUSS nXt;  d  [        XG   [        5      (       d  / XG'   Uc  [        XG   5      n[        XG   5      U::  a&  XG   R                  0 5        [        XG   5      U::  a  M&  U[        U5      S-
  :X  a
  X$U   U'   GM  XG   U   nGM  Xt;  a  0 XG'   U[        U5      S-
  :X  a  X$U'   GM?  XG   nGMF     g)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'}]}}

.   *Nz[])split	enumerateINDEX_REr   groupintlenstr
isinstancelistappend)	r   r   r   r#   pospartsipartresults	            r   r!   r!   d   sZ     CLLE U#&||A<<?c)9D  Q0E 93s5zD'8#9"9:D CRyjD&A&A	 }CIci.E)	  $ ci.E)
 CJN"#(D	%  i&	 CJN"!D	iU $r   )NN)N)rer   botocorer   
exceptionsr   compiler.   r   r%   r!    r   r   <module>r@      s2    
   .::l#36.bC r   