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

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

/// ResourceUsage holds information related to cpu and memory 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 ResourceUsage {
    #[serde(rename = "MemoryStats", skip_serializing_if = "Option::is_none")]
    pub memory_stats: Option<super::MemoryStats>,

    #[serde(rename = "CpuStats", skip_serializing_if = "Option::is_none")]
    pub cpu_stats: Option<super::CpuStats>,

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