HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/__pycache__/cliinputjson.cpython-310.pyc
o

.&�a+�@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)�cli�r	�D/usr/lib/python3/dist-packages/awscli/customizations/cliinputjson.py�register_cli_input_jsonsrcKs"d|vrt|�}|�|�dSdS)N�outfile)�CliInputJSONArgument�add_to_arg_table)�session�argument_table�kwargs�cli_input_json_argumentr	r	r
rs�rcsFeZdZdZddd�Z�fdd�Z�fdd�Zd	d
�Zdd�Z�Z	S)
r
a#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.)�name�	help_textcstt|��|�dS�N)�superr
�__init__)�selfr��	__class__r	r
r2szCliInputJSONArgument.__init__cs"|j�d|j�tt|���dS)Nzcalling-command.*)�_sessionr�add_to_call_parametersrr
�_register_argument_action)rrr	r
r5s�z.CliInputJSONArgument._register_argument_actionc	
Kszt|dd�}|dur;t|t�}|dur|}zt�|�}Wnty2}z
t|jd||f��d}~ww|�||�dSdS)N�cli_input_jsonz"Invalid JSON: %s
JSON received: %s)	�getattrrr�json�loads�
ValueErrorrr�_update_call_parameters)	r�call_parameters�parsed_args�parsed_globalsr�
input_json�retrieved_json�
input_data�er	r	r
r:s"
�����z+CliInputJSONArgument.add_to_call_parameterscCs&|��D]}||vr||||<qdSr)�keys)rr$r)�	input_keyr	r	r
r#Ps
��z,CliInputJSONArgument._update_call_parameters)
�__name__�
__module__�__qualname__�__doc__�ARG_DATArrrr#�
__classcell__r	r	rr
r
 s�r
)r �awscli.paramfilerr�awscli.argprocessr�awscli.customizations.argumentsrrrr
r	r	r	r
�<module>s