setParsedRecords($data['parsed_records']); } elseif (\array_key_exists('parsed_records', $data) && $data['parsed_records'] === null) { $object->setParsedRecords(null); } if (\array_key_exists('valid_records', $data) && $data['valid_records'] !== null) { $values = array(); foreach ($data['valid_records'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'DigiComp\\HetznerDnsApi\\Model\\RecordResponse', 'json', $context); } $object->setValidRecords($values); } elseif (\array_key_exists('valid_records', $data) && $data['valid_records'] === null) { $object->setValidRecords(null); } return $object; } /** * @return array|string|int|float|bool|\ArrayObject|null */ public function normalize($object, $format = null, array $context = array()) { $data = array(); if (null !== $object->getParsedRecords()) { $data['parsed_records'] = $object->getParsedRecords(); } if (null !== $object->getValidRecords()) { $values = array(); foreach ($object->getValidRecords() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } $data['valid_records'] = $values; } return $data; } }