ó U!¶\c@sddlZddlmZd„Zd„Zd„Zedddd d d d gƒZdefd „ƒYZdefd„ƒYZ defd„ƒYZ defd„ƒYZ idd6dd6dd6dd6dd6Z ej djeeje ƒƒƒZd„Zd „ZdS(!iÿÿÿÿN(t namedtuplecCsAidd6dd6dd6dd6d d 6d d 6d d 6j||ƒS(s¯Get the Python type name for a given model type. >>> py_type_name('list') 'list' >>> py_type_name('structure') 'dict' :rtype: string tbytestblobtstringt charactertfloattdoubletintegertlongtdicttmapt structuretdatetimet timestamp(tget(t type_name((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyt py_type_names  cCsVi dd6dd6dd6dd6dd 6d d 6d d 6dd6dd6dd6j|dƒS(sáGet the Python default value for a given model type. >>> py_default('string') ''string'' >>> py_default('list') '[...]' >>> py_default('unknown') '...' :rtype: string s123.0Rt123RRs'string'Rsb'bytes'Rs True|Falsetbooleans[...]tlists{...}R R sdatetime(2015, 1, 1)R s...(R(R((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyt py_default&s  cCs—|jjdƒ}|jjddƒ}|jdƒrC|d}n|jdƒr_|d}n|r“|jƒ|jƒkr“|dj|ƒ7}n|S( swGenerate the official name of an AWS Service :param service_model: The service model representing the service tserviceFullNametserviceAbbreviationttAmazonitAWSis ({0})(tmetadataRt startswithtlowertformat(t service_modelt official_namet short_name((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pytget_official_service_name@s  tDocumentedShapetnameRt documentationRtmemberstrequired_memberscBs eZdZdddd„ZRS(sBUse this class to inject new shapes into a model for documentationcCsg|dkrg}n|dkr*g}n|dkr?g}ntt|ƒj|||||||ƒS(N(tNonetsuperR"t__new__(tclsR#RR$RR%R&((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR)Ws      N(t__name__t __module__t__doc__R'R)(((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR"UstAutoPopulatedParamcBseZdd„Zd„ZRS(cCs.||_||_|dkr*d|_ndS(Ns{Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required (R#tparam_descriptionR'(tselfR#R/((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyt__init__es   cKsÁ|jdƒrw|j|jkr½|j|jƒ}d|jkrR|jdƒn|jdƒ}|j|jƒq½nF|jdƒr½|jdƒ}|j|jkr½|j|jƒq½ndS(sïDocuments auto populated parameters It will remove any required marks for the parameter, remove the parameter from the example, and add a snippet about the parameter being autopopulated in the description. sdocs.request-paramss is-requiredsparam-documentationsdocs.request-examplesstructure-valueN(RR#tavailable_sectionst get_sectiontdelete_sectiontwritelnR/(R0t event_nametsectiontkwargstdescription_section((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pytdocument_auto_populated_paramns N(R+R,R'R1R:(((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR.ds tHideParamFromOperationscBs eZdZd„Zd„ZRS(s>Hides a single parameter from multiple operations. This method will remove a parameter from documentation and from examples. This method is typically used for things that are automatically populated because a user would be unable to provide a value (e.g., a checksum of a serialized XML request body).cCsv||_tƒ|_tƒ|_d}d}xB|D]:}|jj|||fƒ|jj|||fƒq4WdS(s( :type service_name: str :param service_name: Name of the service to modify. :type parameter_name: str :param parameter_name: Name of the parameter to modify. :type operation_names: list :param operation_names: Operation names to modify. s*docs.request-params.%s.%s.complete-sections+docs.request-example.%s.%s.complete-sectionN(t_parameter_nametsett_params_eventst_example_eventstadd(R0t service_nametparameter_nametoperation_namestparam_templatetexample_templateR#((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR1Šs    cKs]||jkr!|jdƒ}n||jkr4dS|j|jkrY|j|jƒndS(Nsstructure-value(R?R3R>R<R2R4(R0R6R7R8((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyt hide_paramŸs (R+R,R-R1RF(((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR;ƒs tAppendParamDocumentationcBs eZdZd„Zd„ZRS(s-Appends documentation to a specific parametercCs||_||_dS(N(R<t _doc_string(R0RBt doc_string((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyR1«s cKsJ|j|jkrF|j|jƒ}|jdƒ}|j|jƒndS(Nsparam-documentation(R<R2R3R5RH(R0R6R7R8R9((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pytappend_documentation¯s  (R+R,R-R1RJ(((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyRG©s s\ns s\rs s\ts s\bss\fs t|cCst|jdƒS(Ni(t _CONTROLStgroup(tmatch((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pytÁscCstjt|ƒS(N(t_ESCAPE_CONTROLS_REtsubt_CONTROLS_MATCH_HANDLER(tvalue((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pytescape_controlsÄs(tret collectionsRRRR!t_DocumentedShapeR"tobjectR.R;RGRLtcompiletjoinR tescapeRPRRRT(((s7/tmp/pip-install-usGedi/botocore/botocore/docs/utils.pyt s(    & $