U å€C^ù%ã@s†ddlmZddlmZddlmZddlmZddlm Z ddl m Z ddlm Z Gdd „d eƒZ dd d „Zdd d„Zddd„ZdS)é)Ú xform_name)Úget_instance_public_methods)ÚDocumentedShape)ÚBaseDocumenter)Úget_resource_ignore_params)Ú%document_model_driven_resource_method)Úadd_resource_type_overviewc@seZdZdd„Zdd„ZdS)ÚCollectionDocumentercCs\|jjjj}g}t|dddd�||jd<|D](}| |j¡}| |j¡|  ||¡q.dS)NZ CollectionszUCollections provide an interface to iterate over and manipulate groups of resources. Zguide_collections)ÚsectionZ resource_typeÚ descriptionZ intro_linkÚ collections) Ú _resourceÚmetaZresource_modelr rÚ member_mapÚadd_new_sectionÚnameÚappendÚ_document_collection)Úselfr r Zcollections_listÚ collectionZcollection_section©rú8/tmp/pip-install-6_kvzl1k/boto3/boto3/docs/collection.pyÚdocument_collectionss ú   z)CollectionDocumenter.document_collectionsc Cs´tt|j|jƒƒ}t||ƒi}|jD]}|||j<q&t|ƒD]p}| |¡}||kr„t||j |jj j j j ||||jj j j j d�q>t||j ||jj j j j ||jj j j j d�q>dS)N)r Ú resource_nameÚ event_emitterÚbatch_action_modelÚcollection_modelÚ service_model)r rÚ action_namerrr)rÚgetattrr rÚdocument_collection_objectÚ batch_actionsÚsortedrÚdocument_batch_actionZ_resource_namerÚclientÚeventsrÚdocument_collection_method)rr rÚmethodsr!Z batch_actionÚmethodZmethod_sectionrrrr(s4 ÿ       ú   úz)CollectionDocumenter._document_collectionN)Ú__name__Ú __module__Ú __qualname__rrrrrrr sr TcCs(|r|j |j¡| d|jj¡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. zA collection of %s resourcesN)ÚstyleZstart_sphinx_py_attrrZinclude_doc_stringÚresourceÚtype)r rÚinclude_signaturerrrr Fs  ÿr c Cs|| |jj¡}t|jjƒ}d} |jr0t|jjƒ} t|ƒ} |j|krF|} d| | |j |j f} 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 %s = %s.%s.%s) r Ú method_nameÚoperation_modelrÚmethod_descriptionÚexample_prefixÚ exclude_inputÚresource_action_modelr/N) r2ÚrequestÚ operationrÚparamsr-rr.Ú service_namerrÚ documentation) r rrrrrr/r2Z ignore_paramsZexample_return_valueÚexample_resource_namer4rrrr#Ws:ÿÿ  þør#c Cs*| |jj¡}g}|jr |jj}t|ƒ} |j|kr6|} d|jjdt|jjƒ| |j f|dœd|jjdt|jjƒ| |j ft |jj ƒdœd|jjdt|jjƒ| |j ft dd d d �g|d œd |jjdt|jjƒ| |j ft dd dd �g|d œdœ} || k�r&| |} t f||||||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. z:Creates an iterable of all %s resources in the collection.z%s_iterator = %s.%s.all)r3r4r5z^Creates an iterable of all %s resources in the collection filtered by kwargs passed to method.z%s_iterator = %s.%s.filterzOCreates an iterable up to a specified amount of %s resources in the collection.z%s_iterator = %s.%s.limitÚcountÚintegerz5The limit to the number of resources in the iterable.)rÚ type_namer;)r3r4Z include_inputr5z�Creates an iterable of all %s resources in the collection, but limits the number of items returned by each service call by the specified amount.z%s_iterator = %s.%s.page_sizez1The number of items returned by each service call)ÚallÚfilterÚlimitZ page_size)r r1r2rr6r/N)r2r7r8Z input_shapeÚmembersrr:r-r.rrr9rr) r rrrrrr/r2Zunderlying_operation_membersr<Zcustom_action_info_dictZ action_inforrrr&Šs˜ÿ ÿ þù þ þÿø þ þýÿòý þýÿñÛ7 ûúr&N)T)T)T)ZbotocorerZbotocore.docs.methodrZbotocore.docs.utilsrZboto3.docs.baserZboto3.docs.utilsrZboto3.docs.methodrrr r r#r&rrrrÚ s       0ÿ þ 5þ