B ܁[@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}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)section resource_type description intro_link)loadreload)r action_name resource_name event_emitter load_model service_model)rrr action_modelr)_resource_modelr namer _resource __class__sorted member_mapr add_new_sectionrdocument_load_reload_action_resource_namemetaclientevents_service_modeldocument_actionr)selfrZmodeled_actions_listZmodeled_actionsZmodeled_actionZresource_actionsrZaction_sectionr)R/Users/kashii/Desktop/Projects/Workshops/worker-safety/lambda/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 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_prefix exclude_inputZresource_action_modelinclude_signatureN) r1request operationr paramsresourcertype service_namerr documentation) rrrrrr5r1Z ignore_paramsZexample_return_valueexample_resource_namer3r)r)r*r'Ds(    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)rr0r1rr2r3r5N)rrr6r7r;rr) rrrrrrr5rr=r3r)r)r*r!ms   r!N)T)T)botocorerbotocore.modelrbotocore.utilsrbotocore.docs.methodrrboto3.docs.baserZboto3.docs.methodrboto3.docs.utilsr r r r r'r!r)r)r)r* s          + *