redfish-codegen 0.3.1

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


/// Power allocation for a subsystem.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PowerAllocation {
    /// The total amount of power that has been allocated or budgeted to this subsystem.
    #[serde(rename = "AllocatedWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub allocated_watts: Option<f64>,
    /// The potential power, in watts, that the subsystem requests, which might be higher than the current level being consumed because the requested power includes a budget that the subsystem wants for future use.
    #[serde(rename = "RequestedWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requested_watts: Option<f64>,
}

impl crate::Metadata<'static> for PowerAllocation {
    const JSON_SCHEMA: &'static str = "PowerSubsystem.v1_1_0.json";
}