redfish_codegen/models/triggers/v1_3_1/
triggers.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The Triggers schema describes a trigger that applies to metrics.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct Triggers {
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(\"#Triggers.v1_3_1.Triggers\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    #[serde(rename = "Actions")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub actions: Option<models::triggers::v1_3_1::Actions>,
28    #[serde(rename = "Description")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub description: Option<models::resource::Description>,
31    #[serde(rename = "DiscreteTriggerCondition")]
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub discrete_trigger_condition: Option<models::triggers::v1_3_1::DiscreteTriggerConditionEnum>,
34    /// The list of discrete triggers.
35    #[serde(rename = "DiscreteTriggers")]
36    #[serde(default, skip_serializing_if = "Option::is_none")]
37    pub discrete_triggers: Option<Vec<models::triggers::v1_3_1::DiscreteTrigger>>,
38    /// The array of MessageIds that specify when a trigger condition is met based on an event.
39    #[serde(rename = "EventTriggers")]
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub event_triggers: Option<Vec<String>>,
42    /// The duration the sensor value must not violate the threshold before the threshold is deactivated.
43    #[serde(rename = "HysteresisDuration")]
44    #[serde(default, skip_serializing_if = "Option::is_none")]
45    pub hysteresis_duration: Option<String>,
46    /// The reading offset from the threshold value required to clear the threshold.
47    #[serde(rename = "HysteresisReading")]
48    #[serde(default, skip_serializing_if = "Option::is_none")]
49    pub hysteresis_reading: Option<f64>,
50    #[serde(rename = "Id")]
51    #[serde(skip_deserializing)]
52    pub id: models::resource::Id,
53    #[serde(rename = "Links")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub links: Option<models::triggers::v1_3_1::Links>,
56    /// The label for the metric definitions that contain the property identifiers for this trigger.  It matches the Id property of the corresponding metric definition.
57    #[serde(rename = "MetricIds")]
58    #[serde(default, skip_serializing_if = "Option::is_none")]
59    pub metric_ids: Option<Vec<String>>,
60    /// An array of URIs with wildcards and property identifiers for this trigger.  Each wildcard shall be replaced with its corresponding entry in the Wildcard array property.
61    #[serde(rename = "MetricProperties")]
62    #[serde(default, skip_serializing_if = "Option::is_none")]
63    pub metric_properties: Option<Vec<String>>,
64    #[serde(rename = "MetricType")]
65    #[serde(default, skip_serializing_if = "Option::is_none")]
66    pub metric_type: Option<models::triggers::v1_3_1::MetricTypeEnum>,
67    #[serde(rename = "Name")]
68    #[serde(skip_deserializing)]
69    pub name: models::resource::Name,
70    #[serde(rename = "NumericThresholds")]
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub numeric_thresholds: Option<models::triggers::v1_3_1::Thresholds>,
73    #[serde(rename = "Oem")]
74    #[serde(default, skip_serializing_if = "Option::is_none")]
75    pub oem: Option<models::resource::Oem>,
76    #[serde(rename = "Status")]
77    #[serde(default, skip_serializing_if = "Option::is_none")]
78    pub status: Option<models::resource::Status>,
79    /// The actions that the trigger initiates.
80    #[serde(rename = "TriggerActions")]
81    #[serde(default, skip_serializing_if = "Option::is_none")]
82    pub trigger_actions: Option<Vec<models::triggers::v1_3_1::TriggerActionEnum>>,
83    /// The wildcards and their substitution values for the entries in the MetricProperties array property.
84    #[serde(rename = "Wildcards")]
85    #[serde(default, skip_serializing_if = "Option::is_none")]
86    pub wildcards: Option<Vec<models::triggers::v1_3_1::Wildcard>>,
87}
88
89impl crate::Metadata<'static> for Triggers {
90    const JSON_SCHEMA: &'static str = "Triggers.v1_3_1.json";
91}