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 Fan {
    #[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::FanActions>,
    #[serde(rename = "Assembly")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub assembly: Option<models::odata_v4::IdRef>,
    /// The name of the fan.
    #[serde(rename = "FanName")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub fan_name: Option<String>,
    /// An indication of whether this device can be inserted or removed while the equipment is in operation.
    #[serde(rename = "HotPluggable")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hot_pluggable: Option<bool>,
    #[serde(rename = "IndicatorLED")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub indicator_led: Option<models::resource::IndicatorLED>,
    #[serde(rename = "Location")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub location: Option<models::resource::Location>,
    /// 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<i64>,
    /// 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<i64>,
    /// 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<i64>,
    /// The manufacturer of this fan.
    #[serde(rename = "Manufacturer")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub manufacturer: Option<String>,
    /// Maximum value for this sensor.
    #[serde(rename = "MaxReadingRange")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_reading_range: Option<i64>,
    /// The identifier for the member within the collection.
    #[serde(rename = "MemberId")]
    pub member_id: String,
    /// Minimum value for this sensor.
    #[serde(rename = "MinReadingRange")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub min_reading_range: Option<i64>,
    /// The model number for this fan.
    #[serde(rename = "Model")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    /// Name of the fan.
    #[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>,
    /// The part number for this fan.
    #[serde(rename = "PartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub part_number: Option<String>,
    #[serde(rename = "PhysicalContext")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub physical_context: Option<models::physical_context::PhysicalContext>,
    /// The fan speed.
    #[serde(rename = "Reading")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reading: Option<i64>,
    #[serde(rename = "ReadingUnits")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub reading_units: Option<models::thermal::v1_7_1::ReadingUnits>,
    /// The set of redundancy groups for this fan.
    #[serde(rename = "Redundancy")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy: Option<Vec<models::redundancy::Redundancy>>,
    #[serde(rename = "Redundancy@odata.count")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub redundancy_odata_count: Option<models::odata_v4::Count>,
    /// An array of links to resources or objects that this fan services.
    #[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 for this fan speed sensor.
    #[serde(rename = "SensorNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sensor_number: Option<i64>,
    /// The serial number for this fan.
    #[serde(rename = "SerialNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    /// The spare part number for this fan.
    #[serde(rename = "SparePartNumber")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub spare_part_number: Option<String>,
    #[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<i64>,
    /// 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<i64>,
    /// 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<i64>,
}

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