Beispiel #1
0
 def deserialize(serialized_data):
     vault = Vault(serialized_data['project_id'],
                   serialized_data['vault_id'])
     vault.__properties['blocks'] = Blocks.deserialize(
         serialized_data['blocks'])
     vault.__properties['storageblocks'] = StorageBlocks.deserialize(
         serialized_data['storage_blocks'])
     vault.__properties['files'] = Files.deserialize(
         serialized_data['files'])
     return vault
Beispiel #2
0
 def deserialize(serialized_data):
     new_file = File(serialized_data['project_id'],
                     serialized_data['vault_id'],
                     file_id=serialized_data['file_id'],
                     url=serialized_data['url'])
     new_file.__properties['maximum_offset'] =\
         serialized_data['maximum_offset']
     new_file.__properties['offsets'] = serialized_data['offsets']
     new_file.__properties['blocks'] = Blocks.deserialize(
         serialized_data['blocks'])
     return new_file