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};

/// UptimeResponse : Aggregated infrastructure status returned by `GET /uptime`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UptimeResponse {
    /// FoxHealth result, or null if that upstream is unavailable.
    #[serde(rename = "health", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub health: Option<Option<Box<models::UptimeHealth>>>,
    /// Uptime Kuma status page result, or null if that upstream is unavailable.
    #[serde(rename = "monitors", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub monitors: Option<Option<Box<models::UptimeMonitors>>>,
    /// Overall status: \"healthy\", \"degraded\" or \"down\".
    #[serde(rename = "status")]
    pub status: String,
}

impl UptimeResponse {
    /// Aggregated infrastructure status returned by `GET /uptime`.
    pub fn new(status: String) -> UptimeResponse {
        UptimeResponse {
            health: None,
            monitors: None,
            status,
        }
    }
}