HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/botocore/docs/__pycache__/example.cpython-37.pyc
B

�P�e�"�@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�F/opt/alt/python37/lib/python3.7/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|jkrVxXt|jd�D]6\}}|�d|�|t|jd�dkr|�d�qWn|�|||�dS)N�enumz'%s'��|)�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)rrrzending-comma�,zending-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|�}x�t|�D]�\}}	|rX|	|krXqB|�|	�}
|
�d|	�||	}|
jdd|jid�}|j||||	d�|t|�d	krB|
�d
�}
|
�d�|
j	�
�qBW|�|dd�dS)
Nz{}zstructure-value�{z'%s': zmember-valuer)r$)rrrr(rzending-commar%�})�membersrrr'�_add_members_to_shaperr(r
rr
r�_end_structure)rrrrrr	r�
input_membersr �paramr+r*�param_value_sectionr,rrr�document_shape_type_structure^s2



z3BaseExampleDocumenter.document_shape_type_structurecKsz|�d�}|�|d�|j}|jdd|jjid�}	|	�d�|jdd|jid�}
|j|
||d�|�d	�}|�|d
�dS)Nz	map-valuer.�keyr)r$z
'string': �value)rrrzending-bracketr/)rr'r8r7r(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$|��}x|D]}|||j<qW|S)N)�copyr()rr0rr4rrrr1�s

z+BaseExampleDocumenter._add_members_to_shapecCs4|dk	r|�|�|j��|j��|j��dS)N)rr
�indentr)rr�startrrrr'�s



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



z'BaseExampleDocumenter._end_nested_paramcCsB|js(|��|�||�|�|�n|�d�}|�||�dS)Nzending-bracket)Zavailable_sectionsZ
clear_textrr)r)rrr=r?r9rrrr2�s
z$BaseExampleDocumenter._end_structure)NNN)NN)NN)NN)NN)NN)N)N)�__name__�
__module__�__qualname__rrrr!r-r6r:r1r'r)r2rrrrrs
!



#


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

z:ResponseExampleDocumenter.document_shape_type_event_streamN)r@rArB�
EVENT_NAMErFrrrrrC�srCc@seZdZdZddd�ZdS)�RequestExampleDocumenterzrequest-exampleNcKsd}d}d}	d}
t|�dkr,d}d}	d}
d	}|�d
�}|�||	�|�|j|�}x�t|�D]�\}}
|rp|
|krpqZ|�|
�}|�||
�|�|�||
}|jdd|jid
�}|j||||
d�|t|�dkrZ|�d�}|�d�|j	�
�qZW|�||	|
�dS)Nz'%s'z: r.r/r�=�(rDz%szstructure-valuezmember-valuer)r$)rrrr(zending-commar%)rrr'r1r0rrr(r
r
rr2)rrrrrr	rZparam_format�operatorr=r?r3r r4r+r*r5r,rrrr6�s@



z6RequestExampleDocumenter.document_shape_type_structure)NN)r@rArBrGr6rrrrrH�srHN)Zbotocore.docs.shaperZbotocore.docs.utilsrrrCrHrrrr�<module>
s
&