{% for name, types in types.children | items %}
pub mod {{ name }} {
mod types { pub use super::super::*; }
{% include "types" %}
}
{% endfor %}

use everestrs::serde as __serde;

{% for object in types.objects %}
#[derive(Debug, Clone, PartialEq, __serde::Serialize, __serde::Deserialize)]
#[serde(crate = "__serde")]
pub struct {{ object.name }} {
{% for p in object.properties %}
/// {{ p.description | replace("\n", " ") }}
#[serde(rename="{{ p.name }}"{% if p.data_type.extra_serde_annotations %},{{ p.data_type.extra_serde_annotations | join(",") }}{% endif %})]
pub {{ p.name | identifier }}: {{ p.data_type.name }},
{% endfor %}
}
{% endfor %}

{% for enum in types.enums %}
#[derive(Debug, Clone, PartialEq, __serde::Serialize, __serde::Deserialize)]
#[serde(crate = "__serde")]
pub enum {{ enum.name }} {
{% for item in enum.items %}
{{ item }},
{% endfor %}
}

{% endfor %}
