hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Metrics {
    /// unix seconds, server-stamped
    #[serde(rename = "at", skip_serializing_if = "Option::is_none")]
    pub at: Option<i32>,
    /// 0..1 aggregate utilization
    #[serde(rename = "gpuUtil", skip_serializing_if = "Option::is_none")]
    pub gpu_util: Option<f64>,
    /// Load1 is the machine's own one-minute load average — a count of runnable and uninterruptible tasks, NOT a percentage and NOT already divided by core count, so it is read against Spec.CPUs: 8.0 is idle on 16 cores and swamped on 4. Coerced finite and non-negative on write, so 0 means either genuinely idle or nothing reported.
    #[serde(rename = "load1", skip_serializing_if = "Option::is_none")]
    pub load1: Option<f64>,
    /// Load5 is the same figure averaged over five minutes.
    #[serde(rename = "load5", skip_serializing_if = "Option::is_none")]
    pub load5: Option<f64>,
    /// Load15 is the same figure over fifteen. The three together are what separate a machine that is busy right now from one that has been busy all along — which is the question a dispatcher is really asking.
    #[serde(rename = "load15", skip_serializing_if = "Option::is_none")]
    pub load15: Option<f64>,
    /// bytes
    #[serde(rename = "memFree", skip_serializing_if = "Option::is_none")]
    pub mem_free: Option<i32>,
    /// bytes
    #[serde(rename = "memUsed", skip_serializing_if = "Option::is_none")]
    pub mem_used: Option<i32>,
}

impl Metrics {
    pub fn new() -> Metrics {
        Metrics {
            at: None,
            gpu_util: None,
            load1: None,
            load5: None,
            load15: None,
            mem_free: None,
            mem_used: None,
        }
    }
}