Skip to main content

clientapi_pbs/models/
push_create_push_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 PushCreatePushRequest {
16
17    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
18    #[serde(rename = "burst-in", skip_serializing_if = "Option::is_none")]
19    pub burst_in: Option<String>,
20
21    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
22    #[serde(rename = "burst-out", skip_serializing_if = "Option::is_none")]
23    pub burst_out: Option<String>,
24
25    /// Only synchronize encrypted backup snapshots, exclude others.
26    #[serde(rename = "encrypted-only", skip_serializing_if = "Option::is_none")]
27    pub encrypted_only: Option<bool>,
28
29    /// ID to uniquely identify encryption/decription key
30    #[serde(rename = "encryption-key", skip_serializing_if = "Option::is_none")]
31    pub encryption_key: Option<String>,
32
33    /// List of group filters.
34    #[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
35    pub group_filter: Option<Vec<String>>,
36
37    /// How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value)
38    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
39    pub max_depth: Option<i32>,
40
41    /// Namespace.
42    #[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
43    pub ns: Option<String>,
44
45    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
46    #[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
47    pub rate_in: Option<String>,
48
49    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
50    #[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
51    pub rate_out: Option<String>,
52
53    /// Remote ID.
54    #[serde(rename = "remote")]
55    pub remote: String,
56
57    /// Namespace.
58    #[serde(rename = "remote-ns", skip_serializing_if = "Option::is_none")]
59    pub remote_ns: Option<String>,
60
61    /// Datastore name.
62    #[serde(rename = "remote-store")]
63    pub remote_store: String,
64
65    /// Delete vanished backups. This remove the local copy if the remote backup was deleted.
66    #[serde(rename = "remove-vanished", skip_serializing_if = "Option::is_none")]
67    pub remove_vanished: Option<bool>,
68
69    /// Datastore name.
70    #[serde(rename = "store")]
71    pub store: String,
72
73    /// Limit transfer to last N snapshots (per group), skipping others
74    #[serde(rename = "transfer-last", skip_serializing_if = "Option::is_none")]
75    pub transfer_last: Option<i64>,
76
77    /// Only synchronize verified backup snapshots, exclude others.
78    #[serde(rename = "verified-only", skip_serializing_if = "Option::is_none")]
79    pub verified_only: Option<bool>,
80
81    /// The number of worker threads to process groups in parallel.
82    #[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
83    pub worker_threads: Option<i32>,
84
85
86}
87
88impl PushCreatePushRequest {
89    pub fn new(remote: String, remote_store: String, store: String) -> PushCreatePushRequest {
90        PushCreatePushRequest {
91            
92            burst_in: None,
93            
94            burst_out: None,
95            
96            encrypted_only: None,
97            
98            encryption_key: None,
99            
100            group_filter: None,
101            
102            max_depth: None,
103            
104            ns: None,
105            
106            rate_in: None,
107            
108            rate_out: None,
109            
110            remote,
111            
112            remote_ns: None,
113            
114            remote_store,
115            
116            remove_vanished: None,
117            
118            store,
119            
120            transfer_last: None,
121            
122            verified_only: None,
123            
124            worker_threads: None,
125            
126        }
127    }
128}
129
130