HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/botocore/docs/__pycache__/utils.cpython-38.pyc
U

KD�g��@s�ddlZddlmZdd�Zdd�Zdd�Zed	d
ddd
ddg�ZGdd	�d	e�ZGdd�d�ZGdd�d�Z	Gdd�d�Z
dddddd�Ze�d�
eeje���Zdd�Zd d!�ZdS)"�N)�
namedtuplecCsdddddddd��||�S)z�Get the Python type name for a given model type.

        >>> py_type_name('list')
        'list'
        >>> py_type_name('structure')
        'dict'

    :rtype: string
    �bytes�string�float�integer�dict�datetime)�blob�	character�double�long�map�	structure�	timestamp��get��	type_name�r�@/opt/cppython/lib/python3.8/site-packages/botocore/docs/utils.py�py_type_names��rcCs"ddddddddddd	�
�|d
�S)z�Get the Python default value for a given model type.

        >>> py_default('string')
        ''string''
        >>> py_default('list')
        '[...]'
        >>> py_default('unknown')
        '...'

    :rtype: string
    z123.0Z123z'string'zb'bytes'z
True|Falsez[...]z{...}zdatetime(2015, 1, 1))
rrrrr	�boolean�listr
rrz...rrrrr�
py_default&s
��rcCsn|j�d�}|j�dd�}|�d�r0|dd�}|�d�rF|dd�}|rj|��|��krj|d	|�d
�7}|S)zwGenerate the official name of an AWS Service

    :param service_model: The service model representing the service
    ZserviceFullNameZserviceAbbreviation�ZAmazon�NZAWS�z (�))�metadatar�
startswith�lower)Z
service_modelZ
official_nameZ
short_namerrr�get_official_service_name@s

r!�DocumentedShape�namer�
documentationr�members�required_memberscs"eZdZdZd�fdd�	Z�ZS)r"zBUse this class to inject new shapes into a model for documentationNc	s<|dkrg}|dkrg}|dkr$g}t��|||||||�S�N)�super�__new__)�clsr#rr$rr%r&��	__class__rrr)`s	�zDocumentedShape.__new__)NNN)�__name__�
__module__�__qualname__�__doc__r)�
__classcell__rrr+rr"]s
�c@seZdZddd�Zdd�ZdS)�AutoPopulatedParamNcCs||_||_|dkrd|_dS)Nz{Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
)r#�param_description)�selfr#r3rrr�__init__{s
�zAutoPopulatedParam.__init__cKs~|�d�rN|j|jkrz|�|j�}d|jkr6|�d�|�d�}|�|j�n,|�d�rz|�d�}|j|jkrz|�|j�dS)z�Documents auto populated parameters

        It will remove any required marks for the parameter, remove the
        parameter from the example, and add a snippet about the parameter
        being autopopulated in the description.
        zdocs.request-paramszis-required�param-documentationzdocs.request-example�structure-valueN)rr#�available_sections�get_section�delete_section�writelnr3�r4�
event_name�section�kwargsZdescription_sectionrrr�document_auto_populated_param�s


�

z0AutoPopulatedParam.document_auto_populated_param)N)r-r.r/r5r@rrrrr2zs

r2c@s eZdZdZdd�Zdd�ZdS)�HideParamFromOperationsa>Hides a single parameter from multiple operations.

    This method will remove a parameter from documentation and from
    examples. This method is typically used for things that are
    automatically populated because a user would be unable to provide
    a value (e.g., a checksum of a serialized XML request body).cCsT||_t�|_t�|_d}d}|D],}|j�|||f�|j�|||f�q"dS)a(
        :type service_name: str
        :param service_name: Name of the service to modify.

        :type parameter_name: str
        :param parameter_name: Name of the parameter to modify.

        :type operation_names: list
        :param operation_names: Operation names to modify.
        z*docs.request-params.%s.%s.complete-sectionz+docs.request-example.%s.%s.complete-sectionN)�_parameter_name�set�_params_events�_example_events�add)r4�service_name�parameter_nameZoperation_namesZparam_templateZexample_templater#rrrr5�sz HideParamFromOperations.__init__cKs@||jkr|�d�}n||jkr$dS|j|jkr<|�|j�dS)Nr7)rEr9rDrBr8r:)r4r=r>r?rrr�
hide_param�s

z"HideParamFromOperations.hide_paramN)r-r.r/r0r5rIrrrrrA�srAc@s eZdZdZdd�Zdd�ZdS)�AppendParamDocumentationz-Appends documentation to a specific parametercCs||_||_dSr')rB�_doc_string)r4rHZ
doc_stringrrrr5�sz!AppendParamDocumentation.__init__cKs2|j|jkr.|�|j�}|�d�}|�|j�dS)Nr6)rBr8r9r;rKr<rrr�append_documentation�s
z-AppendParamDocumentation.append_documentationN)r-r.r/r0r5rLrrrrrJ�srJz\nz\rz\tz\bz\f)�
�
�	���|cCst|�d�S)Nr)�	_CONTROLS�group)�matchrrr�_CONTROLS_MATCH_HANDLER�srVcCst�t|�Sr')�_ESCAPE_CONTROLS_RE�subrV)�valuerrr�escape_controls�srZ)�re�collectionsrrrr!Z_DocumentedShaper"r2rArJrS�compile�joinr
�escaperWrVrZrrrr�<module>
s6��
!'�