HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/self/root/lib/python3.6/site-packages/botocore/docs/__pycache__/shape.cpython-36.pyc
3

�T_��@s ddlmZGdd�de�ZdS)�)�is_json_value_headerc@s<eZdZdZddd�Zddd�Zdd	�Zd
d�Zdd
�ZdS)�ShapeDocumenter�NcCs.||_||_||_||_|dkr*dii|_dS)N�special_shape_types)�
_service_name�_operation_name�_event_emitter�_context)�selfZservice_nameZoperation_nameZ
event_emitter�context�r�/usr/lib/python3.6/shape.py�__init__szShapeDocumenter.__init__Fc
Cs�|j}t|di�jd�rd}|j|kr8|j|||d�n�|j|j�t|�dk}	t|d||j�|||||||	|d�|	r�|jj	d|j
|j|j|f|d	�t|�d
k}
|
r�|jj	d|j
|j|jf|d	�|j
�dS)
a�Traverses and documents a shape

        Will take a self class and call its appropriate methods as a shape
        is traversed.

        :param section: The section to document.

        :param history: A list of the names of the shapes that have been
            traversed.

        :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.

        :param name: The name of the shape.

        :param is_required: If the shape is a required member.
        Z
serializationZeventstreamZevent_stream)�name�zdocument_shape_type_%s)�historyr�include�exclude�is_top_level_param�is_requiredzdocs.%s.%s.%s.%s)�section�zdocs.%s.%s.%s.complete-sectionN)Z	type_name�getattr�getrZdocument_recursive_shape�append�lenZdocument_shape_defaultr�emit�
EVENT_NAMErr�pop)r
r�shaperrrrrZ
param_typerZat_overlying_method_sectionrrr
�traverse_and_document_shape$s8

z+ShapeDocumenter.traverse_and_document_shapecCsddddd�}|j||�S)Nz({...}|[...]|123|123.4|'string'|True|Nonez
b'bytes'|filezStreamingBody()z
EventStream())�jsonvalue_header�streaming_input_shape�streaming_output_shape�eventstream_output_shape)�_get_value_for_special_type)r
rZspecial_defaultsrrr
�_get_special_py_default[s
z'ShapeDocumenter._get_special_py_defaultcCsddddd�}|j||�S)NzJSON serializablez"bytes or seekable file-like objectz:class:`.StreamingBody`z:class:`.EventStream`)r!r"r#r$)r%)r
rZspecial_type_namesrrr
�_get_special_py_type_nameds
z)ShapeDocumenter._get_special_py_type_namecCsHt|�r|dSx2|jdj�D] \}}||kr ||kr ||Sq WdS)Nr!r)rr	�items)r
rZspecial_type_mapZspecial_typeZmarked_shaperrr
r%msz+ShapeDocumenter._get_value_for_special_type)N)NNNF)	�__name__�
__module__�__qualname__rrr r&r'r%rrrr
rs

5		rN)Zbotocore.utilsr�objectrrrrr
�<module>s