public static function fromJson($json)
 {
     // Currently, we only support json object
     if (is_object($json)) {
         $summary = new FDSObjectSummary();
         if (isset($json->name)) {
             $summary->setObjectName($json->name);
         }
         if (isset($json->owner)) {
             $summary->setOwner(Owner::fromJson($json->owner));
         }
         if (isset($json->size)) {
             $summary->setSize($json->size);
         }
         return $summary;
     }
     return NULL;
 }
 public static function fromJson($json)
 {
     // Currently, we only support json object
     if (is_object($json)) {
         $object = new FDSObject();
         if (isset($json->objectSummary)) {
             $object->setObjectSummary(FDSObjectSummary::fromJson($json->objectSummary));
         }
         if (isset($json->objectMetadata)) {
             $object->setObjectMetadata(FDSObjectMetadata::fromJson($json->objectMetadata));
         }
         if (isset($json->objectContent)) {
             $object->setObjectContent($json->objectContent);
         }
         return $object;
     }
     return NULL;
 }
 public static function fromJson($json)
 {
     // Currently, we only support json object
     if (is_object($json)) {
         $listing = new FDSObjectListing();
         if (isset($json->name)) {
             $listing->setBucketName($json->name);
         }
         if (isset($json->prefix)) {
             $listing->setPrefix($json->prefix);
         }
         if (isset($json->delimiter)) {
             $listing->setDelimiter($json->delimiter);
         }
         if (isset($json->marker)) {
             $listing->setMarker($json->marker);
         }
         if (isset($json->nextMarker)) {
             $listing->setNextMarker($json->nextMarker);
         }
         if (isset($json->maxKeys)) {
             $listing->setMaxKeys($json->maxKeys);
         }
         if (isset($json->truncated)) {
             $listing->setTruncated($json->truncated);
         }
         if (isset($json->objects)) {
             $summaries = array();
             foreach ($json->objects as $key => $object) {
                 $summary = FDSObjectSummary::fromJson($object);
                 $summary->setBucketName($listing->getBucketName());
                 $summaries[$key] = $summary;
             }
             $listing->setObjectSummaries($summaries);
         }
         if (isset($json->commonPrefixes)) {
             $listing->setCommonPrefixes($json->commonPrefixes);
         }
         return $listing;
     }
     return NULL;
 }