Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/boto3/docs/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/boto3/docs/__pycache__/resource.cpython-38.pyc
U

Q��g;�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZmZddl
mZddlmZdd	lmZdd
lmZmZmZmZddlmZGdd
�d
e�ZGdd�de�ZdS)�N)�
xform_name)�DocumentStructure)�get_official_service_name)�ActionDocumenter)�document_attribute�document_identifier�document_reference)�BaseDocumenter)�CollectionDocumenter)�SubResourceDocumenter)�add_resource_type_overview�!get_identifier_args_for_signature�get_identifier_description�!get_identifier_values_for_example)�WaiterResourceDocumentercs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Z�ZS)!�ResourceDocumentercs:t��|�||_||_|j��|_|j|jkr6d|_dS)Nzservice-resource)�super�__init__�_botocore_session�_root_docs_path�_resource_name�lower�_resource_sub_path�
_service_name)�self�resourceZbotocore_sessionZroot_docs_path��	__class__��@/opt/cppython/lib/python3.8/site-packages/boto3/docs/resource.pyr&szResourceDocumenter.__init__cCsh|�|�|�|�|�|�|�|�|�|�|�|�|�|�|�|�|�|�|�	|�dS)N)
�
_add_title�_add_resource_note�
_add_intro�_add_identifiers�_add_attributes�_add_references�_add_actions�_add_sub_resources�_add_collections�_add_waiters�r�sectionrrr�document_resource.s








z$ResourceDocumenter.document_resourcecCs|�d�}|j�|j�dS)N�title)�add_new_section�style�h2r�rr+Z
title_sectionrrrr :s
zResourceDocumenter._add_titlec
Cs�g}|jjr&|jjD]}|�|j�qt|�}|�d�}|jj|j�d|�d�d�|�d�}|�	|�|�d�}|�
||�|�d�}|�||�|�d�}	|	j��dS)	N�start_class�(�))�
class_name�description�example�params�	end_class)
Z_resource_model�identifiers�append�namer
r.r/Zstart_sphinx_py_classr5�_add_description�_add_example�_add_params_descriptionZend_sphinx_py_class)
rr+�identifier_names�
identifierZ
class_argsr2Zdescription_sectionZexample_sectionZ
param_sectionr9rrrr">s"
�




zResourceDocumenter._add_introcCs&t|j�}|�d|�d|j���dS)NzA resource representing an � )r�_service_model�writer�rr+Zofficial_service_namerrrr=[s
�z#ResourceDocumenter._add_descriptionc
Cs�|j��|j��|�d�|j��|j��|�|j�d|j�d��|j��t|�}|�t|j��d|j�d|j�d|�d��|j��dS)N�import boto3� = boto3.resource('�')z = �.r3r4)	r/�start_codeblock�new_linerDrrrr�
end_codeblock)rr+r@Zexample_valuesrrrr>as




�
$�zResourceDocumenter._add_examplecCsV|D]L}t|j|�}|�d|�d��|j��|�d|�d|���|j��qdS)Nz:type z: stringz:param z: )rrrDr/rK)rr+r@Zidentifier_namer6rrrr?qs�
z*ResourceDocumenter._add_params_descriptioncCsR|j��|�d|�d��|j��|j��|j|D]}|j�|��q:dS)Nz#These are the resource's available �:)r/rKrDZtoctree�
member_mapZtocitem)rr+Zresource_member_type�memberrrr�_add_overview_of_member_type{s

�

z/ResourceDocumenter._add_overview_of_member_typec	Cs�|jjjj}|�d�}g}|r8||jd<t|dddd�|D]�}|�|j�t	|jdd�}|�d�}|j
�|jd	�|�
d
|j���|�|j�|j|jd|j�d�id
�}t||j|d�tj�|j|j�|j��}|�||j�q<|r�|�|d�dS)Nr:ZIdentifierszYIdentifiers are properties of a resource that are set upon instantiation of the resource.�identifiers_attributes_intro�r+Z
resource_typer6Z
intro_link�html��target�
breadcrumb�indexz / Identifier / �	qualifierrI��context)r+�
resource_nameZidentifier_model)�	_resource�meta�resource_modelr:r.rNrr;r<rr/�ref�_resource_class_namerD�add_title_sectionr5rr�os�path�joinrrr�
write_to_filerP)	rr+r:Zmember_listrAZidentifier_doc�breadcrumb_sectionZidentifier_sectionZidentifiers_dir_pathrrrr#�sF

�	
���z#ResourceDocumenter._add_identifiersc
	CsH|jjjjj}i}|jjjjr@|�|jjjj�}|jjj�|�}|�d�}g}|rlt	|dddd�||j
d<t|�D]�}||\}}|�|�t
|dd�}	|	�d�}
|
j�|jd	�|
�d
|���|	�|�|	j|d|j�d�id
�}t||j|j||jjjjj|d�tj�|j|j�|j��}|	�||�qt|�rD|�|d�dS)N�
attributesZ
Attributesz�Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the :py:meth:`load` method.rQrRrSrTrVrWz / Attribute / rXrIrY)r+�service_namer[�	attr_nameZ
event_emitterZ
attr_model)r\r]�client�
service_modelr^�shapeZ	shape_forZget_attributesr.rrN�sortedr;rr/r_r`rDrar5rrr�eventsrbrcrdrrrerP)
rr+rkrgrlZattribute_listri�_Z
attr_shapeZ
attribute_docrfZattribute_sectionZattributes_dir_pathrrrr$�s^
�
�
�



��
�z"ResourceDocumenter._add_attributesc	Cs�|�d�}|jjjj}g}|r8t|dddd�||jd<|D]�}|�|j�t	|jdd�}|�d�}|j
�|jd	�|�
d
|j���|�|j�|j|jd|j�d�id
�}t||d�tj�|j|j�|j��}|�||j�q<|r�|�|d�dS)N�
referencesZ
ReferenceszNReferences are related resource instances that have a belongs-to relationship.Zreferences_introrRrSrTrVrWz / Reference / rXrIrY)r+Zreference_model)r.r\r]r^rprrNr;r<rr/r_r`rDrar5rrbrcrdrrrrerP)	rr+rpZreference_list�	referenceZ
reference_docrfZreference_sectionZreferences_dir_pathrrrr%�sD
�	

���z"ResourceDocumenter._add_referencescCsJ|�d�}|jjjj}|rFt|j|j�}|j|_|�|�|�	|d�dS)N�actions)
r.r\r]r^rrrrrNZdocument_actionsrP)rr+rr�
documenterrrrr&s

zResourceDocumenter._add_actionscCsJ|�d�}|jjjj}|rFt|j|j�}|j|_|�|�|�	|d�dS)Nz
sub-resources)
r.r\r]r^ZsubresourcesrrrNZdocument_sub_resourcesrP)rr+Z
sub_resourcesrsrrrr's
�
z%ResourceDocumenter._add_sub_resourcescCsJ|�d�}|jjjj}|rFt|j|j�}|j|_|�|�|�	|d�dS)N�collections)
r.r\r]r^rtr
rrNZdocument_collectionsrP)rr+rtrsrrrr((s
�
z#ResourceDocumenter._add_collectionscCsZ|�d�}|jjjj}|rV|j�|j�}t|j||j	�}|j
|_
|�|�|�|d�dS)N�waiters)
r.r\r]r^rurZget_waiter_modelrrrrNZdocument_resource_waitersrP)rr+ruZservice_waiter_modelrsrrrr)3s
��
zResourceDocumenter._add_waiterscCs,|�d�}|j��|�d�|j��dS)Nzfeature-freezez�Before using anything on this page, please refer to the resources :doc:`user guide <../../../../guide/resources>` for the most recent guidance on using resources.)r.r/Z
start_noterDZend_noter*rrrr!As

�z%ResourceDocumenter._add_resource_note)�__name__�
__module__�__qualname__rr,r r"r=r>r?rPr#r$r%r&r'r(r)r!�
__classcell__rrrrr%s 

,9*	rc@s0eZdZedd��Zdd�Zdd�Zdd�Zd	S)
�ServiceResourceDocumentercCs|j�d�S)Nz.ServiceResource)Z_service_docs_name)rrrrr5Msz$ServiceResourceDocumenter.class_namecCs|�d�}|j�d�dS)Nr-zService Resource)r.r/r0r1rrrr Qs
z$ServiceResourceDocumenter._add_titlecCst|j�}|�d|���dS)NzA resource representing )rrCrDrErrrr=Us
z*ServiceResourceDocumenter._add_descriptioncCsZ|j��|j��|�d�|j��|j��|�|j�d|j�d��|j��dS)NrFrGrH)r/rJrKrDrrL)rr+r@rrrr>Ys




�z&ServiceResourceDocumenter._add_exampleN)rvrwrx�propertyr5r r=r>rrrrrzLs

rz)rbZbotocorerZbotocore.docs.bcdoc.restdocrZbotocore.docs.utilsrZboto3.docs.actionrZboto3.docs.attrrrrZboto3.docs.baser	Zboto3.docs.collectionr
Zboto3.docs.subresourcerZboto3.docs.utilsrr
rrZboto3.docs.waiterrrrzrrrr�<module>
s)

F1le Man4ger