o ?c@s\ddlmZddlmZddlmZddlmZmZm Z m Z GdddeZ d dd Z d S) ) xform_name)get_service_module_name)BaseDocumenter)add_resource_type_overview!get_identifier_args_for_signatureget_identifier_description!get_identifier_values_for_examplec@seZdZddZdS)SubResourceDocumentercCspt|ddddt|jjjjddd}g}||jd<|D]}||j}| |jt ||j ||j d qdS) Nz Sub-resourceszSub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child.Zsubresources_intro)sectionZ resource_type descriptionZ intro_linkcSs|jS)N)name) sub_resourcerq/private/var/folders/cw/wlscbxl13mj6wd668h7l9g9sllkg5j/T/pip-target-b31awkwq/lib/python/boto3/docs/subresource.py'sz>SubResourceDocumenter.document_sub_resources..)keyz sub-resources)r resource_namesub_resource_model service_model) rsortedZ _resourcemetaZresource_modelZ subresources member_mapadd_new_sectionr appenddocument_sub_resourceZ_resource_nameZ_service_model)selfr Z sub_resourcesZsub_resources_listr Zsub_resource_sectionrrrdocument_sub_resourcess,    z,SubResourceDocumenter.document_sub_resourcesN)__name__ __module__ __qualname__rrrrrr s r TcCsg}|jjD]}|jdkr|t|jq|r$t|}|j|j || d}d|jj d} | | | d} t |} t|} |j|krJ|} dt|jj | |j | } | j| | | j| d}|D]&}t|j |} |d|d |j|d |d | |jqm| d }|j|d t||jj |j|d|jj d|jdS)ajDocuments a resource action :param section: The section to write to :param resource_name: The name of the resource :param sub_resource_model: The model of the subresource :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. inputz method-introz Creates a z resource.examplez{} = {}.{}({})paramsz:type z: stringz:param z: returnz:rtype: :py:class:`{}.{}`z :returns: A z resourceN)resourceZ identifierssourcerrtargetrstyleZstart_sphinx_py_methodr rtypeZinclude_doc_stringrZ service_nameformatZstart_codeblockwriteZ end_codeblockrnew_liner)r rrrZinclude_signatureZidentifiers_needed identifierZsignature_argsZmethod_intro_sectionr Zexample_sectionZexample_valuesZexample_resource_namer!Z param_sectionZreturn_sectionrrrr6sb                rN)T) ZbotocorerZbotocore.utilsrZboto3.docs.baserZboto3.docs.utilsrrrrr rrrrrs  "