/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// CpuStats holds cpu usage related stats
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct CpuStats {
    #[serde(rename = "ThrottledTime")]
    pub throttled_time: u64,

    #[serde(rename = "Percent")]
    pub percent: f64,

    #[serde(
        rename = "Measured",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub measured: Vec<String>,

    #[serde(rename = "SystemMode")]
    pub system_mode: f64,

    #[serde(rename = "UserMode")]
    pub user_mode: f64,

    #[serde(rename = "TotalTicks")]
    pub total_ticks: f64,

    #[serde(rename = "ThrottledPeriods")]
    pub throttled_periods: u64,
}
