ó
    Û°›jò#  ã                   óF   • S SK r S SKrS SKJr  S SKJr   " S S5      rS rg)é    N)Úescape_controls)Úparse_timestampc                   óh   • \ rS rSrS rS rS rS r SS jrS r	S r
S	 rS
 rS rS rS rS rSrg)ÚSharedExampleDocumenteré   c                 ó  • UR                   R                  5         UR                  UR                  S5      5        UR                   R	                  5         U R                  X1X$R                  5        U R                  X1UR                  5        g)a  Documents a single shared example based on its definition.

:param example: The model of the example

:param prefix: The prefix to use in the method example.

:param section: The section to write to.

:param operation_model: The model of the operation used in the example
ÚdescriptionN)	ÚstyleÚnew_paragraphÚwriteÚgetÚnew_lineÚdocument_inputÚinput_shapeÚdocument_outputÚoutput_shape)ÚselfÚexampleÚprefixÚsectionÚoperation_models        ÚX/home/mande/repo/quber/.venv/lib/python3.13/site-packages/botocore/docs/sharedexample.pyÚdocument_shared_exampleÚ/SharedExampleDocumenter.document_shared_example   sj   € ð 	�‰×#Ñ#Ô%Ø�‰�g—k‘k -Ó0Ô1Ø�‰×ÑÔ Ø×ÑØ˜f×&AÑ&Aô	
ð 	×Ñ˜W¨×/KÑ/KÕLó    c                 ó"  • UR                  S5      nUR                  R                  5         Ub  UR                  U5        UR	                  S0 5      nUR	                  S5      nU(       a  UR	                  S5      nUR                  S5      nU R                  X†U/ U5        UR                  S5      n	U	R                  R                  5         U	R                  R                  5         U	R                  S5        U	R                  R                  5         g )NÚinputÚcommentsÚ
parameterszinput-closezprint(response))Úadd_new_sectionr
   Ústart_codeblockr   r   Ú_document_paramsr   Úend_codeblock)
r   r   r   r   ÚshapeÚinput_sectionÚparamsr   Úparam_sectionÚclosing_sections
             r   r   Ú&SharedExampleDocumenter.document_input*   sà   € Ø×/Ñ/°Ó8ˆØ×Ñ×+Ñ+Ô-ØÑØ×Ñ Ô'Ø—‘˜W bÓ)ˆØ—;‘;˜zÓ*ˆÞØ—|‘| GÓ,ˆHØ%×5Ñ5°lÓCˆØ×Ñ˜m°X¸rÀ5ÔIØ'×7Ñ7¸ÓFˆØ×Ñ×&Ñ&Ô(Ø×Ñ×&Ñ&Ô(Ø×ÑÐ/Ô0Ø×Ñ×+Ñ+Õ-r   c                 óè  • UR                  S5      nUR                  R                  5         UR                  S5        UR                  R                  5         UR                  R	                  5         UR                  S0 5      nSS0US'   UR                  S5      nU(       a  UR                  S5      nU R                  XEU/ US5        UR                  S5      nUR                  R                  5         g )NÚoutputzExpected Output:z...ÚResponseMetadatar   Tzoutput-close)r    r
   r   r   r!   r   Ú_document_dictr#   )r   r   r   r$   Úoutput_sectionr&   r   r(   s           r   r   Ú'SharedExampleDocumenter.document_output;   sÏ   € Ø ×0Ñ0°Ó:ˆØ×Ñ×%Ñ%Ô'Ø×ÑÐ/Ô0Ø×Ñ×%Ñ%Ô'Ø×Ñ×,Ñ,Ô.Ø—‘˜X rÓ*ˆð ',¨U ^ˆÐ!Ñ"Ø—;‘;˜zÓ*ˆÞØ—|‘| HÓ-ˆHØ×Ñ˜N°H¸bÀ%ÈÔNØ(×8Ñ8¸ÓHˆØ×Ñ×+Ñ+Õ-r   c                 ó„  • [        U[        5      (       a  U R                  XX4U5        g[        U[        5      (       a  U R	                  XX4U5        g[        U[
        R                  5      (       a  U R                  XU5        gU(       a#  UR                  S:X  a  U R                  XU5        gU R                  XU5        g)aË  
:param section: The section to add the docs to.

:param value: The input / output values representing the parameters that
              are included in the example.

:param comments: The dictionary containing all the comments to be
                 applied to the example.

:param path: A list describing where the documenter is in traversing the
             parameters. This is used to find the equivalent location
             in the comments dictionary.
Ú	timestampN)Ú
isinstanceÚdictr-   ÚlistÚ_document_listÚnumbersÚNumberÚ_document_numberÚ	type_nameÚ_document_datetimeÚ_document_str)r   r   Úvaluer   Úpathr$   s         r   Ú	_documentÚ!SharedExampleDocumenter._documentL   s‘   € ô �eœT×"Ñ"Ø×Ñ °ÀÕFÜ˜œt×$Ñ$Ø×Ñ °ÀÕFÜ˜œwŸ~™~×.Ñ.Ø×!Ñ! '°$Õ7Þ�u—‘¨+Ó5Ø×#Ñ# G°DÕ9à×Ñ˜w¨tÕ4r   c                 ó  • UR                  S5      nU R                  US5        UR                  5        GH  u  p‰UR                  SU 35        UR                  U5      n
U
R                  R                  5         U R                  XC5      nU(       a+  U
R                  U5        U
R                  R                  5         U
R                  SU S35        S nU(       aH  UR                  S:X  a  UR                  R                  U5      nOUR                  S:X  a  UR                  nU R                  X©X4U5        UR                  5         GM     UR                  S5      nU R                  US	5        U(       d  UR                  S
5        g g )Nz
dict-valueÚ{Ú.Ú'z': Ú	structureÚmapzending-braceÚ}Ú,)r    Ú_start_nested_valueÚitemsÚappendr
   r   Ú_get_commentr   r9   Úmembersr   r<   r>   ÚpopÚ_end_nested_value)r   r   r<   r   r=   r$   Ú	top_levelÚdict_sectionÚkeyÚvalÚitem_sectionÚitem_commentÚ
item_shapeÚdict_section_ends                 r   r-   Ú&SharedExampleDocumenter._document_dicte   sE  € ð ×.Ñ.¨|Ó<ˆØ× Ñ  ¨sÔ3ØŸ™Ÿ‰HˆCØ�K‰K˜!˜C˜5˜	Ô"Ø'×7Ñ7¸Ó<ˆLØ×Ñ×'Ñ'Ô)Ø×,Ñ,¨TÓ<ˆLÞØ×"Ñ" <Ô0Ø×"Ñ"×+Ñ+Ô-Ø×Ñ  3 % s˜|Ô,ð ˆJÞØ—?‘? kÓ1Ø!&§¡×!2Ñ!2°3Ó!7‘JØ—_‘_¨Ó-Ø!&§¡�JØ�N‰N˜<¨h¸jÔIØ�H‰H�Jñ% &ð& (×7Ñ7¸ÓGÐØ×ÑÐ/°Ô5ÞØ×"Ñ" 3Õ'ð r   c                 ó|  • UR                  S5      nU R                  US5        UR                  5        Hâ  u  pxUR                  SU 35        UR                  U5      n	U	R                  R                  5         U R                  XC5      n
U
(       a+  U	R                  U
5        U	R                  R                  5         U	R                  US-   5        S nU(       a  UR                  R                  U5      nU R                  X˜X4U5        UR                  5         Mä     UR                  S5      nU R                  US5        g )Nzparam-valuesÚ(rB   Ú=zending-parenthesisÚ))r    rH   rI   rJ   r
   r   rK   r   rL   r   r>   rM   rN   )r   r   r<   r   r=   r$   r'   rQ   rR   rS   rT   rU   Úparam_section_ends                r   r"   Ú(SharedExampleDocumenter._document_params‚   s	  € Ø×/Ñ/°Ó?ˆØ× Ñ  °Ô4ØŸ™ž‰HˆCØ�K‰K˜!˜C˜5˜	Ô"Ø(×8Ñ8¸Ó=ˆLØ×Ñ×'Ñ'Ô)Ø×,Ñ,¨TÓ<ˆLÞØ×"Ñ" <Ô0Ø×"Ñ"×+Ñ+Ô-Ø×Ñ˜s S™yÔ)ð ˆJÞØ"Ÿ]™]×.Ñ.¨sÓ3�
Ø�N‰N˜<¨h¸jÔIØ�H‰HŽJñ &ð  *×9Ñ9Ð:NÓOÐØ×ÑÐ0°#Õ6r   c                 ó  • UR                  S5      nU R                  US5        UR                  n[        U5       H«  u  p‰UR                  U5      n
U
R                  R                  5         UR                  SU S35        U R                  XC5      nU(       a+  U
R                  U5        U
R                  R                  5         U R                  X©X4U5        UR                  5         M­     UR                  S5      nU R                  US5        g )Nzlist-sectionÚ[Ú]zending-bracketz],)r    rH   ÚmemberÚ	enumerater
   r   rJ   rK   r   r>   rM   rN   )r   r   r<   r   r=   r$   Úlist_sectionrU   ÚindexrR   rS   rT   Úlist_section_ends                r   r5   Ú&SharedExampleDocumenter._document_list˜   sã   € Ø×.Ñ.¨~Ó>ˆØ× Ñ  ¨sÔ3Ø—\‘\ˆ
Ü# EÖ*‰JˆEØ'×7Ñ7¸Ó>ˆLØ×Ñ×'Ñ'Ô)Ø�K‰K˜!˜E˜7 !˜Ô%Ø×,Ñ,¨TÓ<ˆLÞØ×"Ñ" <Ô0Ø×"Ñ"×+Ñ+Ô-Ø�N‰N˜<¨h¸jÔIØ�H‰HŽJñ +ð (×7Ñ7Ð8HÓIÐØ×ÑÐ/°Õ6r   c                 óD   • [        U5      nUR                  SU S35        g )NrC   z',)r   r   )r   r   r<   r=   Ú
safe_values        r   r;   Ú%SharedExampleDocumenter._document_str©   s#   € ô % UÓ+ˆ
Ø�‰˜˜*˜ RÐ(Õ)r   c                 ó>   • UR                  [        U5       S35        g )NrG   )r   Ústr)r   r   r<   r=   s       r   r8   Ú(SharedExampleDocumenter._document_number¯   s   € Ø�‰œ˜U›˜ AÐ&Õ'r   c                 óÚ   • [        U5      R                  5       n[        US   5      n[        S[	        U5      5       H  nUS[        XF   5      -   -  nM     UR                  SU S35        g )Nr   é   z, z	datetime(z),)r   Ú	timetuplerk   ÚrangeÚlenr   )r   r   r<   r=   Údatetime_tupleÚdatetime_strÚis          r   r:   Ú*SharedExampleDocumenter._document_datetime²   sf   € Ü(¨Ó/×9Ñ9Ó;ˆÜ˜>¨!Ñ,Ó-ˆÜ�qœ#˜nÓ-Ö.ˆAØ˜D¤3 ~Ñ'8Ó#9Ñ9Ñ9ŠLñ /à�‰˜	 , ¨rÐ2Õ3r   c                 óx   • [         R                  " SSSR                  U5      5      nU(       a  X2;   a  SX#   -   $ g)Nz^\.Ú z# )ÚreÚsubÚjoin)r   r=   r   rQ   s       r   rK   Ú$SharedExampleDocumenter._get_comment¹   s3   € Ü�fŠf�V˜R §¡¨£Ó/ˆÞ˜›Ø˜(™-Ñ'Ð'àr   c                 óŽ   • UR                  U5        UR                  R                  5         UR                  R                  5         g ©N)r   r
   Úindent)r   r   Ústarts      r   rH   Ú+SharedExampleDocumenter._start_nested_valueÀ   s.   € Ø�‰�eÔØ�‰×ÑÔØ�‰×ÑÕr   c                 óÂ   • UR                   R                  5         UR                   R                  5         UR                   R                  5         UR                  U5        g r}   )r
   Údedentr   r   )r   r   Úends      r   rN   Ú)SharedExampleDocumenter._end_nested_valueÅ   s>   € Ø�‰×ÑÔØ�‰×ÑÔØ�‰×ÑÔ Ø�‰�cÕr   © N)F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r   r>   r-   r"   r5   r;   r8   r:   rK   rH   rN   Ú__static_attributes__r…   r   r   r   r      sK   † òMò*.ò".ò"5ð4 @Eô(ò:7ò,7ò"*ò(ò4òòõ
r   r   c                 óþ   • U R                  S5      nUR                  R                  5         UR                  R                  S5        [	        5       nU H'  nUR                  UUR                  US   5      UUS9  M)     g)a   Documents the shared examples

:param section: The section to write to.

:param operation_model: The model of the operation.

:param example_prefix: The prefix to use in the method example.

:param shared_examples: The shared JSON examples from the model.
zshared-examplesÚExamplesÚid)r   r   r   r   N)r    r
   r   Úboldr   r   )r   r   Úexample_prefixÚshared_examplesÚcontainer_sectionÚ
documenterr   s          r   Údocument_shared_examplesr“   Ì   s|   € ð  ×/Ñ/Ð0AÓBÐØ×Ñ×)Ñ)Ô+Ø×Ñ× Ñ  Ô,Ü(Ó*€JÛ"ˆØ×*Ñ*ØØ%×5Ñ5°g¸d±mÓDØ!Ø+ð	 	+ó 	
ò #r   )r6   rx   Úbotocore.docs.utilsr   Úbotocore.utilsr   r   r“   r…   r   r   Ú<module>r–      s%   ðó Û 	å /Ý *÷uñ uóp
r   