redfish_codegen/models/sensor/v1_7_0/
threshold.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The threshold definition for a sensor.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct Threshold {
10    #[serde(rename = "Activation")]
11    #[serde(default, skip_serializing_if = "Option::is_none")]
12    pub activation: Option<models::sensor::v1_7_0::ThresholdActivation>,
13    /// The duration the sensor value must violate the threshold before the threshold is activated.
14    #[serde(rename = "DwellTime")]
15    #[serde(default, skip_serializing_if = "Option::is_none")]
16    pub dwell_time: Option<String>,
17    /// The duration the sensor value must not violate the threshold before the threshold is deactivated.
18    #[serde(rename = "HysteresisDuration")]
19    #[serde(default, skip_serializing_if = "Option::is_none")]
20    pub hysteresis_duration: Option<String>,
21    /// The reading offset from the threshold value required to clear the threshold.
22    #[serde(rename = "HysteresisReading")]
23    #[serde(default, skip_serializing_if = "Option::is_none")]
24    pub hysteresis_reading: Option<f64>,
25    /// The threshold value.
26    #[serde(rename = "Reading")]
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub reading: Option<f64>,
29}
30
31impl crate::Metadata<'static> for Threshold {
32    const JSON_SCHEMA: &'static str = "Sensor.v1_7_0.json";
33}