Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/boto3/dynamodb/__pycache__/transform.cpython-39.pyc
Ðазад
a v�hT0 � @ s� d dl Z d dlmZ d dlmZmZ d dlmZ d dlmZ d dl m Z dd� Zd d � ZG dd� de �ZG d d� de �ZG dd� de �ZG dd� de �ZdS )� N)�collections_abc)�TypeSerializer�TypeDeserializer)� ConditionBase)�ConditionExpressionBuilder)�DocumentModifiedShapec K s | � dt� d S )Nr )�insert�DynamoDBHighLevelResource)Zbase_classes�kwargs� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/boto3/dynamodb/transform.py�register_high_level_interface s r c K s t �| �S �N)�copy�deepcopy)�paramsr r r r �copy_dynamodb_params s r c s e Zd Z� fdd�Z� ZS )r c s t t| �j|i |�� | jjjjjdtdd� t� | _ | jjjjjd| j j dd� | jjjjjd| j jdd� | jjjjjd| j jdd� t d d ddd �}t ddddd �}t ddddd �}| jjjjjd|jdd� | jjjjjd|jdd� | jjjjjd|jdd� d S )Nzprovide-client-params.dynamodbzdynamodb-create-params-copy)� unique_idzbefore-parameter-build.dynamodbzdynamodb-condition-expressionzdynamodb-attr-value-inputzafter-call.dynamodbzdynamodb-attr-value-output�AttributeValuezvalid DynamoDB typez�- The value of the attribute. The valid value types are listed in the :ref:`DynamoDB Reference Guide<ref_valid_dynamodb_types>`.z`'string'|123|Binary(b'bytes')|True|None|set(['string'])|set([123])|set([Binary(b'bytes')])|[]|{})�new_typeZnew_descriptionZnew_example_value� KeyExpressionz?condition from :py:class:`boto3.dynamodb.conditions.Key` methodz�The condition(s) a key(s) must meet. Valid conditions are listed in the :ref:`DynamoDB Reference Guide<ref_dynamodb_conditions>`.zKey('mykey').eq('myvalue')�ConditionExpressionz@condition from :py:class:`boto3.dynamodb.conditions.Attr` methodz�The condition(s) an attribute(s) must meet. Valid conditions are listed in the :ref:`DynamoDB Reference Guide<ref_dynamodb_conditions>`.z!Attr('myattribute').eq('myvalue')z"docs.*.dynamodb.*.complete-sectionzdynamodb-attr-value-docszdynamodb-key-expression-docszdynamodb-cond-expression-docs)�superr �__init__�meta�client�events�registerr �TransformationInjectorZ _injector�inject_condition_expressions�inject_attribute_value_input�inject_attribute_value_outputr Z(replace_documentation_for_matching_shape)�self�argsr Zattr_value_shape_docsZkey_expression_shape_docsZcon_expression_shape_docs�� __class__r r r sn ����� �����z"DynamoDBHighLevelResource.__init__)�__name__� __module__�__qualname__r � __classcell__r r r$ r r s r c @ s2 e Zd ZdZddd�Zdd� Zdd� Zd d � ZdS )r z>Injects the transformations into the user provided parameters.Nc C s\ || _ |d u rt� | _ || _|d u r,t� | _|| _|d u rBt� | _|| _|d u rXt� | _d S r )�_transformer�ParameterTransformer�_condition_builderr �_serializerr � _deserializerr )r"