
    /Jf-                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZ  G d	 d
e
          Z	 ddZ	 ddZ	 ddZdS )    N)
xform_name)DocumentStructure)get_instance_public_methods)DocumentedShape)NestedDocumenter)%document_model_driven_resource_method)add_resource_type_overviewget_resource_ignore_paramsc                       e Zd Zd Zd ZdS )CollectionDocumenterc                    | j         j        j        j        }g }t	          |ddd           || j        d<   |D ](}|                    |j                   t          |j        d          }|	                    d          }|j
                            | j        d	           |                    d
|j                    |                    |j                   |	                    |j        d| j         di          }|                     ||           t"          j                            | j        | j         | j                   }|                    ||j                   *d S )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_modelr   r	   
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_paths	            X/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/boto3/docs/collection.pydocument_collectionsz)CollectionDocumenter.document_collections   s   n)8D"'3 +	
 	
 	
 	
 *:&% 	P 	PJ##JO444.zvNNNN!/!?!?!M!M$(()BGLLL$$%I
%I%IJJJ,,Z_===!/!?!?$&;&;&;< "@ " " %%&8*EEE $&7<<$%'*,$ $ 
 (()=zOOOO+	P 	P    c           	      4   t          t          | j        |j                            }t	          ||           i }|j        D ]}|||j        <   t          |          D ]}|                    |          }||v rSt          || j	        | j        j
        j        j
        j        ||         || j        j
        j        j
        j                   nt          || j	        || j        j
        j        j
        j        || j        j
        j        j
        j                   d S )N)r   resource_nameevent_emitterbatch_action_modelcollection_modelservice_model)r   r<   action_namer=   r?   r@   )r   getattrr   r!   document_collection_objectbatch_actionssortedr"   document_batch_action_resource_namer   clienteventsr@   document_collection_method)r1   r   r3   methodsrD   batch_actionmethodmethod_sections           r8   r)   z)CollectionDocumenter._document_collectionA   s9   -DNJO44
 
 	#7J777&4 	< 	<L/;M,+,,Woo 	 	F$44V<<N&&%*"&"5"&."5"<"A"H'4V'<%/"&."5"<"A"O     +*"&"5 &"&."5"<"A"H%/"&."5"<"A"O    	 	r:   N)__name__
__module____qualname__r9   r)    r:   r8   r   r      s6        "P "P "PH    r:   r   Tc                    |r>| j                             dd           |j         }| j                            |           |                     d|j        j         d           |                     d|j        j         d           dS )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    zA collection of z resources.zA z Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.N)r   getr!   r#   start_sphinx_py_attrinclude_doc_stringresourcetype)r   r?   include_signaturefull_collection_names       r8   rC   rC   `   s      A"";33L5E5JLL 	 	**+?@@@F+49FFF   	0&+ 	0 	0 	0    r:   c                 z   |                     |j        j                  }t          |j        j                  }d}	|j        rt          |j        j                  }	t          |          }
|j        |k    r|}
d	                    |	|
|j
        |j
                  }t          | |j
        |||j        ||||	  	         dS )ai  Documents 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_modelrZ   N)r_   request	operationr
   paramsrX   r   rY   service_nameformatr!   r   documentation)r   r<   r=   r>   r@   r?   rZ   r_   ignore_paramsexample_return_valueexample_resource_namera   s               r8   rF   rF   }   s    : $33", O /") M &" L)*<*E*JKK&}55!]22 -$++	 N *&+'#*8%#0+
 
 
 
 
 
r:   c           
         |                     |j        j                  }g }|j        r|j        j        }t          |          }	|j        |k    r|}	d|j        j         dd	                    t          |j        j                  |	|j
                  |dd|j        j         d|j        j         dd	                    t          |j        j                  |	|j
                  t          |j        j                  dd|j        j         dd		                    t          |j        j                  |	|j
                  t          d
dd          g|dd|j        j         dd	                    t          |j        j                  |	|j
                  t          d
dd          g|dd}
||
v r|
|         }t          d| |||||d| dS dS )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.
    zCreates an iterable of all z resources in the collection.z{}_iterator = {}.{}.all)r`   ra   rb   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{}_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_nameri   )r`   ra   include_inputrb   zs 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limit	page_size)r   r^   r_   r=   rc   rZ   NrR   )r_   rd   re   input_shapemembersr   rg   rX   rY   rh   r!   r
   rf   r   r   )r   r<   rA   r=   r?   r@   rZ   r_   underlying_operation_membersrl   custom_action_info_dictaction_infos               r8   rJ   rJ      s   6 $33 * O $& " K'6'B'J$&}55!]22 -
0.>.G.L 0 0 0 8>>+49::% % 
 :
 
%.>.G.L % %-6;% % % ;AA+49::% % 
 8 (/ 
 
(Q#,1Q Q Q :@@+49::% %    '+	  	 :)
 
0P.>.G.L P P P >DD+49::% %    'N	   :)
 
kK KX ----k:- 	
#+'"2/	
 	
 	
 	
 	
 	
 	
 .-r:   )T)r*   botocorer   botocore.docs.bcdoc.restdocr   botocore.docs.methodr   botocore.docs.utilsr   boto3.docs.baser   boto3.docs.methodr   boto3.docs.utilsr	   r
   r   rC   rF   rJ   rR   r:   r8   <module>r      s5   
			       9 9 9 9 9 9 < < < < < < / / / / / / , , , , , , C C C C C C       A A A A A+ A A AN    H ; ; ; ;J }
 }
 }
 }
 }
 }
r:   