foxclient 6.0.9

Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
Documentation
/*
 * Fox API
 *
 * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement.  To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit.  The requests may be logged for analytics and development purposes. 
 *
 * The version of the OpenAPI document: 6.0.9
 * Contact: admin@orangefox.tech
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// UptimeMonitor : A single monitor with its current heartbeat and uptime ratio.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UptimeMonitor {
    #[serde(rename = "id")]
    pub id: i64,
    #[serde(rename = "lastHeartbeat", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_heartbeat: Option<Option<String>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "ping", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub ping: Option<Option<i64>>,
    /// \"up\", \"down\", \"pending\", \"maintenance\" or \"unknown\".
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "uptime24h", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub uptime24h: Option<Option<f64>>,
    #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub url: Option<Option<String>>,
}

impl UptimeMonitor {
    /// A single monitor with its current heartbeat and uptime ratio.
    pub fn new(id: i64, name: String, status: String, r#type: String) -> UptimeMonitor {
        UptimeMonitor {
            id,
            last_heartbeat: None,
            name,
            ping: None,
            status,
            r#type,
            uptime24h: None,
            url: None,
        }
    }
}