ó T!¶\c@sÐddlZddlmZddlmZmZddlmZddlmZddl m Z d„Z d„Z d e fd „ƒYZd e fd „ƒYZd e fd„ƒYZde fd„ƒYZdS(iÿÿÿÿN(tcollections_abc(tTypeSerializertTypeDeserializer(t ConditionBase(tConditionExpressionBuilder(tDocumentModifiedShapecKs|jdtƒdS(Ni(tinserttDynamoDBHighLevelResource(t base_classestkwargs((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pytregister_high_level_interfacescKs tj|ƒS(N(tcopytdeepcopy(tparamsR ((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pytcopy_dynamodb_paramssRcBseZd„ZRS(cOsŒtt|ƒj||Ž|jjjjjdtddƒtƒ|_ |jjjjjd|j j ddƒ|jjjjjd|j j ddƒ|jjjjjd|j j ddƒt d d d d d ddƒ}t dd dd dddƒ}t dd dd dddƒ}|jjjjjd|jddƒ|jjjjjd|jddƒ|jjjjjd|jddƒdS(Nsprovide-client-params.dynamodbt unique_idsdynamodb-create-params-copysbefore-parameter-build.dynamodbsdynamodb-condition-expressionsdynamodb-attr-value-inputsafter-call.dynamodbsdynamodb-attr-value-outputtAttributeValuetnew_typesvalid DynamoDB typetnew_descriptions€- The value of the attribute. The valid value types are listed in the :ref:`DynamoDB Reference Guide`.tnew_example_values`'string'|123|Binary(b'bytes')|True|None|set(['string'])|set([123])|set([Binary(b'bytes')])|[]|{}t KeyExpressions?condition from :py:class:`boto3.dynamodb.conditions.Key` methodsThe condition(s) a key(s) must meet. Valid conditions are listed in the :ref:`DynamoDB Reference Guide`.sKey('mykey').eq('myvalue')tConditionExpressions@condition from :py:class:`boto3.dynamodb.conditions.Attr` methodsˆThe condition(s) an attribute(s) must meet. Valid conditions are listed in the :ref:`DynamoDB Reference Guide`.s!Attr('myattribute').eq('myvalue')s"docs.*.dynamodb.*.complete-sectionsdynamodb-attr-value-docssdynamodb-key-expression-docssdynamodb-cond-expression-docs(tsuperRt__init__tmetatclientteventstregisterRtTransformationInjectort _injectortinject_condition_expressionstinject_attribute_value_inputtinject_attribute_value_outputRt(replace_documentation_for_matching_shape(tselftargsR tattr_value_shape_docstkey_expression_shape_docstcon_expression_shape_docs((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyRsZ          (t__name__t __module__R(((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyRsRcBs>eZdZddddd„Zd„Zd„Zd„ZRS(s>Injects the transformations into the user provided parameters.cCs”||_|dkr$tƒ|_n||_|dkrHtƒ|_n||_|dkrltƒ|_n||_|dkrtƒ|_ndS(N( t _transformertNonetParameterTransformert_condition_builderRt _serializerRt _deserializerR(R"t transformertcondition_buildert serializert deserializer((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyR}s        c Ks |jjƒi}i}t|jd|d|dtƒ}|jj||j|dƒt|jd|d|dtƒ}|jj||j|dƒd}d}||kr¿||j|ƒn|rÒ|||tattribute_name_placeholdersRKtattribute_value_placeholderstcondition_expression(R"tvaluetbuilt_expression((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyt__call__Ýs     (R'R(RIR:RRT(((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyR9Ðs R+cBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s?Transforms the input to and output from botocore based on shapecCs|j||||ƒdS(säTransforms the dynamodb input to or output from botocore It applies a specified transformation whenever a specific shape name is encountered while traversing the parameters in the dictionary. :param params: The parameters structure to transform. :param model: The operation model. :param transformation: The function to apply the parameter :param target_shape: The name of the shape to apply the transformation to N(t_transform_parameters(R"R R?RBt target_shape((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyR;ñs cCs<|j}|dkr8t|d|ƒ||||ƒndS(Nt structuretmaptlists _transform_%s(RWsmapslist(t type_nametgetattr(R"R?R RBRVRZ((s9/tmp/pip-install-usGedi/boto3/boto3/dynamodb/transform.pyRUs  cCst|tjƒsdSxs|D]k}||jkr|j|}|j}||krk|||ƒ|| s   ]U