+
     Ii+&  c                   s    ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt Rt	]P                  ! R4      tRt] P                  ! R4      tR	R
RRR/RR
RRR/RR
RRR/RR
RRR//tR^R^R^/t ! R R4      t ! R R]4      tR# )i    N)OrderedDict)DocStringParser)	ReSTStylez&https://docs.aws.amazon.com/index.htmlzX`AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/[a-z0-9-.]*/[a-zA-Z]*>`_z

    **{}**
    ::

        # This section is too large to render.
        # Please see the AWS API Documentation linked below.

    {}
    Zbcdocszresponse-examplenamezResponse Syntax
line_limiti  ZdescriptionzResponse Structurei  zrequest-examplezRequest Syntaxzrequest-paramsZ
Parametersz
client-apizpaginator-apiz
waiter-apic                   sl   a  ] tR t^2t o RR ltR tR tR tR tR t	R t
R tR	 tR
 tR tR tRtV tR# )ReSTDocumentc                s    \        V 4      V n        Wn        \        V 4      V n        R V n        RV n        / V n        / V n        . V n	        RV n
        R# )TFN)r   styletargetr   parser	keep_datado_translationtranslation_maphrefs_writes_last_doc_string)selfr      &&@/usr/lib/python3.14/site-packages/botocore/docs/bcdoc/restdoc.py__init__ZReSTDocument.__init__3   sK    t_
%d+#!
 $    c                sp    V P                   '       d$   Ve   V P                  P                  V4       R # R # R # N)r	   r   appendr   Zsr   r   _writeZReSTDocument._write>   s(    >>>amLL" ,>r   c                s(    V P                  V4       R# )z"
Write content into the document.
N)r   r   Zcontentr   r   writeZReSTDocument.writeB   s     	Gr   c                sb    V P                  V P                  P                  4        V R24       R# )z
Write content on a newline.
Z
N)r   r   Zspacesr   r   r   writelnZReSTDocument.writelnH   s)     	tzz((*+G9B78r   c                s(    V P                   R,          # )zV
Returns the last content written to the document without
removing it from the stack.
ir   r      &r   
peek_writeZReSTDocument.peek_writeN   s    
 ||Br   c                sn    \        V P                  4      ^ 8  d   V P                  P                  4       # R# )z<
Removes and returns the last content written to the stack.
N)lenr   Zpopr   r   r   	pop_writeZReSTDocument.pop_writeU   s,     &)%6%:t||!DDr   c                s<    V P                   P                  V4       R# )z"
Places new content on the stack.
N)r   r   r   r   r   
push_writeZReSTDocument.push_write[   s     	Ar   c                s*   V P                   '       dY   V P                  P                  4        V P                   P                  4        F   w  rV P                  P	                  W4       K"  	  RP                  V P                  4      P                  R4      # )z:
Returns the current content of the document as a string.
 utf-8)r   r   new_paragraphitemslink_target_definitionjoinr   encode)r   refnamelink   &  r   getvalueZReSTDocument.getvaluea   sf     :::JJ$$&!%!1!1!3

11'@ "4wwt||$++G44r   c                s`    V Uu. uF  q P                   P                  W"4      NK  	  up# u upi r   )r   get)r   ZwordsZw   && r   translate_wordsZReSTDocument.translate_wordsk   s)    8=>1$$((.>>>s   #+c                sd    V'       d(   V P                   '       d   V P                  V4       R # R # R # r   )r	   r   )r   Zdatar   r   handle_dataZReSTDocument.handle_datan   s     DNNNKK #4r   c                sf   V'       dk    \        V P                  4      pV P                  P                  V4       V P                  P	                  4        \        V P                  4      pW#3V n        R# R#   \         d1    \        P                  R RR7       \        P                  T4        R# i ; i)zError parsing doc stringT)Zexc_infoN)	r   r   r   ZfeedZcloser   Z	ExceptionLOGZdebug)r   Z
doc_stringstartends   &&  r   include_doc_stringZReSTDocument.include_doc_stringr   s    &DLL)  ,!!#$,,').%   &		4t	D		*%&s   A'A5 57B0/B0c                s^    V P                   e   V P                   w  rV P                  W1 R # R # r   )r   r   )r   r2   r3   r+   r   remove_last_doc_stringZ#ReSTDocument.remove_last_doc_string~   s.      ,..JEUY' -r   )	r   r   r
   r   r	   r   r   r   r   N)man)__name__
__module____qualname____firstlineno__r   r   r   r   r   r    r!   r,   r/   r0   r4   r5   __static_attributes____classdictcell__)__classdict__s   @r   r   r   2   sG     	%#9 E5?
&( (r   r   c                   s   a a ] tR t^t oRV 3R llt]R 4       t]R 4       t]P                  R 4       t]R 4       t	]R 4       t
R tRR ltR	 tR
 tR tRR ltR tR tR tR tR tRtVtV ;t# )DocumentStructurec                s   < \         SV `  VR7       Wn        \        4       V n        V P                  .V n        / V n        Ve   W@n        Ve   V P                  V4       R# R# )a  Provides a Hierarichial structure to a ReSTDocument

You can write to it similiar to as you can to a ReSTDocument but
has an innate structure for more orginaztion and abstraction.

:param name: The name of the document
:param section_names: A list of sections to be included
    in the document.
:param target: The target documentation of the Document structure
:param context: A dictionary of data to store with the strucuture. These
    are only stored per section not the entire structure.
)r   N)Zsuperr   _namer    
_structure_path_context_generate_structure)r   r   section_namesr   context	__class__s   &&&&&r   r   ZDocumentStructure.__init__   s[     	'
%-jj\
#M$$$]3 %r   c                    V P                   # )z"The name of the document structure)r?   r   r   r   r   ZDocumentStructure.name   s     zzr   c                rG   )z^
A list of where to find a particular document structure in the
overlying document structure.
rA   r   r   r   pathDocumentStructure.path   s     zzr   c                s    Wn         R # r   rH   )r   valuer   r   rI   rJ      s    
r   c                s,    \        V P                  4      # r   )Zlistr@   r   r   r   available_sectionsZ$DocumentStructure.available_sections   s    DOO$$r   c                rG   r   )rB   r   r   r   rE   ZDocumentStructure.context   s    }}r   c                s:    V F  pV P                  V4       K  	  R # r   )add_new_section)r   rD   Zsection_namer.   r   rC   Z%DocumentStructure._generate_structure   s    )L  . *r   c                s   V P                  WP                  VR7      pV P                  V.,           Vn        V P                  P                  VP                  n        V P
                  Vn        V P                  Vn        W0P                  V&   V# )a7  Adds a new section to the current document structure

This document structure will be considered a section to the
current document structure but will in itself be an entirely
new document structure that can be written to and have sections
as well

:param name: The name of the section.
:param context: A dictionary of data to store with the strucuture. These
    are only stored per section not the entire structure.
:rtype: DocumentStructure
:returns: A new document structure to add to but lives as a section
    to the document structure it was instantiated from.
)r   r   rE   )rF   r   rI   r   Zindentationr   r   r@   )r   r   rE   sections   &&& r   rM   Z!DocumentStructure.add_new_section   st      ..kk7 ! 
 yyD6)$(JJ$:$:!"&"6"6

 'r   c                s(    V P                   V,          # )zRetrieve a sectionr@   r   r   r   r   get_sectionZDocumentStructure.get_section   s    t$$r   c                s    WP                   9   # r   rO   rP   r   r   has_sectionZDocumentStructure.has_section   s    &&r   c                s     V P                   V R# )zDelete a sectionNrO   rP   r   r   delete_sectionZ DocumentStructure.delete_section   s    OOD!r   c                s   \        V P                  4      pV^8X  dl   V P                  '       dY   V P                  P	                  4        V P                  P                  4        F   w  r4V P                  P                  W44       K"  	  M-V\        P                  V P                  ^,          4      8X  d   RpV P                  4       pV P                  P                  4        Fk  w  rg\        P                  VP                  4       4      pV'       d#   VP                  ^ 4       R2P                  4       MTpWWP!                  V4      ,          pKm  	  \        VP#                  4       4      p	\$        P                  V P&                  4      p
Ve   VP                  4       M\(        pV
'       d9   WR,          8  d,   \*        P-                  V
R,          V4      P                  4       pV# )zFlushes a doc structure to a ReSTructed string

The document is flushed out in a DFS style where sections and their
subsections' values are added to the string as they are visited.
Nz

r   r   )r   rI   r   r   r$   r%   r&   SECTION_METHOD_PATH_DEPTHr-   r,   r@   DOCUMENTATION_LINK_REGEXZsearchZdecodeZgroupr(   flush_structureZ
splitlinesSECTION_LINE_LIMIT_CONFIGr   DEFAULT_AWS_DOCS_LINKLARGE_SECTION_MESSAGEZformat)r   Z	docs_linkZpath_lengthr)   r*   rK   r   rN   ZmatchZ
line_countZsection_configZaws_docs_links   &&          r   rV   Z!DocumentStructure.flush_structure   sx    $))n!zzz

((*%)ZZ%5%5%7MGJJ55gD &8 599$))A,GGI!__224MD -33ELLNCE495;;q>"$'..0y  ,,Y77E 5 ))+,
266tyyA $ & 	
 j,+GG)00v&fh  r   c                sV    R P                  V P                  4      P                  R4      # )r"   r#   )r'   r   r(   r   r   r   r,   ZDocumentStructure.getvalue
  s     wwt||$++G44r   c                s$    \        4       V n        R # r   )r    r@   r   r   r   remove_all_sectionsZ%DocumentStructure.remove_all_sections  s    %-r   c                s    . V n         R # r   r   r   r   r   
clear_textZDocumentStructure.clear_text  s	    r   c                s^    V P                  R 4      pVP                  P                  V4       V# )title)rM   r   Zh1)r   r\   Ztitle_sectionr.   r   add_title_sectionZ#DocumentStructure.add_title_section  s,    ,,W5u%r   c                s`   \         P                  P                  V4      '       g   \         P                  ! V4       \         P                  P	                  W R 24      p\        VR4      ;_uu_ 4       pVP                  V P                  4       4       RRR4       R#   + '       g   i     R# ; i)z.rstZwbN)osrI   ZexistsZmakedirsr'   Zopenr   rV   )r   Z	full_pathZ	file_nameZsub_resource_file_pathZfs   &&&  r   write_to_fileZDocumentStructure.write_to_file  so    ww~~i((KK	"!#i;d9K!L($//1GGD((*+ 0///s   2 BB-	)rB   r?   rA   r@   r   )Nr6   Nr   )r7   r8   r9   r:   r   Zpropertyr   rI   ZsetterrL   rE   rC   rM   rQ   rR   rS   rV   r,   rZ   r[   r]   r_   r;   r<   Z__classcell__)rF   r=   s   @@r   r>   r>      s     4.     
[[  % %  /6%'"(T5(
, ,r   r>   )Zloggingr^   ZreZbotocore.compatr    Z#botocore.docs.bcdoc.docstringparserr   Zbotocore.docs.bcdoc.styler   rX   ZcompilerU   rY   Z	getLoggerr1   rW   rT   r   r>   ) r   r   <module>r`      s     	 	 ' ? /@ ::I 	  !!2L$GF0,E 0,Ev|\4@	  !Q! P( P(fX, X,r   