redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.


/// Power management policy information.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PowerManagementPolicy {
    /// Average power budget, in milliwatts.
    #[serde(rename = "AveragePowerBudgetMilliWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub average_power_budget_milli_watts: Option<i64>,
    /// Maximum TDP in milliwatts.
    #[serde(rename = "MaxTDPMilliWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_tdp_milli_watts: Option<i64>,
    /// Peak power budget, in milliwatts.
    #[serde(rename = "PeakPowerBudgetMilliWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub peak_power_budget_milli_watts: Option<i64>,
    /// An indication of whether the power management policy is enabled.
    #[serde(rename = "PolicyEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub policy_enabled: Option<bool>,
}

impl crate::Metadata<'static> for PowerManagementPolicy {
    const JSON_SCHEMA: &'static str = "Memory.v1_17_1.json";
}