Skip to main content

opsgenie_rs/models/
update_heartbeat_payload.rs

1/*
2 * Python SDK for Opsgenie REST API
3 *
4 * Python SDK for Opsgenie REST API
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: support@opsgenie.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateHeartbeatPayload {
16    /// An optional description of the heartbeat
17    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
18    pub description: Option<String>,
19    /// Specifies how often a heartbeat message should be expected
20    #[serde(rename = "interval", skip_serializing_if = "Option::is_none")]
21    pub interval: Option<i32>,
22    /// Interval specified as 'minutes', 'hours' or 'days'
23    #[serde(rename = "intervalUnit", skip_serializing_if = "Option::is_none")]
24    pub interval_unit: Option<IntervalUnit>,
25    /// Enable/disable heartbeat monitoring
26    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
27    pub enabled: Option<bool>,
28}
29
30impl UpdateHeartbeatPayload {
31    pub fn new() -> UpdateHeartbeatPayload {
32        UpdateHeartbeatPayload {
33            description: None,
34            interval: None,
35            interval_unit: None,
36            enabled: None,
37        }
38    }
39}
40
41/// Interval specified as 'minutes', 'hours' or 'days'
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum IntervalUnit {
44    #[serde(rename = "minutes")]
45    Minutes,
46    #[serde(rename = "hours")]
47    Hours,
48    #[serde(rename = "days")]
49    Days,
50}
51