nomad_client/models/
cpu_stats.rs

1/*
2 * Nomad
3 *
4 * Nomad OpenApi specification
5 *
6 * The version of the OpenAPI document: 0.11.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CpuStats {
16    #[serde(rename = "SystemMode", skip_serializing_if = "Option::is_none")]
17    pub system_mode: Option<f64>,
18    #[serde(rename = "UserMode", skip_serializing_if = "Option::is_none")]
19    pub user_mode: Option<f64>,
20    #[serde(rename = "TotalTicks", skip_serializing_if = "Option::is_none")]
21    pub total_ticks: Option<f64>,
22    #[serde(rename = "ThrottledPeriods", skip_serializing_if = "Option::is_none")]
23    pub throttled_periods: Option<i32>,
24    #[serde(rename = "ThrottledTime", skip_serializing_if = "Option::is_none")]
25    pub throttled_time: Option<i32>,
26    #[serde(rename = "Percent", skip_serializing_if = "Option::is_none")]
27    pub percent: Option<f64>,
28    #[serde(rename = "Measured", skip_serializing_if = "Option::is_none")]
29    pub measured: Option<Vec<String>>,
30}
31
32impl CpuStats {
33    pub fn new() -> CpuStats {
34        CpuStats {
35            system_mode: None,
36            user_mode: None,
37            total_ticks: None,
38            throttled_periods: None,
39            throttled_time: None,
40            percent: None,
41            measured: None,
42        }
43    }
44}
45
46