@implementation StorageObject
-@synthesize name, fullPath, hash, bytes, contentType, lastModified, data, metadata;
+@synthesize name, fullPath, hash, bytes, contentType, lastModified, data, publicURI, sharing, metadata;
#pragma mark -
#pragma mark Serialization
object.bytes = [[dict objectForKey:@"bytes"] intValue];
object.contentType = [dict objectForKey:@"content_type"];
object.lastModified = [ComputeModel dateFromString:[dict objectForKey:@"last_modified"]];
-
+ object.publicURI = [dict objectForKey:@"x_object_public"];
+ object.sharing = [dict objectForKey:@"x_object_sharing"];
+
+ object.metadata = [NSMutableDictionary dictionary];
+ for (NSString *key in dict) {
+ if ([key hasPrefix:@"x_object_meta_"]) {
+ NSString *metadataKey = [key substringFromIndex:14];
+ [object.metadata setObject:[dict objectForKey:key] forKey:metadataKey];
+ }
+ }
+
return object;
}