use super::Annotations;
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(
tag = "fmiBuildDescription",
strict(unknown_attribute, unknown_element)
)]
pub struct Fmi3BuildDescription {
#[xml(attr = "fmiVersion")]
pub fmi_version: String,
#[xml(child = "BuildConfiguration")]
pub build_configurations: Vec<BuildConfiguration>,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "BuildConfiguration", strict(unknown_attribute, unknown_element))]
pub struct BuildConfiguration {
#[xml(attr = "modelIdentifier")]
pub model_identifier: String,
#[xml(attr = "platform")]
pub platform: Option<String>,
#[xml(attr = "description")]
pub description: Option<String>,
#[xml(child = "SourceFileSet")]
pub source_file_sets: Vec<SourceFileSet>,
#[xml(child = "Library")]
pub libraries: Vec<Library>,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "SourceFileSet", strict(unknown_attribute, unknown_element))]
pub struct SourceFileSet {
#[xml(attr = "name")]
pub name: Option<String>,
#[xml(attr = "language")]
pub language: Option<String>,
#[xml(attr = "compiler")]
pub compiler: Option<String>,
#[xml(attr = "compilerOptions")]
pub compiler_options: Option<String>,
#[xml(child = "SourceFile")]
pub source_files: Vec<SourceFile>,
#[xml(child = "PreprocessorDefinition")]
pub preprocessor_definitions: Vec<PreprocessorDefinition>,
#[xml(child = "IncludeDirectory")]
pub include_directories: Vec<IncludeDirectory>,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "SourceFile", strict(unknown_attribute, unknown_element))]
pub struct SourceFile {
#[xml(attr = "name")]
pub name: String,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(
tag = "PreprocessorDefinition",
strict(unknown_attribute, unknown_element)
)]
pub struct PreprocessorDefinition {
#[xml(attr = "name")]
pub name: String,
#[xml(attr = "optional")]
pub optional: Option<bool>,
#[xml(attr = "value")]
pub value: Option<String>,
#[xml(attr = "description")]
pub description: Option<String>,
#[xml(child = "Option")]
pub options: Vec<PreprocessorOption>,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "Option", strict(unknown_attribute, unknown_element))]
pub struct PreprocessorOption {
#[xml(attr = "value")]
pub value: Option<String>,
#[xml(attr = "description")]
pub description: Option<String>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "IncludeDirectory", strict(unknown_attribute, unknown_element))]
pub struct IncludeDirectory {
#[xml(attr = "name")]
pub name: String,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}
#[derive(Default, Debug, PartialEq, hard_xml::XmlRead, hard_xml::XmlWrite)]
#[xml(tag = "Library", strict(unknown_attribute, unknown_element))]
pub struct Library {
#[xml(attr = "name")]
pub name: String,
#[xml(attr = "version")]
pub version: Option<String>,
#[xml(attr = "external")]
pub external: Option<bool>,
#[xml(attr = "description")]
pub description: Option<String>,
#[xml(child = "Annotations")]
pub annotations: Option<Annotations>,
}