/*
 * Python SDK for Opsgenie REST API
 *
 * Python SDK for Opsgenie REST API
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: support@opsgenie.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateHeartbeatPayload {
    /// An optional description of the heartbeat
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Specifies how often a heartbeat message should be expected
    #[serde(rename = "interval", skip_serializing_if = "Option::is_none")]
    pub interval: Option<i32>,
    /// Interval specified as 'minutes', 'hours' or 'days'
    #[serde(rename = "intervalUnit", skip_serializing_if = "Option::is_none")]
    pub interval_unit: Option<IntervalUnit>,
    /// Enable/disable heartbeat monitoring
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
}

impl UpdateHeartbeatPayload {
    pub fn new() -> UpdateHeartbeatPayload {
        UpdateHeartbeatPayload {
            description: None,
            interval: None,
            interval_unit: None,
            enabled: None,
        }
    }
}

/// Interval specified as 'minutes', 'hours' or 'days'
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IntervalUnit {
    #[serde(rename = "minutes")]
    Minutes,
    #[serde(rename = "hours")]
    Hours,
    #[serde(rename = "days")]
    Days,
}

