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
/*
* 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 PushCreatePushRequest {
/// 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>,
/// Only synchronize encrypted backup snapshots, exclude others.
#[serde(rename = "encrypted-only", skip_serializing_if = "Option::is_none")]
pub encrypted_only: Option<bool>,
/// ID to uniquely identify encryption/decription key
#[serde(rename = "encryption-key", skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
/// List of group filters.
#[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
pub group_filter: Option<Vec<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>,
/// 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")]
pub remote: 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>,
/// Datastore name.
#[serde(rename = "store")]
pub store: String,
/// 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>,
/// 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 PushCreatePushRequest {
pub fn new(remote: String, remote_store: String, store: String) -> PushCreatePushRequest {
PushCreatePushRequest {
burst_in: None,
burst_out: None,
encrypted_only: None,
encryption_key: None,
group_filter: None,
max_depth: None,
ns: None,
rate_in: None,
rate_out: None,
remote,
remote_ns: None,
remote_store,
remove_vanished: None,
store,
transfer_last: None,
verified_only: None,
worker_threads: None,
}
}
}