
    Dh                          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	e
      Z	 dd
Z	 ddZy)    )
xform_name)document_custom_methoddocument_model_driven_method)OperationModel)get_service_module_name)BaseDocumenter)%document_model_driven_resource_method)add_resource_type_overviewget_resource_ignore_paramsget_resource_public_actionsc                       e Zd Zd Zy)ActionDocumenterc           	         | j                   j                  }i }|D ]  }|||j                  <    t        | j                  j
                        }t        |      | j                  d<   t        |ddd       t        |      D ]  }|j                  |      }|dv r| j                   j                  rlt        ||| j                  | j                  j                  j                  j                  j                  | j                   j                  | j                          ||v rZt#        || j                  | j                  j                  j                  j                  j                  ||   | j                          t%        ||||           y )	NactionsActionszActions call operations on resources.  They may automatically handle the passing in of arguments set from identifiers and some attributes.actions_intro)sectionresource_typedescription
intro_link)loadreload)r   action_nameresource_nameevent_emitter
load_modelservice_model)r   r   r   action_modelr   )_resource_modelr   namer   	_resource	__class__sorted
member_mapr
   add_new_sectionr   document_load_reload_action_resource_namemetaclientevents_service_modeldocument_actionr   )selfr   modeled_actions_listmodeled_actionsmodeled_actionresource_actionsr   action_sections           s/var/www/fastuser/data/www/generator.snapmosaic.io/flask_app/venv/lib/python3.12/site-packages/boto3/docs/action.pydocument_actionsz!ActionDocumenter.document_actions   sq   #33;;2 	BN3AON//0	B6NN$$
 &,,<%=	""#8 '		
 ""23 	K$44[AN00T5I5I5N5N+* +"&"5"5"&.."5"5"<"<"A"A"H"H#3388"&"5"5 /*"&"5"5"&.."5"5"<"<"A"A"H"H!0!="&"5"5 '"K1A+1N)	    N)__name__
__module____qualname__r4    r5   r3   r   r      s    *r5   r   c                    |j                  |j                  j                        }t        |j                  j                        }d}|j
                  rt        |j
                  j                        }t        |      }	|j                  |k(  r|}	dj                  ||	|j                        }
t        | |j                  |||j                  |
|||	       y)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   method_nameoperation_modelr   method_descriptionexample_prefixexclude_inputresource_action_modelinclude_signatureN)r=   request	operationr   paramsresourcer   typeservice_nameformatr    r	   documentation)r   r   r   r   r   rB   r=   ignore_paramsexample_return_valueexample_resource_namer?   s              r3   r,   r,   L   s    . $33&&O /|/C/C/J/JKM%),*?*?*D*DE&}5!!]2 -!((3\5F5FN * %%'#*88%#*+
r5   c           	          dj                  t        |      t        |j                  j                        |      }t        |      }|j
                  |k(  r|}| d| }	t        | |t        i |      |||	|       y)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<   r=   r   r>   r?   rB   N)rI   r   r   rC   rD   rH   r   r   )
r   r   r   r   r   r   rB   r   rM   r?   s
             r3   r&   r&   ~   s    6	;;A6#M2z))334<
  '}5!!]2 --.a}=N &r=9#&%+r5   N)T)botocorer   botocore.docs.methodr   r   botocore.modelr   botocore.utilsr   boto3.docs.baser   boto3.docs.methodr	   boto3.docs.utilsr
   r   r   r   r,   r&   r9   r5   r3   <module>rW      sI      * 2 * C +~ +h /r /r5   