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
/*
* 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 NodesStorageGetContentResponseDataInner {
/// Approximate volume size in bytes. Present instead of 'size' for storages where determining the exact size has technical limitations. Will typically be an upper bound on the actual size, but the exact semantics depend on the storage plugin.
#[serde(rename = "approximate-size", skip_serializing_if = "Option::is_none")]
pub approximate_size: Option<i64>,
/// Creation time (seconds since the UNIX Epoch).
#[serde(rename = "ctime", skip_serializing_if = "Option::is_none")]
pub ctime: Option<i64>,
/// If whole backup is encrypted, value is the fingerprint or '1' if encrypted. Only useful for the Proxmox Backup Server storage type.
#[serde(rename = "encrypted", skip_serializing_if = "Option::is_none")]
pub encrypted: Option<String>,
/// Format identifier ('raw', 'qcow2', 'subvol', 'iso', 'tgz' ...)
#[serde(rename = "format")]
pub format: String,
/// Optional notes. If they contain multiple lines, only the first one is returned here.
#[serde(rename = "notes", skip_serializing_if = "Option::is_none")]
pub notes: Option<String>,
/// Volume identifier of parent (for linked cloned).
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
pub parent: Option<String>,
/// Protection status. Currently only supported for backups.
#[serde(rename = "protected", skip_serializing_if = "Option::is_none")]
pub protected: Option<models::PveBoolean>,
/// Volume size in bytes.
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
/// Used space. Please note that most storage plugins do not report anything useful here.
#[serde(rename = "used", skip_serializing_if = "Option::is_none")]
pub used: Option<i64>,
#[serde(rename = "verification", skip_serializing_if = "Option::is_none")]
pub verification: Option<Box<models::NodesStorageGetContentResponseDataInnerVerification>>,
/// Associated Owner VMID.
#[serde(rename = "vmid", skip_serializing_if = "Option::is_none")]
pub vmid: Option<i64>,
/// Volume identifier.
#[serde(rename = "volid")]
pub volid: String,
}
impl NodesStorageGetContentResponseDataInner {
pub fn new(format: String, volid: String) -> NodesStorageGetContentResponseDataInner {
NodesStorageGetContentResponseDataInner {
approximate_size: None,
ctime: None,
encrypted: None,
format,
notes: None,
parent: None,
protected: None,
size: None,
used: None,
verification: None,
vmid: None,
volid,
}
}
}