o
    ˷eW                     @   sR   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
 G dd dZdS )	    )DocumentStructure)ClientDocumenterClientExceptionsDocumenter)PaginatorDocumenter)WaiterDocumenter)DataNotFoundErrorc                   @   sV   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dddZdS )ServiceDocumenterc                 C   s<   || _ || _| j j|dddd| _| jjj| _g d| _d S )Nz	us-east-1foobar)region_nameaws_access_key_idaws_secret_access_key)titletable-of-contents
client-apiclient-exceptionspaginator-api
waiter-api)_session_service_namecreate_client_clientmetaevents_event_emittersections)selfservice_namesession r   L/var/www/ideatree/venv/lib/python3.10/site-packages/botocore/docs/service.py__init__   s   zServiceDocumenter.__init__c                 C   sz   t | j| jdd}| |d | |d | |d | |d | |d | 	|d |
 S )	ziDocuments an entire service.

        :returns: The reStructured text of the documented service.
        html)section_namestargetr   r   r   r   r   r   )r   r   r   r   get_sectiontable_of_contents
client_apiclient_exceptionspaginator_api
waiter_apiflush_structure)r   doc_structurer   r   r    document_service*   s   
z"ServiceDocumenter.document_servicec                 C   s.   |j | jjj | jjd| j |d d S )Nzdocs.title.)section)styleh1r   	__class____name__r   emitr   r   r.   r   r   r    r   :   s   
zServiceDocumenter.titlec                 C   s   |j jddd d S )NzTable of Contents   )r   depth)r/   r&   r4   r   r   r    r&   @      z#ServiceDocumenter.table_of_contentsc                 C   s>   d }z|  | j}W n	 ty   Y nw t| j|| d S N)get_examplesr   r   r   r   document_client)r   r.   examplesr   r   r    r'   C   s   zServiceDocumenter.client_apic                 C   s   t | j| d S r8   )r   r   document_exceptionsr4   r   r   r    r(   L   r7   z#ServiceDocumenter.client_exceptionsc                 C   sB   z	| j | j}W n
 ty   Y d S w t| j|}|| d S r8   )r   get_paginator_modelr   r   r   r   document_paginators)r   r.   service_paginator_modelpaginator_documenterr   r   r    r)   O   s   zServiceDocumenter.paginator_apic                 C   s4   | j jr| j| j}t| j |}|| d S d S r8   )r   waiter_namesr   get_waiter_modelr   r   document_waiters)r   r.   service_waiter_modelwaiter_documenterr   r   r    r*   [   s   zServiceDocumenter.waiter_apiNc                 C   s"   | j d}||d|}|d S )Ndata_loaderz
examples-1r;   )r   get_componentload_service_model)r   r   api_versionloaderr;   r   r   r    r9   e   s
   zServiceDocumenter.get_examplesr8   )r2   
__module____qualname__r!   r-   r   r&   r'   r(   r)   r*   r9   r   r   r   r    r      s    	
r   N)botocore.docs.bcdoc.restdocr   botocore.docs.clientr   r   botocore.docs.paginatorr   botocore.docs.waiterr   botocore.exceptionsr   r   r   r   r   r    <module>   s   