File: //opt/cppython/lib/python3.8/site-packages/botocore/docs/__pycache__/paginator.cpython-38.pyc
U
KD�g# � @ sl d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m
Z
d dlmZ G dd � d �Z
d
dd�ZdS )� N)�
xform_name)�OrderedDict)�DocumentStructure)�document_model_driven_method)�DocumentedShape)�get_service_module_namec @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�PaginatorDocumenterc C s6 || _ | j jj| _| j jjj| _|| _|| _ d| _
d S )NzMhttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/paginators.html)�_client� __class__�__name__�_client_class_name�meta�
service_model�service_name�
_service_name�_service_paginator_model�_root_docs_path�_USER_GUIDE_LINK)�self�clientZservice_paginator_modelZroot_docs_path� r �D/opt/cppython/lib/python3.8/site-packages/botocore/docs/paginator.py�__init__ s �zPaginatorDocumenter.__init__c C s� |j �d� | �|� |j �� |�d� |j �� t| jj�}|D ]T}|j � | j
� d|� �� t|dd�}| �||� t
j�| j| j
d�}|�||� qDdS )zhDocuments the various paginators for a service
param section: The section to write to.
Z
PaginatorszThe available paginators are:z/paginator/�html)�targetZ paginatorN)�styleZh2�
_add_overview�new_line�writelnZtoctree�sortedr Z_paginator_configZtocitemr r �_add_paginator�os�path�joinr Z
write_to_file)r �sectionZpaginator_names�paginator_nameZpaginator_doc_structureZpaginator_dir_pathr r r �document_paginators# s4
�� � � �z'PaginatorDocumenter.document_paginatorsc C s� |� d�}|j�| jd| j� �� |�d|� �� |�|� |� |�}|jj| j� d|� �d� |j�� |j� � |�dt
|�� d�� |j�� |j� � | j�
|�}t||| jjj| jjj|d� d S ) NZ
breadcrumbz../../z / Paginator / z.Paginator.)�
class_namez"paginator = client.get_paginator('z'))r$ r% �
event_emitterr �paginator_config)Zadd_new_sectionr �refr r �writeZadd_title_sectionZstart_sphinx_py_classZstart_codeblockr r Z
end_codeblockr Z
get_paginator�document_paginate_methodr r
�eventsr )r r$ r% Zbreadcrumb_sectionZpaginator_sectionr) r r r r E s8
�
�
�
��z"PaginatorDocumenter._add_paginatorc C s>