redfish-codegen 0.3.1

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

use crate::models;

/// The power limit status and configuration information for the chassis.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct PowerLimit {
    /// The time required for the limiting process to reduce power consumption to below the limit.
    #[serde(rename = "CorrectionInMs")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub correction_in_ms: Option<i64>,
    #[serde(rename = "LimitException")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limit_exception: Option<models::power::v1_7_1::PowerLimitException>,
    /// The power limit, in watts.  If `null`, power capping is disabled.
    #[serde(rename = "LimitInWatts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limit_in_watts: Option<f64>,
}

impl crate::Metadata<'static> for PowerLimit {
    const JSON_SCHEMA: &'static str = "Power.v1_7_1.json";
}