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 Backup Server API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/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 StatusGetDatastoreUsageResponseDataInner {
/// The available bytes of the underlying storage. (-1 on error)
#[serde(rename = "avail", skip_serializing_if = "Option::is_none")]
pub avail: Option<i64>,
/// Datastore backend type
#[serde(rename = "backend-type")]
pub backend_type: models::PbsBackendTypeEnum,
/// An error description, for example, when the datastore could not be looked up
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
/// Estimation of the UNIX epoch when the storage will be full. It's calculated via a simple Linear Regression (Least Squares) over the RRD data of the last Month. Missing if not enough data points are available yet. An estimate in the past means that usage is declining or not changing.
#[serde(rename = "estimated-full-date", skip_serializing_if = "Option::is_none")]
pub estimated_full_date: Option<i64>,
#[serde(rename = "gc-status", skip_serializing_if = "Option::is_none")]
pub gc_status: Option<Box<models::AdminDatastoreGetStatusResponseDataGcStatus>>,
/// A list of usages of the past (last Month).
#[serde(rename = "history", skip_serializing_if = "Option::is_none")]
pub history: Option<Vec<f64>>,
/// History resolution (seconds)
#[serde(rename = "history-delta", skip_serializing_if = "Option::is_none")]
pub history_delta: Option<i64>,
/// History start time (epoch)
#[serde(rename = "history-start", skip_serializing_if = "Option::is_none")]
pub history_start: Option<i64>,
/// Current mounting status of a datastore, useful for removable datastores.
#[serde(rename = "mount-status")]
pub mount_status: models::PbsMountStatusEnum,
/// Datastore name.
#[serde(rename = "store")]
pub store: String,
/// The Size of the underlying storage in bytes.
#[serde(rename = "total", skip_serializing_if = "Option::is_none")]
pub total: Option<i64>,
/// The used bytes of the underlying storage.
#[serde(rename = "used", skip_serializing_if = "Option::is_none")]
pub used: Option<i64>,
}
impl StatusGetDatastoreUsageResponseDataInner {
pub fn new(backend_type: models::PbsBackendTypeEnum, mount_status: models::PbsMountStatusEnum, store: String) -> StatusGetDatastoreUsageResponseDataInner {
StatusGetDatastoreUsageResponseDataInner {
avail: None,
backend_type,
error: None,
estimated_full_date: None,
gc_status: None,
history: None,
history_delta: None,
history_start: None,
mount_status,
store,
total: None,
used: None,
}
}
}