B Ýç[-ã@snddlZddlmZddlmZddlmZddlmZdZdd„Zdd d „Z dd d „Z d d„Z ddd„Z dS)éN)ÚRequestParamsDocumenter)ÚResponseParamsDocumenter)ÚResponseExampleDocumenter)ÚRequestExampleDocumenterz'https://docs.aws.amazon.com/goto/WebAPIcCs@t |¡}i}x,|D]$\}}| d¡st |¡r|||<qW|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Ú startswithÚismethod)ÚinstanceZinstance_membersZinstance_methodsÚnameÚmember©rúU/Users/kashii/Desktop/Projects/Workshops/worker-safety/lambda/botocore/docs/method.pyÚget_instance_public_methodss    rc Cs†i}|jr|jj}t| ¡ƒ}|dk r@x|D]}| |j¡q,W|dk rhx|D]}||krN| |¡qNWd}|rtd}|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. NÚz**kwargs) Ú input_shapeÚmembersÚlistÚkeysÚappendr ÚremoveÚstyleÚstart_sphinx_py_method) Úsectionr Úoperation_modelÚincludeÚexcludeÚparamsZparameter_namesr Úsignature_paramsrrrÚdocument_model_driven_signature*s   r c CsTt |¡\}}}}|dd…}t ||||¡} |  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ú(ú))rÚ getargspecÚ formatargspecÚlstripÚrstriprr) rr ÚmethodrrÚargsÚvarargsÚkeywordsÚdefaultsrrrrÚdocument_custom_signatureQs    r-cCsBt|||ƒ| d¡}| d¡t |¡}|dk r>|j |¡dS)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 z method-introrN)r-Úadd_new_sectionÚwritelnrÚgetdocrZwrite_py_doc_string)rÚ method_namer(Úmethod_intro_sectionÚ doc_stringrrrÚdocument_custom_methodls     r4Tc Cs¨| rt|||||d| d¡} |  |¡|jrN| j ¡|  d¡| j ¡|jj   d¡} | dk r¢| j  ¡|   d¡dt | |jf}| jjd|d |  d ¡| d ¡}|j  ¡|j d ¡d | ¡| ¡| ¡dœi}|jrt|jj|j||dj||j|||dn"|j  ¡|j ¡|  |d¡| d¡}|jrjt|jj|j||dj||j||d| d¡}|j ¡|jdk rš| rš|  d¡|j ¡|  d¡|j ¡|j ¡| ¡}|rø| d¡}|j  ¡|  d¡|j ¡| d ¡}|j ¡|j d¡|j  ¡t|jj|j||dj||j|| d| d¡}|j ¡|j d¡|j  ¡t|jj|j||dj||j|| dn |  d¡dS)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. )rrz method-introzª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%s/%s/%szAWS API Documentation)ÚtitleÚlinkrZexamplezRequest SyntaxZspecial_shape_types)Zstreaming_input_shapeZstreaming_output_shapeZeventstream_output_shape)Ú service_nameÚoperation_nameÚ event_emitterÚcontext)Úprefixrrz()zrequest-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.zResponse SyntaxÚ descriptionzResponse Structurez:returns: None) r r.Zinclude_doc_stringÚ deprecatedrZ start_dangerr/Z end_dangerÚ service_modelÚmetadataÚgetZ new_paragraphÚwriteÚ AWS_DOC_BASEr Z external_linkZboldZget_streaming_inputZget_streaming_outputZget_event_stream_outputrrr8Zdocument_exampleÚstart_codeblockrZdocument_paramsÚnew_lineZ output_shapeÚindentrr)rr1rr:Úmethod_descriptionÚexample_prefixZ include_inputZinclude_outputZ exclude_inputZexclude_outputZdocument_outputÚinclude_signaturer2Z service_uidr7Zexample_sectionr;Zrequest_params_sectionZreturn_sectionZevent_stream_outputZ event_sectionZreturn_example_sectionZreturn_description_sectionrrrÚdocument_model_driven_method~sª+                                     rK)NN)NN)NNNNNNTT) rZbotocore.docs.paramsrrZbotocore.docs.examplerrrDrr r-r4rKrrrrÚ s     '