U C^@sddlmZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd l mZdd l mZGd d d e ZdddZdddZdS)) xform_name)OperationModel)get_service_module_name)document_model_driven_method)document_custom_method)BaseDocumenter)%document_model_driven_resource_method)get_resource_ignore_params)get_resource_public_actions)add_resource_type_overviewc@seZdZddZdS)ActionDocumenterc Cs|jj}i}|D]}|||j<qt|jj}t||jd<t|ddddt|D]}| |}|dkr|jj rt |||j |jj jj j|jj |jdqR||krt||j |jj jj j|||jdqRt||||qRdS) NactionsZActionszActions 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)loadreload)r action_name resource_name event_emitter load_model service_model)rrr action_modelr)Z_resource_modelr namer Z _resource __class__sorted member_mapr Zadd_new_sectionrdocument_load_reload_actionZ_resource_namemetaclienteventsZ_service_modeldocument_actionr)selfrZmodeled_actions_listZmodeled_actionsZmodeled_actionZresource_actionsrZaction_sectionr"4/tmp/pip-install-6_kvzl1k/boto3/boto3/docs/action.pydocument_actionssL     z!ActionDocumenter.document_actionsN)__name__ __module__ __qualname__r$r"r"r"r#r sr Tc Csx||jj}t|jj}d}|jr0t|jj}t|} |j|krF|} d|| |j f} t ||j |||j | |||d dS)aDocuments 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 %s = %s.%s) r method_nameoperation_modelrmethod_descriptionexample_prefixZ exclude_inputZresource_action_modelinclude_signatureN) r*request operationr paramsresourcertype service_namerrZ documentation) rrrrrr-r*Z ignore_paramsZexample_return_valueexample_resource_namer,r"r"r#r Ds4   r c Cs\dt|t|jj|f}t|}|j|kr0|}d||f} t||ti|||| |ddS)aDocuments 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:`%s.Client.%s` to update the attributes of the %s resource. Note that the load and reload methods are the same method and can be used interchangeably.z%s.%s)rr)r*rr+r,r-N)rrr.r/r3rr) rrrrrrr-rr4r,r"r"r#rms(   rN)T)T)ZbotocorerZbotocore.modelrZbotocore.utilsrZbotocore.docs.methodrrZboto3.docs.baserZboto3.docs.methodrZboto3.docs.utilsr r r r r rr"r"r"r# s          + +