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 \Joli\Jane\OpenApi\Model\Response();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (isset($data->{'description'})) {
         $object->setDescription($data->{'description'});
     }
     if (isset($data->{'schema'})) {
         $value_111 = $data->{'schema'};
         if (is_object($data->{'schema'})) {
             $value_111 = $this->serializer->deserialize($data->{'schema'}, 'Joli\\Jane\\OpenApi\\Model\\Schema', 'raw', $context);
         }
         if (is_object($data->{'schema'}) and (isset($data->{'schema'}->{'type'}) and $data->{'schema'}->{'type'} == 'file')) {
             $value_111 = $this->serializer->deserialize($data->{'schema'}, 'Joli\\Jane\\OpenApi\\Model\\FileSchema', 'raw', $context);
         }
         $object->setSchema($value_111);
     }
     if (isset($data->{'headers'})) {
         $values_112 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'headers'} as $key_114 => $value_113) {
             $values_112[$key_114] = $this->serializer->deserialize($value_113, 'Joli\\Jane\\OpenApi\\Model\\Header', 'raw', $context);
         }
         $object->setHeaders($values_112);
     }
     if (isset($data->{'examples'})) {
         $values_115 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'examples'} as $key_117 => $value_116) {
             $values_115[$key_117] = $value_116;
         }
         $object->setExamples($values_115);
     }
     return $object;
 }
 public function denormalize($data, $class, $format = null, array $context = [])
 {
     if (isset($data->{'$ref'})) {
         return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null);
     }
     $object = new \Joli\Jane\OpenApi\Model\Response();
     if (!isset($context['rootSchema'])) {
         $context['rootSchema'] = $object;
     }
     if (property_exists($data, 'description')) {
         $object->setDescription($data->{'description'});
     }
     if (property_exists($data, 'schema')) {
         $value = $data->{'schema'};
         if (is_object($data->{'schema'})) {
             $value = $this->serializer->deserialize($data->{'schema'}, 'Joli\\Jane\\OpenApi\\Model\\Schema', 'raw', $context);
         }
         if (is_object($data->{'schema'}) and (isset($data->{'schema'}->{'type'}) and $data->{'schema'}->{'type'} == 'file')) {
             $value = $this->serializer->deserialize($data->{'schema'}, 'Joli\\Jane\\OpenApi\\Model\\FileSchema', 'raw', $context);
         }
         $object->setSchema($value);
     }
     if (property_exists($data, 'headers')) {
         $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'headers'} as $key => $value_1) {
             $values[$key] = $this->serializer->deserialize($value_1, 'Joli\\Jane\\OpenApi\\Model\\Header', 'raw', $context);
         }
         $object->setHeaders($values);
     }
     if (property_exists($data, 'examples')) {
         $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
         foreach ($data->{'examples'} as $key_1 => $value_2) {
             $values_1[$key_1] = $value_2;
         }
         $object->setExamples($values_1);
     }
     return $object;
 }