B 劇c@s\ddlZddlZddZddZddZdd Zd d Zd d ZdddZGdddZ dS)NcCs\g}xR|D]J}t|j}|j}x|dr8|dd}q"W|ddkr ||dq W|S)zHelper method to determine which parameters to ignore for actions :returns: A list of the parameter names that does not need to be included in a resource's method call for documentation purposes. childrenrtypefieldvalue)jmespathcompiletargetparsedappend)paramsZ ignore_paramsparamresultcurrentrk/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/boto3/docs/utils.pyget_resource_ignore_paramss    rcCs t|S)N)inspect isfunction)Z action_handlerrris_resource_action'srcCsTt|}i}x@|D]8\}}|ds|ds|dst|r|||<qW|S)N_rZ wait_until)r getmembers startswithisupperr)Zresource_classZresource_class_membersZresource_methodsnamememberrrrget_resource_public_actions+s     rcCsddd|DS)N,cSsg|]}d|dqS)'r).0 identifierrrr 8sz5get_identifier_values_for_example..)join)identifier_namesrrr!get_identifier_values_for_example7sr#cCs d|S)Nr)r!)r"rrr!get_identifier_args_for_signature;sr$cCsd|d|dS)NzThe z's z" identifier. This **must** be set.r) resource_nameZidentifier_namerrrget_identifier_description?sr&cCs|j|d|j|j|||j|j|||j|dk r|d|d|d|jdS)Nz.. rst-class:: admonition-titlezFor more information about z1 refer to the :ref:`Resources Introduction Guide`.)stylenew_linewritelower)sectionZ resource_type descriptionZ intro_linkrrradd_resource_type_overviewFs         r-c@s$eZdZddZddZddZdS)DocumentModifiedShapecCs||_||_||_||_dS)N) _shape_name _new_type_new_description_new_example_value)selfZ shape_namenew_typeZnew_descriptionZnew_example_valuerrr__init__[szDocumentModifiedShape.__init__cKsh|j|jdkr|||xD|jD]:}||}|j|jdkrT|||q&|||q&WdS)Nshape)r/contextget_replace_documentationavailable_sections get_section(replace_documentation_for_matching_shape)r3 event_namer+kwargs section_nameZ sub_sectionrrrr<cs   z>DocumentModifiedShape.replace_documentation_for_matching_shapecCs|ds|dr0||||j|dsD|drd}x |jD]}||krP||qPW|d}|||j|d}| dd r||d |j d |j n||j d |j d dS)Nzdocs.request-examplezdocs.response-examplezdocs.request-paramszdocs.response-params)z param-namezparam-documentationz end-structurez param-typez end-paramzparam-documentationz param-typezutf-8z:typez:type z: (z) -- )rZremove_all_sectionsZ clear_textr)r2r:Zdelete_sectionr;r1getvaluedecoderr0r'Zitalics)r3r=r+Zallowed_sectionsr?Zdescription_sectionZ type_sectionrrrr9qs,       z,DocumentModifiedShape._replace_documentationN)__name__ __module__ __qualname__r5r<r9rrrrr.Zsr.)N) rrrrrr#r$r&r-r.rrrr s