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
/*
* 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 ConfigSyncCreateSyncRequest {
/// ID to uniquely identify encryption/decription key
#[serde(rename = "active-encryption-key", skip_serializing_if = "Option::is_none")]
pub active_encryption_key: Option<String>,
/// List of cryptographic keys associated with sync job.
#[serde(rename = "associated-key", skip_serializing_if = "Option::is_none")]
pub associated_key: Option<Vec<String>>,
/// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
#[serde(rename = "burst-in", skip_serializing_if = "Option::is_none")]
pub burst_in: Option<String>,
/// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
#[serde(rename = "burst-out", skip_serializing_if = "Option::is_none")]
pub burst_out: Option<String>,
/// Comment.
#[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
/// Only synchronize encrypted backup snapshots, exclude others.
#[serde(rename = "encrypted-only", skip_serializing_if = "Option::is_none")]
pub encrypted_only: Option<bool>,
/// List of group filters.
#[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
pub group_filter: Option<Vec<String>>,
/// Job ID.
#[serde(rename = "id")]
pub id: String,
/// How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value)
#[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
pub max_depth: Option<i32>,
/// Namespace.
#[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
pub ns: Option<String>,
/// Authentication ID
#[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
/// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
#[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
pub rate_in: Option<String>,
/// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
#[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
pub rate_out: Option<String>,
/// Remote ID.
#[serde(rename = "remote", skip_serializing_if = "Option::is_none")]
pub remote: Option<String>,
/// Namespace.
#[serde(rename = "remote-ns", skip_serializing_if = "Option::is_none")]
pub remote_ns: Option<String>,
/// Datastore name.
#[serde(rename = "remote-store")]
pub remote_store: String,
/// Delete vanished backups. This remove the local copy if the remote backup was deleted.
#[serde(rename = "remove-vanished", skip_serializing_if = "Option::is_none")]
pub remove_vanished: Option<bool>,
/// If the verification failed for a local snapshot, try to pull it again.
#[serde(rename = "resync-corrupt", skip_serializing_if = "Option::is_none")]
pub resync_corrupt: Option<bool>,
/// Run this job when a relevant datastore is mounted.
#[serde(rename = "run-on-mount", skip_serializing_if = "Option::is_none")]
pub run_on_mount: Option<bool>,
/// Run sync job at specified schedule.
#[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
/// Datastore name.
#[serde(rename = "store")]
pub store: String,
/// Direction of the sync job, push or pull
#[serde(rename = "sync-direction", skip_serializing_if = "Option::is_none")]
pub sync_direction: Option<models::PbsAdminSyncSyncDirectionEnum>,
/// Limit transfer to last N snapshots (per group), skipping others
#[serde(rename = "transfer-last", skip_serializing_if = "Option::is_none")]
pub transfer_last: Option<i64>,
/// Unmount involved removable datastore after the sync job finishes. Requires 'run-on-mount' to be enabled.
#[serde(rename = "unmount-on-done", skip_serializing_if = "Option::is_none")]
pub unmount_on_done: Option<bool>,
/// Only synchronize verified backup snapshots, exclude others.
#[serde(rename = "verified-only", skip_serializing_if = "Option::is_none")]
pub verified_only: Option<bool>,
/// The number of worker threads to process groups in parallel.
#[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
pub worker_threads: Option<i32>,
}
impl ConfigSyncCreateSyncRequest {
pub fn new(id: String, remote_store: String, store: String) -> ConfigSyncCreateSyncRequest {
ConfigSyncCreateSyncRequest {
active_encryption_key: None,
associated_key: None,
burst_in: None,
burst_out: None,
comment: None,
encrypted_only: None,
group_filter: None,
id,
max_depth: None,
ns: None,
owner: None,
rate_in: None,
rate_out: None,
remote: None,
remote_ns: None,
remote_store,
remove_vanished: None,
resync_corrupt: None,
run_on_mount: None,
schedule: None,
store,
sync_direction: None,
transfer_last: None,
unmount_on_done: None,
verified_only: None,
worker_threads: None,
}
}
}