public function normalize($object, $format = null, array $context = [])
{
$data = new \stdClass();
if (null !== $object->getDollarRef()) {
$data->{'$ref'} = $object->getDollarRef();
}
if (null !== $object->getFormat()) {
$data->{'format'} = $object->getFormat();
}
if (null !== $object->getTitle()) {
$data->{'title'} = $object->getTitle();
}
if (null !== $object->getDescription()) {
$data->{'description'} = $object->getDescription();
}
if (null !== $object->getDefault()) {
$data->{'default'} = $object->getDefault();
}
if (null !== $object->getMultipleOf()) {
$data->{'multipleOf'} = $object->getMultipleOf();
}
if (null !== $object->getMaximum()) {
$data->{'maximum'} = $object->getMaximum();
}
if (null !== $object->getExclusiveMaximum()) {
$data->{'exclusiveMaximum'} = $object->getExclusiveMaximum();
}
if (null !== $object->getMinimum()) {
$data->{'minimum'} = $object->getMinimum();
}
if (null !== $object->getExclusiveMinimum()) {
$data->{'exclusiveMinimum'} = $object->getExclusiveMinimum();
}
if (null !== $object->getMaxLength()) {
$data->{'maxLength'} = $object->getMaxLength();
}
if (null !== $object->getMinLength()) {
$data->{'minLength'} = $object->getMinLength();
}
if (null !== $object->getPattern()) {
$data->{'pattern'} = $object->getPattern();
}
if (null !== $object->getMaxItems()) {
$data->{'maxItems'} = $object->getMaxItems();
}
if (null !== $object->getMinItems()) {
$data->{'minItems'} = $object->getMinItems();
}
if (null !== $object->getUniqueItems()) {
$data->{'uniqueItems'} = $object->getUniqueItems();
}
if (null !== $object->getMaxProperties()) {
$data->{'maxProperties'} = $object->getMaxProperties();
}
if (null !== $object->getMinProperties()) {
$data->{'minProperties'} = $object->getMinProperties();
}
if (null !== $object->getRequired()) {
$values = [];
foreach ($object->getRequired() as $value) {
$values[] = $value;
}
$data->{'required'} = $values;
}
if (null !== $object->getEnum()) {
$values_1 = [];
foreach ($object->getEnum() as $value_1) {
$values_1[] = $value_1;
}
$data->{'enum'} = $values_1;
}
if (null !== $object->getAdditionalProperties()) {
$value_2 = $object->getAdditionalProperties();
if (is_object($object->getAdditionalProperties())) {
$value_2 = $this->serializer->serialize($object->getAdditionalProperties(), 'raw', $context);
}
if (is_bool($object->getAdditionalProperties())) {
$value_2 = $object->getAdditionalProperties();
}
$data->{'additionalProperties'} = $value_2;
}
if (null !== $object->getType()) {
$value_3 = $object->getType();
if (!is_null($object->getType())) {
$value_3 = $object->getType();
}
if (is_array($object->getType())) {
$values_2 = [];
foreach ($object->getType() as $value_4) {
$values_2[] = $value_4;
}
$value_3 = $values_2;
}
$data->{'type'} = $value_3;
}
if (null !== $object->getItems()) {
$value_5 = $object->getItems();
if (is_object($object->getItems())) {
$value_5 = $this->serializer->serialize($object->getItems(), 'raw', $context);
}
if (is_array($object->getItems())) {
$values_3 = [];
foreach ($object->getItems() as $value_6) {
$values_3[] = $this->serializer->serialize($value_6, 'raw', $context);
}
$value_5 = $values_3;
}
$data->{'items'} = $value_5;
}
if (null !== $object->getAllOf()) {
$values_4 = [];
foreach ($object->getAllOf() as $value_7) {
$values_4[] = $this->serializer->serialize($value_7, 'raw', $context);
}
$data->{'allOf'} = $values_4;
}
if (null !== $object->getProperties()) {
$values_5 = new \stdClass();
foreach ($object->getProperties() as $key => $value_8) {
$values_5->{$key} = $this->serializer->serialize($value_8, 'raw', $context);
}
$data->{'properties'} = $values_5;
}
if (null !== $object->getDiscriminator()) {
$data->{'discriminator'} = $object->getDiscriminator();
}
if (null !== $object->getReadOnly()) {
$data->{'readOnly'} = $object->getReadOnly();
}
if (null !== $object->getXml()) {
$data->{'xml'} = $this->serializer->serialize($object->getXml(), 'raw', $context);
}
if (null !== $object->getExternalDocs()) {
$data->{'externalDocs'} = $this->serializer->serialize($object->getExternalDocs(), 'raw', $context);
}
if (null !== $object->getExample()) {
$data->{'example'} = $object->getExample();
}
return $data;
}