a
    ތxd                     @   s   d dl Z d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ d d	lmZmZmZ G d
d deZdddZdddZdS )    N)
xform_name)DocumentStructure)document_custom_methoddocument_model_driven_method)OperationModel)get_service_module_name)NestedDocumenter)%document_model_driven_resource_method)add_resource_type_overviewget_resource_ignore_paramsget_resource_public_actionsc                   @   s   e Zd Zdd ZdS )ActionDocumenterc              	   C   sT  | j j}i }|D ]}|||j< qt| jj}t|| jd< t|dddd t|D ]}t	|dd}|
d}|j| jd	 |d
|  || |j
|d| j did}	|dv r| j jrt|	|| j| jjjjj| j j| jd n@||v rt|	| j| jjjjj|| | jd nt|	|||  tj| j| j | j }
| |
| qRd S )NactionsZActionszActions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.Zactions_intro)sectionZresource_typedescriptionZ
intro_linkhtml)targetZ
breadcrumbindexz / Action / 	qualifier.)context)loadreload)r   action_nameresource_nameevent_emitter
load_modelservice_model)r   r   r   action_modelr   )!Z_resource_modelr   namer   Z	_resource	__class__sorted
member_mapr
   r   Zadd_new_sectionstylerefZ_resource_class_namewriteZadd_title_section
class_namer   document_load_reload_actionZ_resource_namemetaclienteventsZ_service_modeldocument_actionr   ospathjoinZ_root_docs_pathZ_service_nameZ_resource_sub_pathZwrite_to_file)selfr   Zmodeled_actions_listZmodeled_actionsZmodeled_actionZresource_actionsr   Z
action_docZbreadcrumb_sectionZaction_sectionZactions_dir_path r0   I/var/www/html/Ranjet/env/lib/python3.9/site-packages/boto3/docs/action.pydocument_actions"   sd    



z!ActionDocumenter.document_actionsN)__name__
__module____qualname__r2   r0   r0   r0   r1   r   !   s   r   Tc                 C   s   | |jj}t|jj}d}|jr0t|jj}t|}	|j|krF|}	d	||	|j
}
| jdd |j
 }t| ||||j|
|||d	 dS )a  Documents a resource action

    :param section: The section to write to

    :param resource_name: The name of the resource

    :param event_emitter: The event emitter to use to emit events

    :param action_model: The model of the action

    :param service_model: The model of the service

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    responsez
{} = {}.{}r    )	r   method_nameoperation_modelr   method_descriptionexample_prefixZexclude_inputZresource_action_modelinclude_signatureN)r9   request	operationr   paramsresourcer   typeservice_nameformatr   r   getr	   Zdocumentation)r   r   r   r   r   r<   r9   Zignore_paramsZexample_return_valueexample_resource_namer;   full_action_namer0   r0   r1   r+   `   s4    
r+   c              	   C   st   d t|t|jj|}t|}|j|kr0|}| d| }	| jdd | }
t| |
t	i ||||	|d dS )a  Documents the resource load action

    :param section: The section to write to

    :param action_name: The name of the loading action should be load or reload

    :param resource_name: The name of the resource

    :param event_emitter: The event emitter to use to emit events

    :param load_model: The model of the load action

    :param service_model: The model of the service

    :param include_signature: Whether or not to include the signature.
        It is useful for generating docstrings.
    zCalls :py:meth:`{}.Client.{}` to update the attributes of the {} resource. Note that the load and reload methods are the same method and can be used interchangeably.r   r   r7   )r   r8   r9   r   r:   r;   r<   N)
rC   r   r   r=   r>   rB   r   rD   r   r   )r   r   r   r   r   r   r<   r   rE   r;   rF   r0   r0   r1   r'      s(    
	
r'   )T)T)r,   Zbotocorer   Zbotocore.docs.bcdoc.restdocr   Zbotocore.docs.methodr   r   Zbotocore.modelr   Zbotocore.utilsr   Zboto3.docs.baser   Zboto3.docs.methodr	   Zboto3.docs.utilsr
   r   r   r   r+   r'   r0   r0   r0   r1   <module>   s   E 
< 