B 劇c @sddlmZddlmZmZddlmZddlmZddl m Z ddl m Z ddl mZmZmZGdd d e Zdd d Zdd dZdS)) xform_name)document_custom_methoddocument_model_driven_method)OperationModel)get_service_module_name)BaseDocumenter)%document_model_driven_resource_method)add_resource_type_overviewget_resource_ignore_paramsget_resource_public_actionsc@seZdZddZdS)ActionDocumenterc Cs|jj}i}x|D]}|||j<qWt|jj}t||jd<t|ddddxt|D]}| |}|dkr|jj rt |||j |jj jj j|jj |jdqX||krt||j |jj jj j|||jdqXt||||qXWdS) 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"l/private/var/folders/8c/hx9_v10d5x38qmnzt13b7b8j1k3n5b/T/pip-target-x6xd5gna/lib/python/boto3/docs/action.pydocument_actionss>       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 } 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 {} = {}.{}) r method_nameoperation_modelrmethod_descriptionexample_prefixZ exclude_inputZresource_action_modelinclude_signatureN) r*request operationr paramsresourcertype service_nameformatrrZ documentation) rrrrrr-r*Z ignore_paramsZexample_return_valueexample_resource_namer,r"r"r#r Ls*     r c Cs^dt|t|jj|}t|}|j|kr0|}|d|} 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:`{}.Client.{}` to update the attributes of the {} resource. Note that the load and reload methods are the same method and can be used interchangeably..)rr)r*rr+r,r-N)r4rrr.r/r3rr) rrrrrrr-rr5r,r"r"r#r~s   rN)T)T)ZbotocorerZbotocore.docs.methodrrZbotocore.modelrZbotocore.utilsrZboto3.docs.baserZboto3.docs.methodrZboto3.docs.utilsr r r r r rr"r"r"r# s     4 3