redfish-codegen 0.3.1

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


/// The idle power saver settings of a computer system.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct IdlePowerSaver {
    /// An indication of whether idle power saver is enabled.
    #[serde(rename = "Enabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// The duration in seconds the computer system is below the EnterUtilizationPercent value before the idle power save is activated.
    #[serde(rename = "EnterDwellTimeSeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enter_dwell_time_seconds: Option<i64>,
    /// The percentage of utilization that the computer system shall be lower than to enter idle power save.
    #[serde(rename = "EnterUtilizationPercent")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enter_utilization_percent: Option<f64>,
    /// The duration in seconds the computer system is above the ExitUtilizationPercent value before the idle power save is stopped.
    #[serde(rename = "ExitDwellTimeSeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exit_dwell_time_seconds: Option<i64>,
    /// The percentage of utilization that the computer system shall be higher than to exit idle power save.
    #[serde(rename = "ExitUtilizationPercent")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exit_utilization_percent: Option<f64>,
}

impl crate::Metadata<'static> for IdlePowerSaver {
    const JSON_SCHEMA: &'static str = "ComputerSystem.v1_20_1.json";
}