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;

#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Temperature {
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::thermal::v1_7_1::TemperatureActions>,
    /// Adjusted maximum allowable operating temperature for this equipment based on the current environmental conditions present.
    #[serde(rename = "AdjustedMaxAllowableOperatingValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub adjusted_max_allowable_operating_value: Option<i64>,
    /// Adjusted minimum allowable operating temperature for this equipment based on the current environmental conditions present.
    #[serde(rename = "AdjustedMinAllowableOperatingValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub adjusted_min_allowable_operating_value: Option<i64>,
    #[serde(rename = "DeltaPhysicalContext")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub delta_physical_context: Option<models::physical_context::PhysicalContext>,
    /// The delta temperature reading.
    #[serde(rename = "DeltaReadingCelsius")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub delta_reading_celsius: Option<f64>,
    /// The value at which the reading is below normal range but not yet fatal.
    #[serde(rename = "LowerThresholdCritical")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lower_threshold_critical: Option<f64>,
    /// The value at which the reading is below normal range and fatal.
    #[serde(rename = "LowerThresholdFatal")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lower_threshold_fatal: Option<f64>,
    /// The value at which the reading is below normal range.
    #[serde(rename = "LowerThresholdNonCritical")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lower_threshold_non_critical: Option<f64>,
    /// The value at which the reading is below the user-defined range.
    #[serde(rename = "LowerThresholdUser")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lower_threshold_user: Option<i64>,
    /// Maximum allowable operating temperature for this equipment.
    #[serde(rename = "MaxAllowableOperatingValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_allowable_operating_value: Option<i64>,
    /// Maximum value for this sensor.
    #[serde(rename = "MaxReadingRangeTemp")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_reading_range_temp: Option<f64>,
    /// The identifier for the member within the collection.
    #[serde(rename = "MemberId")]
    pub member_id: String,
    /// Minimum allowable operating temperature for this equipment.
    #[serde(rename = "MinAllowableOperatingValue")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub min_allowable_operating_value: Option<i64>,
    /// Minimum value for this sensor.
    #[serde(rename = "MinReadingRangeTemp")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub min_reading_range_temp: Option<f64>,
    /// The temperature sensor name.
    #[serde(rename = "Name")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    #[serde(rename = "PhysicalContext")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub physical_context: Option<models::physical_context::PhysicalContext>,
    /// The temperature in degrees Celsius.
    #[serde(rename = "ReadingCelsius")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reading_celsius: Option<f64>,
    /// An array of links to resources or objects that represent areas or devices to which this temperature applies.
    #[serde(rename = "RelatedItem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_item: Option<Vec<models::odata_v4::IdRef>>,
    #[serde(rename = "RelatedItem@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub related_item_odata_count: Option<models::odata_v4::Count>,
    /// The numerical identifier of the temperature sensor.
    #[serde(rename = "SensorNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sensor_number: Option<i64>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// The value at which the reading is above normal range but not yet fatal.
    #[serde(rename = "UpperThresholdCritical")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub upper_threshold_critical: Option<f64>,
    /// The value at which the reading is above normal range and fatal.
    #[serde(rename = "UpperThresholdFatal")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub upper_threshold_fatal: Option<f64>,
    /// The value at which the reading is above normal range.
    #[serde(rename = "UpperThresholdNonCritical")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub upper_threshold_non_critical: Option<f64>,
    /// The value at which the reading is above the user-defined range.
    #[serde(rename = "UpperThresholdUser")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub upper_threshold_user: Option<i64>,
}

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