HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/botocore/docs/__pycache__/example.cpython-38.pyc
U

KD�g�"�@sLddlmZddlmZGdd�de�ZGdd�de�ZGdd�de�Zd	S)
�)�ShapeDocumenter)�
py_defaultc@steZdZddd�Zdd�Zddd�Zddd	�Zdd
d�Zddd
�Zddd�Z	dd�Z
ddd�Zddd�Zdd�Z
dS) �BaseExampleDocumenterNcCsVg}|j��|j��|dk	r*|�|�|j|||||d�|�d�}|j��dS)a]Generates an example based on a shape

        :param section: The section to write the documentation to.

        :param shape: The shape of the operation.

        :param prefix: Anything to be included before the example

        :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)�section�shape�history�include�excludezfinal-blank-line)�style�new_lineZstart_codeblock�write�traverse_and_document_shape�add_new_section)�selfrr�prefixrr	rZfinal_blank_line_section�r�B/opt/cppython/lib/python3.8/site-packages/botocore/docs/example.py�document_examples


�
z&BaseExampleDocumenter.document_examplecKs|�d�dS)Nz{'... recursive ...'})r)rrr�kwargsrrr�document_recursive_shape4sz.BaseExampleDocumenter.document_recursive_shapecKs>|�|�}|dkrt|j�}|j�d�|kr0d}|�|�dS)NZstreaming_shapezStreamingBody())Z_get_special_py_defaultr�	type_name�_context�getr)rrrrrr	rZpy_typerrr�document_shape_default7s

z,BaseExampleDocumenter.document_shape_defaultc	Kshd|jkrVt|jd�D]:\}}|�d|�d��|t|jd�dkr|�d�qn|�|||�dS)N�enum�'��|)�metadata�	enumerater�lenr)	rrrrrr	r�irrrr�document_shape_type_stringBs
z0BaseExampleDocumenter.document_shape_type_stringcKsn|j}|�d�}|�|d�|jdd|jid�}	|j|	||d�|�d�}
|
�d�|�d	�}|�|d
�dS)Nz
list-value�[�memberr��context�rrr�ending-comma�,�ending-bracket�])r$r�_start_nested_param�namer
r�_end_nested_param)rrrrrr	r�param_shapeZlist_section�
param_section�ending_comma_sectionZending_bracket_sectionrrr�document_shape_type_listMs 
��


z.BaseExampleDocumenter.document_shape_type_listcKs�|js|�d�dS|�d�}|�|d�|�|j|�}t|�D]�\}}	|rV|	|krVq@|�|	�}
|
�d|	�d��||	}|
jdd|jid�}|j||||	d	�|t|�d
kr@|
�d�}
|
�d�|
j	�
�q@|�|dd
�dS)Nz{}�structure-value�{rz': �member-valuerr%�rrrr-rr(r)�})�membersrrr,�_add_members_to_shaperr-r
r r
r�_end_structure)rrrrrr	r�
input_membersr!�paramr0r/�param_value_sectionr1rrr�document_shape_type_structure^s:


���
z3BaseExampleDocumenter.document_shape_type_structurecKsz|�d�}|�|d�|j}|jdd|jjid�}	|	�d�|jdd|jid�}
|j|
||d�|�d	�}|�|d
�dS)Nz	map-valuer4�keyrr%z
'string': �valuer'r*r7)rr,r@r?r-rr
r.)rrrrrr	rZmap_sectionZvalue_shapeZkey_sectionZ
value_section�end_bracket_sectionrrr�document_shape_type_map�s&

�
��
z-BaseExampleDocumenter.document_shape_type_mapcCs$|r |��}|D]}|||j<q|S�N)�copyr-)rr8rr<rrrr9�s
z+BaseExampleDocumenter._add_members_to_shapecCs4|dk	r|�|�|j��|j��|j��dSrC)rr
�indentr)rr�startrrrr,�s



z)BaseExampleDocumenter._start_nested_paramcCs4|j��|j��|j��|dk	r0|�|�dSrC)r
�dedentrr)rr�endrrrr.�s



z'BaseExampleDocumenter._end_nested_paramcCsB|js(|��|�||�|�|�n|�d�}|�||�dS)Nr*)Zavailable_sectionsZ
clear_textrr.r)rrrFrHrArrrr:�s
z$BaseExampleDocumenter._end_structure)NNN)NN)NN)NN)NN)NN)N)N)�__name__�
__module__�__qualname__rrrr"r2r>rBr9r,r.r:rrrrrs0�
"�
�
�
�
$�


rc@seZdZdZdd�ZdS)�ResponseExampleDocumenterzresponse-examplecKs4|�d�|j|||f|�|�d�}|�d�dS)NzEventStream(zevent-stream-end�))rr>r)rrrrr�end_sectionrrr� document_shape_type_event_stream�s

z:ResponseExampleDocumenter.document_shape_type_event_streamN)rIrJrK�
EVENT_NAMErOrrrrrL�srLc@seZdZdZddd�ZdS)�RequestExampleDocumenterzrequest-exampleNcKsd}d}d}	d}
t|�dkr,d}d}	d}
d	}|�d
�}|�||	�|�|j|�}t|�D]�\}}
|rn|
|krnqX|�|
�}|�||
�|�|�||
}|jdd|jid
�}|j||||
d�|t|�dkrX|�d�}|�d�|j	�
�qX|�||	|
�dS)Nz'%s'z: r4r7r�=�(rMz%sr3r5rr%r6r(r))r rr,r9r8rrr-r
r
rr:)rrrrrr	rZparam_format�operatorrFrHr;r!r<r0r/r=r1rrrr>�sH


���
z6RequestExampleDocumenter.document_shape_type_structure)NN)rIrJrKrPr>rrrrrQ�s�rQN)Zbotocore.docs.shaperZbotocore.docs.utilsrrrLrQrrrr�<module>
s
&