o
    è’Oj/  ã                   @   sz   d dl Z d dlZd dlmZmZ d dlmZmZ dZdd„ Z		ddd„Z
	dd	d
„Zdd„ Z								ddd„ZdS )é    N)ÚRequestExampleDocumenterÚResponseExampleDocumenter)ÚRequestParamsDocumenterÚResponseParamsDocumenterz'https://docs.aws.amazon.com/goto/WebAPIc                 C   s<   t  | ¡}i }|D ]\}}| d¡st  |¡r|||< q	|S )a  Retrieves an objects public methods

    :param instance: The instance of the class to inspect
    :rtype: dict
    :returns: A dictionary that represents an instance's methods where
        the keys are the name of the methods and the
        values are the handler to the method.
    Ú_)ÚinspectÚ
getmembersÚ
startswithÚismethod)ÚinstanceÚinstance_membersÚinstance_methodsÚnameÚmember© r   úZ/var/www/html/pharmsmart-cdr-gen/venv/lib/python3.10/site-packages/botocore/docs/method.pyÚget_instance_public_methods   s   
	

€r   c           	      C   s~   i }|j r	|j j}t| ¡ ƒ}|dur|D ]}| |j¡ q|dur0|D ]}||v r/| |¡ q$d}|r6d}| j ||¡ dS )a;  Documents the signature of a model-driven method

    :param section: The section to write the documentation to.

    :param name: The name of the method

    :param operation_model: The operation model for the method

    :type include: Dictionary where keys are parameter names and
        values are the shapes of the parameter names.
    :param include: The parameter shapes to include in the documentation.

    :type exclude: List of the names of the parameters to exclude.
    :param exclude: The names of the parameters to exclude from
        documentation.
    NÚ z**kwargs)	Úinput_shapeÚmembersÚlistÚkeysÚappendr   ÚremoveÚstyleÚstart_sphinx_py_method)	Úsectionr   Úoperation_modelÚincludeÚexcludeÚparamsÚparameter_namesr   Úsignature_paramsr   r   r   Údocument_model_driven_signature.   s    
€r#   c           
      C   sŠ   t  |¡}t|tjƒr0tt|jƒƒ}|j| j}|t j	j
ks J ‚|j ¡ }||= |j| ¡ d�}t|ƒ d¡}	|	 d¡}	| j ||	¡ dS )a3  Documents the signature of a custom method

    :param section: The section to write the documentation to.

    :param name: The name of the method

    :param method: The handle to the method being documented

    :type include: Dictionary where keys are parameter names and
        values are the shapes of the parameter names.
    :param include: The parameter shapes to include in the documentation.

    :type exclude: List of the names of the parameters to exclude.
    :param exclude: The names of the parameters to exclude from
        documentation.
    )Ú
parametersú(ú)N)r   Ú	signatureÚ
isinstanceÚtypesÚFunctionTypeÚnextÚiterr$   ÚkindÚ	ParameterÚPOSITIONAL_OR_KEYWORDÚcopyÚreplaceÚvaluesÚstrÚlstripÚrstripr   r   )
r   r   Úmethodr   r   r'   Ú
self_paramÚ	self_kindÚ
new_paramsr"   r   r   r   Údocument_custom_signatureV   s   


r:   c                 C   s\   | j  dd¡› |› �}t| ||ƒ |  d¡}| d¡ t |¡}|dur,|j |¡ dS dS )zÕDocuments a non-data driven method

    :param section: The section to write the documentation to.

    :param method_name: The name of the method

    :param method: The handle to the method being documented
    Ú	qualifierr   úmethod-introN)	ÚcontextÚgetr:   Úadd_new_sectionÚwritelnr   Úgetdocr   Úwrite_py_doc_string)r   Úmethod_namer6   Úfull_method_nameÚmethod_intro_sectionÚ
doc_stringr   r   r   Údocument_custom_methody   s   	


ÿrG   Tc                 C   sª  |rt | ||||d� |  d¡}| |¡ |jr'|j ¡  | d¡ |j ¡  |jj	 
d¡}|durT|j ¡  | d¡ t› d|› d|j› �}|jjd|d	� | d
¡ |  d¡}|j ¡  |j d¡ d| ¡ | ¡ | ¡ dœi}|jrŠt|jj|j||d�j||j|||d� n|j ¡  |j ¡  | |d ¡ |  d¡}|jr¶t|jj|j||d�j||j||d� |  d¡}|j ¡  |jdu�rN|
�rN| d¡ |j ¡  | d¡ |j ¡  |j ¡  | ¡ }|rü| d¡}|j ¡  | d¡ |j ¡  | d¡}|j ¡  |j d¡ |j ¡  t|jj|j||d�j||j||	d� | d¡}|j ¡  |j d¡ |j ¡  t|jj|j||d�j||j||	d� dS | d¡ dS )a.  Documents an individual method

    :param section: The section to write to

    :param method_name: The name of the method

    :param operation_model: The model of the operation

    :param event_emitter: The event emitter to use to emit events

    :param example_prefix: The prefix to use in the method example.

    :type include_input: Dictionary where keys are parameter names and
        values are the shapes of the parameter names.
    :param include_input: The parameter shapes to include in the
        input documentation.

    :type include_output: Dictionary where keys are parameter names and
        values are the shapes of the parameter names.
    :param include_input: The parameter shapes to include in the
        output documentation.

    :type exclude_input: List of the names of the parameters to exclude.
    :param exclude_input: The names of the parameters to exclude from
        input documentation.

    :type exclude_output: List of the names of the parameters to exclude.
    :param exclude_input: The names of the parameters to exclude from
        output documentation.

    :param document_output: A boolean flag to indicate whether to
        document the output.

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    )r   r   r<   zªThis operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.ÚuidNz
See also: ú/zAWS API Documentation)ÚtitleÚlinkr   zrequest-examplezRequest SyntaxÚspecial_shape_types)Ústreaming_input_shapeÚstreaming_output_shapeÚeventstream_output_shape)Úservice_nameÚoperation_nameÚevent_emitterr=   )Úprefixr   r   z()zrequest-paramsÚreturnz:rtype: dictz
:returns: zevent-streamzêThe response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.zresponse-examplezResponse SyntaxÚdescriptionzResponse Structurez:returns: None) r#   r?   Úinclude_doc_stringÚ
deprecatedr   Ústart_dangerr@   Ú
end_dangerÚservice_modelÚmetadatar>   Únew_paragraphÚwriteÚAWS_DOC_BASEr   Úexternal_linkÚboldÚget_streaming_inputÚget_streaming_outputÚget_event_stream_outputr   r   rP   Údocument_exampleÚstart_codeblockr   Údocument_paramsÚnew_lineÚoutput_shapeÚindentr   r   )r   rC   r   rR   Úmethod_descriptionÚexample_prefixÚinclude_inputÚinclude_outputÚexclude_inputÚexclude_outputÚdocument_outputÚinclude_signaturerE   Úservice_uidrK   Úexample_sectionr=   Úrequest_params_sectionÚreturn_sectionÚevent_stream_outputÚevent_sectionÚreturn_example_sectionÚreturn_description_sectionr   r   r   Údocument_model_driven_method‹   sì   3û
	

ÿ


ÿ


ýÿüö


ü÷








ÿ
ÿ

ü÷ÿ

ü
÷rz   )NN)NNNNNNTT)r   r)   Úbotocore.docs.exampler   r   Úbotocore.docs.paramsr   r   r^   r   r#   r:   rG   rz   r   r   r   r   Ú<module>   s(   
ÿ)
ÿ#ô