redfish_codegen/models/sensor/v1_7_0/
sensor.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The Sensor schema describes a sensor and its properties.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct Sensor {
10    #[serde(rename = "@odata.context")]
11    #[serde(skip_deserializing)]
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub odata_context: Option<models::odata_v4::Context>,
14    #[serde(rename = "@odata.etag")]
15    #[serde(skip_deserializing)]
16    #[serde(default, skip_serializing_if = "Option::is_none")]
17    pub odata_etag: Option<models::odata_v4::Etag>,
18    #[serde(rename = "@odata.id")]
19    #[serde(skip_deserializing)]
20    pub odata_id: models::odata_v4::Id,
21    #[serde(rename = "@odata.type")]
22    #[serde(skip_deserializing)]
23    #[derivative(Default(value = "models::odata_v4::Type(\"#Sensor.v1_7_0.Sensor\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    /// The estimated percent error of measured versus actual values.
26    #[serde(rename = "Accuracy")]
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub accuracy: Option<f64>,
29    #[serde(rename = "Actions")]
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub actions: Option<models::sensor::v1_7_0::Actions>,
32    /// The adjusted maximum allowable operating value for this equipment based on the environmental conditions.
33    #[serde(rename = "AdjustedMaxAllowableOperatingValue")]
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub adjusted_max_allowable_operating_value: Option<f64>,
36    /// The adjusted minimum allowable operating value for this equipment based on the environmental conditions.
37    #[serde(rename = "AdjustedMinAllowableOperatingValue")]
38    #[serde(default, skip_serializing_if = "Option::is_none")]
39    pub adjusted_min_allowable_operating_value: Option<f64>,
40    /// The product of voltage and current for an AC circuit, in volt-ampere units.
41    #[serde(rename = "ApparentVA")]
42    #[serde(default, skip_serializing_if = "Option::is_none")]
43    pub apparent_va: Option<f64>,
44    /// Apparent energy (kVAh).
45    #[serde(rename = "ApparentkVAh")]
46    #[serde(default, skip_serializing_if = "Option::is_none")]
47    pub apparentk_v_ah: Option<f64>,
48    /// The average sensor value.
49    #[serde(rename = "AverageReading")]
50    #[serde(default, skip_serializing_if = "Option::is_none")]
51    pub average_reading: Option<f64>,
52    /// The interval over which the average sensor value is calculated.
53    #[serde(rename = "AveragingInterval")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub averaging_interval: Option<String>,
56    /// Indicates that enough readings were collected to calculate the average sensor reading over the averaging interval time.
57    #[serde(rename = "AveragingIntervalAchieved")]
58    #[serde(default, skip_serializing_if = "Option::is_none")]
59    pub averaging_interval_achieved: Option<bool>,
60    /// The calibration offset applied to the Reading.
61    #[serde(rename = "Calibration")]
62    #[serde(default, skip_serializing_if = "Option::is_none")]
63    pub calibration: Option<f64>,
64    /// The date and time that the sensor was last calibrated.
65    #[serde(rename = "CalibrationTime")]
66    #[serde(default, skip_serializing_if = "Option::is_none")]
67    pub calibration_time: Option<String>,
68    /// The crest factor for this sensor.
69    #[serde(rename = "CrestFactor")]
70    #[serde(default, skip_serializing_if = "Option::is_none")]
71    pub crest_factor: Option<f64>,
72    #[serde(rename = "Description")]
73    #[serde(default, skip_serializing_if = "Option::is_none")]
74    pub description: Option<models::resource::Description>,
75    #[serde(rename = "ElectricalContext")]
76    #[serde(default, skip_serializing_if = "Option::is_none")]
77    pub electrical_context: Option<models::sensor::ElectricalContext>,
78    #[serde(rename = "Id")]
79    #[serde(skip_deserializing)]
80    pub id: models::resource::Id,
81    #[serde(rename = "Implementation")]
82    #[serde(default, skip_serializing_if = "Option::is_none")]
83    pub implementation: Option<models::sensor::v1_7_0::ImplementationType>,
84    /// The total accumulation value for this sensor.
85    #[serde(rename = "LifetimeReading")]
86    #[serde(default, skip_serializing_if = "Option::is_none")]
87    pub lifetime_reading: Option<f64>,
88    #[serde(rename = "Links")]
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    pub links: Option<models::sensor::v1_7_0::Links>,
91    /// The power load utilization for this sensor.
92    #[serde(rename = "LoadPercent")]
93    #[serde(default, skip_serializing_if = "Option::is_none")]
94    pub load_percent: Option<f64>,
95    #[serde(rename = "Location")]
96    #[serde(default, skip_serializing_if = "Option::is_none")]
97    pub location: Option<models::resource::Location>,
98    /// The lowest sensor value.
99    #[serde(rename = "LowestReading")]
100    #[serde(default, skip_serializing_if = "Option::is_none")]
101    pub lowest_reading: Option<f64>,
102    /// The time when the lowest sensor value occurred.
103    #[serde(rename = "LowestReadingTime")]
104    #[serde(default, skip_serializing_if = "Option::is_none")]
105    pub lowest_reading_time: Option<String>,
106    /// The maximum allowable operating value for this equipment.
107    #[serde(rename = "MaxAllowableOperatingValue")]
108    #[serde(default, skip_serializing_if = "Option::is_none")]
109    pub max_allowable_operating_value: Option<f64>,
110    /// The minimum allowable operating value for this equipment.
111    #[serde(rename = "MinAllowableOperatingValue")]
112    #[serde(default, skip_serializing_if = "Option::is_none")]
113    pub min_allowable_operating_value: Option<f64>,
114    #[serde(rename = "Name")]
115    #[serde(skip_deserializing)]
116    pub name: models::resource::Name,
117    #[serde(rename = "Oem")]
118    #[serde(default, skip_serializing_if = "Option::is_none")]
119    pub oem: Option<models::resource::Oem>,
120    /// The peak sensor value.
121    #[serde(rename = "PeakReading")]
122    #[serde(default, skip_serializing_if = "Option::is_none")]
123    pub peak_reading: Option<f64>,
124    /// The time when the peak sensor value occurred.
125    #[serde(rename = "PeakReadingTime")]
126    #[serde(default, skip_serializing_if = "Option::is_none")]
127    pub peak_reading_time: Option<String>,
128    /// The phase angle (degrees) between the current and voltage waveforms.
129    #[serde(rename = "PhaseAngleDegrees")]
130    #[serde(default, skip_serializing_if = "Option::is_none")]
131    pub phase_angle_degrees: Option<f64>,
132    #[serde(rename = "PhysicalContext")]
133    #[serde(default, skip_serializing_if = "Option::is_none")]
134    pub physical_context: Option<models::physical_context::PhysicalContext>,
135    #[serde(rename = "PhysicalSubContext")]
136    #[serde(default, skip_serializing_if = "Option::is_none")]
137    pub physical_sub_context: Option<models::physical_context::PhysicalSubContext>,
138    /// The power factor for this sensor.
139    #[serde(rename = "PowerFactor")]
140    #[serde(default, skip_serializing_if = "Option::is_none")]
141    pub power_factor: Option<f64>,
142    /// The number of significant digits in the reading.
143    #[serde(rename = "Precision")]
144    #[serde(default, skip_serializing_if = "Option::is_none")]
145    pub precision: Option<f64>,
146    /// The square root of the difference term of squared apparent VA and squared power (Reading) for a circuit, in VAR units.
147    #[serde(rename = "ReactiveVAR")]
148    #[serde(default, skip_serializing_if = "Option::is_none")]
149    pub reactive_var: Option<f64>,
150    /// Reactive energy (kVARh).
151    #[serde(rename = "ReactivekVARh")]
152    #[serde(default, skip_serializing_if = "Option::is_none")]
153    pub reactivek_va_rh: Option<f64>,
154    /// The sensor value.
155    #[serde(rename = "Reading")]
156    #[serde(default, skip_serializing_if = "Option::is_none")]
157    pub reading: Option<f64>,
158    #[serde(rename = "ReadingBasis")]
159    #[serde(default, skip_serializing_if = "Option::is_none")]
160    pub reading_basis: Option<models::sensor::v1_7_0::ReadingBasisType>,
161    /// The maximum possible value for this sensor.
162    #[serde(rename = "ReadingRangeMax")]
163    #[serde(default, skip_serializing_if = "Option::is_none")]
164    pub reading_range_max: Option<f64>,
165    /// The minimum possible value for this sensor.
166    #[serde(rename = "ReadingRangeMin")]
167    #[serde(default, skip_serializing_if = "Option::is_none")]
168    pub reading_range_min: Option<f64>,
169    /// The date and time that the reading was acquired from the sensor.
170    #[serde(rename = "ReadingTime")]
171    #[serde(default, skip_serializing_if = "Option::is_none")]
172    pub reading_time: Option<String>,
173    #[serde(rename = "ReadingType")]
174    #[serde(default, skip_serializing_if = "Option::is_none")]
175    pub reading_type: Option<models::sensor::v1_7_0::ReadingType>,
176    /// The units of the reading and thresholds.
177    #[serde(rename = "ReadingUnits")]
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    pub reading_units: Option<String>,
180    /// An array of links to resources or objects that this sensor services.
181    #[serde(rename = "RelatedItem")]
182    #[serde(default, skip_serializing_if = "Option::is_none")]
183    pub related_item: Option<Vec<models::odata_v4::IdRef>>,
184    #[serde(rename = "RelatedItem@odata.count")]
185    #[serde(default, skip_serializing_if = "Option::is_none")]
186    pub related_item_odata_count: Option<models::odata_v4::Count>,
187    /// The time interval between readings of the physical sensor.
188    #[serde(rename = "SensingFrequency")]
189    #[serde(default, skip_serializing_if = "Option::is_none")]
190    pub sensing_frequency: Option<f64>,
191    /// The time interval between readings of the sensor.
192    #[serde(rename = "SensingInterval")]
193    #[serde(default, skip_serializing_if = "Option::is_none")]
194    pub sensing_interval: Option<String>,
195    #[serde(rename = "SensorGroup")]
196    #[serde(default, skip_serializing_if = "Option::is_none")]
197    pub sensor_group: Option<models::redundancy::RedundantGroup>,
198    /// The date and time when the time-based properties were last reset.
199    #[serde(rename = "SensorResetTime")]
200    #[serde(default, skip_serializing_if = "Option::is_none")]
201    pub sensor_reset_time: Option<String>,
202    /// The rotational speed.
203    #[serde(rename = "SpeedRPM")]
204    #[serde(default, skip_serializing_if = "Option::is_none")]
205    pub speed_rpm: Option<f64>,
206    #[serde(rename = "Status")]
207    #[serde(default, skip_serializing_if = "Option::is_none")]
208    pub status: Option<models::resource::Status>,
209    /// The total harmonic distortion (THD).
210    #[serde(rename = "THDPercent")]
211    #[serde(default, skip_serializing_if = "Option::is_none")]
212    pub thd_percent: Option<f64>,
213    #[serde(rename = "Thresholds")]
214    #[serde(default, skip_serializing_if = "Option::is_none")]
215    pub thresholds: Option<models::sensor::v1_7_0::Thresholds>,
216    #[serde(rename = "VoltageType")]
217    #[serde(default, skip_serializing_if = "Option::is_none")]
218    pub voltage_type: Option<models::sensor::VoltageType>,
219}
220
221impl crate::Metadata<'static> for Sensor {
222    const JSON_SCHEMA: &'static str = "Sensor.v1_7_0.json";
223}