ó
    Ú°›jtO  ã                   óú   • S r SSKrSSKJr  \R                  " \5      r " S S5      r " S S5      r " S S	5      r	 " S
 S5      r
 " S S\	5      r " S S\	5      r " S S5      r " S S\5      r " S S5      rg)a   
The models defined in this file represent the resource JSON description
format and provide a layer of abstraction from the raw JSON. The advantages
of this are:

* Pythonic interface (e.g. ``action.request.operation``)
* Consumers need not change for minor JSON changes (e.g. renamed field)

These models are used both by the resource factory to generate resource
classes as well as by the documentation generator.
é    N)Ú
xform_namec                   ó"   • \ rS rSrSrSS jrSrg)Ú
Identifieré!   zg
A resource identifier, given by its name.

:type name: string
:param name: The name of the identifier
Nc                 ó   • Xl         X l        g ©N)ÚnameÚmember_name)Úselfr	   r
   s      ÚR/home/mande/repo/quber/.venv/lib/python3.13/site-packages/boto3/resources/model.pyÚ__init__ÚIdentifier.__init__)   s   € àŒ	Ø&Õó    )r
   r	   r   ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__© r   r   r   r   !   s   † ñ÷'r   r   c                   ó   • \ rS rSrSrS rSrg)ÚActioné/   zè
A service operation action.

:type name: string
:param name: The name of the action
:type definition: dict
:param definition: The JSON definition
:type resource_defs: dict
:param resource_defs: All resources defined in the service
c                 óþ   • X l         Xl        S U l        SU;   a   [        UR	                  S0 5      5      U l        S U l        SU;   a!  [        UR	                  S0 5      U5      U l        UR	                  S5      U l        g )NÚrequestÚresourceÚpath)Ú_definitionr	   r   ÚRequestÚgetr   ÚResponseResourcer   ©r   r	   Ú
definitionÚresource_defss       r   r   ÚAction.__init__;   sr   € Ø%Ôð Œ	àˆŒØ˜
Ó"Ü" :§>¡>°)¸RÓ#@ÓAˆDŒLàˆŒØ˜Ó#Ü,Ø—‘˜z¨2Ó.°óˆDŒMð —N‘N 6Ó*ˆ�	r   )r   r	   r   r   r   Nr   r   r   r   r   r   /   s   † ñ	õ+r   r   c                   ó.   • \ rS rSrSrS r\S 5       rSrg)ÚDefinitionWithParamséN   zð
An item which has parameters exposed via the ``params`` property.
A request has an operation and parameters, while a waiter has
a name, a low-level waiter name and parameters.

:type definition: dict
:param definition: The JSON definition
c                 ó   • Xl         g r   ©r   )r   r$   s     r   r   ÚDefinitionWithParams.__init__X   s   € Ø%Õr   c                 ó„   • / nU R                   R                  S/ 5       H  nUR                  [        S0 UD65        M     U$ )z\
Get a list of auto-filled parameters for this request.

:type: list(:py:class:`Parameter`)
Úparamsr   ©r   r!   ÚappendÚ	Parameter)r   r.   Úitems      r   r.   ÚDefinitionWithParams.params[   sA   € ð ˆà×$Ñ$×(Ñ(¨°2Ö6ˆDØ�M‰Mœ)Ñ+ dÑ+Ö,ñ 7ð ˆr   r+   N)	r   r   r   r   r   r   Úpropertyr.   r   r   r   r   r(   r(   N   s    † ñò&ð ñó ór   r(   c                   ó$   • \ rS rSrSr SS jrSrg)r1   éj   a¤  
An auto-filled parameter which has a source and target. For example,
the ``QueueUrl`` may be auto-filled from a resource's ``url`` identifier
when making calls to ``queue.receive_messages``.

:type target: string
:param target: The destination parameter name, e.g. ``QueueUrl``
:type source_type: string
:param source_type: Where the source is defined.
:type source: string
:param source: The source name, e.g. ``Url``
Nc                 ó|   • Xl         X l        X0l        X@l        XPl        U(       a  [
        R                  SU5        g g )Nz#Unknown parameter options found: %s)ÚtargetÚsourcer	   r   ÚvalueÚloggerÚwarning)r   r8   r9   r	   r   r:   Úkwargss          r   r   ÚParameter.__init__x   s6   € ð ŒàŒàŒ	àŒ	àŒ
ö Ü�N‰NÐ@À&ÕIð r   )r	   r   r9   r8   r:   )NNNr   r   r   r   r1   r1   j   s   † ñð ;?÷Jr   r1   c                   ó,   ^ • \ rS rSrSrU 4S jrSrU =r$ )r    é‹   zd
A service operation action request.

:type definition: dict
:param definition: The JSON definition
c                 óP   >• [         TU ]  U5        UR                  S5      U l        g )NÚ	operation)Úsuperr   r!   rB   )r   r$   Ú	__class__s     €r   r   ÚRequest.__init__“   s"   ø€ Ü‰Ñ˜Ô$ð $Ÿ™¨Ó4ˆ�r   )rB   )r   r   r   r   r   r   r   Ú__classcell__©rD   s   @r   r    r    ‹   s   ø† ñ÷5ó 5r   r    c                   ó0   ^ • \ rS rSrSrSrU 4S jrSrU =r$ )ÚWaiteréš   z’
An event waiter specification.

:type name: string
:param name: Name of the waiter
:type definition: dict
:param definition: The JSON definition
Ú	WaitUntilc                 ó\   >• [         TU ]  U5        Xl        UR                  S5      U l        g )NÚ
waiterName)rC   r   r	   r!   Úwaiter_name)r   r	   r$   rD   s      €r   r   ÚWaiter.__init__¦   s*   ø€ Ü‰Ñ˜Ô$ð Œ	ð &Ÿ>™>¨,Ó7ˆÕr   )r	   rN   )	r   r   r   r   r   ÚPREFIXr   r   rF   rG   s   @r   rI   rI   š   s   ø† ñð €F÷8ó 8r   rI   c                   ó>   • \ rS rSrSrS r\S 5       r\S 5       rSr	g)r"   é°   zÏ
A resource response to create after performing an action.

:type definition: dict
:param definition: The JSON definition
:type resource_defs: dict
:param resource_defs: All resources defined in the service
c                 ót   • Xl         X l        UR                  S5      U l        UR                  S5      U l        g )NÚtyper   )r   Ú_resource_defsr!   rT   r   )r   r$   r%   s      r   r   ÚResponseResource.__init__º   s2   € Ø%ÔØ+Ôð —N‘N 6Ó*ˆŒ	ð —N‘N 6Ó*ˆ�	r   c                 ó„   • / nU R                   R                  S/ 5       H  nUR                  [        S0 UD65        M     U$ )zF
A list of resource identifiers.

:type: list(:py:class:`Identifier`)
Úidentifiersr   r/   )r   rX   r2   s      r   rX   ÚResponseResource.identifiersÄ   sD   € ð ˆà×$Ñ$×(Ñ(¨¸Ö;ˆDØ×ÑœyÑ0¨4Ñ0Ö1ñ <ð Ðr   c                 ór   • [        U R                  U R                  U R                     U R                  5      $ )zU
Get the resource model for the response resource.

:type: :py:class:`ResourceModel`
)ÚResourceModelrT   rU   ©r   s    r   ÚmodelÚResponseResource.modelÒ   s1   € ô Ø�I‰I�t×*Ñ*¨4¯9©9Ñ5°t×7JÑ7Jó
ð 	
r   )r   rU   r   rT   N)
r   r   r   r   r   r   r4   rX   r]   r   r   r   r   r"   r"   °   s4   † ñò+ð ñó ðð ñ
ó ó
r   r"   c                   ó(   • \ rS rSrSr\S 5       rSrg)Ú
CollectionéÞ   zþ
A group of resources. See :py:class:`Action`.

:type name: string
:param name: The name of the collection
:type definition: dict
:param definition: The JSON definition
:type resource_defs: dict
:param resource_defs: All resources defined in the service
c                 óB   • U R                   R                  R                  $ )zÊ
Get a list of batch actions supported by the resource type
contained in this action. This is a shortcut for accessing
the same information through the resource model.

:rtype: list(:py:class:`Action`)
)r   r]   Úbatch_actionsr\   s    r   rc   ÚCollection.batch_actionsê   s   € ð �}‰}×"Ñ"×0Ñ0Ð0r   r   N)r   r   r   r   r   r4   rc   r   r   r   r   r`   r`   Þ   s   † ñ	ð ñ1ó ó1r   r`   c                   óÎ   • \ rS rSrSrS rSS jrSS jrSS jrS r	\
S	 5       r\
S
 5       r\
S 5       r\
S 5       rS rS r\
S 5       r\
S 5       r\
S 5       r\
S 5       rSrg)r[   éö   aÍ  
A model representing a resource, defined via a JSON description
format. A resource has identifiers, attributes, actions,
sub-resources, references and collections. For more information
on resources, see :ref:`guide_resources`.

:type name: string
:param name: The name of this resource, e.g. ``sqs`` or ``Queue``
:type definition: dict
:param definition: The JSON definition
:type resource_defs: dict
:param resource_defs: All resources defined in the service
c                 ób   • X l         X0l        0 U l        Xl        UR	                  S5      U l        g )NÚshape)r   rU   Ú_renamedr	   r!   rh   r#   s       r   r   ÚResourceModel.__init__  s,   € Ø%ÔØ+ÔØˆŒð Œ	à—^‘^ GÓ,ˆ�
r   Nc                 óœ  • S1n0 U l         U R                  R                  S5      (       a  UR                  S5        U R                  R                  S/ 5       H  nU R	                  X#S   S5        M     U R                  R                  S0 5       H  nU R	                  X$S5        M     U R                  5       R                  5        HO  u  pESnUS	   S    H  nUS
   S:X  d  M  Sn  O   U(       d  U R	                  X$SSS9  M=  U R	                  X$S5        MQ     U R                  R                  S0 5       H  nU R	                  X$S5        M     U R                  R                  S0 5       H'  nU R	                  U[        R                  U-   S5        M)     Ub4  UR                  R                  5        H  nU R	                  X$S5        M     gg)a  
Load a name translation map given a shape. This will set
up renamed values for any collisions, e.g. if the shape,
an action, and a subresource all are all named ``foo``
then the resource will have an action ``foo``, a subresource
named ``Foo`` and a property named ``foo_attribute``.
This is the order of precedence, from most important to
least important:

* Load action (resource.load)
* Identifiers
* Actions
* Subresources
* References
* Collections
* Waiters
* Attributes (shape members)

Batch actions are only exposed on collections, so do not
get modified here. Subresources use upper camel casing, so
are unlikely to collide with anything but other subresources.

Creates a structure like this::

    renames = {
        ('action', 'id'): 'id_action',
        ('collection', 'id'): 'id_collection',
        ('attribute', 'id'): 'id_attribute'
    }

    # Get the final name for an action named 'id'
    name = renames.get(('action', 'id'), 'id')

:type shape: botocore.model.Shape
:param shape: The underlying shape for this resource.
ÚmetaÚloadrX   r	   Ú
identifierÚactionsÚactionFr   r9   ÚdataTÚsubresource©Ú
snake_caseÚ	referenceÚhasManyÚ
collectionÚwaitersÚwaiterNÚ	attribute)ri   r   r!   ÚaddÚ_load_name_with_categoryÚ_get_has_definitionÚitemsrI   rP   ÚmembersÚkeys)r   rh   Únamesr2   r	   ÚrefÚdata_requiredrn   s           r   Úload_rename_mapÚResourceModel.load_rename_map  s¶  € ðL �ˆØˆŒà×Ñ×Ñ ×'Ñ'Ø�I‰I�fÔà×$Ñ$×(Ñ(¨¸Ö;ˆDØ×)Ñ)¨%°f±¸|ÖLñ <ð ×$Ñ$×(Ñ(¨°BÖ7ˆDØ×)Ñ)¨%°xÖ@ñ 8ð ×1Ñ1Ó3×9Ñ9Ö;‰IˆDð "ˆMØ! *™o¨mÔ<�
Ø˜hÑ'¨6Õ1Ø$(�MÙñ =ö
 !Ø×-Ñ-Ø ¸5ð .ó ð ×-Ñ-¨e¸;ÖGñ <ð  ×$Ñ$×(Ñ(¨°BÖ7ˆDØ×)Ñ)¨%°|ÖDñ 8ð ×$Ñ$×(Ñ(¨°BÖ7ˆDØ×)Ñ)Ø”v—}‘} tÑ+¨Xöñ 8ð
 ÑØŸ™×*Ñ*Ö,�Ø×-Ñ-¨e¸;ÖGò -ð r   c           	      ó  • U(       a  [        U5      nX!;   ab  [        R                  SU R                  X25        U SU 3U R                  X24'   USU 3-  nX!;   a  [        SU R                   SU SU S35      eUR                  U5        g)a  
Load a name with a given category, possibly renaming it
if that name is already in use. The name will be stored
in ``names`` and possibly be set up in ``self._renamed``.

:type names: set
:param names: Existing names (Python attributes, properties, or
              methods) on the resource.
:type name: string
:param name: The original name of the value.
:type category: string
:param category: The value type, such as 'identifier' or 'action'
:type snake_case: bool
:param snake_case: True (default) if the name should be snake cased.
zRenaming %s %s %sÚ_zProblem renaming Ú z to Ú!N)r   r;   Údebugr	   ri   Ú
ValueErrorr{   )r   r�   r	   Úcategoryrt   s        r   r|   Ú&ResourceModel._load_name_with_category]  s”   € ö  Ü˜dÓ#ˆDà‹=Ü�L‰LÐ,¨d¯i©i¸ÔHØ15°°a¸°zÐ.BˆD�M‰M˜8Ð*Ñ+Ø�a˜�z�NÑ"ˆDà‹}ô !Ø'¨¯	©	 {°!°H°:¸TÀ$ÀÀqÐIóð ð 	�	‰	�$�r   c                 ó`   • U(       a  [        U5      nU R                  R                  X4U5      $ )aõ  
Get a possibly renamed value given a category and name. This
uses the rename map set up in ``load_rename_map``, so that
method must be called once first.

:type category: string
:param category: The value type, such as 'identifier' or 'action'
:type name: string
:param name: The original name of the value
:type snake_case: bool
:param snake_case: True (default) if the name should be snake cased.
:rtype: string
:return: Either the renamed value if it is set, otherwise the
         original name.
)r   ri   r!   )r   rŒ   r	   rt   s       r   Ú	_get_nameÚResourceModel._get_name~  s+   € ö  Ü˜dÓ#ˆDà�}‰}× Ñ  (Ð!1°4Ó8Ð8r   c                 óô   • 0 nU R                    Vs/ s H  o3R                  PM     nnUR                  R                  5        H-  u  pV[	        U5      nXt;   a  M  U R                  SUSS9nXV4X''   M/     U$ s  snf )a[  
Get a dictionary of attribute names to original name and shape
models that represent the attributes of this resource. Looks
like the following:

    {
        'some_name': ('SomeName', <Shape...>)
    }

:type shape: botocore.model.Shape
:param shape: The underlying shape for this resource.
:rtype: dict
:return: Mapping of resource attributes.
rz   Frs   )rX   r	   r   r~   r   r�   )r   rh   Ú
attributesÚiÚidentifier_namesr	   ÚmemberÚsnake_caseds           r   Úget_attributesÚResourceModel.get_attributes“  s‡   € ð ˆ
Ø,0×,<Ò,<Ó=Ò,< qŸFœFÑ,<ÐÐ=à!ŸM™M×/Ñ/Ö1‰LˆDÜ$ TÓ*ˆKØÓ.áØŸ.™.Ø˜[°Uð )ð ˆKð (, nˆJÓ#ñ 2ð Ðùò >s   ‘A5c                 ó  • / nU R                   R                  S/ 5       H]  nU R                  SUS   5      nUR                  SS5      nU(       a  U R                  SU5      nUR                  [	        X45      5        M_     U$ )zJ
Get a list of resource identifiers.

:type: list(:py:class:`Identifier`)
rX   rn   r	   Ú
memberNameNrz   )r   r!   r�   r0   r   )r   rX   r2   r	   r
   s        r   rX   ÚResourceModel.identifiers±  sx   € ð ˆà×$Ñ$×(Ñ(¨¸Ö;ˆDØ—>‘> ,°°V±Ó=ˆDØŸ(™( <°Ó6ˆKÞØ"Ÿn™n¨[¸+ÓF�Ø×Ñœz¨$Ó<Ö=ñ <ð Ðr   c                 ón   • U R                   R                  S5      nUb  [        SXR                  5      nU$ )za
Get the load action for this resource, if it is defined.

:type: :py:class:`Action` or ``None``
rm   )r   r!   r   rU   )r   rp   s     r   rm   ÚResourceModel.loadÃ  s7   € ð ×!Ñ!×%Ñ% fÓ-ˆàÑÜ˜F F×,?Ñ,?Ó@ˆFàˆr   c                 óÞ   • / nU R                   R                  S0 5      R                  5        H<  u  p#U R                  SU5      nUR	                  [        X#U R                  5      5        M>     U$ )zK
Get a list of actions for this resource.

:type: list(:py:class:`Action`)
ro   rp   ©r   r!   r~   r�   r0   r   rU   ©r   ro   r	   r2   s       r   ro   ÚResourceModel.actionsÑ  sb   € ð ˆà×*Ñ*×.Ñ.¨y¸"Ó=×CÑCÖE‰JˆDØ—>‘> (¨DÓ1ˆDØ�N‰Nœ6 $¨d×.AÑ.AÓBÖCñ Fð ˆr   c                 óÞ   • / nU R                   R                  S0 5      R                  5        H<  u  p#U R                  SU5      nUR	                  [        X#U R                  5      5        M>     U$ )zQ
Get a list of batch actions for this resource.

:type: list(:py:class:`Action`)
ÚbatchActionsÚbatch_actionrŸ   r    s       r   rc   ÚResourceModel.batch_actionsà  sb   € ð ˆà×*Ñ*×.Ñ.¨~¸rÓB×HÑHÖJ‰JˆDØ—>‘> .°$Ó7ˆDØ�N‰Nœ6 $¨d×.AÑ.AÓBÖCñ Kð ˆr   c                 ó  • U R                   U R                  ;  aÕ  0 nU R                  R                  5        H³  u  p#SnU R                  R	                  S0 5      R                  5       nU H2  u  pgUR	                  S0 5      R	                  S5      U:X  d  M,  XqU'   SnM4     U(       a  Mr  SU/ S.0nUR	                  S/ 5       H   n	US   S   R                  U	S   S	S
.5        M"     X�U'   Mµ     U$ U R                  R	                  S0 5      nU$ )a‰  
Get a ``has`` relationship definition from a model, where the
service resource model is treated special in that it contains
a relationship to every resource defined for the service. This
allows things like ``s3.Object('bucket-name', 'key')`` to
work even though the JSON doesn't define it explicitly.

:rtype: dict
:return: Mapping of names to subresource and reference
         definitions.
FÚhasr   rT   T)rT   rX   rX   r	   Úinput)r8   r9   )r	   rU   r~   r   r!   r0   )
r   r$   r	   Úresource_defÚfoundÚ	has_itemsÚhas_nameÚhas_defÚfake_hasrn   s
             r   r}   Ú!ResourceModel._get_has_definitionï  s#  € ð �9‰9˜D×/Ñ/Ó/ð ˆJà&*×&9Ñ&9×&?Ñ&?Ö&AÑ"�ð
 �Ø ×,Ñ,×0Ñ0°¸Ó;×AÑAÓC�	Û)2Ñ%�HØ—{‘{ :¨rÓ2×6Ñ6°vÓ>À$ÕFØ/6 8Ñ,Ø $šñ *3÷
 �uð  !+°TÈ"Ñ,MÐN�Hà&2×&6Ñ&6°}ÀbÖ&I˜
Ø  Ñ,¨]Ñ;×BÑBØ'1°&Ñ'9ÀWÑMöñ 'Jð
 (0˜tÓ$ñG 'BðN Ðð ×)Ñ)×-Ñ-¨e°RÓ8ˆJàÐr   c                 óÈ  • / nU R                  5       R                  5        H½  u  p4U(       a  U R                  SUSS9nOU R                  SU5      n[        X4U R                  5      nSnUR
                  R                   H  nUR                  S:X  d  M  Sn  O   U(       a  U(       d  UR                  U5        Mš  U(       a  M£  U(       d  M¬  UR                  U5        M¿     U$ )zÍ
Get a list of sub-resources or references.

:type subresources: bool
:param subresources: ``True`` to get sub-resources, ``False`` to
                     get references.
:rtype: list(:py:class:`Action`)
rr   Frs   ru   rq   T)	r}   r~   r�   r   rU   r   rX   r9   r0   )r   ÚsubresourcesÚ	resourcesr	   r$   rp   rƒ   rn   s           r   Ú_get_related_resourcesÚ$ResourceModel._get_related_resources)  sÅ   € ð ˆ	à $× 8Ñ 8Ó :× @Ñ @Ö BÑˆDÞØ—~‘~ m°TÀe�~ÐL‘à—~‘~ k°4Ó8�Ü˜D¨d×.AÑ.AÓBˆFà!ˆMØ$Ÿo™o×9Ô9�
Ø×$Ñ$¨Õ.Ø$(�MÙñ :ö
 ¦MØ× Ñ  Ö(ß!�\§m mØ× Ñ  Ö(ñ! !Cð$ Ðr   c                 ó$   • U R                  S5      $ )z?
Get a list of sub-resources.

:type: list(:py:class:`Action`)
T©r³   r\   s    r   r±   ÚResourceModel.subresourcesH  s   € ð ×*Ñ*¨4Ó0Ð0r   c                 ó$   • U R                  S5      $ )zE
Get a list of reference resources.

:type: list(:py:class:`Action`)
Fr¶   r\   s    r   Ú
referencesÚResourceModel.referencesQ  s   € ð ×*Ñ*¨5Ó1Ð1r   c                 óÞ   • / nU R                   R                  S0 5      R                  5        H<  u  p#U R                  SU5      nUR	                  [        X#U R                  5      5        M>     U$ )zS
Get a list of collections for this resource.

:type: list(:py:class:`Collection`)
rv   rw   )r   r!   r~   r�   r0   r`   rU   )r   Úcollectionsr	   r2   s       r   r¼   ÚResourceModel.collectionsZ  se   € ð ˆà×*Ñ*×.Ñ.¨y¸"Ó=×CÑCÖE‰JˆDØ—>‘> ,°Ó5ˆDØ×Ñœz¨$°d×6IÑ6IÓJÖKñ Fð Ðr   c                 óê   • / nU R                   R                  S0 5      R                  5        HB  u  p#U R                  S[        R
                  U-   5      nUR                  [	        X#5      5        MD     U$ )zK
Get a list of waiters for this resource.

:type: list(:py:class:`Waiter`)
rx   ry   )r   r!   r~   r�   rI   rP   r0   )r   rx   r	   r2   s       r   rx   ÚResourceModel.waitersi  sc   € ð ˆà×*Ñ*×.Ñ.¨y¸"Ó=×CÑCÖE‰JˆDØ—>‘> (¬F¯M©M¸DÑ,@ÓAˆDØ�N‰Nœ6 $Ó-Ö.ñ Fð ˆr   )r   ri   rU   r	   rh   r   )T)r   r   r   r   r   r   r„   r|   r�   r—   r4   rX   rm   ro   rc   r}   r³   r±   r¹   r¼   rx   r   r   r   r   r[   r[   ö   sÏ   † ñò-ôLHô\ôB9ò*ð< ñó ðð" ñó ðð ñó ðð ñó ðò8òtð> ñ1ó ð1ð ñ2ó ð2ð ñó ðð ñó ór   r[   )r   ÚloggingÚbotocorer   Ú	getLoggerr   r;   r   r   r(   r1   r    rI   r"   r`   r[   r   r   r   Ú<module>rÃ      sŠ   ðñ
ó å à	×	Ò	˜8Ó	$€÷'ñ '÷+ñ +÷>ñ ÷8Jñ JôB5Ð"ô 5ô8Ð!ô 8÷,+
ñ +
ô\1�ô 1÷0@ò @r   