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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*
* 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 ClusterResourcesResponseDataInner {
/// The cgroup mode the node operates under (for type 'node').
#[serde(rename = "cgroup-mode", skip_serializing_if = "Option::is_none")]
pub cgroup_mode: Option<i64>,
/// Allowed storage content types (for type 'storage').
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
/// CPU utilization (for types 'node', 'qemu' and 'lxc').
#[serde(rename = "cpu", skip_serializing_if = "Option::is_none")]
pub cpu: Option<f64>,
/// Used disk space in bytes (for type 'storage'), used root image space for VMs (for types 'qemu' and 'lxc').
#[serde(rename = "disk", skip_serializing_if = "Option::is_none")]
pub disk: Option<i64>,
/// The number of bytes the guest read from its block devices since the guest was started. This info is not available for all storage types. (for types 'qemu' and 'lxc')
#[serde(rename = "diskread", skip_serializing_if = "Option::is_none")]
pub diskread: Option<i64>,
/// The number of bytes the guest wrote to its block devices since the guest was started. This info is not available for all storage types. (for types 'qemu' and 'lxc')
#[serde(rename = "diskwrite", skip_serializing_if = "Option::is_none")]
pub diskwrite: Option<i64>,
/// HA service status (for HA managed VMs).
#[serde(rename = "hastate", skip_serializing_if = "Option::is_none")]
pub hastate: Option<String>,
/// The node's CPU architecture. (for type 'node').
#[serde(rename = "host-arch", skip_serializing_if = "Option::is_none")]
pub host_arch: Option<models::PveArchEnum>,
/// Resource id.
#[serde(rename = "id")]
pub id: String,
/// Support level (for type 'node').
#[serde(rename = "level", skip_serializing_if = "Option::is_none")]
pub level: Option<String>,
/// The guest's current config lock (for types 'qemu' and 'lxc')
#[serde(rename = "lock", skip_serializing_if = "Option::is_none")]
pub lock: Option<String>,
/// Number of available CPUs (for types 'node', 'qemu' and 'lxc').
#[serde(rename = "maxcpu", skip_serializing_if = "Option::is_none")]
pub maxcpu: Option<f64>,
/// Storage size in bytes (for type 'storage'), root image size for VMs (for types 'qemu' and 'lxc').
#[serde(rename = "maxdisk", skip_serializing_if = "Option::is_none")]
pub maxdisk: Option<i64>,
/// Number of available memory in bytes (for types 'node', 'qemu' and 'lxc').
#[serde(rename = "maxmem", skip_serializing_if = "Option::is_none")]
pub maxmem: Option<i64>,
/// Used memory in bytes (for types 'node', 'qemu' and 'lxc').
#[serde(rename = "mem", skip_serializing_if = "Option::is_none")]
pub mem: Option<i64>,
/// Used memory in bytes from the point of view of the host (for types 'qemu').
#[serde(rename = "memhost", skip_serializing_if = "Option::is_none")]
pub memhost: Option<i64>,
/// Name of the resource.
#[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. (for types 'qemu' and 'lxc')
#[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. (for types 'qemu' and 'lxc')
#[serde(rename = "netout", skip_serializing_if = "Option::is_none")]
pub netout: Option<i64>,
/// The name of a Network entity (for type 'network').
#[serde(rename = "network", skip_serializing_if = "Option::is_none")]
pub network: Option<String>,
/// The type of network resource (for type 'network').
#[serde(rename = "network-type", skip_serializing_if = "Option::is_none")]
pub network_type: Option<models::PveClusterNetworkTypeEnum>,
/// The cluster node name (for types 'node', 'storage', 'qemu', and 'lxc').
#[serde(rename = "node", skip_serializing_if = "Option::is_none")]
pub node: Option<String>,
/// More specific type, if available.
#[serde(rename = "plugintype", skip_serializing_if = "Option::is_none")]
pub plugintype: Option<String>,
/// The pool name (for types 'pool', 'qemu' and 'lxc').
#[serde(rename = "pool", skip_serializing_if = "Option::is_none")]
pub pool: Option<String>,
/// The protocol of a fabric (for type 'network', network-type 'fabric').
#[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
/// The name of an SDN entity (for type 'sdn')
#[serde(rename = "sdn", skip_serializing_if = "Option::is_none")]
pub sdn: Option<String>,
/// Determines whether the storage is shared
#[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
pub shared: Option<models::PveBoolean>,
/// Resource type dependent status.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// The storage identifier (for type 'storage').
#[serde(rename = "storage", skip_serializing_if = "Option::is_none")]
pub storage: Option<String>,
/// The guest's tags (for types 'qemu' and 'lxc')
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<String>,
/// Determines if the guest is a template. (for types 'qemu' and 'lxc')
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<models::PveBoolean>,
/// Resource type.
#[serde(rename = "type")]
pub r#type: models::PveClusterTypeEnum2,
/// Uptime of node or virtual guest in seconds (for types 'node', 'qemu' and 'lxc').
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
pub uptime: Option<i64>,
/// The numerical vmid (for types 'qemu' and 'lxc').
#[serde(rename = "vmid", skip_serializing_if = "Option::is_none")]
pub vmid: Option<i32>,
/// The type of an SDN zone (for type 'sdn').
#[serde(rename = "zone-type", skip_serializing_if = "Option::is_none")]
pub zone_type: Option<String>,
}
impl ClusterResourcesResponseDataInner {
pub fn new(id: String, r#type: models::PveClusterTypeEnum2) -> ClusterResourcesResponseDataInner {
ClusterResourcesResponseDataInner {
cgroup_mode: None,
content: None,
cpu: None,
disk: None,
diskread: None,
diskwrite: None,
hastate: None,
host_arch: None,
id,
level: None,
lock: None,
maxcpu: None,
maxdisk: None,
maxmem: None,
mem: None,
memhost: None,
name: None,
netin: None,
netout: None,
network: None,
network_type: None,
node: None,
plugintype: None,
pool: None,
protocol: None,
sdn: None,
shared: None,
status: None,
storage: None,
tags: None,
template: None,
r#type,
uptime: None,
vmid: None,
zone_type: None,
}
}
}