Current File : //usr/lib/python3/dist-packages/boto3/resources/__pycache__/model.cpython-312.pyc |
�
��e�O � � � d Z ddlZddlmZ ej e� Z G d� d� Z G d� d� Z G d� d � Z G d
� d� Z
G d� d
e � Z G d� de � Z G d� d� Z
G d� de� Z G d� d� Zy)a�
The models defined in this file represent the resource JSON description
format and provide a layer of abstraction from the raw JSON. The advantages
of this are:
* Pythonic interface (e.g. ``action.request.operation``)
* Consumers need not change for minor JSON changes (e.g. renamed field)
These models are used both by the resource factory to generate resource
classes as well as by the documentation generator.
� N)�
xform_namec � � e Zd ZdZdd�Zy)�
Identifierzw
A resource identifier, given by its name.
:type name: string
:param name: The name of the identifier
Nc � � || _ || _ y �N)�name�member_name)�selfr r s �7/usr/lib/python3/dist-packages/boto3/resources/model.py�__init__zIdentifier.__init__) s � ��� �&��� r ��__name__�
__module__�__qualname__�__doc__r � r
r r r ! s � ��'r
r c � � e Zd ZdZd� Zy)�Actiona
A service operation action.
:type name: string
:param name: The name of the action
:type definition: dict
:param definition: The JSON definition
:type resource_defs: dict
:param resource_defs: All resources defined in the service
c � � || _ || _ d | _ d|v r t |j di � � | _ d | _ d|v r!t
|j di � |� | _ |j d� | _ y )N�request�resource�path)�_definitionr r �Request�getr �ResponseResourcer �r
r �
definition�
resource_defss r r zAction.__init__; sv � �%��� �� �����
�"�"�:�>�>�)�R�#@�A�D�L���
���#�,����z�2�.�
��D�M� �N�N�6�*�� r
Nr r r
r r r / s � � �+r
r c �&