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\Info();
if (!isset($context['rootSchema'])) {
$context['rootSchema'] = $object;
}
if (property_exists($data, 'title')) {
$object->setTitle($data->{'title'});
}
if (property_exists($data, 'version')) {
$object->setVersion($data->{'version'});
}
if (property_exists($data, 'description')) {
$object->setDescription($data->{'description'});
}
if (property_exists($data, 'termsOfService')) {
$object->setTermsOfService($data->{'termsOfService'});
}
if (property_exists($data, 'contact')) {
$object->setContact($this->serializer->deserialize($data->{'contact'}, 'Joli\\Jane\\OpenApi\\Model\\Contact', 'raw', $context));
}
if (property_exists($data, 'license')) {
$object->setLicense($this->serializer->deserialize($data->{'license'}, 'Joli\\Jane\\OpenApi\\Model\\License', 'raw', $context));
}
return $object;
}