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\RegistryConfig();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (isset($data->{'IndexConfigs'})) {
         $values_169 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'IndexConfigs'} as $key_171 => $value_170) {
             $values_169[$key_171] = $this->serializer->deserialize($value_170, 'Docker\\API\\Model\\Registry', 'raw', $context);
         }
         $object->setIndexConfigs($values_169);
     }
     if (isset($data->{'InsecureRegistryCIDRs'})) {
         $values_172 = [];
         foreach ($data->{'InsecureRegistryCIDRs'} as $value_173) {
             $values_172[] = $value_173;
         }
         $object->setInsecureRegistryCIDRs($values_172);
     }
     return $object;
 }
 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\RegistryConfig();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (property_exists($data, 'IndexConfigs')) {
         $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'IndexConfigs'} as $key => $value) {
             $values[$key] = $this->serializer->deserialize($value, 'Docker\\API\\Model\\Registry', 'raw', $context);
         }
         $object->setIndexConfigs($values);
     }
     if (property_exists($data, 'InsecureRegistryCIDRs')) {
         $value_1 = $data->{'InsecureRegistryCIDRs'};
         if (is_array($data->{'InsecureRegistryCIDRs'})) {
             $values_1 = [];
             foreach ($data->{'InsecureRegistryCIDRs'} as $value_2) {
                 $values_1[] = $value_2;
             }
             $value_1 = $values_1;
         }
         if (is_null($data->{'InsecureRegistryCIDRs'})) {
             $value_1 = $data->{'InsecureRegistryCIDRs'};
         }
         $object->setInsecureRegistryCIDRs($value_1);
     }
     return $object;
 }