HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/boto3/docs/__pycache__/collection.cpython-310.pyc
o

�h>,�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZmZGd	d
�d
e
�Z	ddd
�Z	ddd�Z	ddd�ZdS)�N)�
xform_name)�DocumentStructure)�get_instance_public_methods)�DocumentedShape)�NestedDocumenter)�%document_model_driven_resource_method)�add_resource_type_overview�get_resource_ignore_paramsc@seZdZdd�Zdd�ZdS)�CollectionDocumenterc	Cs�|jjjj}g}t|dddd�||jd<|D]S}|�|j�t|jdd�}|�	d�}|j
�|jd	�|�
d
|j���|�|j�|j	|jd|j�d�id
�}|�||�tj�|j|j�|j��}|�||j�qdS)N�CollectionszUCollections provide an interface to iterate over and manipulate groups of resources. �guide_collections)�section�
resource_type�description�
intro_link�collections�html)�target�
breadcrumb�indexz / Collection / �	qualifier�.)�context)�	_resource�meta�resource_modelrr�
member_map�append�namer�add_new_section�style�ref�_resource_class_name�write�add_title_section�
class_name�_document_collection�os�path�join�_root_docs_path�
_service_name�_resource_sub_path�
write_to_file)	�selfr
r�collections_list�
collection�collection_doc�breadcrumb_section�collection_section�collections_dir_path�r5�H/usr/local/CyberCP/lib/python3.10/site-packages/boto3/docs/collection.py�document_collectionss8�
	
���z)CollectionDocumenter.document_collectionsc	Cs�tt|j|j��}t||�i}|jD]}|||j<qt|�D]8}|�|�}||vrBt||j	|jj
jj
j||||jj
jj
j
d�qt||j	||jj
jj
j||jj
jj
j
d�qdS)N)r
�
resource_name�
event_emitter�batch_action_model�collection_model�
service_model)r
r8�action_namer9r;r<)r�getattrrr�document_collection_object�
batch_actions�sortedr�document_batch_action�_resource_namer�client�eventsr<�document_collection_method)r.r
r0�methodsr@�batch_action�method�method_sectionr5r5r6r&As6�


�	��z)CollectionDocumenter._document_collectionN)�__name__�
__module__�__qualname__r7r&r5r5r5r6r
s$r
TcCsX|r|j�dd��|j��}|j�|�|�d|jj�d��|�d|jj�d��dS)a
Documents a collection resource object

    :param section: The section to write to

    :param collection_model: The model of the collection

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    r�zA collection of z resources.zA z� Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.N)r�getrr �start_sphinx_py_attr�include_doc_string�resource�type)r
r;�include_signature�full_collection_namer5r5r6r?`s���r?cCs�|�|jj�}t|jj�}d}	|jrt|jj�}	t|�}
|j|kr#|}
|	�d|
�d|j	�d|j	��}t
||j	|||j||||d�	dS)aiDocuments a collection's batch action

    :param section: The section to write to

    :param resource_name: The name of the resource

    :param action_name: The name of collection action. Currently only
        can be all, filter, limit, or page_size

    :param event_emitter: The event emitter to use to emit events

    :param batch_action_model: The model of the batch action

    :param collection_model: The model of the collection

    :param service_model: The model of the service

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    �responsez = r)	r
�method_name�operation_modelr9�method_description�example_prefix�
exclude_input�resource_action_modelrTN)rX�request�	operationr	�paramsrRrrS�service_namerr�
documentation)r
r8r9r:r<r;rTrX�
ignore_params�example_return_value�example_resource_namerZr5r5r6rB}s0��

�rBc
Csf|�|jj�}g}|jr|jj}t|�}	|j|kr|}	d|jj�d�t|jj��d|	�d|j	�d�|d�d|jj�d|jj�d�t|jj��d|	�d|j	�d	�t
|jj�d�d
|jj�d�t|jj��d|	�d|j	�d�tdd
dd�g|d�d|jj�d�t|jj��d|	�d|j	�d�tdd
dd�g|d�d�}
||
vr�|
|}t
d||||||d�|��dSdS)a#Documents a collection method

    :param section: The section to write to

    :param resource_name: The name of the resource

    :param action_name: The name of collection action. Currently only
        can be all, filter, limit, or page_size

    :param event_emitter: The event emitter to use to emit events

    :param collection_model: The model of the collection

    :param service_model: The model of the service

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    zCreates an iterable of all z resources in the collection.z_iterator = rz.all)rYrZr[zD resources in the collection filtered by kwargs passed to method. A z� collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.z.filterz0Creates an iterable up to a specified amount of z.limit�count�integerz5The limit to the number of resources in the iterable.)r�	type_namera)rYrZ�
include_inputr[zs resources in the collection, but limits the number of items returned by each service call by the specified amount.z
.page_sizez1The number of items returned by each service call)�all�filter�limit�	page_size)r
rWrXr9r\rTNr5)rXr]r^�input_shape�membersrr`rRrSrr	r_rr)r
r8r=r9r;r<rTrX�underlying_operation_membersrd�custom_action_info_dict�action_infor5r5r6rF�sr�
�
������
���	��<�
��rF)T)r'�botocorer�botocore.docs.bcdoc.restdocr�botocore.docs.methodr�botocore.docs.utilsr�boto3.docs.baser�boto3.docs.methodr�boto3.docs.utilsrr	r
r?rBrFr5r5r5r6�<module>sG
�$
�@�