B “äī\Y%ć@sLddlmZddlmZGdd„deƒZGdd„deƒZGdd„deƒZd S) é)ŚShapeDocumenter)Ś py_type_namec@sneZdZddd„Zdd„Zddd„Zddd „Zdd d „Zdd 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 ś8/tmp/pip-build-uw_ogi45/botocore/botocore/docs/params.pyŚdocument_paramssz$BaseParamsDocumenter.document_paramscKs|j||f|ŽdS)N)Ś_add_member_documentation)r rrŚkwargsr r rŚdocument_recursive_shape&sz-BaseParamsDocumenter.document_recursive_shapecKs|j||f|ŽdS)N)r)r rrrr r rr r rŚdocument_shape_default)sz+BaseParamsDocumenter.document_shape_defaultc Ksb|j||f|Ž|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_list-s   z-BaseParamsDocumenter.document_shape_type_listc Ks¢|j||f|Ž|jdd|jjid}| |”| ||j”|j|jjd|jjid}|j ”| |”|j||j|dd| d”} |  | ”|  | ”dS)NŚkeyr)r)rrrrzend-map) rrrrrŚvalueŚstyleŚindentr r) r rrrr r rZ key_sectionrZ end_sectionr r rŚdocument_shape_type_map:s      z,BaseParamsDocumenter.document_shape_type_mapc KsŠ| |j|”}|j|||dxR|D]J} |r6| |kr6q$|| } |j| d| jid} | | ”|j| | || dq$W| d”}| |”dS)N)rr)r)rrrrz end-structure)Ś_add_members_to_shapeŚmembersrrrrr r) r rrrr r rrr"Śparamrrr r rŚdocument_shape_type_structureOs    z2BaseParamsDocumenter.document_shape_type_structurecKsdS)Nr )r rrrr r rrasz.BaseParamsDocumenter._add_member_documentationcCs(|r$| ”}x|D]}|||j<qW|S)N)Ścopyr)r r"r r#r r rr!ds  z*BaseParamsDocumenter._add_members_to_shapecCsD| |”}t|jƒ}d}|dk r0| ||”n|j ||”dS)Nz(%s) -- )Ś_get_special_py_type_namerŚ type_nameŚwriterZitalics)r Ś type_sectionrZspecial_py_typeŚpy_typeZ type_formatr r rŚ"_document_non_top_level_param_typeks   z7BaseParamsDocumenter._document_non_top_level_param_typecCs|j ”|j ”dS)N)rrŚnew_line)r rr r rrws z(BaseParamsDocumenter._start_nested_paramcCs|j ”|j ”dS)N)rŚdedentr,)r rr r rr{s z&BaseParamsDocumenter._end_nested_param)NN)NN)NN)NN)NNN)Ś__name__Ś __module__Ś __qualname__rrrrr r$rr!r+rrr r r rrs      rc@s&eZdZdZdZddd„Zdd„ZdS) ŚResponseParamsDocumenterz5Generates the description for the response parameterszresponse-paramsNcKsv| d”}| d”|dk r,|j d|”| d”}| ||”| d”}|jrh|j ”| |j”|j ”dS)Nz param-namez- z%s z param-typezparam-documentation) rr(rŚboldr+Ś documentationrŚinclude_doc_stringŚ new_paragraph)r rrrrŚ name_sectionr)Śdocumentation_sectionr r rr…s       z2ResponseParamsDocumenter._add_member_documentationcKs|j|||f|ŽdS)N)r$)r rrrrr r rŚ document_shape_type_event_stream“sz9ResponseParamsDocumenter.document_shape_type_event_stream)N)r.r/r0Ś__doc__Ś EVENT_NAMErr8r r r rr1€s r1c@s8eZdZdZdZd dd„Zddd„Zd d „Zd d „ZdS)ŚRequestParamsDocumenterz4Generates the description for the request parameterszrequest-paramsNc KsŹt|ƒdkr&|j||f|Ž|j ”| |j|”}xft|ƒD]Z\}} |rT| |krTq>|| } |j| d| jid} | j  ”| |j k} |j | | || | dq>W| d”}t|ƒdkr¼|j  ”|j  ”dS)Nér)r)rrrrŚ is_requiredz end-structure) Ślenrrrr!r"Ś enumeraterrr,Zrequired_membersr r-) r rrrr r rr"Śir#rrr=r r rr$s&        z5RequestParamsDocumenter.document_shape_type_structureFcKs| |”}|dkrt|jƒ}|rj| d”}| d||f”| d”} | j ”| d”} |  d|”nB| d”} |  d”|dk r–| j d|”| d”}| ||”|rŠ| d”} | j  ”| j d ”|j r| d ”} | j  ”|   |j ”|  | |”| d ”} | j  ”dS) Nz param-typez :type %s: %szend-param-typez param-namez :param %s: z- z%s z is-requiredz [REQUIRED] zparam-documentationz end-param)r&rr'rr(rr,r2r+rr3r4Ś _add_special_trait_documentationr5)r rrrZis_top_level_paramr=rr*r)Zend_type_sectionr6Zis_required_sectionr7Zend_param_sectionr r rr³s8                 z1RequestParamsDocumenter._add_member_documentationcCsd|jkr| |”dS)NZidempotencyToken)ŚmetadataŚ!_append_idempotency_documentation)r rrr r rrAÖs z8RequestParamsDocumenter._add_special_trait_documentationcCsd}| |”dS)Nz,This field is autopopulated if not provided.)r()r rZ docstringr r rrCŚsz9RequestParamsDocumenter._append_idempotency_documentation)NN)NFF) r.r/r0r9r:r$rrArCr r r rr;˜s  "r;N)Zbotocore.docs.shaperZbotocore.docs.utilsrrr1r;r r r rŚ s  o