HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //proc/self/root/lib/python3.6/site-packages/botocore/docs/__pycache__/params.cpython-36.pyc
3

�T_Y%�@sLddlmZddlmZGdd�de�ZGdd�de�ZGdd�de�Zd	S)
�)�ShapeDocumenter)�py_type_namec@sneZdZddd�Zdd�Zddd�Zddd	�Zdd
d�Zddd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�BaseParamsDocumenterNcCsg}|j|||d||d�dS)a3Fills out the documentation for a section given a model shape.

        :param section: The section to write the documentation to.

        :param shape: The shape of the operation.

        :type include: Dictionary where keys are parameter names and
            values are the shapes of the parameter names.
        :param include: The parameter shapes to include in the documentation.

        :type exclude: List of the names of the parameters to exclude.
        :param exclude: The names of the parameters to exclude from
            documentation.
        N)�section�shape�history�name�include�exclude)�traverse_and_document_shape)�selfrrr	r
r�r
�/usr/lib/python3.6/params.py�document_paramssz$BaseParamsDocumenter.document_paramscKs|j||f|�dS)N)�_add_member_documentation)rrr�kwargsr
r
r�document_recursive_shape&sz-BaseParamsDocumenter.document_recursive_shapecKs|j||f|�dS)N)r)rrrrr	r
rr
r
r�document_shape_default)sz+BaseParamsDocumenter.document_shape_defaultc	Ksb|j||f|�|j}|j|jd|jjid�}|j|�|j|||dd�|jd�}|j|�dS)Nr)�context)rrrrzend-list)r�member�add_new_sectionr�_start_nested_paramr�_end_nested_param)	rrrrr	r
r�param_shape�
param_sectionr
r
r�document_shape_type_list-s


z-BaseParamsDocumenter.document_shape_type_listc
Ks�|j||f|�|jdd|jjid�}|j|�|j||j�|j|jjd|jjid�}|jj�|j|�|j||j|dd�|jd�}	|j	|	�|j	|	�dS)N�keyr)r)rrrrzend-map)
rrrrr�value�style�indentrr)
rrrrr	r
rZkey_sectionrZend_sectionr
r
r�document_shape_type_map:s





z,BaseParamsDocumenter.document_shape_type_mapcKs�|j|j|�}|j|||d�xR|D]J}	|r6|	|kr6q$||	}
|j|	d|
jid�}|j|�|j||
||	d�q$W|jd�}|j|�dS)N)rr)r)rrrrz
end-structure)�_add_members_to_shape�membersrrrrrr)rrrrr	r
rrr"�paramrrr
r
r�document_shape_type_structureOs


z2BaseParamsDocumenter.document_shape_type_structurecKsdS)Nr
)rrrrr
r
rrasz.BaseParamsDocumenter._add_member_documentationcCs(|r$|j�}x|D]}|||j<qW|S)N)�copyr)rr"r	r#r
r
rr!ds

z*BaseParamsDocumenter._add_members_to_shapecCsD|j|�}t|j�}d}|dk	r0|j||�n|jj||�dS)Nz(%s) -- )�_get_special_py_type_namer�	type_name�writerZitalics)r�type_sectionrZspecial_py_type�py_typeZtype_formatr
r
r�"_document_non_top_level_param_typeks

z7BaseParamsDocumenter._document_non_top_level_param_typecCs|jj�|jj�dS)N)rr�new_line)rrr
r
rrws
z(BaseParamsDocumenter._start_nested_paramcCs|jj�|jj�dS)N)r�dedentr,)rrr
r
rr{s
z&BaseParamsDocumenter._end_nested_param)NN)NN)NN)NN)NNN)�__name__�
__module__�__qualname__rrrrr r$rr!r+rrr
r
r
rrs




rc@s&eZdZdZdZddd�Zdd�ZdS)	�ResponseParamsDocumenterz5Generates the description for the response parameterszresponse-paramsNcKsv|jd�}|jd�|dk	r,|jjd|�|jd�}|j||�|jd�}|jrh|jj�|j|j�|jj�dS)Nz
param-namez- z%s z
param-typezparam-documentation)	rr(r�boldr+�
documentationr�include_doc_string�
new_paragraph)rrrrr�name_sectionr)�documentation_sectionr
r
rr�s




z2ResponseParamsDocumenter._add_member_documentationcKs|j|||f|�dS)N)r$)rrrrrr
r
r� document_shape_type_event_stream�sz9ResponseParamsDocumenter.document_shape_type_event_stream)N)r.r/r0�__doc__�
EVENT_NAMErr8r
r
r
rr1�s
r1c@s8eZdZdZdZd
dd�Zddd�Zd	d
�Zdd�ZdS)�RequestParamsDocumenterz4Generates the description for the request parameterszrequest-paramsNc
Ks�t|�dkr&|j||f|�|jj�|j|j|�}xft|�D]Z\}}	|rT|	|krTq>||	}
|j|	d|
jid�}|jj	�|	|j
k}|j||
||	|d�q>W|jd�}t|�dkr�|jj�|jj	�dS)N�r)r)rrrr�is_requiredz
end-structure)
�lenrrrr!r"�	enumeraterrr,Zrequired_membersrr-)
rrrrr	r
rr"�ir#rrr=r
r
rr$�s&




z5RequestParamsDocumenter.document_shape_type_structureFcKs|j|�}|dkrt|j�}|rj|jd�}|jd||f�|jd�}	|	jj�|jd�}
|
jd|�nB|jd�}
|
jd�|dk	r�|
jjd|�|jd�}|j||�|r�|jd�}|jj	�|jjd	�|j
�r|jd
�}|jj	�|j|j
�|j||�|jd�}
|
jj
�dS)Nz
param-typez:type %s: %szend-param-typez
param-namez:param %s: z- z%s zis-requiredz[REQUIRED] zparam-documentationz	end-param)r&rr'rr(rr,r2r+rr3r4� _add_special_trait_documentationr5)rrrrZis_top_level_paramr=rr*r)Zend_type_sectionr6Zis_required_sectionr7Zend_param_sectionr
r
rr�s8












z1RequestParamsDocumenter._add_member_documentationcCsd|jkr|j|�dS)NZidempotencyToken)Zmetadata�!_append_idempotency_documentation)rrrr
r
rrA�s
z8RequestParamsDocumenter._add_special_trait_documentationcCsd}|j|�dS)Nz,This field is autopopulated if not provided.)r()rrZ	docstringr
r
rrB�sz9RequestParamsDocumenter._append_idempotency_documentation)NN)NFF)	r.r/r0r9r:r$rrArBr
r
r
rr;�s

"r;N)Zbotocore.docs.shaperZbotocore.docs.utilsrrr1r;r
r
r
r�<module>
so