B \@sZddlmZddlmZddlmZddlmZddlm Z Gddde Z d d d Z d S) ) xform_name) OrderedDict)DocumentedShape)get_service_module_name)document_model_driven_methodc@s$eZdZddZddZddZdS)WaiterDocumentercCs||_|jjjj|_||_dS)N)_clientmeta service_modelZ service_nameZ _service_name_service_waiter_model)selfclientservice_waiter_modelr8/tmp/pip-build-uw_ogi45/botocore/botocore/docs/waiter.py__init__szWaiterDocumenter.__init__cCs\|jd|j|dx6|jjD]*}|jd|jjj |f| ||q*WdS)zgDocuments the various waiters for a service. :param section: The section to write to. ZWaiterszThe available waiters are:z:py:class:`%s.Waiter.%s`N) styleh2new_linewritelnr Z waiter_nameslir __class____name___add_single_waiter)r section waiter_namerrrdocument_waiterss   z!WaiterDocumenter.document_waiterscCs||}|jjd|jjj|fd|j|j|dt ||j |jt |||jj j |jj j|jddS)Nz %s.Waiter.%s) class_namez waiter = client.get_waiter('%s'))rr event_emitterr r)Zadd_new_sectionrZstart_sphinx_py_classrrrZstart_codeblockrwriterZ end_codeblockdocument_wait_methodr eventsr r )r rrrrrr(s      z#WaiterDocumenter._add_single_waiterN)r __module__ __qualname__rrrrrrrrsrTc Cs||}||j}t}tddd|jd|d<tddd|jd|d<tddd |d g} d t|t |j|j|j} t |d ||| d | d|d dS)aDocuments a the wait method of a waiter :param section: The section to write to :param waiter_name: The name of the waiter :param event_emitter: The event emitter to use to emit events :param service_model: The service model :param service_waiter_model: The waiter model associated to the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. ZDelayintegerzK

The amount of time in seconds to wait between attempts. Default: {0}

)name type_name documentationZ MaxAttemptsz>

The maximum number of attempts to be made. Default: {0}

Z WaiterConfigZ structurezI

A dictionary that provides parameters to control waiting behavior.

)r%r&r'memberszPolls :py:meth:`{0}.Client.{1}` every {2} seconds until a successful state is reached. An error is returned after {3} failed checks.waitz waiter.waitF)rZmethod_descriptionZexample_prefixZ include_inputZdocument_outputinclude_signatureN) Z get_waiteroperation_modelZ operationrrformatdelayZ max_attemptsrrr) rrrr rr*Z waiter_modelr+Zwaiter_config_membersZbotocore_waiter_paramsZwait_descriptionrrrr As8   r N)T) ZbotocorerZbotocore.compatrZbotocore.docs.utilsrZbotocore.utilsrZbotocore.docs.methodrobjectrr rrrr s     /