redfish_codegen/models/power/v1_7_1/
power_supply.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// Details of a power supplies associated with this system or device.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct PowerSupply {
10    #[serde(rename = "@odata.id")]
11    #[serde(skip_deserializing)]
12    pub odata_id: models::odata_v4::Id,
13    #[serde(rename = "Actions")]
14    #[serde(default, skip_serializing_if = "Option::is_none")]
15    pub actions: Option<models::power::v1_7_1::PowerSupplyActions>,
16    #[serde(rename = "Assembly")]
17    #[serde(default, skip_serializing_if = "Option::is_none")]
18    pub assembly: Option<models::odata_v4::IdRef>,
19    /// The measured efficiency of this power supply as a percentage.
20    #[serde(rename = "EfficiencyPercent")]
21    #[serde(default, skip_serializing_if = "Option::is_none")]
22    pub efficiency_percent: Option<f64>,
23    /// The firmware version for this power supply.
24    #[serde(rename = "FirmwareVersion")]
25    #[serde(default, skip_serializing_if = "Option::is_none")]
26    pub firmware_version: Option<String>,
27    /// An indication of whether this device can be inserted or removed while the equipment is in operation.
28    #[serde(rename = "HotPluggable")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub hot_pluggable: Option<bool>,
31    #[serde(rename = "IndicatorLED")]
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub indicator_led: Option<models::resource::IndicatorLED>,
34    /// The input ranges that the power supply can use.
35    #[serde(rename = "InputRanges")]
36    #[serde(default, skip_serializing_if = "Option::is_none")]
37    pub input_ranges: Option<Vec<models::power::v1_7_1::InputRange>>,
38    /// The average power output of this power supply.
39    #[serde(rename = "LastPowerOutputWatts")]
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub last_power_output_watts: Option<f64>,
42    /// The line input voltage at which the power supply is operating.
43    #[serde(rename = "LineInputVoltage")]
44    #[serde(default, skip_serializing_if = "Option::is_none")]
45    pub line_input_voltage: Option<f64>,
46    #[serde(rename = "LineInputVoltageType")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub line_input_voltage_type: Option<models::power::v1_7_1::LineInputVoltageType>,
49    #[serde(rename = "Location")]
50    #[serde(default, skip_serializing_if = "Option::is_none")]
51    pub location: Option<models::resource::Location>,
52    /// The manufacturer of this power supply.
53    #[serde(rename = "Manufacturer")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub manufacturer: Option<String>,
56    /// The identifier for the member within the collection.
57    #[serde(rename = "MemberId")]
58    pub member_id: String,
59    /// The model number for this power supply.
60    #[serde(rename = "Model")]
61    #[serde(default, skip_serializing_if = "Option::is_none")]
62    pub model: Option<String>,
63    /// The name of the power supply.
64    #[serde(rename = "Name")]
65    #[serde(default, skip_serializing_if = "Option::is_none")]
66    pub name: Option<String>,
67    #[serde(rename = "Oem")]
68    #[serde(default, skip_serializing_if = "Option::is_none")]
69    pub oem: Option<models::resource::Oem>,
70    /// The part number for this power supply.
71    #[serde(rename = "PartNumber")]
72    #[serde(default, skip_serializing_if = "Option::is_none")]
73    pub part_number: Option<String>,
74    /// The maximum capacity of this power supply.
75    #[serde(rename = "PowerCapacityWatts")]
76    #[serde(default, skip_serializing_if = "Option::is_none")]
77    pub power_capacity_watts: Option<f64>,
78    /// The measured input power of this power supply.
79    #[serde(rename = "PowerInputWatts")]
80    #[serde(default, skip_serializing_if = "Option::is_none")]
81    pub power_input_watts: Option<f64>,
82    /// The measured output power of this power supply.
83    #[serde(rename = "PowerOutputWatts")]
84    #[serde(default, skip_serializing_if = "Option::is_none")]
85    pub power_output_watts: Option<f64>,
86    #[serde(rename = "PowerSupplyType")]
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    pub power_supply_type: Option<models::power::v1_7_1::PowerSupplyType>,
89    /// The set of redundancy groups for this power supply.
90    #[serde(rename = "Redundancy")]
91    #[serde(default, skip_serializing_if = "Option::is_none")]
92    pub redundancy: Option<Vec<models::redundancy::Redundancy>>,
93    #[serde(rename = "Redundancy@odata.count")]
94    #[serde(default, skip_serializing_if = "Option::is_none")]
95    pub redundancy_odata_count: Option<models::odata_v4::Count>,
96    /// An array of links to resources or objects associated with this power supply.
97    #[serde(rename = "RelatedItem")]
98    #[serde(default, skip_serializing_if = "Option::is_none")]
99    pub related_item: Option<Vec<models::odata_v4::IdRef>>,
100    #[serde(rename = "RelatedItem@odata.count")]
101    #[serde(default, skip_serializing_if = "Option::is_none")]
102    pub related_item_odata_count: Option<models::odata_v4::Count>,
103    /// The serial number for this power supply.
104    #[serde(rename = "SerialNumber")]
105    #[serde(default, skip_serializing_if = "Option::is_none")]
106    pub serial_number: Option<String>,
107    /// The spare part number for this power supply.
108    #[serde(rename = "SparePartNumber")]
109    #[serde(default, skip_serializing_if = "Option::is_none")]
110    pub spare_part_number: Option<String>,
111    #[serde(rename = "Status")]
112    #[serde(default, skip_serializing_if = "Option::is_none")]
113    pub status: Option<models::resource::Status>,
114}
115
116impl crate::Metadata<'static> for PowerSupply {
117    const JSON_SCHEMA: &'static str = "Power.v1_7_1.json";
118}