HEX
Server: nginx/1.24.0
System: Linux webserver 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: wpuser (1002)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/botocore/docs/__pycache__/example.cpython-312.pyc
�

P��e�"��^�ddlmZddlmZGd�de�ZGd�de�ZGd�de�Zy	)
�)�ShapeDocumenter)�
py_defaultc�j�eZdZ	d
d�Zd�Z	dd�Z	dd�Z	dd�Z	dd�Z	dd�Z	d	�Z
dd
�Zdd�Zd�Z
y)�BaseExampleDocumenterNc��g}|jj�|jj�|�|j|�|j	|||||��|jd�}|jj�y)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_sections        �7/usr/lib/python3/dist-packages/botocore/docs/example.py�document_examplez&BaseExampleDocumenter.document_examples���&���
�
��� ��
�
�%�%�'����M�M�&�!��(�(������	)�	
�$+�#:�#:�;M�#N� � �&�&�/�/�1�c�&�|jd�y)Nz{'... recursive ...'})r)rrr	�kwargss    r�document_recursive_shapez.BaseExampleDocumenter.document_recursive_shape4s���
�
�/�0rc��|j|�}|�t|j�}|jj	d�|k(rd}|j|�y)N�streaming_shapezStreamingBody())�_get_special_py_defaultr�	type_name�_context�getr)rrr	r
rrr�py_types        r�document_shape_defaultz,BaseExampleDocumenter.document_shape_default7sP���.�.�u�5���?� ����1�G��=�=���.�/�5�8�'�G��
�
�g�rc��d|jvret|jd�D]I\}}|jd|z�|t|jd�dz
ks�9|jd��Ky|j	|||�y)N�enum�'%s'��|)�metadata�	enumerater�lenr#)	rrr	r
rrr�ir%s	         r�document_shape_type_stringz0BaseExampleDocumenter.document_shape_type_stringBs|���U�^�^�#�$�U�^�^�F�%;�<�
'���4��
�
�h��o�.��s�5�>�>�&�1�2�Q�6�6��M�M�#�&�
'�

�'�'����@rc�R�|j}|jd�}|j|d�|jdd|ji��}	|j	|	||��|jd�}
|
jd�|jd	�}|j
|d
�y)Nz
list-value�[�memberr	��context�rr	r
�ending-comma�,�ending-bracket�])r0r�_start_nested_param�namerr�_end_nested_param)rrr	r
rrr�param_shape�list_section�
param_section�ending_comma_section�ending_bracket_sections            r�document_shape_type_listz.BaseExampleDocumenter.document_shape_type_listMs����l�l���.�.�|�<��� � ��s�3�$�4�4��w��(8�(8�9�5�
�
�	
�(�(�!��g�	)�	
� ,�;�;�N�K���"�"�3�'�!-�!=�!=�>N�!O�����5�s�;rc�p�|js|jd�y|jd�}|j|d�|j	|j|�}t|�D]�\}}	|r|	|vr�
|j|	�}
|
jd|	z�||	}|
jdd|ji��}|j||||	��|t|�d	z
ks�}|
jd
�}
|
jd�|
jj���|j|dd�y)
Nz{}�structure-value�{z'%s': �member-valuer	r1�rr	r
r9r'r4r5�})�membersrrr8�_add_members_to_shaper*r9rr+r
r�_end_structure)rrr	r
rrr�
input_membersr,�paramr=r;�param_value_sectionr>s              r�document_shape_type_structurez3BaseExampleDocumenter.document_shape_type_structure^sI���}�}��M�M�$����)�)�*;�<��� � ��#�.��2�2�5�=�=�'�J�
�!�-�0�	6�H�A�u��5�G�+��#�3�3�E�:�M����
�U� 2�3�'��.�K�"/�"?�"?���+�2B�2B�(C�#@�#��
�,�,�+�!���	
-�
��3�}�%��)�)�'4�'D�'D�"�(�$�%�*�*�3�/�$�*�*�3�3�5�)	6�*	
���G�S�#�.rc��|jd�}|j|d�|j}|jdd|jji��}	|	jd�|jdd|ji��}
|j
|
||��|jd	�}|j|d
�y)Nz	map-valuerC�keyr	r1z
'string': �valuer3r6rF)rr8rPrOr9rrr:)rrr	r
rrr�map_section�value_shape�key_section�
value_section�end_bracket_sections            r�document_shape_type_mapz-BaseExampleDocumenter.document_shape_type_map�s����-�-�k�:��� � ��c�2��k�k��!�1�1��G�U�Y�Y�^�^�4�2�
��	���.�)�#�3�3��g�{�'7�'7�8�4�
�
�	
�(�(�!��g�	)�	
�*�9�9�:J�K�����2�C�8rc�V�|r&|j�}|D]}|||j<�|S�N)�copyr9)rrGrrKs    rrHz+BaseExampleDocumenter._add_members_to_shape�s2����l�l�n�G� �
,��&+���
�
�#�
,��rc���|�|j|�|jj�|jj�|jj�yrX)rr
�indentr)rr�starts   rr8z)BaseExampleDocumenter._start_nested_param�sD�����M�M�%� ��
�
�����
�
�����
�
��� rc���|jj�|jj�|jj�|�|j|�yyrX)r
�dedentrr)rr�ends   rr:z'BaseExampleDocumenter._end_nested_param�sH���
�
�����
�
�����
�
��� ��?��M�M�#��rc���|js6|j�|j||z�|j|�y|j	d�}|j||�y)Nr6)�available_sections�
clear_textrr:r)rrr\r_rUs     rrIz$BaseExampleDocumenter._end_structure�sZ���)�)���� ��M�M�%�#�+�&��"�"�7�+�")�"9�"9�:J�"K���"�"�#6��<r)NNN�NNrX)�__name__�
__module__�__qualname__rrr#r-r@rMrVrHr8r:rI�rrrrs]��AE� 2�D1�>B�	�>B�	A�>B�<�$>B�!/�H>B�9�&�!��
=rrc��eZdZdZd�Zy)�ResponseExampleDocumenterzresponse-examplec��|jd�|j|||fi|��|jd�}|jd�y)NzEventStream(zevent-stream-end�))rrMr)rrr	r
r�end_sections      r� document_shape_type_event_streamz:ResponseExampleDocumenter.document_shape_type_event_stream�sH��	�
�
�n�%�*��*�*�7�E�7�M�f�M��-�-�.@�A�����#�rN)rdrerf�
EVENT_NAMErmrgrrriri�s��#�J�rric��eZdZdZ	dd�Zy)�RequestExampleDocumenterzrequest-exampleNc��d}d}d}	d}
t|�dkrd}d}	d}
d	}|jd
�}|j||	�|j|j|�}t|�D]�\}}
|r|
|vr�
|j|
�}|j
||
z�|j
|�||
}|jdd|ji�
�}|j||||
��|t|�dz
ks��|jd�}|j
d�|jj���|j||	|
�y)Nr&z: rCrFr'�=�(rkz%srBrDr	r1rEr4r5)r+rr8rHrGr*rr9rr
rrI)rrr	r
rrr�param_format�operatorr\r_rJr,rKr=r;rLr>s                  rrMz6RequestExampleDocumenter.document_shape_type_structure�su�� ���������w�<�1���H��E��C��L��)�)�*;�<��� � ��%�0��2�2�5�=�=�'�J�
�!�-�0�	6�H�A�u��5�G�+��#�3�3�E�:�M�����u� 4�5�����)�'��.�K�"/�"?�"?���+�2B�2B�(C�#@�#��
�,�,�+�!���	
-�
��3�}�%��)�)�'4�'D�'D�"�(�$�%�*�*�3�/�$�*�*�3�3�5�+	6�,	
���G�U�C�0rrc)rdrerfrnrMrgrrrprp�s��"�J�>B�'1rrpN)�botocore.docs.shaper�botocore.docs.utilsrrrirprgrr�<module>rxs6��0�*�b=�O�b=�J	� 5�	�*1�4�*1r