o ?c@sZddlmZddlmZddlmZddlmZddlm Z GdddZ d d d Z d S) ) xform_name) OrderedDict)document_model_driven_method)DocumentedShape)get_service_module_namec@s$eZdZddZddZddZdS)PaginatorDocumentercCs||_|jjjj|_||_dS)N)_clientmeta service_modelZ service_nameZ _service_name_service_paginator_model)selfclientZservice_paginator_modelrr/private/var/folders/cw/wlscbxl13mj6wd668h7l9g9sllkg5j/T/pip-target-b31awkwq/lib/python/botocore/docs/paginator.py__init__s zPaginatorDocumenter.__init__cCsf|jd|j|dt|jj}|D]}|jd|jj j d|d| ||qdS)zhDocuments the various paginators for a service param section: The section to write to. Z PaginatorszThe available paginators are:z :py:class:` .Paginator.`N) styleZh2new_linewritelnsortedr Z_paginator_configZlir __class____name___add_paginator)r sectionZpaginator_namespaginator_namerrrdocument_paginatorss   z'PaginatorDocumenter.document_paginatorscCs||}|jj|jjjd|d|j|j|dt |d|j |j|j |}t |||jjj|jjj|ddS)Nr) class_namez"paginator = client.get_paginator('z'))rr event_emitterr paginator_config)Zadd_new_sectionrZstart_sphinx_py_classrrrZstart_codeblockrwriterZ end_codeblockr Z get_paginatordocument_paginate_methodr eventsr )r rrrrrrr.s*      z"PaginatorDocumenter._add_paginatorN)r __module__ __qualname__rrrrrrrrs rTc Cs ||}t}tdddd|d<|ddr tdddd|d<td d d d|d <td d d|dg}tdd ddg} g} t|dtrJ| |d7} n| |d|ddr^| |dg} t|dtrn| |d7} n| |ddt|t |} t |d||| d|| | | |d dS)aDocuments the paginate method of a paginator :param section: The section to write to :param paginator_name: The name of the paginator. It is snake cased. :param event_emitter: The event emitter to use to emit events :param service_model: The service model :param paginator_config: The paginator config associated to a particular paginator. :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. ZMaxItemsintegerz

The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

)name type_name documentationZ limit_keyNZPageSizez

The size of each page.

Z StartingTokenstringzq

A token to specify where to start paginating. This is the NextToken from a previous response.

ZPaginationConfigZ structurezC

A dictionary that provides parameters to control pagination.

)r&r'r(membersZ NextTokenz$

A token to resume pagination.

Z input_tokenZ output_tokenzVCreates an iterator that will paginate through responses from :py:meth:`{}.Client.{}`.Zpaginatez&response_iterator = paginator.paginate)rZmethod_descriptionZexample_prefixZ include_inputZinclude_outputZ exclude_inputZexclude_outputinclude_signature) operation_modelrrget isinstancelistappendformatrrr) rrrr rr+r,Zpagination_config_membersZbotocore_pagination_paramsZ#botocore_pagination_response_paramsZservice_pagination_paramsZ"service_pagination_response_paramsZpaginate_descriptionrrrr!Msz         r!N)T) ZbotocorerZbotocore.compatrZbotocore.docs.methodrZbotocore.docs.utilsrZbotocore.utilsrrr!rrrrs    ?