redfish_codegen/models/power/v1_7_1/
power_control.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
6#[derive(derivative::Derivative)]
7#[derivative(Default)]
8pub struct PowerControl {
9    #[serde(rename = "@odata.id")]
10    #[serde(skip_deserializing)]
11    pub odata_id: models::odata_v4::Id,
12    #[serde(rename = "Actions")]
13    #[serde(default, skip_serializing_if = "Option::is_none")]
14    pub actions: Option<models::power::v1_7_1::PowerControlActions>,
15    /// The identifier for the member within the collection.
16    #[serde(rename = "MemberId")]
17    pub member_id: String,
18    /// The power control function name.
19    #[serde(rename = "Name")]
20    #[serde(default, skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    #[serde(rename = "Oem")]
23    #[serde(default, skip_serializing_if = "Option::is_none")]
24    pub oem: Option<models::resource::Oem>,
25    #[serde(rename = "PhysicalContext")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub physical_context: Option<models::physical_context::PhysicalContext>,
28    /// The total amount of power that has been allocated or budgeted to chassis.
29    #[serde(rename = "PowerAllocatedWatts")]
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub power_allocated_watts: Option<f64>,
32    /// The amount of reserve power capacity, in watts, that remains.  This value is the PowerCapacityWatts value minus the PowerAllocatedWatts value.
33    #[serde(rename = "PowerAvailableWatts")]
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub power_available_watts: Option<f64>,
36    /// The total amount of power that can be allocated to the chassis.  This value can be either the power supply capacity or the power budget that an upstream chassis assigns to this chassis.
37    #[serde(rename = "PowerCapacityWatts")]
38    #[serde(default, skip_serializing_if = "Option::is_none")]
39    pub power_capacity_watts: Option<f64>,
40    /// The actual power that the chassis consumes, in watts.
41    #[serde(rename = "PowerConsumedWatts")]
42    #[serde(default, skip_serializing_if = "Option::is_none")]
43    pub power_consumed_watts: Option<f64>,
44    #[serde(rename = "PowerLimit")]
45    #[serde(default, skip_serializing_if = "Option::is_none")]
46    pub power_limit: Option<models::power::v1_7_1::PowerLimit>,
47    #[serde(rename = "PowerMetrics")]
48    #[serde(default, skip_serializing_if = "Option::is_none")]
49    pub power_metrics: Option<models::power::v1_7_1::PowerMetric>,
50    /// The potential power, in watts, that the chassis requests, which might be higher than the current level being consumed because the requested power includes a budget that the chassis wants for future use.
51    #[serde(rename = "PowerRequestedWatts")]
52    #[serde(default, skip_serializing_if = "Option::is_none")]
53    pub power_requested_watts: Option<f64>,
54    /// An array of links to resources or objects associated with this power limit.
55    #[serde(rename = "RelatedItem")]
56    #[serde(default, skip_serializing_if = "Option::is_none")]
57    pub related_item: Option<Vec<models::odata_v4::IdRef>>,
58    #[serde(rename = "RelatedItem@odata.count")]
59    #[serde(default, skip_serializing_if = "Option::is_none")]
60    pub related_item_odata_count: Option<models::odata_v4::Count>,
61    #[serde(rename = "Status")]
62    #[serde(default, skip_serializing_if = "Option::is_none")]
63    pub status: Option<models::resource::Status>,
64}
65
66impl crate::Metadata<'static> for PowerControl {
67    const JSON_SCHEMA: &'static str = "Power.v1_7_1.json";
68}