1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LxcVmlistResponseDataInner {
/// Current CPU usage.
#[serde(rename = "cpu", skip_serializing_if = "Option::is_none")]
pub cpu: Option<f64>,
/// Maximum usable CPUs.
#[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
pub cpus: Option<f64>,
/// Root disk image space-usage in bytes.
#[serde(rename = "disk", skip_serializing_if = "Option::is_none")]
pub disk: Option<i64>,
/// The amount of bytes the guest read from it's block devices since the guest was started. (Note: This info is not available for all storage types.)
#[serde(rename = "diskread", skip_serializing_if = "Option::is_none")]
pub diskread: Option<i64>,
/// The amount of bytes the guest wrote from it's block devices since the guest was started. (Note: This info is not available for all storage types.)
#[serde(rename = "diskwrite", skip_serializing_if = "Option::is_none")]
pub diskwrite: Option<i64>,
/// The current config lock, if any.
#[serde(rename = "lock", skip_serializing_if = "Option::is_none")]
pub lock: Option<String>,
/// Root disk image size in bytes.
#[serde(rename = "maxdisk", skip_serializing_if = "Option::is_none")]
pub maxdisk: Option<i64>,
/// Maximum memory in bytes.
#[serde(rename = "maxmem", skip_serializing_if = "Option::is_none")]
pub maxmem: Option<i64>,
/// Maximum SWAP memory in bytes.
#[serde(rename = "maxswap", skip_serializing_if = "Option::is_none")]
pub maxswap: Option<i64>,
/// Currently used memory in bytes.
#[serde(rename = "mem", skip_serializing_if = "Option::is_none")]
pub mem: Option<i64>,
/// Container name.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The amount of traffic in bytes that was sent to the guest over the network since it was started.
#[serde(rename = "netin", skip_serializing_if = "Option::is_none")]
pub netin: Option<i64>,
/// The amount of traffic in bytes that was sent from the guest over the network since it was started.
#[serde(rename = "netout", skip_serializing_if = "Option::is_none")]
pub netout: Option<i64>,
/// CPU Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressurecpusome", skip_serializing_if = "Option::is_none")]
pub pressurecpusome: Option<f64>,
/// IO Full pressure stall average over the last 10 seconds.
#[serde(rename = "pressureiofull", skip_serializing_if = "Option::is_none")]
pub pressureiofull: Option<f64>,
/// IO Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressureiosome", skip_serializing_if = "Option::is_none")]
pub pressureiosome: Option<f64>,
/// Memory Full pressure stall average over the last 10 seconds.
#[serde(rename = "pressurememoryfull", skip_serializing_if = "Option::is_none")]
pub pressurememoryfull: Option<f64>,
/// Memory Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressurememorysome", skip_serializing_if = "Option::is_none")]
pub pressurememorysome: Option<f64>,
/// LXC Container status.
#[serde(rename = "status")]
pub status: models::PveStatusEnum,
/// The current configured tags, if any.
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<String>,
/// Determines if the guest is a template.
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<models::PveBoolean>,
/// Uptime in seconds.
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
pub uptime: Option<i64>,
/// The (unique) ID of the VM.
#[serde(rename = "vmid")]
pub vmid: i32,
}
impl LxcVmlistResponseDataInner {
pub fn new(status: models::PveStatusEnum, vmid: i32) -> LxcVmlistResponseDataInner {
LxcVmlistResponseDataInner {
cpu: None,
cpus: None,
disk: None,
diskread: None,
diskwrite: None,
lock: None,
maxdisk: None,
maxmem: None,
maxswap: None,
mem: None,
name: None,
netin: None,
netout: None,
pressurecpusome: None,
pressureiofull: None,
pressureiosome: None,
pressurememoryfull: None,
pressurememorysome: None,
status,
tags: None,
template: None,
uptime: None,
vmid,
}
}
}