public function denormalize($data, $class, $format = null, array $context = [])
 {
     if (empty($data)) {
         return null;
     }
     if (isset($data->{'$ref'})) {
         return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null);
     }
     $object = new \Docker\API\Model\ResourceUpdate();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (property_exists($data, 'BlkioWeight')) {
         $object->setBlkioWeight($data->{'BlkioWeight'});
     }
     if (property_exists($data, 'CpuShares')) {
         $object->setCpuShares($data->{'CpuShares'});
     }
     if (property_exists($data, 'CpuPeriod')) {
         $object->setCpuPeriod($data->{'CpuPeriod'});
     }
     if (property_exists($data, 'CpuQuota')) {
         $object->setCpuQuota($data->{'CpuQuota'});
     }
     if (property_exists($data, 'CpusetCpus')) {
         $object->setCpusetCpus($data->{'CpusetCpus'});
     }
     if (property_exists($data, 'CpusetMems')) {
         $object->setCpusetMems($data->{'CpusetMems'});
     }
     if (property_exists($data, 'Memory')) {
         $object->setMemory($data->{'Memory'});
     }
     if (property_exists($data, 'MemorySwap')) {
         $object->setMemorySwap($data->{'MemorySwap'});
     }
     if (property_exists($data, 'MemoryReservation')) {
         $object->setMemoryReservation($data->{'MemoryReservation'});
     }
     if (property_exists($data, 'KernelMemory')) {
         $object->setKernelMemory($data->{'KernelMemory'});
     }
     return $object;
 }