ó U!¶\c@sfddlmZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd S( iÿÿÿÿ(tShapeDocumenter(t py_defaulttBaseExampleDocumentercBs˜eZd d d d„Zd„Zd d d„Zd d d„Zd d d„Zd d d„Zd d d„Z d„Z d d„Z d d „Z d „Z RS( c Cshg}|jjƒ|jjƒ|dk r<|j|ƒn|jd|d|d|d|d|ƒdS(s]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. tsectiontshapethistorytincludetexcludeN(tstyletnew_linetstart_codeblocktNonetwritettraverse_and_document_shape(tselfRRtprefixRRR((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_examples    cKs|jdƒdS(Ns{'... recursive ...'}(R (RRRtkwargs((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_recursive_shape-scKs_|j|ƒ}|dkr-t|jƒ}n|jjdƒ|krNd}n|j|ƒdS(Ntstreaming_shapesStreamingBody()(t_get_special_py_defaultR Rt type_namet_contexttgetR (RRRRRRRtpy_type((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_shape_default0s   c Ks‹d|jkrtxut|jdƒD]J\}}|jd|ƒ|t|jdƒdkr#|jdƒq#q#Wn|j|||ƒdS(Ntenums'%s'it|(tmetadatat enumerateR tlenR( RRRRRRRtiR((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_shape_type_string:s  c Ks¢|j}|jdƒ}|j|dƒ|jddi|jd6ƒ} |jd| d|d|ƒ|jdƒ} | jd ƒ|jd ƒ} |j| d ƒdS( Ns list-valuet[tmembertcontextRRRs ending-commat,sending-brackett](R"tadd_new_sectiont_start_nested_paramtnameR R t_end_nested_param( RRRRRRRt param_shapet list_sectiont param_sectiontending_comma_sectiontending_bracket_section((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_shape_type_listDs    c KsG|js|jdƒdS|jdƒ}|j|dƒ|j|j|ƒ}xßt|ƒD]Ñ\}} |r| |krq[n|j| ƒ} | jd| ƒ|| } | jddi| jd6ƒ} |jd| d| d |d | ƒ|t|ƒd kr[| jd ƒ} | jd ƒ| j j ƒq[q[W|j |ddƒdS(Ns{}sstructure-valuet{s'%s': s member-valueR#RRRR(is ending-commaR$t}( tmembersR R&R't_add_members_to_shapeRR(R RRR t_end_structure(RRRRRRRt input_membersRtparamR,R*tparam_value_sectionR-((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_shape_type_structureSs.        c Ksµ|jdƒ}|j|dƒ|j}|jddi|jjd6ƒ} | jdƒ|jddi|jd6ƒ} |jd| d|d |ƒ|jd ƒ} |j| d ƒdS( Ns map-valueR0tkeyR#Rs 'string': tvalueRRsending-bracketR1(R&R'R:R9R(R R R)( RRRRRRRt map_sectiont value_shapet key_sectiont value_sectiontend_bracket_section((s9/tmp/pip-install-usGedi/botocore/botocore/docs/example.pytdocument_shape_type_mapps   cCs7|r3|jƒ}x|D]}|||j s