o ckF[Šã@sGdd„deƒZdS)c@sreZdZdZdd„Zdd„Zeddd„ƒZed d „ƒZ ed d „ƒZ ed d„ƒZ edd„ƒZ edd„ƒZ dd„ZdS)ÚSchemaa" Represents a DynamoDB schema. :ivar hash_key_name: The name of the hash key of the schema. :ivar hash_key_type: The DynamoDB type specification for the hash key of the schema. :ivar range_key_name: The name of the range key of the schema or None if no range key is defined. :ivar range_key_type: The DynamoDB type specification for the range key of the schema or None if no range key is defined. :ivar dict: The underlying Python dictionary that needs to be passed to Layer1 methods. cCs ||_dS©N©Ú_dict)ÚselfÚ schema_dict©rú6/usr/lib/python3/dist-packages/boto/dynamodb/schema.pyÚ__init__(s zSchema.__init__cCs(|jr d|j|jf}|Sd|j}|S)Nz Schema(%s:%s)z Schema(%s))Úrange_key_nameÚ hash_key_name)rÚsrrrÚ__repr__+s  ÿzSchema.__repr__NcCsFd|d|ddœi}|dur|d|ddœ|d<|dƒ}||_|S)aÉConvenience method to create a schema object. Example usage:: schema = Schema.create(hash_key=('foo', 'N')) schema2 = Schema.create(hash_key=('foo', 'N'), range_key=('bar', 'S')) :type hash_key: tuple :param hash_key: A tuple of (hash_key_name, hash_key_type) :type range_key: tuple :param hash_key: A tuple of (range_key_name, range_key_type) ÚHashKeyElementéé)Ú AttributeNameÚ AttributeTypeNÚRangeKeyElementr)ÚclsÚhash_keyÚ range_keyÚ reconstructedÚinstancerrrÚcreate2sþÿ þz Schema.createcCs|jSrr©rrrrÚdictRsz Schema.dictcCó|jddS)Nrrrrrrrr VózSchema.hash_key_namecCr)NrrrrrrrÚ hash_key_typeZrzSchema.hash_key_typecCó d}d|jvr|jdd}|S)Nrrr)rÚnamerrrr ^ó zSchema.range_key_namecCr)Nrrr)rÚtyperrrÚrange_key_typeer!zSchema.range_key_typecCs0|j|jko|j|jko|j|jko|j|jkSr)r rr r#)rÚotherrrrÚ__eq__ls  ÿ þ ýz Schema.__eq__r)Ú__name__Ú __module__Ú __qualname__Ú__doc__r r Ú classmethodrÚpropertyrr rr r#r%rrrrrs"       rN)ÚobjectrrrrrÚs