HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/botocore/docs/__pycache__/utils.cpython-37.pyc
B

�P�e|�@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�D/opt/alt/python37/lib/python3.7/site-packages/botocore/docs/utils.py�py_type_namesrcCs"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...)r)rrrr�
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__rr)r(rr ]sc@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!r/rrr�__init__{szAutoPopulatedParam.__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-requiredzparam-documentationzdocs.request-examplezstructure-valueN)rr!�available_sections�get_section�delete_section�writelnr/)r0�
event_name�section�kwargs�description_sectionrrr�document_auto_populated_param�s




z0AutoPopulatedParam.document_auto_populated_param)N)r)r*r+r1r:rrrrr.zs

r.c@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).cCsX||_t�|_t�|_d}d}x4|D],}|j�|||f�|j�|||f�q$WdS)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)r0�service_name�parameter_nameZoperation_namesZparam_templateZexample_templater!rrrr1�s
z HideParamFromOperations.__init__cKs@||jkr|�d�}n||jkr$dS|j|jkr<|�|j�dS)Nzstructure-value)r?r3r>r<r2r4)r0r6r7r8rrr�
hide_param�s

z"HideParamFromOperations.hide_paramN)r)r*r+r,r1rCrrrrr;�sr;c@s eZdZdZdd�Zdd�ZdS)�AppendParamDocumentationz-Appends documentation to a specific parametercCs||_||_dS)N)r<�_doc_string)r0rBZ
doc_stringrrrr1�sz!AppendParamDocumentation.__init__cKs2|j|jkr.|�|j�}|�d�}|�|j�dS)Nzparam-documentation)r<r2r3r5rE)r0r6r7r8r9rrr�append_documentation�s
z-AppendParamDocumentation.append_documentationN)r)r*r+r,r1rFrrrrrD�srDz\nz\rz\tz\bz\f)�
�
�	���|cCst|�d�S)Nr)�	_CONTROLS�group)�matchrrr�<lambda>��rPcCst�t|�S)N)�_ESCAPE_CONTROLS_RE�sub�_CONTROLS_MATCH_HANDLER)�valuerrr�escape_controls�srV)�re�collectionsrrrrZ_DocumentedShaper r.r;rDrM�compile�joinr
�escaperRrTrVrrrr�<module>
s0!'