o .&a@-@s|ddlZddlmZddlmZddlmZddlmZdZddZ dd d Z dd d Z d dZ     dddZ dS)N)RequestParamsDocumenter)ResponseParamsDocumenter)ResponseExampleDocumenter)RequestExampleDocumenterz'https://docs.aws.amazon.com/goto/WebAPIcCs<t|}i}|D]\}}|dst|r|||<q |S)aRetrieves 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 startswithismethod)instanceinstance_membersinstance_methodsnamememberr6/usr/lib/python3/dist-packages/botocore/docs/method.pyget_instance_public_methodss    rc Cs~i}|jr |jj}t|}|dur|D]}||jq|dur0|D] }||vr/||q$d}|r6d}|j||dS)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. Nz**kwargs) input_shapememberslistkeysappendrremovestylestart_sphinx_py_method) sectionroperation_modelincludeexcludeparamsparameter_namesrsignature_paramsrrrdocument_model_driven_signature*s   r#cCsRt|}tj|jdd|j|j|jd}|d}|d}|j ||dS)a3Documents 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. N)argsvarargsvarkwdefaults()) rgetfullargspec formatargspecr%r&r'r(lstriprstriprr)rrmethodrrargspecr"rrrdocument_custom_signatureQs    r1cCsFt||||d}|dt|}|dur!|j|dSdS)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 method-introrN)r1add_new_sectionwritelnrgetdocrwrite_py_doc_string)r method_namer/method_intro_section doc_stringrrrdocument_custom_methodos    r:Tc Cs| r t|||||d|d} | ||jr'| j| d| j|jj d} | durQ| j | ddt | |jf}| jjd|d | d |d }|j |jd d |||di}|jrt|jj|j||dj||j|||dn|j |j| |d|d}|jrt|jj|j||dj||j||d|d}|j|jdurK| rK| d|j| d|j|j|}|r|d}|j | d|j|d }|j|jd|j t|jj|j||dj||j|| d|d}|j|jd|j t|jj|j||dj||j|| ddS| ddS)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. )rrr2zThis 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%s/%s/%szAWS API Documentation)titlelinkrexamplezRequest Syntaxspecial_shape_types)streaming_input_shapestreaming_output_shapeeventstream_output_shape) service_nameoperation_name event_emittercontext)prefixrrz()zrequest-paramsreturnz :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.zResponse Syntax descriptionzResponse Structurez:returns: None) r#r3include_doc_string deprecatedr start_dangerr4 end_danger service_modelmetadataget new_paragraphwrite AWS_DOC_BASEr external_linkboldget_streaming_inputget_streaming_outputget_event_stream_outputrrrCdocument_examplestart_codeblockrdocument_paramsnew_line output_shapeindentrr)rr7rrEmethod_descriptionexample_prefix include_inputinclude_output exclude_inputexclude_outputdocument_outputinclude_signaturer8 service_uidr=example_sectionrFrequest_params_sectionreturn_sectionevent_stream_output event_sectionreturn_example_sectionreturn_description_sectionrrrdocument_model_driven_methods+                                ro)NN)NNNNNNTT) rbotocore.docs.paramsrrbotocore.docs.examplerrrSrr#r1r:rorrrrs$     (