U n‰^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 śn/private/var/folders/sd/whlwsn6x1_qgglc0mjv25_695qk2gl/T/pip-install-4zq3fp6i/botocore/botocore/docs/params.pyŚdocument_paramssžz$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|ŽdSrr)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Śkeyrrrzend-map) rrr!rrŚ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|D]J} |r4| |kr4q"|| } |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_structureOs& ’ ž z2BaseParamsDocumenter.document_shape_type_structurecKsdSrr rr r rrasz.BaseParamsDocumenter._add_member_documentationcCs$|r | ”}|D]}|||j<q|Sr)Ś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Śwriter#Zitalics)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 ”dSr)r#r$Śnew_line©r rr r rrws z(BaseParamsDocumenter._start_nested_paramcCs|j ”|j ”dSr)r#Śdedentr2r3r r rr{s z&BaseParamsDocumenter._end_nested_param)NN)NN)NN)NN)NNN)Ś__name__Ś __module__Ś __qualname__rrrr r%r*rr'r1rrr 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)Nś param-nameś- ś%s ś param-typeśparam-documentation) rr.r#Śboldr1Ś documentationr$Śinclude_doc_stringŚ new_paragraph)r rrrrŚ name_sectionr/Śdocumentation_sectionr r rr…s       z2ResponseParamsDocumenter._add_member_documentationcKs|j|||f|ŽdSr)r*)r rrrrr r rŚ document_shape_type_event_stream“sz9ResponseParamsDocumenter.document_shape_type_event_stream)N)r5r6r7Ś__doc__Ś EVENT_NAMErrDr r r rr8€s r8c@s8eZdZdZdZd dd„Zddd„Zd d „Zd d „ZdS)ŚRequestParamsDocumenterz4Generates the description for the request parameterszrequest-paramsNc KsĘt|ƒdkr&|j||f|Ž|j ”| |j|”}t|ƒD]Z\}} |rR| |krRq<|| } |j| d| jid} | j  ”| |j k} |j | | || | dq<| d”}t|ƒdkrø|j  ”|j  ”dS)Nérr)rrrrŚ is_requiredr&) Ślenrr#r$r'r(Ś enumeraterrr2Zrequired_membersr r4) r rrrr r rr(Śir)rrrIr r rr*s2   ’  ž   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) Nr<z :type %s: %szend-param-typer9z :param %s: r:r;z is-requiredz [REQUIRED] r=z end-param)r,rr-rr.r#r2r>r1r$r?r@Ś _add_special_trait_documentationrA)r rrrZis_top_level_paramrIrr0r/Zend_type_sectionrBZis_required_sectionrCZend_param_sectionr r rr³s:             ’    z1RequestParamsDocumenter._add_member_documentationcCsd|jkr| |”dS)NZidempotencyToken)ŚmetadataŚ!_append_idempotency_documentation)r rrr r rrMÖs z8RequestParamsDocumenter._add_special_trait_documentationcCsd}| |”dS)Nz,This field is autopopulated if not provided.)r.)r rZ docstringr r rrOŚsz9RequestParamsDocumenter._append_idempotency_documentation)NN)NFF) r5r6r7rErFr*rrMrOr r r rrG˜s’ ’ #rGN)Zbotocore.docs.shaperZbotocore.docs.utilsrrr8rGr r r rŚ s  o