
    vKg`!                     v    S SK r S SKJr  S SKJr  S SKJr  S SKrS SK	J
r
  S SKJrJr  S SKJr   " S S	\5      rg)
    N)DocumentStructure)ServiceDocumenter)DataNotFoundError)Boto3ClientDocumenter)ResourceDocumenterServiceResourceDocumenter)ServiceContextc                      ^  \ rS rSr\R
                  R                  \R
                  R                  \R                  5      S5      r
U 4S jrS rS rS rS rS rS	 rS
 rSrU =r$ )r      examplesc                 N  > [         TU ]  UUR                  US9  X l        U R                  R	                  U5      U l        S U l        U R                  U R                  R                  5       ;   a   U R                  R                  U5      U l        / SQU l
        X0l        SU l        g )N)service_namesessionroot_docs_path)titleclient
paginatorswaiters	resourcesr   context-paramszLhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html)super__init___session_boto3_sessionr   _client_service_resource_service_nameget_available_resourcesresourcesections_root_docs_path_USER_GUIDE_LINK)selfr   r   r   	__class__s       R/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/boto3/docs/service.pyr   ServiceDocumenter.__init__   s    % $$) 	 	
 &**11,?!%!4!4!L!L!NN%)%8%8%A%A,%OD"
  .? 	    c                 F   [        U R                  U R                  SS9nU R                  UR	                  S5      5        U R                  UR	                  S5      5        U R                  UR	                  S5      5        U R                  UR	                  S5      5        U R                  (       a   U R                  UR	                  S5      5        U R                  UR	                  S5      5        UR	                  S	5      nU R                  U5        UR                  5       $ )
zYDocuments an entire service.

:returns: The reStructured text of the documented service.
html)section_namestargetr   r   r   r   r   r   r   )r   r   r    r   get_section
client_apipaginator_api
waiter_apir   resource_section_document_examplesclient_context_paramsflush_structure)r#   doc_structurecontext_params_sections      r%   document_service"ServiceDocumenter.document_service9   s    
 *dmmF
 	

=,,W5611(;<=44\BC11)<=!!!!-";";K"HI 9 9* EF!.!:!:;K!L""#9:,,..r'   c                     S n U R                  U R                  5      n[        U R                  U R
                  U5      R                  U5        g ! [         a     N=f = f)N)get_examplesr   r   r   r   r!   document_client)r#   sectionr   s      r%   r-   ServiceDocumenter.client_apiM   s[    	((););<H 	LL$..	

/'
" ! 		s   A 
AAc                 0   UR                   R                  S5        UR                   R                  5         UR                  S5        UR                   R	                  SU R
                  S9  UR                  S5        UR                   R                  5         UR                   R                  5         UR                  S5        UR                   R                  5         UR                   R                  5         U R                  U5        U R                  U5        g )N	ResourceszResources are available in boto3 via the ``resource`` method. For more detailed instructions and examples on the usage of resources, see the resources z
user guide)r   link.zThe available resources are:)	styleh2new_linewriteexternal_linkr"   toctree_document_service_resource_document_resources)r#   r;   s     r%   r0   "ServiceDocumenter.resource_sectionX   s    % 	
 	##&& 	$ 	
 	c  45 ''0  )r'   c                    [        SSS9nUR                  S5      nUR                  R                  U R                  R
                  R                  SU R                   35        UR                  S5        [        U R                  U R                  U R                  5      R                  U5        U R                  R                  R                  R                   nX@R                  :X  a  Sn["        R$                  R'                  U R                  U R                   UR)                  5        5      nUR+                  US5        UR                  R-                  U R                   SU S	35        g )
Nzservice-resourcer)   r+   
breadcrumb../../z / Resource / ServiceResourceindex//index)r   add_new_sectionrA   refr   r$   __name__r   rD   r   r   r   r!   document_resourcemetaresource_modelnameospathjoinlowerwrite_to_filetocitem)r#   r;   service_resource_docbreadcrumb_sectionresource_nameservice_resource_dir_paths         r%   rG   ,ServiceDocumenter._document_service_resourcen   s8   0v 
 2AA,O  $$LL""++vd6H6H5I-J	
 	  !@A!""DMM43G3G	


0
1 ..33BBGG....M$&GGLL  !!"""$%%
!
 	**+DgN!3!3 4Am_FKLr'   c                 B   SnU R                   R                  S5      nUR                  U R                  S5      nU R                  R
                  R                  R
                  R                  nUS    GH(  nUS   U   nU R                  R                  R                  UU[        U R                  US   US S9S9nUR
                  R                  R                  n	/ n
U	 H  nU
R                  U5        M     U" U
SU R                  06nUR
                  R                  R                   R#                  5       n[%        USS	9nUR'                  S
5      nUR(                  R+                  U R                  R,                  R.                  SU R                   35        UR1                  SUR
                  R                  R                    35        [3        XR                   U R4                  5      R7                  UR'                  UR
                  R                  R                   5      5        [8        R:                  R=                  U R4                  U R                   U 5      nUR?                  US5        UR(                  RA                  U R                   SU S35        GM+     g )Nfoodata_loaderzresources-1r   )r   resource_json_definitionsservice_modelservice_waiter_model)r`   single_resource_json_definitionservice_contextr   r)   rK   rL   rM   z / Resource / rN   rO   rP   )!r   get_componentload_service_modelr   r   rU   r   rg   r   resource_factoryload_from_definitionr	   rV   identifiersappendr   rW   r[   r   rQ   rA   rR   r$   rS   rD   r   r!   rT   rX   rY   rZ   r\   r]   )r#   r;   temp_identifier_valueloaderjson_resource_modelrg   r`   rV   resource_clsro   args_r   resource_docr_   ra   s                   r%   rH   %ServiceDocumenter._document_resources   s]    %,,];$77
 ..33::??MM0=M0=mLN##44II"/4B$2%)%7%72E'3 '4-1% J   '++::FFKD 12 !#T?$,,?H$MM88==CCEM,]6JL!-!=!=l!K$$((&&//6$:L:L9M1N $$ !=!=!B!B CD --)=)=,,X]]-I-I-N-NO
 )+$$%%& /)%
 &&'@'JMM!!%%&af=Y >r'   c                     [         R                  R                  [         R                  R                  U R                  U R
                  S-   5      5      $ )Nz.rst)rX   rY   realpathrZ   EXAMPLE_PATHr   )r#   s    r%   _get_example_file#ServiceDocumenter._get_example_file   s<    wwGGLL**D,>,>,GH
 	
r'   c                 `   U R                  5       n[        R                  R                  U5      (       ai  UR                  R                  S5        UR                  R                  5         [        U5       nUR                  UR                  5       5        S S S 5        g g ! , (       d  f       g = f)NExamples)
r|   rX   rY   isfilerA   rB   rC   openrD   read)r#   r;   examples_filefs       r%   r1   $ServiceDocumenter._document_examples   sw    ..077>>-((MMZ(MM""$m$affh' %$ ) %$s   5 B
B-)r"   r   r   r!   r   r    )rS   
__module____qualname____firstlineno__rX   rY   rZ   dirnameboto3__file__r{   r   r6   r-   r0   rG   rH   r|   r1   __static_attributes____classcell__)r$   s   @r%   r   r      sW    77<< ?LL
8/(	#*,M45n

( (r'   r   )rX   botocore.docs.bcdoc.restdocr   botocore.docs.servicer   BaseServiceDocumenterbotocore.exceptionsr   r   boto3.docs.clientr   boto3.docs.resourcer   r   boto3.utilsr	    r'   r%   <module>r      s.    
 9 L 1  3 M &q(- q(r'   