LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /opt/alt/python311/lib/python3.11/site-packages/boto3/resources/__pycache__/
File Upload :
Command :
Current File : //opt/alt/python311/lib/python3.11/site-packages/boto3/resources/__pycache__/action.cpython-311.pyc

�

��Cf�%����ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
eje��ZGd	�d
��ZGd�de��ZGd
�d��ZGd�d��ZdS)�N)�
xform_name)�ActionDocstring)�inject_attribute�)�Action)�create_request_parameters)�
RawHandler�ResourceHandlerc� �eZdZdZdd�Zd�ZdS)�
ServiceActiona�
    A class representing a callable action on a resource, for example
    ``sqs.get_queue_by_name(...)`` or ``s3.Bucket('foo').delete()``.
    The action may construct parameters from existing resource identifiers
    and may return either a raw response or a new resource instance.

    :type action_model: :py:class`~boto3.resources.model.Action`
    :param action_model: The action model.

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

    :type service_context: :py:class:`~boto3.utils.ServiceContext`
    :param service_context: Context about the AWS service
    Nc��||_|j}|r*t|j||||jj���|_dSt|j��|_dS)N)�search_path�factory�resource_model�service_context�operation_name)�
_action_model�resourcer
�path�request�	operation�_response_handlerr	)�self�action_modelrr�resource_response_models     �I/opt/alt/python311/lib/python3.11/site-packages/boto3/resources/action.py�__init__zServiceAction.__init__.sn��)���#/�"7��"�		C�%4�3�8��6� /�+�3�=�&�&�&�D�"�"�"�&0��0A�%B�%B�D�"�"�"�c��t|jjj��}t	||jj��}|�|��t�d|jj	||��t|jj|��|i|��}t�d|��|�|||��S)a�
        Perform the action's request operation after building operation
        parameters and build any defined resources from the response.

        :type parent: :py:class:`~boto3.resources.base.ServiceResource`
        :param parent: The resource instance to which this action is attached.
        :rtype: dict or ServiceResource or list(ServiceResource)
        :return: The response, either as a raw dict or resource instance(s).
        �Calling %s:%s with %r�Response: %r)
rrrrr�update�logger�debug�meta�service_name�getattr�clientr)r�parent�args�kwargsr�params�responses       r�__call__zServiceAction.__call__?s���$�D�$6�$>�$H�I�I��
+�6�4�3E�3M�N�N���
�
�f�������#��K�$���		
�	
�	
�?�7�6�;�-�~�>�>��O��O�O�����^�X�.�.�.��%�%�f�f�h�?�?�?r)NN��__name__�
__module__�__qualname__�__doc__rr.�rrrrsJ��������"C�C�C�C�"@�@�@�@�@rrc��eZdZdZd�ZdS)�BatchActiona�
    An action which operates on a batch of items in a collection, typically
    a single page of results from the collection's underlying service
    operation call. For example, this allows you to delete up to 999
    S3 objects in a single operation rather than calling ``.delete()`` on
    each one individually.

    :type action_model: :py:class`~boto3.resources.model.Action`
    :param action_model: The action model.

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

    :type service_context: :py:class:`~boto3.utils.ServiceContext`
    :param service_context: Context about the AWS service
    c�>�d}d}g}t|jjj��}|���D]�}i}	t|��D]>\}
}|�|jj}|�|jj}t||jj|	|
����?|	sn�|	�
|��t�d|||	��t||��|i|	��}t�d|��|�|�||	|������|S)a�
        Perform the batch action's operation on every page of results
        from the collection.

        :type parent:
            :py:class:`~boto3.resources.collection.ResourceCollection`
        :param parent: The collection iterator to which this action
                       is attached.
        :rtype: list(dict)
        :return: A list of low-level response dicts from each call.
        N)r,�indexr r!)rrrr�pages�	enumerater%r&r(rr"r#r$r'�appendr)
rr)r*r+r&r(�	responsesr�pager,r8rr-s
             rr.zBatchAction.__call__rsT�������	�#�D�$6�$>�$H�I�I��
�L�L�N�N� 	O� 	O�D��F�#,�T�?�?�
�
���x� �'�#+�=�#=�L��>�%�]�1�F�)���&�.�!��	������
����M�M�&�!�!�!��L�L�'��~�v�
�
�
�7�w�v�~�6�6��G��G�G�H��L�L���2�2�2����T�3�3�F�F�H�M�M�N�N�N�N��rN)r0r1r2r3r.r4rrr6r6_s-��������$6�6�6�6�6rr6c��eZdZdZd�Zd�ZdS)�WaiterActiona/
    A class representing a callable waiter action on a resource, for example
    ``s3.Bucket('foo').wait_until_bucket_exists()``.
    The waiter action may construct parameters from existing resource
    identifiers.

    :type waiter_model: :py:class`~boto3.resources.model.Waiter`
    :param waiter_model: The action waiter.
    :type waiter_resource_name: string
    :param waiter_resource_name: The name of the waiter action for the
                                 resource. It usually begins with a
                                 ``wait_until_``
    c�"�||_||_dS)N)�
_waiter_model�_waiter_resource_name)r�waiter_model�waiter_resource_names   rrzWaiterAction.__init__�s��)���%9��"�"�"rc�v�t|jj��}t||j��}|�|��t
�d|jj|j	|��|jj
}|�|��}|jdi|��}t
�d|��dS)z�
        Perform the wait operation after building operation
        parameters.

        :type parent: :py:class:`~boto3.resources.base.ServiceResource`
        :param parent: The resource instance to which this action is attached.
        r r!Nr4)
rrA�waiter_namerr"r#r$r%r&rBr(�
get_waiter�wait)	rr)r*r+�client_waiter_namer,r(�waiterr-s	         rr.zWaiterAction.__call__�s���(��(:�(F�G�G��
+�6�4�3E�F�F���
�
�f�������#��K�$��&��		
�	
�	
���#���"�"�#5�6�6���6�;�(�(��(�(�����^�X�.�.�.�.�.rNr/r4rrr?r?�s<��������:�:�:�/�/�/�/�/rr?c��eZdZdZd�Zd�ZdS)�CustomModeledActionz3A custom, modeled action to inject into a resource.c�>�||_||_||_||_dS)a�
        :type action_name: str
        :param action_name: The name of the action to inject, e.g.
            'delete_tags'

        :type action_model: dict
        :param action_model: A JSON definition of the action, as if it were
            part of the resource model.

        :type function: function
        :param function: The function to perform when the action is called.
            The first argument should be 'self', which will be the resource
            the function is to be called on.

        :type event_emitter: :py:class:`botocore.hooks.BaseEventHooks`
        :param event_emitter: The session event emitter.
        N)�name�model�function�emitter)r�action_namerrP�
event_emitters     rrzCustomModeledAction.__init__�s$��$ ��	�!��
� ��
�$����rc��|�d��d}t|j|ji��}|j|j_t
||j||jd���|j_	t||j|j��dS)N�.���F)�
resource_namerSr�
service_model�include_signature)�rsplitrrNrOrPr0rrQrXr3r)r�class_attributesr�
event_namer+rW�actions       r�injectzCustomModeledAction.inject�s���"�)�)�#�.�.�r�2�
���	�4�:�r�2�2��!%���
�� /�'��,��)�7�#�!
�!
�!
��
��	�)�4�9�d�m�D�D�D�D�DrN)r0r1r2r3rr^r4rrrLrL�s=������=�=�%�%�%�.E�E�E�E�ErrL)�logging�botocorer�boto3.docs.docstringr�boto3.utilsrrOrr,rr-r	r
�	getLoggerr0r#rr6r?rLr4rr�<module>rdse������������0�0�0�0�0�0�(�(�(�(�(�(�������-�-�-�-�-�-�1�1�1�1�1�1�1�1�	��	�8�	$�	$��@@�@@�@@�@@�@@�@@�@@�@@�FI�I�I�I�I�-�I�I�I�X./�./�./�./�./�./�./�./�b%E�%E�%E�%E�%E�%E�%E�%E�%E�%Er

LittleDemon - FACEBOOK
[ KELUAR ]