
    Pe@                         d dl mZ d dlmZ d dlmZ d dlmZ  G d de      Z	 G d de	      Z
 G d	 d
e	      Z G d de	      Zy)    )DocumentStructuredocument_model_driven_methoddocument_paginate_methoddocument_wait_methodc                   P     e Zd ZdZ fdZ fdZd Zd	dZd ZeZ	d Z
d Z xZS )
LazyLoadedDocstringa0  Used for lazily loading docstrings

    You can instantiate this class and assign it to a __doc__ value.
    The docstring will not be generated till accessed via __doc__ or
    help(). Note that all docstring classes **must** subclass from
    this class. It cannot be used directly as a docstring.
    c                 L    t         |           || _        || _        d| _        y)z
        The args and kwargs are the same as the underlying document
        generation function. These just get proxied to the underlying
        function.
        N)super__init__	_gen_args_gen_kwargs
_docstring)selfargskwargs	__class__s      9/usr/lib/python3/dist-packages/botocore/docs/docstring.pyr   zLazyLoadedDocstring.__init__   s&     	!    c                 "    t         |   |       S N)r   __new__)clsr   r   r   s      r   r   zLazyLoadedDocstring.__new__'   s    ws##r   c                     t        d      )Nzq_write_docstring is not implemented. Please subclass from this class and provide your own _write_docstring method)NotImplementedErrorr   r   r   s      r   _write_docstringz$LazyLoadedDocstring._write_docstring+   s    !F
 	
r   c                 p    | j                   | j                          | j                   j                  |      S )a  Expands tabs to spaces

        So this is a big hack in order to get lazy loaded docstring work
        for the ``help()``. In the ``help()`` function, ``pydoc`` and
        ``inspect`` are used. At some point the ``inspect.cleandoc``
        method is called. To clean the docs ``expandtabs`` is called
        and that is where we override the method to generate and return the
        docstrings.
        )r   	_generate
expandtabs)r   tabsizes     r   r"   zLazyLoadedDocstring.expandtabs1   s-     ??"NN))'22r   c                 "    | j                         S r   )r!   r   s    r   __str__zLazyLoadedDocstring.__str__?   s    ~~r   c                 \    | j                   | j                         | _         | j                   S r   )r   _create_docstringr%   s    r   r!   zLazyLoadedDocstring._generateE   s&    ??""446DOr   c                     t        dd      } | j                  |g| j                  i | j                   |j	                         j                  d      S )N	docstringhtml)targetzutf-8)r   r   r   r   flush_structuredecode)r   docstring_structures     r   r(   z%LazyLoadedDocstring._create_docstringK   sZ    /FK 		
"&..	
484D4D	
 #224;;GDDr   )   )__name__
__module____qualname____doc__r   r   r   r"   r&   __repr__r!   r(   __classcell__)r   s   @r   r   r      s3    	$
3  HEr   r   c                       e Zd Zd Zy)ClientMethodDocstringc                     t        |i | y r   r   r   s      r   r   z&ClientMethodDocstring._write_docstringV   s    $d5f5r   Nr1   r2   r3   r    r   r   r8   r8   U   s    6r   r8   c                       e Zd Zd Zy)WaiterDocstringc                     t        |i | y r   r   r   s      r   r   z WaiterDocstring._write_docstring[   s    d-f-r   Nr:   r;   r   r   r=   r=   Z   s    .r   r=   c                       e Zd Zd Zy)PaginatorDocstringc                     t        |i | y r   r   r   s      r   r   z#PaginatorDocstring._write_docstring`   s     $1&1r   Nr:   r;   r   r   r@   r@   _   s    2r   r@   N)botocore.docs.bcdoc.restdocr   botocore.docs.methodr   botocore.docs.paginatorr   botocore.docs.waiterr	   strr   r8   r=   r@   r;   r   r   <module>rG      sI    : = < 5?E# ?ED6/ 6
.) .
2, 2r   