B 劇c)@s~ddlmZddlmZddlmZddlmZddlm Z ddl m Z m Z GdddeZ dd d Zdd d ZdddZdS)) xform_name)get_instance_public_methods)DocumentedShape)BaseDocumenter)%document_model_driven_resource_method)add_resource_type_overviewget_resource_ignore_paramsc@seZdZddZddZdS)CollectionDocumentercCs`|jjjj}g}t|dddd||jd<x0|D](}||j}||j| ||q0WdS)NZ CollectionszUCollections provide an interface to iterate over and manipulate groups of resources. Zguide_collections)sectionZ resource_type descriptionZ intro_link collections) _resourcemetaZresource_modelr r member_mapadd_new_sectionnameappend_document_collection)selfr r Zcollections_list collectionZcollection_sectionrp/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/boto3/docs/collection.pydocument_collectionss     z)CollectionDocumenter.document_collectionsc Cstt|j|j}t||i}x|jD]}|||j<q(Wx|t|D]p}||}||krt||j |jj j j j ||||jj j j j dqDt||j ||jj j j j ||jj j j j dqDWdS)N)r resource_name event_emitterbatch_action_modelcollection_model service_model)r r action_namerrr)rgetattrr rdocument_collection_object batch_actionssortedrdocument_batch_actionZ_resource_namerclienteventsrdocument_collection_method)rr rmethodsr!Z batch_actionmethodZmethod_sectionrrrr,s.     z)CollectionDocumenter._document_collectionN)__name__ __module__ __qualname__rrrrrrr sr TcCsB|r|j|j|d|jjd|d|jjddS)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. 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)styleZstart_sphinx_py_attrrZinclude_doc_stringresourcetype)r rinclude_signaturerrrr Ks 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_nameoperation_modelrmethod_descriptionexample_prefix exclude_inputresource_action_modelr/N) r2request operationrparamsr-rr. service_nameformatrr documentation) r rrrrrr/r2Z ignore_paramsZexample_return_valueexample_resource_namer4rrrr#cs2    r#c CsD||jj}g}|jr |jj}t|} |j|kr6|} d|jjdd t|jj| |j |dd|jjd|jjdd t|jj| |j t |jj dd|jjdd t|jj| |j t d d d d g|dd|jjdd t|jj| |j t d d dd g|dd} || kr@| |} 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)r3r4r5zD 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 = {}.{}.limitcountintegerz5The limit to the number of resources in the iterable.)rZ type_namer<)r3r4Z include_inputr5zs 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)allfilterlimitZ page_size)r r1r2rr6r/N)r2r7r8Z input_shapemembersrr:r-r.r;rrr9rr) r rrrrrr/r2Zunderlying_operation_membersr=Zcustom_action_info_dictZ action_inforrrr&sf         r&N)T)T)T)ZbotocorerZbotocore.docs.methodrZbotocore.docs.utilsrZboto3.docs.baserZboto3.docs.methodrZboto3.docs.utilsrrr r r#r&rrrr s     3  >