HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/boto3/docs/__pycache__/service.cpython-37.pyc
B

�P�e`!�@spddlZddlmZddlmZddlmZddlZddl	m
Z
ddlmZm
Z
ddlmZGdd	�d	e�ZdS)
�N)�DocumentStructure)�ServiceDocumenter)�DataNotFoundError)�Boto3ClientDocumenter)�ResourceDocumenter�ServiceResourceDocumenter)�ServiceContextcsleZdZej�ej�ej�d�Z	�fdd�Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�Zdd�Zdd�Z�ZS)r�examplescspt�j||j|d�||_|j�|�|_d|_|j|j��krL|j�	|�|_dddddddg|_
||_d	|_dS)
N)�service_name�session�root_docs_path�title�client�
paginators�waiters�	resourcesr	zcontext-paramszLhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html)
�super�__init__�_session�_boto3_sessionr�_client�_service_resource�
_service_nameZget_available_resources�resource�sections�_root_docs_path�_USER_GUIDE_LINK)�selfr
rr)�	__class__��C/opt/alt/python37/lib/python3.7/site-packages/boto3/docs/service.pyrs$zServiceDocumenter.__init__cCs�t|j|jdd�}|�|�d��|�|�d��|�|�d��|�|�d��|jrh|�	|�d��|�
|�d��|�d	�}|�|�|��S)
ziDocuments an entire service.

        :returns: The reStructured text of the documented service.
        �html)Z
section_names�targetr
rrrrr	zcontext-params)
rrrr
Zget_section�
client_apiZ
paginator_apiZ
waiter_apir�resource_section�_document_examplesZclient_context_paramsZflush_structure)rZ
doc_structureZcontext_params_sectionrrr �document_service9s

z"ServiceDocumenter.document_servicecCsDd}y|�|j�}Wntk
r(YnXt|j|j|��|�dS)N)Zget_examplesrrrrrZdocument_client)r�sectionr	rrr r#MszServiceDocumenter.client_apicCs�|j�d�|j��|�d�|jjd|jd�|�d�|j��|j��|�d�|j��|j��|�|�|�|�dS)NZ	Resourcesz�Resources 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�.zThe available resources are:)	�style�h2�new_line�writeZ
external_linkrZtoctree�_document_service_resource�_document_resources)rr'rrr r$Xs








z"ServiceDocumenter.resource_sectioncCs�tddd�}|�d�}|j�|jjjd|j���|�d�t	|j
|j|j��
|�|j
jjj}||jkrnd}tj�|j|j�|����}|�|d�|j�|j�d|�d	��dS)
Nzservice-resourcer!)r"�
breadcrumbz../../z / Resource / ServiceResource�index�/z/index)r�add_new_sectionr*�refrr�__name__rr-rrrr�document_resource�meta�resource_model�name�os�path�join�lower�
write_to_file�tocitem)rr'Zservice_resource_doc�breadcrumb_section�
resource_name�service_resource_dir_pathrrr r.ns$



z,ServiceDocumenter._document_service_resourcec
Csdd}|j�d�}|�|jd�}|jjjjj}�x0|dD�]"}|d|}|jj	j
||t|j|d|dd�d�}|jjj
}	g}
x|	D]}|
�|�q�W||
d|ji�}|jjj��}t|dd	�}
|
�d
�}|j�|jjjd|j���|�d|jjj���t||j|j��|
�|jjj��tj�|j|j�|��}|
�|d
�|j� |j�d|�d��q8WdS)NZfooZdata_loaderzresources-1r)r
Zresource_json_definitions�
service_modelZservice_waiter_model)rAZsingle_resource_json_definitionZservice_contextrr!)r"r0z../../z / Resource / r1r2z/index)!rZ
get_componentZload_service_modelrrr7rrCrZresource_factoryZload_from_definitionrr8�identifiers�appendrr9r=rr3r*r4rr5r-rrr6r:r;r<r>r?)rr'Ztemp_identifier_value�loaderZjson_resource_modelrCrAr8Zresource_clsrD�args�_rZresource_docr@rBrrr r/�sL



z%ServiceDocumenter._document_resourcescCstj�tj�|j|jd��S)Nz.rst)r:r;�realpathr<�EXAMPLE_PATHr)rrrr �_get_example_file�sz#ServiceDocumenter._get_example_filec	CsP|��}tj�|�rL|j�d�|j��t|��}|�|�	��WdQRXdS)NZExamples)
rKr:r;�isfiler*r+r,�openr-�read)rr'Z
examples_file�frrr r%�s

z$ServiceDocumenter._document_examples)r5�
__module__�__qualname__r:r;r<�dirname�boto3�__file__rJrr&r#r$r.r/rKr%�
__classcell__rr)rr rs7r)r:Zbotocore.docs.bcdoc.restdocrZbotocore.docs.servicerZBaseServiceDocumenterZbotocore.exceptionsrrSZboto3.docs.clientrZboto3.docs.resourcerrZboto3.utilsrrrrr �<module>
s