Skip to main content

clientapi_pbs/models/
config_sync_create_sync_request.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 ConfigSyncCreateSyncRequest {
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    /// How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value)
50    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
51    pub max_depth: Option<i32>,
52
53    /// Namespace.
54    #[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
55    pub ns: Option<String>,
56
57    /// Authentication ID
58    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
59    pub owner: Option<String>,
60
61    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
62    #[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
63    pub rate_in: Option<String>,
64
65    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
66    #[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
67    pub rate_out: Option<String>,
68
69    /// Remote ID.
70    #[serde(rename = "remote", skip_serializing_if = "Option::is_none")]
71    pub remote: Option<String>,
72
73    /// Namespace.
74    #[serde(rename = "remote-ns", skip_serializing_if = "Option::is_none")]
75    pub remote_ns: Option<String>,
76
77    /// Datastore name.
78    #[serde(rename = "remote-store")]
79    pub remote_store: String,
80
81    /// Delete vanished backups. This remove the local copy if the remote backup was deleted.
82    #[serde(rename = "remove-vanished", skip_serializing_if = "Option::is_none")]
83    pub remove_vanished: Option<bool>,
84
85    /// If the verification failed for a local snapshot, try to pull it again.
86    #[serde(rename = "resync-corrupt", skip_serializing_if = "Option::is_none")]
87    pub resync_corrupt: Option<bool>,
88
89    /// Run this job when a relevant datastore is mounted.
90    #[serde(rename = "run-on-mount", skip_serializing_if = "Option::is_none")]
91    pub run_on_mount: Option<bool>,
92
93    /// Run sync job at specified schedule.
94    #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
95    pub schedule: Option<String>,
96
97    /// Datastore name.
98    #[serde(rename = "store")]
99    pub store: String,
100
101    /// Direction of the sync job, push or pull
102    #[serde(rename = "sync-direction", skip_serializing_if = "Option::is_none")]
103    pub sync_direction: Option<models::PbsAdminSyncSyncDirectionEnum>,
104
105    /// Limit transfer to last N snapshots (per group), skipping others
106    #[serde(rename = "transfer-last", skip_serializing_if = "Option::is_none")]
107    pub transfer_last: Option<i64>,
108
109    /// Unmount involved removable datastore after the sync job finishes. Requires 'run-on-mount' to be enabled.
110    #[serde(rename = "unmount-on-done", skip_serializing_if = "Option::is_none")]
111    pub unmount_on_done: Option<bool>,
112
113    /// Only synchronize verified backup snapshots, exclude others.
114    #[serde(rename = "verified-only", skip_serializing_if = "Option::is_none")]
115    pub verified_only: Option<bool>,
116
117    /// The number of worker threads to process groups in parallel.
118    #[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
119    pub worker_threads: Option<i32>,
120
121
122}
123
124impl ConfigSyncCreateSyncRequest {
125    pub fn new(id: String, remote_store: String, store: String) -> ConfigSyncCreateSyncRequest {
126        ConfigSyncCreateSyncRequest {
127            
128            active_encryption_key: None,
129            
130            associated_key: None,
131            
132            burst_in: None,
133            
134            burst_out: None,
135            
136            comment: None,
137            
138            encrypted_only: None,
139            
140            group_filter: None,
141            
142            id,
143            
144            max_depth: None,
145            
146            ns: None,
147            
148            owner: None,
149            
150            rate_in: None,
151            
152            rate_out: None,
153            
154            remote: None,
155            
156            remote_ns: None,
157            
158            remote_store,
159            
160            remove_vanished: None,
161            
162            resync_corrupt: None,
163            
164            run_on_mount: None,
165            
166            schedule: None,
167            
168            store,
169            
170            sync_direction: None,
171            
172            transfer_last: None,
173            
174            unmount_on_done: None,
175            
176            verified_only: None,
177            
178            worker_threads: None,
179            
180        }
181    }
182}
183
184