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\ContainerConfig();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (property_exists($data, 'Id')) {
         $object->setId($data->{'Id'});
     }
     if (property_exists($data, 'Names')) {
         $value = $data->{'Names'};
         if (is_array($data->{'Names'})) {
             $values = [];
             foreach ($data->{'Names'} as $value_1) {
                 $values[] = $value_1;
             }
             $value = $values;
         }
         if (is_null($data->{'Names'})) {
             $value = $data->{'Names'};
         }
         $object->setNames($value);
     }
     if (property_exists($data, 'Image')) {
         $object->setImage($data->{'Image'});
     }
     if (property_exists($data, 'ImageID')) {
         $object->setImageID($data->{'ImageID'});
     }
     if (property_exists($data, 'Command')) {
         $object->setCommand($data->{'Command'});
     }
     if (property_exists($data, 'Created')) {
         $object->setCreated($data->{'Created'});
     }
     if (property_exists($data, 'Status')) {
         $object->setStatus($data->{'Status'});
     }
     if (property_exists($data, 'Ports')) {
         $value_2 = $data->{'Ports'};
         if (is_array($data->{'Ports'})) {
             $values_1 = [];
             foreach ($data->{'Ports'} as $value_3) {
                 $values_1[] = $this->serializer->deserialize($value_3, 'Docker\\API\\Model\\Port', 'raw', $context);
             }
             $value_2 = $values_1;
         }
         if (is_null($data->{'Ports'})) {
             $value_2 = $data->{'Ports'};
         }
         $object->setPorts($value_2);
     }
     if (property_exists($data, 'Labels')) {
         $value_4 = $data->{'Labels'};
         if (is_object($data->{'Labels'})) {
             $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
             foreach ($data->{'Labels'} as $key => $value_5) {
                 $values_2[$key] = $value_5;
             }
             $value_4 = $values_2;
         }
         if (is_null($data->{'Labels'})) {
             $value_4 = $data->{'Labels'};
         }
         $object->setLabels($value_4);
     }
     if (property_exists($data, 'SizeRw')) {
         $object->setSizeRw($data->{'SizeRw'});
     }
     if (property_exists($data, 'SizeRootFs')) {
         $object->setSizeRootFs($data->{'SizeRootFs'});
     }
     if (property_exists($data, 'Hostname')) {
         $object->setHostname($data->{'Hostname'});
     }
     if (property_exists($data, 'Domainname')) {
         $object->setDomainname($data->{'Domainname'});
     }
     if (property_exists($data, 'User')) {
         $object->setUser($data->{'User'});
     }
     if (property_exists($data, 'AttachStdin')) {
         $object->setAttachStdin($data->{'AttachStdin'});
     }
     if (property_exists($data, 'AttachStdout')) {
         $object->setAttachStdout($data->{'AttachStdout'});
     }
     if (property_exists($data, 'AttachStderr')) {
         $object->setAttachStderr($data->{'AttachStderr'});
     }
     if (property_exists($data, 'Tty')) {
         $object->setTty($data->{'Tty'});
     }
     if (property_exists($data, 'OpenStdin')) {
         $object->setOpenStdin($data->{'OpenStdin'});
     }
     if (property_exists($data, 'StdinOnce')) {
         $object->setStdinOnce($data->{'StdinOnce'});
     }
     if (property_exists($data, 'Env')) {
         $value_6 = $data->{'Env'};
         if (is_array($data->{'Env'})) {
             $values_3 = [];
             foreach ($data->{'Env'} as $value_7) {
                 $values_3[] = $value_7;
             }
             $value_6 = $values_3;
         }
         if (is_null($data->{'Env'})) {
             $value_6 = $data->{'Env'};
         }
         $object->setEnv($value_6);
     }
     if (property_exists($data, 'Cmd')) {
         $value_8 = $data->{'Cmd'};
         if (is_array($data->{'Cmd'})) {
             $values_4 = [];
             foreach ($data->{'Cmd'} as $value_9) {
                 $values_4[] = $value_9;
             }
             $value_8 = $values_4;
         }
         if (is_string($data->{'Cmd'})) {
             $value_8 = $data->{'Cmd'};
         }
         $object->setCmd($value_8);
     }
     if (property_exists($data, 'Entrypoint')) {
         $value_10 = $data->{'Entrypoint'};
         if (is_array($data->{'Entrypoint'})) {
             $values_5 = [];
             foreach ($data->{'Entrypoint'} as $value_11) {
                 $values_5[] = $value_11;
             }
             $value_10 = $values_5;
         }
         if (is_string($data->{'Entrypoint'})) {
             $value_10 = $data->{'Entrypoint'};
         }
         $object->setEntrypoint($value_10);
     }
     if (property_exists($data, 'Mounts')) {
         $value_12 = $data->{'Mounts'};
         if (is_array($data->{'Mounts'})) {
             $values_6 = [];
             foreach ($data->{'Mounts'} as $value_13) {
                 $values_6[] = $this->serializer->deserialize($value_13, 'Docker\\API\\Model\\Mount', 'raw', $context);
             }
             $value_12 = $values_6;
         }
         if (is_null($data->{'Mounts'})) {
             $value_12 = $data->{'Mounts'};
         }
         $object->setMounts($value_12);
     }
     if (property_exists($data, 'WorkingDir')) {
         $object->setWorkingDir($data->{'WorkingDir'});
     }
     if (property_exists($data, 'NetworkDisabled')) {
         $object->setNetworkDisabled($data->{'NetworkDisabled'});
     }
     if (property_exists($data, 'MacAddress')) {
         $object->setMacAddress($data->{'MacAddress'});
     }
     if (property_exists($data, 'ExposedPorts')) {
         $value_14 = $data->{'ExposedPorts'};
         if (is_object($data->{'ExposedPorts'})) {
             $values_7 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
             foreach ($data->{'ExposedPorts'} as $key_1 => $value_15) {
                 $values_7[$key_1] = $value_15;
             }
             $value_14 = $values_7;
         }
         if (is_null($data->{'ExposedPorts'})) {
             $value_14 = $data->{'ExposedPorts'};
         }
         $object->setExposedPorts($value_14);
     }
     if (property_exists($data, 'NetworkSettings')) {
         $object->setNetworkSettings($this->serializer->deserialize($data->{'NetworkSettings'}, 'Docker\\API\\Model\\NetworkConfig', 'raw', $context));
     }
     if (property_exists($data, 'HostConfig')) {
         $object->setHostConfig($this->serializer->deserialize($data->{'HostConfig'}, 'Docker\\API\\Model\\HostConfig', 'raw', $context));
     }
     return $object;
 }