
    /Jf|                     2   d dl Z d dlmZ d Zd Zd Z edg d          Z G d de          Z G d	 d
          Z G d d          Z	 G d d          Z
ddddddZ e j        d                     ee j        e                              Zd Zd ZdS )    N)
namedtuplec                 >    dddddddd                     | |           S )zGet the Python type name for a given model type.

        >>> py_type_name('list')
        'list'
        >>> py_type_name('structure')
        'dict'

    :rtype: string
    bytesstringfloatintegerdictdatetime)blob	characterdoublelongmap	structure	timestampget	type_names    V/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/botocore/docs/utils.pypy_type_namer      s9       
c)Y     c                 D    ddddddddddd	
                     | d
          S )zGet the Python default value for a given model type.

        >>> py_default('string')
        ''string''
        >>> py_default('list')
        '[...]'
        >>> py_default('unknown')
        '...'

    :rtype: string
    z123.0123z'string'zb'bytes'z
True|Falsez[...]z{...}zdatetime(2015, 1, 1))
r   r   r   r   r   booleanlistr   r   r   z...r   r   s    r   
py_defaultr   &   sB     +  
c)Ur   c                 R   | j                             d          }| j                             dd          }|                    d          r
|dd         }|                    d          r
|dd         }|r1|                                |                                vr	|d	| d
z  }|S )zwGenerate the official name of an AWS Service

    :param service_model: The service model representing the service
    serviceFullNameserviceAbbreviation Amazon   NAWS   z ())metadatar   
startswithlower)service_modelofficial_name
short_names      r   get_official_service_namer-   @   s    
 "*../@AAM'++,A2FFJX&& $^
U## $^
 ,j&&((0C0C0E0EEE+j++++r   DocumentedShape)namer   documentationr'   membersrequired_membersc                   *     e Zd ZdZ	 	 	 d fd	Z xZS )r.   zBUse this class to inject new shapes into a model for documentationNc           	      j    |g }|g }|g }t                                          | ||||||          S N)super__new__)clsr/   r   r0   r'   r1   r2   	__class__s          r   r7   zDocumentedShape.__new__`   sU     H?G#!ww
 
 	
r   )NNN)__name__
__module____qualname____doc__r7   __classcell__)r9   s   @r   r.   r.   ]   sN        LL 
 
 
 
 
 
 
 
 
 
r   c                       e Zd ZddZd ZdS )AutoPopulatedParamNc                 8    || _         || _        |	d| _        d S d S )Nz{Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
)r/   param_description)selfr/   rB   s      r   __init__zAutoPopulatedParam.__init__{   s2    	!2$ """ %$r   c                    |                     d          ry| j        |j        v ri|                    | j                  }d|j        v r|                    d           |                    d          }|                    | j                   dS dS |                     d          r?|                    d          }| j        |j        v r|                    | j                   dS dS dS )zDocuments auto populated parameters

        It will remove any required marks for the parameter, remove the
        parameter from the example, and add a snippet about the parameter
        being autopopulated in the description.
        zdocs.request-paramszis-requiredparam-documentationzdocs.request-examplestructure-valueN)r(   r/   available_sectionsget_sectiondelete_sectionwritelnrB   rC   
event_namesectionkwargsdescription_sections        r   document_auto_populated_paramz0AutoPopulatedParam.document_auto_populated_param   s      !677 	2yG666!--di88 G$>>>**=999&-&9&9)' '# $++D,BCCCCC 76 ""#9:: 	2))*;<<GyG666&&ty11111	2 	266r   r5   )r:   r;   r<   rD   rQ    r   r   r@   r@   z   s7           2 2 2 2 2r   r@   c                       e Zd ZdZd Zd ZdS )HideParamFromOperationsa>  Hides a single parameter from multiple operations.

    This method will remove a parameter from documentation and from
    examples. This method is typically used for things that are
    automatically populated because a user would be unable to provide
    a value (e.g., a checksum of a serialized XML request body).c                     || _         t                      | _        t                      | _        d}d}|D ]@}| j                            |||fz             | j                            |||fz             AdS )a(  
        :type service_name: str
        :param service_name: Name of the service to modify.

        :type parameter_name: str
        :param parameter_name: Name of the parameter to modify.

        :type operation_names: list
        :param operation_names: Operation names to modify.
        z*docs.request-params.%s.%s.complete-sectionz+docs.request-example.%s.%s.complete-sectionN)_parameter_nameset_params_events_example_eventsadd)rC   service_nameparameter_nameoperation_namesparam_templateexample_templater/   s          r   rD   z HideParamFromOperations.__init__   s      .!ee"uuEH# 	N 	ND##NlD5I$IJJJ $$%5t8L%LMMMM	N 	Nr   c                     || j         v r|                    d          }n|| j        vrd S | j        |j        v r|                    | j                   d S d S )NrG   )rY   rI   rX   rV   rH   rJ   )rC   rM   rN   rO   s       r   
hide_paramz"HideParamFromOperations.hide_param   so    ---))*;<<GGt222F7#===""4#788888 >=r   N)r:   r;   r<   r=   rD   ra   rR   r   r   rT   rT      sA        D DN N N*9 9 9 9 9r   rT   c                       e Zd ZdZd Zd ZdS )AppendParamDocumentationz-Appends documentation to a specific parameterc                 "    || _         || _        d S r5   )rV   _doc_string)rC   r\   
doc_strings      r   rD   z!AppendParamDocumentation.__init__   s    -%r   c                     | j         |j        v rK|                    | j                   }|                    d          }|                    | j                   d S d S )NrF   )rV   rH   rI   rK   re   rL   s        r   append_documentationz-AppendParamDocumentation.append_documentation   sc    7#===))$*>??G")"5"56K"L"L''(899999 >=r   N)r:   r;   r<   r=   rD   rh   rR   r   r   rc   rc      s8        77& & &: : : : :r   rc   z\nz\rz\tz\bz\f)
	|c                 B    t           |                     d                   S )Nr   )	_CONTROLSgroup)matchs    r   <lambda>rs      s    	%++a..(A r   c                 B    t                               t          |           S r5   )_ESCAPE_CONTROLS_REsub_CONTROLS_MATCH_HANDLER)values    r   escape_controlsry      s    ""#:EBBBr   )recollectionsr   r   r   r-   _DocumentedShaper.   r@   rT   rc   rp   compilejoinr   escaperu   rw   ry   rR   r   r   <module>r      s   
			 " " " " " "     *  4    :  
 
 
 
 
 
 
& 
 
 
:2 2 2 2 2 2 2 2B$9 $9 $9 $9 $9 $9 $9 $9N: : : : : : : : 



 	 !bj##bi*C*C!D!DEE AA C C C C Cr   