o
    Vf/                     @   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   U/home/ubuntu/oakencloud.com/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 )zDocuments 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rt|jj|j||dj||j|||d n|j  |j  ||d  | d}|jrt|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<   zThis 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-streamzThe 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(   
)
#