HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/__pycache__/cliinputjson.cpython-38.pyc
U

<�^+�@sTddlZddlmZmZddlmZddlmZdd�Zdd�Z	Gd	d
�d
e�Z
dS)�N)�
get_paramfile�LOCAL_PREFIX_MAP)�
ParamError)�OverrideRequiredArgsArgumentcCs|�dt�dS)Nzbuilding-argument-table)�register�add_cli_input_json)Zcli�r�D/usr/lib/python3/dist-packages/awscli/customizations/cliinputjson.py�register_cli_input_jsonsr
cKsd|krt|�}|�|�dS)NZoutfile)�CliInputJSONArgumentZadd_to_arg_table)�sessionZargument_table�kwargsZcli_input_json_argumentrrr	rsrcsFeZdZdZddd�Z�fdd�Z�fdd�Zd	d
�Zdd�Z�Z	S)
ra#This argument inputs a JSON string as the entire input for a command.

    Ideally, the value to this argument should be a filled out JSON file
    generated by ``--generate-cli-skeleton``. The items in the JSON string
    will not clobber other arguments entered into the command line.
    zcli-input-jsonakPerforms service operation based on the JSON string provided. The JSON string follows the format provided by ``--generate-cli-skeleton``. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.)�nameZ	help_textcstt|��|�dS�N)�superr�__init__)�selfr��	__class__rr	r2szCliInputJSONArgument.__init__cs"|j�d|j�tt|���dS)Nzcalling-command.*)Z_sessionr�add_to_call_parametersrr�_register_argument_action)rrrr	r5s
�z.CliInputJSONArgument._register_argument_actionc	
Ks�t|dd�}|dk	r|t|t�}|dkr*|}zt�|�}Wn6tk
rn}zt|jd||f��W5d}~XYnX|�||�dS)NZcli_input_jsonz"Invalid JSON: %s
JSON received: %s)	�getattrrr�json�loads�
ValueErrorrr�_update_call_parameters)	r�call_parametersZparsed_argsZparsed_globalsr
Z
input_jsonZretrieved_json�
input_data�errr	r:s
��z+CliInputJSONArgument.add_to_call_parameterscCs&|��D]}||kr||||<qdSr)�keys)rrrZ	input_keyrrr	rPsz,CliInputJSONArgument._update_call_parameters)
�__name__�
__module__�__qualname__�__doc__ZARG_DATArrrr�
__classcell__rrrr	r s�r)rZawscli.paramfilerrZawscli.argprocessrZawscli.customizations.argumentsrr
rrrrrr	�<module>
s