openjd_model/template/
host_requirements.rs1use crate::format_string::FormatString;
8use serde::Deserialize;
9
10#[derive(Debug, Clone, Deserialize)]
12#[serde(rename_all = "camelCase", deny_unknown_fields)]
13pub struct HostRequirements {
14 pub amounts: Option<Vec<AmountRequirement>>,
15 pub attributes: Option<Vec<AttributeRequirement>>,
16}
17
18#[derive(Debug, Clone, Deserialize)]
20#[serde(rename_all = "camelCase", deny_unknown_fields)]
21pub struct AmountRequirement {
22 pub name: String,
23 pub min: Option<FormatString>,
24 pub max: Option<FormatString>,
25}
26
27#[derive(Debug, Clone, Deserialize)]
29#[serde(rename_all = "camelCase", deny_unknown_fields)]
30pub struct AttributeRequirement {
31 pub name: String,
32 pub any_of: Option<Vec<FormatString>>,
33 pub all_of: Option<Vec<FormatString>>,
34}