
    /JfN                     ,    d dl mZ  G d d          ZdS )    )is_json_value_headerc                   >    e Zd ZdZ	 d	dZ	 	 	 	 d
dZd Zd Zd ZdS )ShapeDocumenter Nc                 X    || _         || _        || _        || _        |di i| _        d S d S )Nspecial_shape_types)_service_name_operation_name_event_emitter_context)selfservice_nameoperation_nameevent_emittercontexts        V/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/botocore/docs/shape.py__init__zShapeDocumenter.__init__   s?     *-+?2B7DMMM ?    Fc           
         |j         }t          |di                               d          rd}|j        |v r|                     |||           dS |                    |j                   t          |          dk    }	t          |d          r	|j        rd} t          | d| | j	                  |||||||	|	           |	r7| j
                            d
| j         d| j         d| j         d| |           t          |          dk    }
|
r5| j
                            d
| j         d| j         d| j         d|           |                                 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.
        serializationeventstreamevent_stream)name   is_document_typedocumentdocument_shape_type_)historyr   includeexcludeis_top_level_paramis_requiredzdocs..)section   z.complete-sectionN)	type_namegetattrgetr   document_recursive_shapeappendlenhasattrr   document_shape_defaultr   emit
EVENT_NAMEr	   r
   pop)r   r$   shaper   r   r    r   r"   
param_typer!   at_overlying_method_sections              r   traverse_and_document_shapez+ShapeDocumenter.traverse_and_document_shape#   s   @ _
5/2..22=AA 	('J:  ))'5t)DDDDDNN5:&&&!$W!2u011 (e6L ('
G3z33+ 
 #5'    " #((`DO``d.@``4CW``Z^``# )    +.g,,!*;'* #((jDOjjd.@jj4CWjjj# )    KKMMMMMr   c                 >    dddddd}|                      ||          S )Nz({...}|[...]|123|123.4|'string'|True|Nonezb'bytes'|filezStreamingBody()zEventStream()document_typejsonvalue_headerstreaming_input_shapestreaming_output_shapeeventstream_output_shape_get_value_for_special_type)r   r1   special_defaultss      r   _get_special_py_defaultz'ShapeDocumenter._get_special_py_defaulth   s7    I L%6&7(7
 
 //7GHHHr   c                 >    dddddd}|                      ||          S )Nz:ref:`document<document>`zJSON serializablez"bytes or seekable file-like objectz:class:`.StreamingBody`z:class:`.EventStream`r6   r<   )r   r1   special_type_namess      r   _get_special_py_type_namez)ShapeDocumenter._get_special_py_type_namer   s7    8 3%I&?(?
 
 //7IJJJr   c                     t          |          r|d         S t          |d          r|j        r|d         S | j        d                                         D ]\  }}||v r||k    r
||         c S d S )Nr8   r   r7   r   )r   r,   r   r   items)r   r1   special_type_mapspecial_typemarked_shapes        r   r=   z+ShapeDocumenter._get_value_for_special_type|   s    && 	8#$6775,-- 	5%2H 	5#O44*.-!+

%''	: 	:&L, ///L((+L9999tr   )N)NNNF)	__name__
__module____qualname__r/   r   r4   r?   rB   r=    r   r   r   r      s        J DH8 8 8 8 C C C CJI I IK K K    r   r   N)botocore.utilsr   r   rK   r   r   <module>rM      sU   & 0 / / / / /q q q q q q q q q qr   