B 䊇c@sXddlmZddlmZddlmZddlmZddlm Z GdddZ d d d Z d S) ) xform_name) OrderedDict)document_model_driven_method)DocumentedShape)get_service_module_namec@s$eZdZddZddZddZdS)WaiterDocumentercCs||_|jjjj|_||_dS)N)_clientmeta service_model service_nameZ _service_name_service_waiter_model)selfclientservice_waiter_modelro/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/botocore/docs/waiter.py__init__szWaiterDocumenter.__init__cCsb|jd|j|dx<|jjD]0}|jd|jjj d|d| ||q*WdS)zgDocuments the various waiters for a service. :param section: The section to write to. ZWaiterszThe available waiters are:z :py:class:`z.Waiter.`N) styleZh2new_linewritelnr Z waiter_namesZlir __class____name___add_single_waiter)r section waiter_namerrrdocument_waiterss   z!WaiterDocumenter.document_waiterscCs||}|jj|jjjd|d|j|j|dt ||j |jt |||jj j |jj j|jddS)Nz.Waiter.) 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. ZDelayintegerzJ

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

)name type_name documentationZ MaxAttemptsz=

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

Z WaiterConfigZ structurezI

A dictionary that provides parameters to control waiting behavior.

)r%r&r'memberszPolls :py:meth:`{}.Client.{}` every {} seconds until a successful state is reached. An error is returned after {} 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 AsB   r N)T) ZbotocorerZbotocore.compatrZbotocore.docs.methodrZbotocore.docs.utilsrZbotocore.utilsrrr rrrr s     3