B 䊇cN@sddlmZGdddZdS))is_json_value_headerc@s<eZdZdZdddZdddZdd Zd d Zd d ZdS)ShapeDocumenterNcCs.||_||_||_||_|dkr*dii|_dS)Nspecial_shape_types) _service_name_operation_name_event_emitter_context)self service_nameZoperation_nameZ event_emittercontextr n/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/botocore/docs/shape.py__init__s zShapeDocumenter.__init__Fc Cs|j}t|didrd}|j|kr8|j|||dn||jt|dk} t|drd|jrdd}t|d||j ||||||| |d | r|j j d |j d |j d |jd ||d t|d k} | r|j j d |j d |j d |jd|d |dS)aTraverses 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 serializationZ eventstreamZ event_stream)nameis_document_typeZdocumentZdocument_shape_type_)historyrincludeexcludeis_top_level_param is_requiredzdocs..)sectionz.complete-sectionN)Z type_namegetattrgetrZdocument_recursive_shapeappendlenhasattrrZdocument_shape_defaultremit EVENT_NAMErrpop) r rshaperrrrrZ param_typerZat_overlying_method_sectionr r rtraverse_and_document_shape#s>      z+ShapeDocumenter.traverse_and_document_shapecCsdddddd}|||S)Nz({...}|[...]|123|123.4|'string'|True|Nonez b'bytes'|filezStreamingBody()z EventStream()) document_typejsonvalue_headerstreaming_input_shapestreaming_output_shapeeventstream_output_shape)_get_value_for_special_type)r r#Zspecial_defaultsr r r_get_special_py_defaulths z'ShapeDocumenter._get_special_py_defaultcCsdddddd}|||S)Nz:ref:`document`zJSON serializablez"bytes or seekable file-like objectz:class:`.StreamingBody`z:class:`.EventStream`)r%r&r'r(r))r*)r r#Zspecial_type_namesr r r_get_special_py_type_namers z)ShapeDocumenter._get_special_py_type_namecCs`t|r|dSt|dr(|jr(|dSx2|jdD] \}}||kr8||kr8||Sq8WdS)Nr&rr%r)rrrr items)r r#Zspecial_type_mapZ special_typeZ marked_shaper r rr*|s z+ShapeDocumenter._get_value_for_special_type)N)NNNF) __name__ __module__ __qualname__r!rr$r+r,r*r r r rrs  =  rN)Zbotocore.utilsrrr r r rs