o ‰ü?c]-ć@sLddlmZddlmZGdd„deƒZGdd„deƒZGdd„deƒZd S) é)ŚShapeDocumenter)Ś py_type_namec@szeZdZddd„Zdd„Z ddd„Z ddd „Z dd d „Z   dd d „Zdd„Z dd„Z dd„Z dd„Z dd„Z dS)ŚBaseParamsDocumenterNcCsg}|j|||d||ddS)a3Fills out the documentation for a section given a model shape. :param section: The section to write the documentation to. :param shape: The shape of the operation. :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ŚnameŚincludeŚexclude)Śtraverse_and_document_shape)Śselfrrr r r©r śo/private/var/folders/cw/wlscbxl13mj6wd668h7l9g9sllkg5j/T/pip-target-b31awkwq/lib/python/botocore/docs/params.pyŚdocument_paramss śz$BaseParamsDocumenter.document_paramscKs|j||fi|¤ŽdS©N©Ś_add_member_documentation©r rrŚkwargsr r rŚdocument_recursive_shape+sz-BaseParamsDocumenter.document_recursive_shapecKs|j||fi|¤ŽdSrr)r rrrr r rr r rŚdocument_shape_default.sz+BaseParamsDocumenter.document_shape_defaultc Ksf|j||fi|¤Ž|j}|j|jd|jjid}| |”|j|||dd| d”}| |”dS)Nr©Ścontext©rrrrzend-list)rŚmemberŚadd_new_sectionrŚ_start_nested_paramr Ś_end_nested_param) r rrrr r rŚ param_shapeŚ param_sectionr r rŚdocument_shape_type_list3s’ ü z-BaseParamsDocumenter.document_shape_type_listc Ks¦|j||fi|¤Ž|jdd|jjid}| |”| ||j”|j|jjd|jjid}|j ”| |”|j||j|dd| d”} |  | ”|  | ”dS)NŚkeyrrrzend-map) rrr!rrŚvalueŚstyleŚindentr r) r rrrr r rZ key_sectionrŚ end_sectionr r rŚdocument_shape_type_mapEs( ’ ’  ü  z,BaseParamsDocumenter.document_shape_type_mapc Ks†| |j|”}|j|||d|D]%} |r| |vrq|| } |j| d| jid} | | ”|j| | || dq| d”}| |”dS)N)rrrrś end-structure)Ś_add_members_to_shapeŚmembersrrrrr r) r rrrr r rrr)Śparamrrr r rŚdocument_shape_type_structure`s$   ’ ü z2BaseParamsDocumenter.document_shape_type_structurecKsdSrr rr r rr}sz.BaseParamsDocumenter._add_member_documentationcCs$|r| ”}|D]}|||j<q|Sr)Ścopyr)r r)r r*r r rr(€s  z*BaseParamsDocumenter._add_members_to_shapecCsF| |”}t|jƒ}d}|dur| ||”dS|j ||”dS)Nz(%s) -- )Ś_get_special_py_type_namerŚ type_nameŚwriter#Zitalics)r Ś type_sectionrZspecial_py_typeŚpy_typeZ type_formatr r rŚ"_document_non_top_level_param_type‡s  z7BaseParamsDocumenter._document_non_top_level_param_typecCó|j ”|j ”dSr)r#r$Śnew_line©r rr r rr“ó z(BaseParamsDocumenter._start_nested_paramcCr3r)r#Śdedentr4r5r r rr—r6z&BaseParamsDocumenter._end_nested_param©NN)NNN)Ś__name__Ś __module__Ś __qualname__rrrr r&r+rr(r2rrr r r rrs$  ’ ’ ’  ł rc@s&eZdZdZdZddd„Zdd„ZdS) ŚResponseParamsDocumenterz5Generates the description for the response parameterszresponse-paramsNc KsŅ| d”}| d”|dur|j d|”| d”}| ||”| d”}|jrb|j ”t|ddƒr\| d”}d } d  d d „|j   ”Dƒ”} d } | | | ”| d”} | j  | ”|  |j”|j  ”dS)Nś param-nameś- ś%s ś param-typeśparam-documentationŚis_tagged_unionFśparam-tagged-union-docsaK.. note:: This is a Tagged Union structure. Only one of the following top level keys will be set: %s. If a client receives an unknown member it will set ``SDK_UNKNOWN_MEMBER`` as the top level key, which maps to the name or tag of the unknown member. The structure of ``SDK_UNKNOWN_MEMBER`` is as followsś, cSóg|]}d|‘qS©z``%s``r ©Ś.0r!r r rŚ »ózFResponseParamsDocumenter._add_member_documentation..z3'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}zparam-unknown-example)rr/r#Śboldr2Ś documentationr$ŚgetattrŚjoinr)ŚkeysZ codeblockŚinclude_doc_stringŚ new_paragraph) r rrrrŚ name_sectionr0Śdocumentation_sectionŚtagged_union_docsŚnoteŚtagged_union_members_strZunknown_code_exampleZexampler r rr”s2       ’’ ’’   z2ResponseParamsDocumenter._add_member_documentationcKs|j|||fi|¤ŽdSr)r+)r rrrrr r rŚ document_shape_type_event_streamĒsz9ResponseParamsDocumenter.document_shape_type_event_streamr)r9r:r;Ś__doc__Ś EVENT_NAMErrWr r r rr<œs   &r<c@s@eZdZdZdZ d dd„Z   ddd„Zd d „Zd d „ZdS)ŚRequestParamsDocumenterz4Generates the description for the request parameterszrequest-paramsNc KsŹt|ƒdkr|j||fi|¤Ž|j ”| |j|”}t|ƒD]-\}} |r+| |vr+q || } |j| d| jid} | j  ”| |j v} |j | | || | dq | d”}t|ƒdkr^|j  ”|j  ”dS)Nérr)rrrrŚ is_requiredr') Ślenrr#r$r(r)Ś enumeraterrr4Zrequired_membersr r7) r rrrr r rr)Śir*rrr\r r rr+Ņs0    ’  ū   z5RequestParamsDocumenter.document_shape_type_structureFcKs`| |”}|durt|jƒ}|r7| d”}| d|›d|›”| d”} | j ”| d”} |  d|”n!| d”} |  d”|durM| j d|”| d”}| ||”|rj| d ”} | j  ”| j d ”|j r¤| d ”} | j  ”t |d d ƒr˜| d”} d}d  dd„|j  ”Dƒ”}|  ||”|  |j ”| | |”| d”}|j ”dS)Nr@z:type z: zend-param-typer=z :param %s: r>r?z is-requiredz [REQUIRED] rArBFrCzl.. note:: This is a Tagged Union structure. Only one of the following top level keys can be set: %s. rDcSrErFr rGr r rrIrJzERequestParamsDocumenter._add_member_documentation..z end-param)r-rr.rr/r#r4rKr2r$rLrMrNr)rOrPŚ _add_special_trait_documentationrQ)r rrrZis_top_level_paramr\rr1r0Zend_type_sectionrRZis_required_sectionrSrTrUrVZend_param_sectionr r rrīsN             ’  ’’’   z1RequestParamsDocumenter._add_member_documentationcCsd|jvr | |”dSdS)NZidempotencyToken)ŚmetadataŚ!_append_idempotency_documentation)r rrr r rr`%s ’z8RequestParamsDocumenter._add_special_trait_documentationcCsd}| |”dS)Nz,This field is autopopulated if not provided.)r/)r rŚ docstringr r rrb)sz9RequestParamsDocumenter._append_idempotency_documentationr8)NFF) r9r:r;rXrYr+rr`rbr r r rrZĶs ’  ś7 rZN)Zbotocore.docs.shaperZbotocore.docs.utilsrrr<rZr r r rŚs  1