
     h                     r    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  G d d	      Z	 dd
Zy)    N)
xform_name)OrderedDict)DocumentStructure)document_model_driven_method)DocumentedShape)get_service_module_namec                   $    e Zd Zd Zd Zd Zd Zy)WaiterDocumenterc                     || _         | j                   j                  j                  | _        | j                   j                  j
                  j                  | _        || _        || _	        d| _
        y )NzRhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html#waiters)_client	__class____name___client_class_namemetaservice_modelservice_name_service_name_service_waiter_model_root_docs_path_USER_GUIDE_LINK)selfclientservice_waiter_modelroot_docs_paths       p/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/botocore/docs/waiter.py__init__zWaiterDocumenter.__init__   s]    "&,,"8"8"A"A!\\..<<II%9"-E 	    c                 <   |j                   j                  d       | j                  |       |j                   j                          |j	                  d       |j                   j                          | j                  j                  D ]  }|j                   j                  | j                   d|        t        |d      }| j                  ||       t        j                  j                  | j                  | j                  d      }|j!                  ||        y)zgDocuments the various waiters for a service.

        :param section: The section to write to.
        WaiterszThe available waiters are:z/waiter/html)targetwaiterN)styleh2_add_overviewnew_linewritelntoctreer   waiter_namestocitemr   r   _add_single_waiterospathjoinr   write_to_file)r   sectionwaiter_namewaiter_doc_structurewaiter_dir_paths        r   document_waitersz!WaiterDocumenter.document_waiters#   s    
 	#7# 4555BB 	MKMM!!T%7%7$8"NO#4F$  ##$8+F !ggll$$d&8&8(O !..L	Mr   c                    |j                  d      }|j                  j                  | j                  d| j                          |j                  d|        |j                  |       |j                  |      }|j                  j                  | j                   d|        |j                  j                          |j                  j                          |j                  dt        |       d       |j                  j                          |j                  j                          t        ||| j                  j                  j                  | j                  j                  j                   | j"                         y )	N
breadcrumbz../../z / Waiter / z.Waiter.)
class_namezwaiter = client.get_waiter('z'))r0   r1   event_emitterr   r   )add_new_sectionr#   refr   r   writeadd_title_sectionstart_sphinx_py_classstart_codeblockr&   r   end_codeblockdocument_wait_methodr   r   eventsr   r   )r   r0   r1   breadcrumb_sectionwaiter_sections        r   r+   z#WaiterDocumenter._add_single_waiter;   sN   $44\B  $$##vd.@.@-A%B	
 	  <}!=>!!+. 00=22112(;-H 	3 	

 	,,.%%'+J{,C+DCH	
 	**, 	%%'"#,,++22,,++99!%!;!;	
r   c                     |j                   j                          |j                  d       |j                   j                  d| j                         |j                  d       |j                   j                          y )NzWaiters are available on a client instance via the ``get_waiter`` method. For more detailed instructions and examples on the usage or waiters, see the waiters z
user guide)titlelink.)r#   r&   r;   external_linkr   )r   r0   s     r   r%   zWaiterDocumenter._add_overviewY   sf     	
 	##&& 	$ 	
 	c r   N)r   
__module____qualname__r   r4   r+   r%    r   r   r
   r
      s    	
M0
<!r   r
   c                    |j                  |      }|j                  |j                        }t               }t	        ddd|j
                   d      |d<   t	        ddd|j                   d      |d<   t	        dd	d
|      g}	dt        |       dt        |j                         d|j
                   d|j                   d	}
t        | d|||
d|	d|	       y)a  Documents 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.
    DelayintegerzD<p>The amount of time in seconds to wait between attempts. Default: z</p>)name	type_namedocumentationMaxAttemptsz7<p>The maximum number of attempts to be made. Default: WaiterConfig	structurezI<p>A dictionary that provides parameters to control waiting behavior.</p>)rO   rP   rQ   memberszPolls :py:meth:`z.Client.z` every zG seconds until a successful state is reached. An error is raised after z failed checks.waitzwaiter.waitF)r8   method_descriptionexample_prefixinclude_inputdocument_outputinclude_signatureN)

get_waiteroperation_model	operationr   r   delaymax_attemptsr   r   r   )r0   r1   r8   r   r   r[   waiter_modelr]   waiter_config_membersbotocore_waiter_paramswait_descriptions              r   r@   r@   i   s&   . (22;?L#33L4J4JKO'M%4""."4"4!5T;	&'" ,;$112$8	,-( 	!( *	

 2=AB(l,,-
.h|7I7I6J K$112/	C  !#+$,+
r   )T)r,   botocorer   botocore.compatr   botocore.docs.bcdoc.restdocr   botocore.docs.methodr   botocore.docs.utilsr   botocore.utilsr   r
   r@   rK   r   r   <module>rk      s4    
  ' 9 = / 2O! O!p Kr   