�
K�g�J � �� � d dl Z d dlZd dlmZ d dlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
ej e� � Z G d
� d� � Z G d� d
� � Z G d� d� � ZdS )� N)�
xform_name)�merge_dicts� )� docstring� )�BatchAction)�create_request_parameters)�ResourceHandlerc �H � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� ZdS )�ResourceCollectiona�
Represents a collection of resources, which can be iterated through,
optionally with filtering. Collections automatically handle pagination
for you.
See :ref:`guide_collections` for a high-level overview of collections,
including when remote service requests are performed.
:type model: :py:class:`~boto3.resources.model.Collection`
:param model: Collection model
:type parent: :py:class:`~boto3.resources.base.ServiceResource`
:param parent: The collection's parent resource
:type handler: :py:class:`~boto3.resources.response.ResourceHandler`
:param handler: The resource response handler used to create resource
instances
c � � || _ || _ t |j j � � | _ || _ t j |� � | _ d S �N)
�_model�_parentr �request� operation�_py_operation_name�_handler�copy�deepcopy�_params)�self�model�parent�handler�kwargss �j/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/boto3/resources/collection.py�__init__zResourceCollection.__init__. sA � �������",�U�]�-D�"E�"E�����
��}�V�,�,����� c � � d� | j j | j | j j j � d| j j j � �� � S �Nz
{}({}, {})�.� �format� __class__�__name__r �meta�service_namer �resource�type�r s r �__repr__zResourceCollection.__repr__5 �H � ��"�"��N�#��L��|� �-�K�K���0D�0I�K�K�
�
�
r c # � K � | j � dd� � }d}| � � � D ]}|D ]}|V � |dz
}|�
||k r dS ��dS )a�
A generator which yields resource instances after doing the
appropriate service operation calls and handling any pagination
on your behalf.
Page size, item limit, and filter parameters are applied
if they have previously been set.
>>> bucket = s3.Bucket('boto3')
>>> for obj in bucket.objects.all():
... print(obj.key)
'key1'
'key2'
�limitNr r )r �get�pages)r r/ �count�page�items r �__iter__zResourceCollection.__iter__<