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

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

/// HostStats represents resource usage stats of the host running a Nomad client
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct HostStats {
    #[serde(
        rename = "DiskStats",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub disk_stats: Vec<super::HostDiskStats>,

    #[serde(rename = "AllocDirStats", skip_serializing_if = "Option::is_none")]
    pub alloc_dir_stats: Option<super::HostDiskStats>,

    #[serde(
        rename = "DeviceStats",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub device_stats: Vec<super::DeviceGroupStats>,

    #[serde(rename = "Uptime")]
    pub uptime: u64,

    #[serde(rename = "CPUTicksConsumed")]
    pub cpu_ticks_consumed: f64,

    #[serde(rename = "Memory", skip_serializing_if = "Option::is_none")]
    pub memory: Option<super::HostMemoryStats>,

    #[serde(
        rename = "CPU",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub cpu: Vec<super::HostCPUStats>,
}
