File: //lib/python3/dist-packages/awscli/__pycache__/arguments.cpython-310.pyc
o
@&�a�I � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
e�d�ZG d d
� d
e
�Zdd� ZG d
d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )a Abstractions for CLI arguments.
This module contains abstractions for representing CLI arguments.
This includes how the CLI argument parser is created, how arguments
are serialized, and how arguments are bound (if at all) to operation
arguments.
The BaseCLIArgument is the interface for all arguments. This is the interface
expected by objects that work with arguments. If you want to implement your
own argument subclass, make sure it implements everything in BaseCLIArgument.
Arguments generally fall into one of several categories:
* global argument. These arguments may influence what the CLI does,
but aren't part of the input parameters needed to make an API call. For
example, the ``--region`` argument specifies which region to send the request
to. The ``--output`` argument specifies how to display the response to the
user. The ``--query`` argument specifies how to select specific elements
from a response.
* operation argument. These are arguments that influence the parameters we
send to a service when making an API call. Some of these arguments are
automatically created directly from introspecting the JSON service model.
Sometimes customizations may provide a pseudo-argument that takes the
user input and maps the input value to several API parameters.
� N)�
xform_name)�first_non_none_response)�unpack_cli_arg)�SchemaTransformer)�modelzawscli.argumentsc @ s e Zd ZdS )�UnknownArgumentErrorN)�__name__�
__module__�__qualname__� r r �2/usr/lib/python3/dist-packages/awscli/arguments.pyr 4 s r c C s( t � }|�| �}t�|�}|�d�}|S )N�
InputShape)r � transformr �
ShapeResolver�get_shape_by_name)�schema�transformer�
shapes_map�shape_resolver� arg_shaper r r �!create_argument_model_from_schema8 s
r c @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zed
d� �Z edd
� �Z
edd� �Zedd� �Zedd� �Z
edd� �Zedd� �Zedd� �Zedd� �Zedd� �Zedd� �Ze jd d� �Z ed!d"� �Zd#S )$�BaseCLIArgumentzsInterface for CLI argument.
This class represents the interface used for representing CLI
arguments.
c C �
|| _ d S �N��_name)�self�namer r r �__init__M s
zBaseCLIArgument.__init__c C s | || j <