Skip to main content

clientapi_pbs/models/
admin_datastore_get_gc_response_data.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AdminDatastoreGetGcResponseData {
16
17    #[serde(rename = "cache-stats", skip_serializing_if = "Option::is_none")]
18    pub cache_stats: Option<Box<models::AdminDatastoreGetGcResponseDataCacheStats>>,
19
20    /// Bytes used on disk.
21    #[serde(rename = "disk-bytes")]
22    pub disk_bytes: i64,
23
24    /// Chunks used on disk.
25    #[serde(rename = "disk-chunks")]
26    pub disk_chunks: i64,
27
28    /// Duration of last gc run
29    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
30    pub duration: Option<i64>,
31
32    /// Sum of bytes referred by index files.
33    #[serde(rename = "index-data-bytes")]
34    pub index_data_bytes: i64,
35
36    /// Number of processed index files.
37    #[serde(rename = "index-file-count")]
38    pub index_file_count: i64,
39
40    /// Endtime of the last gc run
41    #[serde(rename = "last-run-endtime", skip_serializing_if = "Option::is_none")]
42    pub last_run_endtime: Option<i64>,
43
44    /// State of the last gc run
45    #[serde(rename = "last-run-state", skip_serializing_if = "Option::is_none")]
46    pub last_run_state: Option<String>,
47
48    /// Time of the next gc run
49    #[serde(rename = "next-run", skip_serializing_if = "Option::is_none")]
50    pub next_run: Option<i64>,
51
52    /// Sum of pending bytes (pending removal - kept for safety).
53    #[serde(rename = "pending-bytes")]
54    pub pending_bytes: i64,
55
56    /// Number of pending chunks (pending removal - kept for safety).
57    #[serde(rename = "pending-chunks")]
58    pub pending_chunks: i64,
59
60    /// Number of chunks marked as .bad by verify that have been removed by GC.
61    #[serde(rename = "removed-bad")]
62    pub removed_bad: i64,
63
64    /// Sum of removed bytes.
65    #[serde(rename = "removed-bytes")]
66    pub removed_bytes: i64,
67
68    /// Number of removed chunks.
69    #[serde(rename = "removed-chunks")]
70    pub removed_chunks: i64,
71
72    /// Schedule of the gc job
73    #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
74    pub schedule: Option<String>,
75
76    /// Number of chunks still marked as .bad after garbage collection.
77    #[serde(rename = "still-bad")]
78    pub still_bad: i64,
79
80    /// Datastore
81    #[serde(rename = "store")]
82    pub store: String,
83
84    /// Unique Process/Task Identifier
85    #[serde(rename = "upid", skip_serializing_if = "Option::is_none")]
86    pub upid: Option<String>,
87
88
89}
90
91impl AdminDatastoreGetGcResponseData {
92    pub fn new(disk_bytes: i64, disk_chunks: i64, index_data_bytes: i64, index_file_count: i64, pending_bytes: i64, pending_chunks: i64, removed_bad: i64, removed_bytes: i64, removed_chunks: i64, still_bad: i64, store: String) -> AdminDatastoreGetGcResponseData {
93        AdminDatastoreGetGcResponseData {
94            
95            cache_stats: None,
96            
97            disk_bytes,
98            
99            disk_chunks,
100            
101            duration: None,
102            
103            index_data_bytes,
104            
105            index_file_count,
106            
107            last_run_endtime: None,
108            
109            last_run_state: None,
110            
111            next_run: None,
112            
113            pending_bytes,
114            
115            pending_chunks,
116            
117            removed_bad,
118            
119            removed_bytes,
120            
121            removed_chunks,
122            
123            schedule: None,
124            
125            still_bad,
126            
127            store,
128            
129            upid: None,
130            
131        }
132    }
133}
134
135