redfish_codegen/models/triggers/v1_3_1/
threshold.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// A 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::triggers::v1_3_1::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 threshold value.
18    #[serde(rename = "Reading")]
19    #[serde(default, skip_serializing_if = "Option::is_none")]
20    pub reading: Option<f64>,
21}
22
23impl crate::Metadata<'static> for Threshold {
24    const JSON_SCHEMA: &'static str = "Triggers.v1_3_1.json";
25}