Skip to main content

clientapi_pbs/models/
admin_sync_get_sync_response_data_inner.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 AdminSyncGetSyncResponseDataInner {
16
17    /// ID to uniquely identify encryption/decription key
18    #[serde(rename = "active-encryption-key", skip_serializing_if = "Option::is_none")]
19    pub active_encryption_key: Option<String>,
20
21    /// List of cryptographic keys associated with sync job.
22    #[serde(rename = "associated-key", skip_serializing_if = "Option::is_none")]
23    pub associated_key: Option<Vec<String>>,
24
25    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
26    #[serde(rename = "burst-in", skip_serializing_if = "Option::is_none")]
27    pub burst_in: Option<String>,
28
29    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
30    #[serde(rename = "burst-out", skip_serializing_if = "Option::is_none")]
31    pub burst_out: Option<String>,
32
33    /// Comment.
34    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
35    pub comment: Option<String>,
36
37    /// Only synchronize encrypted backup snapshots, exclude others.
38    #[serde(rename = "encrypted-only", skip_serializing_if = "Option::is_none")]
39    pub encrypted_only: Option<bool>,
40
41    /// List of group filters.
42    #[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
43    pub group_filter: Option<Vec<String>>,
44
45    /// Job ID.
46    #[serde(rename = "id")]
47    pub id: String,
48
49    /// Endtime of the last run.
50    #[serde(rename = "last-run-endtime", skip_serializing_if = "Option::is_none")]
51    pub last_run_endtime: Option<i64>,
52
53    /// Result of the last run.
54    #[serde(rename = "last-run-state", skip_serializing_if = "Option::is_none")]
55    pub last_run_state: Option<String>,
56
57    /// Task UPID of the last run.
58    #[serde(rename = "last-run-upid", skip_serializing_if = "Option::is_none")]
59    pub last_run_upid: Option<String>,
60
61    /// How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value)
62    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
63    pub max_depth: Option<i32>,
64
65    /// Estimated time of the next run (UNIX epoch).
66    #[serde(rename = "next-run", skip_serializing_if = "Option::is_none")]
67    pub next_run: Option<i64>,
68
69    /// Namespace.
70    #[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
71    pub ns: Option<String>,
72
73    /// Authentication ID
74    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
75    pub owner: Option<String>,
76
77    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
78    #[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
79    pub rate_in: Option<String>,
80
81    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
82    #[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
83    pub rate_out: Option<String>,
84
85    /// Remote ID.
86    #[serde(rename = "remote", skip_serializing_if = "Option::is_none")]
87    pub remote: Option<String>,
88
89    /// Namespace.
90    #[serde(rename = "remote-ns", skip_serializing_if = "Option::is_none")]
91    pub remote_ns: Option<String>,
92
93    /// Datastore name.
94    #[serde(rename = "remote-store")]
95    pub remote_store: String,
96
97    /// Delete vanished backups. This remove the local copy if the remote backup was deleted.
98    #[serde(rename = "remove-vanished", skip_serializing_if = "Option::is_none")]
99    pub remove_vanished: Option<bool>,
100
101    /// If the verification failed for a local snapshot, try to pull it again.
102    #[serde(rename = "resync-corrupt", skip_serializing_if = "Option::is_none")]
103    pub resync_corrupt: Option<bool>,
104
105    /// Run this job when a relevant datastore is mounted.
106    #[serde(rename = "run-on-mount", skip_serializing_if = "Option::is_none")]
107    pub run_on_mount: Option<bool>,
108
109    /// Run sync job at specified schedule.
110    #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
111    pub schedule: Option<String>,
112
113    /// Datastore name.
114    #[serde(rename = "store")]
115    pub store: String,
116
117    /// Direction of the sync job, push or pull
118    #[serde(rename = "sync-direction", skip_serializing_if = "Option::is_none")]
119    pub sync_direction: Option<models::PbsAdminSyncSyncDirectionEnum>,
120
121    /// Limit transfer to last N snapshots (per group), skipping others
122    #[serde(rename = "transfer-last", skip_serializing_if = "Option::is_none")]
123    pub transfer_last: Option<i64>,
124
125    /// Unmount involved removable datastore after the sync job finishes. Requires 'run-on-mount' to be enabled.
126    #[serde(rename = "unmount-on-done", skip_serializing_if = "Option::is_none")]
127    pub unmount_on_done: Option<bool>,
128
129    /// Only synchronize verified backup snapshots, exclude others.
130    #[serde(rename = "verified-only", skip_serializing_if = "Option::is_none")]
131    pub verified_only: Option<bool>,
132
133    /// The number of worker threads to process groups in parallel.
134    #[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
135    pub worker_threads: Option<i32>,
136
137
138}
139
140impl AdminSyncGetSyncResponseDataInner {
141    pub fn new(id: String, remote_store: String, store: String) -> AdminSyncGetSyncResponseDataInner {
142        AdminSyncGetSyncResponseDataInner {
143            
144            active_encryption_key: None,
145            
146            associated_key: None,
147            
148            burst_in: None,
149            
150            burst_out: None,
151            
152            comment: None,
153            
154            encrypted_only: None,
155            
156            group_filter: None,
157            
158            id,
159            
160            last_run_endtime: None,
161            
162            last_run_state: None,
163            
164            last_run_upid: None,
165            
166            max_depth: None,
167            
168            next_run: None,
169            
170            ns: None,
171            
172            owner: None,
173            
174            rate_in: None,
175            
176            rate_out: None,
177            
178            remote: None,
179            
180            remote_ns: None,
181            
182            remote_store,
183            
184            remove_vanished: None,
185            
186            resync_corrupt: None,
187            
188            run_on_mount: None,
189            
190            schedule: None,
191            
192            store,
193            
194            sync_direction: None,
195            
196            transfer_last: None,
197            
198            unmount_on_done: None,
199            
200            verified_only: None,
201            
202            worker_threads: None,
203            
204        }
205    }
206}
207
208