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

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

/// MemoryStats holds memory 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 MemoryStats {
    #[serde(rename = "Swap")]
    pub swap: u64,

    #[serde(rename = "Usage")]
    pub usage: u64,

    #[serde(rename = "MaxUsage")]
    pub max_usage: u64,

    #[serde(rename = "KernelUsage")]
    pub kernel_usage: u64,

    #[serde(rename = "KernelMaxUsage")]
    pub kernel_max_usage: u64,

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

    #[serde(rename = "RSS")]
    pub rss: u64,

    #[serde(rename = "Cache")]
    pub cache: u64,
}
