o
    è’Oj~  ã                   @   sV   d dl mZ d dlmZ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)ÚClientContextParamsDocumenterÚClientDocumenterÚClientExceptionsDocumenter)ÚPaginatorDocumenter)ÚWaiterDocumenter)ÚDataNotFoundErrorc                   @   s^   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d„ ZdS )ÚServiceDocumenterc                 C   sB   || _ || _|| _| 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ú
client-apiúclient-exceptionsúpaginator-apiú
waiter-apiúclient-context-params)	Ú_sessionÚ_service_nameÚ_root_docs_pathÚcreate_clientÚ_clientÚmetaÚeventsÚ_event_emitterÚsections)ÚselfÚservice_nameÚsessionÚroot_docs_path© r"   ú[/var/www/html/pharmsmart-cdr-gen/venv/lib/python3.10/site-packages/botocore/docs/service.pyÚ__init__   s   üzServiceDocumenter.__init__c                 C   s~   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Ú
client_apiÚclient_exceptionsÚpaginator_apiÚ
waiter_apiÚclient_context_paramsÚflush_structure)r   Údoc_structureÚcontext_params_sectionr"   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   r2   r"   r"   r#   r   B   s   
ÿzServiceDocumenter.titlec                 C   s   |j jddd� d S )NzTable of Contentsé   )r   Údepth)r3   Útable_of_contentsr8   r"   r"   r#   r;   H   s   z#ServiceDocumenter.table_of_contentsc                 C   sB   d }z|   | j¡}W n	 ty   Y nw t| j| j|ƒ |¡ d S ©N)Úget_examplesr   r   r   r   r   Údocument_client)r   r2   Úexamplesr"   r"   r#   r)   K   s   ÿ
ÿzServiceDocumenter.client_apic                 C   s   t | j| jƒ |¡ d S r<   )r   r   r   Údocument_exceptionsr8   r"   r"   r#   r*   V   s   ÿz#ServiceDocumenter.client_exceptionsc                 C   sP   z	| j  | j¡}W n
 ty   Y d S w |jr&t| j|| jƒ}| |¡ d S d S r<   )	r   Úget_paginator_modelr   r   Ú_paginator_configr   r   r   Údocument_paginators)r   r2   Úservice_paginator_modelÚpaginator_documenterr"   r"   r#   r+   [   s   ÿÿ
ÿüzServiceDocumenter.paginator_apic                 C   s8   | j jr| j | j¡}t| j || jƒ}| |¡ d S d S r<   )r   Úwaiter_namesr   Úget_waiter_modelr   r   r   Údocument_waiters)r   r2   Úservice_waiter_modelÚwaiter_documenterr"   r"   r#   r,   h   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#   r=   r   s
   ÿzServiceDocumenter.get_examplesc                    sX   t j}| | jg ¡‰ | jjj}|j}‡ fdd„|D ƒ}|r*t | j|ƒ}| |¡ d S d S )Nc                    s   g | ]	}|j ˆ vr|‘qS r"   )Úname)Ú.0Úp©Úparams_to_omitr"   r#   Ú
<listcomp>~   s
    
ÿÿz;ServiceDocumenter.client_context_params.<locals>.<listcomp>)	r   ÚOMITTED_CONTEXT_PARAMSÚgetr   r   r   Úservice_modelÚclient_context_parametersÚdocument_context_params)r   r2   Úomitted_paramsrX   Úraw_context_paramsÚcontext_paramsÚcontext_param_documenterr"   rS   r#   r-   y   s   

ÿÿüz'ServiceDocumenter.client_context_paramsr<   )r6   Ú
__module__Ú__qualname__r$   r1   r   r;   r)   r*   r+   r,   r=   r-   r"   r"   r"   r#   r	      s    

r	   N)Úbotocore.docs.bcdoc.restdocr   Úbotocore.docs.clientr   r   r   Úbotocore.docs.paginatorr   Úbotocore.docs.waiterr   Úbotocore.exceptionsr   r	   r"   r"   r"   r#   Ú<module>   s   