HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/botocore/docs/__pycache__/example.cpython-310.pyc
o

�h�"�@sLddlmZddlmZGdd�de�ZGdd�de�ZGdd�de�Zd	S)
�)�ShapeDocumenter)�
py_defaultc@s�eZdZ	ddd�Zdd�Z	ddd�Z	ddd	�Z	dd
d�Z	ddd
�Z	ddd�Z	dd�Z
ddd�Zddd�Zdd�Z
dS)�BaseExampleDocumenterNcCsVg}|j��|j��|dur|�|�|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_line�start_codeblock�write�traverse_and_document_shape�add_new_section)�selfrr�prefixrr	r�final_blank_line_section�r�H/usr/local/CyberCP/lib/python3.10/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>|�|�}|durt|j�}|j�d�|krd}|�|�dS)N�streaming_shapezStreamingBody())�_get_special_py_defaultr�	type_name�_context�getr
)rrrrrr	r�py_typerrr�document_shape_default7s

z,BaseExampleDocumenter.document_shape_defaultc	Ksjd|jvr,t|jd�D]\}}|�d|�d��|t|jd�dkr)|�d�qdS|�|||�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�namerr
�_end_nested_param)rrrrrr	r�param_shape�list_section�
param_section�ending_comma_section�ending_bracket_sectionrrr�document_shape_type_listMs

��


z.BaseExampleDocumenter.document_shape_type_listcKs�|js
|�d�dS|�d�}|�|d�|�|j|�}t|�D]G\}}	|r+|	|vr+q |�|	�}
|
�d|	�d��||	}|
jdd|jid�}|j||||	d	�|t|�d
krg|
�d�}
|
�d�|
j	�
�q |�|dd
�dS)Nz{}�structure-value�{r z': �member-valuerr*�rrrr2r!r-r.�})�membersr
rr1�_add_members_to_shaper$r2rr%r
r�_end_structure)rrrrrr	r�
input_membersr&�paramr6r4�param_value_sectionr7rrr�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-valuer;�keyrr*z
'string': �valuer,r/r>)rr1rGrFr2r
rr3)rrrrrr	r�map_section�value_shape�key_section�
value_section�end_bracket_sectionrrr�document_shape_type_map�s
�

��
z-BaseExampleDocumenter.document_shape_type_mapcCs$|r|��}|D]}|||j<q|S�N)�copyr2)rr?rrCrrrr@�s
z+BaseExampleDocumenter._add_members_to_shapecCs4|dur	|�|�|j��|j��|j��dSrN)r
r
�indentr)rr�startrrrr1�s



z)BaseExampleDocumenter._start_nested_paramcCs8|j��|j��|j��|dur|�|�dSdSrN)r
�dedentrr
)rr�endrrrr3�s


�z'BaseExampleDocumenter._end_nested_paramcCsD|js|��|�||�|�|�dS|�d�}|�||�dS)Nr/)�available_sections�
clear_textr
r3r)rrrQrSrLrrrrA�s
z$BaseExampleDocumenter._end_structure)NNN�NNrN)�__name__�
__module__�__qualname__rrrr'r9rErMr@r1r3rArrrrrs$
�"
�
�
�
�$
�

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

z:ResponseExampleDocumenter.document_shape_type_event_streamN)rWrXrY�
EVENT_NAMEr]rrrrrZ�srZc@seZdZdZ	ddd�ZdS)�RequestExampleDocumenterzrequest-exampleNcKsd}d}d}	d}
t|�dkrd}d}	d}
d	}|�d
�}|�||	�|�|j|�}t|�D]J\}}
|r7|
|vr7q,|�|
�}|�||
�|�|�||
}|jdd|jid
�}|j||||
d�|t|�dkrv|�d�}|�d�|j	�
�q,|�||	|
�dS)Nz'%s'z: r;r>r!�=�(r[z%sr:r<rr*r=r-r.)r%rr1r@r?r$r
r2rr
rrA)rrrrrr	r�param_format�operatorrQrSrBr&rCr6r4rDr7rrrrE�sH



���

�z6RequestExampleDocumenter.document_shape_type_structurerV)rWrXrYr^rErrrrr_�s�r_N)�botocore.docs.shaper�botocore.docs.utilsrrrZr_rrrr�<module>s&