
    N                     d    d dl Z d dlZd dlmZ d Zd Zd Zd Zd Zd Z		 dd	Z
 G d
 de      Zy)    N)sixc                     g }| D ]]  }t        j                  |j                        }|j                  }|d   r|d   d   }|d   r|d   dk(  sJ|j	                  |d          _ |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.
    childrenr   typefieldvalue)jmespathcompiletargetparsedappend)paramsignore_paramsparamresultcurrents        #lib/third_party/boto3/docs/utils.pyget_resource_ignore_paramsr      s|     M!!%,,/-- j!j)!,G j! 6?g%  !12      c                 v    t         j                  rt        j                  |       S t        j                  |       S N)r   PY3inspect
isfunctionismethod)action_handles    r   is_resource_actionr   )   s+    
ww!!-00..r   c                     t        j                  |       }i }|D ]N  \  }}|j                  d      r|d   j                         r,|j                  d      r>t	        |      sJ|||<   P |S )N_r   
wait_until)r   
getmembers
startswithisupperr   )resource_classresource_class_membersresource_methodsnamemembers        r   get_resource_public_actionsr)   0   sh    $//?.fs#7??$|4)&117(. / r   c                 R    | D cg c]  }d|z  	 }}dj                  |      S c c}w )Nz'%s',join)identifier_names
identifierexample_valuess      r   !get_identifier_values_for_exampler1   <   s2    >NO>N
h+>NNO88N## Ps   $c                 $    dj                  |       S )Nr+   r,   )r.   s    r   !get_identifier_args_for_signaturer3   A   s    88$%%r   c                     d| d|dS )NzThe z's z" identifier. This **must** be set. )resource_nameidentifier_names     r   get_identifier_descriptionr8   E   s    ( (r   c                 (   | j                   j                          | j                  d       | j                   j                          | j                   j                          | j                  |       | j                   j                          | j                   j                          | j                  |       | j                   j                          |A| j                  d|j                         d|d       | j                   j                          y y )Nz.. rst-class:: admonition-titlezFor more information about z1 refer to the :ref:`Resources Introduction Guide<z>`.)stylenew_linewritelower)sectionresource_typedescription
intro_links       r   add_resource_type_overviewrB   J   s    MMMM34MMMMMM- MMMMMM+MM'--/= 	> 	 	 r   c                       e Zd Zd Zd Zd Zy)DocumentModifiedShapec                 <    || _         || _        || _        || _        y r   )_shape_name	_new_type_new_description_new_example_value)self
shape_namenew_typenew_descriptionnew_example_values        r   __init__zDocumentModifiedShape.__init__]   s!    %! /"3r   c                 V   | j                   |j                  j                  d      k(  r| j                  ||       |j                  D ]`  }|j                  |      }| j                   |j                  j                  d      k(  r| j                  ||       O| j                  ||       b y )Nshape)rF   contextget_replace_documentationavailable_sectionsget_section(replace_documentation_for_matching_shape)rJ   
event_namer>   kwargssection_namesub_sections         r   rW   z>DocumentModifiedShape.replace_documentation_for_matching_shaped   s    w227;;''
G<#66L!--l;K;#6#6#:#:7#CC++JD==- 7r   c                 2   |j                  d      s|j                  d      r;|j                          |j                          |j                  | j                         |j                  d      s|j                  d      r|j
                  D ]  }|dvs|j                  |        |j                  d      }|j                          |j                  | j                         |j                  d      }|j                         j                  d      j                  d	      r<|j                          |j                  d
|j                  d| j                         y |j                          |j                  j                  d| j                  z         y y )Nzdocs.request-examplezdocs.response-examplezdocs.request-paramszdocs.response-params)z
param-nameparam-documentationzend-structure
param-typez	end-paramr]   r^   zutf-8z:typez:type z: z(%s) -- )r"   remove_all_sections
clear_textr<   rI   rU   delete_sectionrV   rH   getvaluedecoder'   rG   r:   italics)rJ   rX   r>   rZ   description_sectiontype_sections         r   rT   z,DocumentModifiedShape._replace_documentationp   s[     !78%%&=>'') MM$112  !67%%&<= ' : :   (5 5 **<8 !; #*"5"56K"L**,%%d&;&;< #..|<L$$&--g6AA'J'')""LL$..$2 3 '')""**:+FG- >r   N)__name__
__module____qualname__rO   rW   rT   r5   r   r   rD   rD   \   s    4
-Hr   rD   r   )r   r	   botocore.compatr   r   r   r)   r1   r3   r8   rB   objectrD   r5   r   r   <module>rl      sF      */	$
&( +/!$2HF 2Hr   