HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/boto3/docs/__pycache__/collection.cpython-37.pyc
B

�P�e�-�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZmZGd	d
�d
e
�Zddd
�Zddd�Zddd�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<x�|D]�}|�|j�t|jdd�}|�	d�}|j
�|jd	�|�
d
|j���|�|j�|j	|jd|j�d�id
�}|�||�tj�|j|j�|j��}|�||j�q0WdS)NZCollectionszUCollections provide an interface to iterate over and manipulate groups of resources. Zguide_collections)�sectionZ
resource_type�descriptionZ
intro_link�collections�html)�targetZ
breadcrumb�indexz / Collection / �	qualifier�.)�context)�	_resource�metaZresource_modelr
r�
member_map�append�namer�add_new_section�style�refZ_resource_class_name�writeZadd_title_section�
class_name�_document_collection�os�path�joinZ_root_docs_pathZ
_service_nameZ_resource_sub_pathZ
write_to_file)	�selfrr
Zcollections_list�
collectionZcollection_docZbreadcrumb_sectionZcollection_sectionZcollections_dir_path�r$�F/opt/alt/python37/lib/python3.7/site-packages/boto3/docs/collection.py�document_collectionss0



z)CollectionDocumenter.document_collectionsc	Cs�tt|j|j��}t||�i}x|jD]}|||j<q(Wx|t|�D]p}|�|�}||kr�t||j	|jj
jj
j||||jj
jj
j
d�qDt||j	||jj
jj
j||jj
jj
j
d�qDWdS)N)r�
resource_name�
event_emitter�batch_action_model�collection_model�
service_model)rr'�action_namer(r*r+)r�getattrrr�document_collection_object�
batch_actions�sortedr�document_batch_actionZ_resource_namer�client�eventsr+�document_collection_method)r"rr#�methodsr/Zbatch_action�methodZmethod_sectionr$r$r%rAs.

z)CollectionDocumenter._document_collectionN)�__name__�
__module__�__qualname__r&rr$r$r$r%r
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�getrrZstart_sphinx_py_attrZinclude_doc_string�resource�type)rr*�include_signatureZfull_collection_namer$r$r%r.`sr.cCs||�|jj�}t|jj�}d}	|jr0t|jj�}	t|�}
|j|krF|}
d�	|	|
|j
|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�method_name�operation_modelr(�method_description�example_prefix�
exclude_input�resource_action_modelr>N)
rA�request�	operationr	�paramsr<rr=�service_name�formatrr�
documentation)rr'r(r)r+r*r>rAZ
ignore_paramsZexample_return_value�example_resource_namerCr$r$r%r1}s2


r1c
CsD|�|jj�}g}|jr |jj}t|�}	|j|kr6|}	d|jj�d�d�	t|jj�|	|j
�|d�d|jj�d|jj�d�d�	t|jj�|	|j
�t|jj�d�d|jj�d�d	�	t|jj�|	|j
�t
d
ddd
�g|d�d|jj�d�d�	t|jj�|	|j
�t
d
ddd
�g|d�d�}
||
k�r@|
|}tf||||||d�|��dS)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 = {}.{}.all)rBrCrDzD 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{}_iterator = {}.{}.filterz0Creates an iterable up to a specified amount of z{}_iterator = {}.{}.limit�count�integerz5The limit to the number of resources in the iterable.)r�	type_namerK)rBrCZ
include_inputrDzs resources in the collection, but limits the number of items returned by each service call by the specified amount.z{}_iterator = {}.{}.page_sizez1The number of items returned by each service call)�all�filter�limitZ	page_size)rr@rAr(rEr>N)rArFrGZinput_shape�membersrrIr<r=rJrr	rHrr)rr'r,r(r*r+r>rAZunderlying_operation_membersrLZcustom_action_info_dictZaction_infor$r$r%r4�sf






r4)T)T)T)rZbotocorerZbotocore.docs.bcdoc.restdocrZbotocore.docs.methodrZbotocore.docs.utilsrZboto3.docs.baserZboto3.docs.methodrZboto3.docs.utilsrr	r
r.r1r4r$r$r$r%�<module>
sG
!
>