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
/*
* 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 TapeBackupCreateBackupRequest {
/// Drive Identifier.
#[serde(rename = "drive")]
pub drive: String,
/// Eject media upon job completion.
#[serde(rename = "eject-media", skip_serializing_if = "Option::is_none")]
pub eject_media: Option<bool>,
/// Export media set upon job completion.
#[serde(rename = "export-media-set", skip_serializing_if = "Option::is_none")]
pub export_media_set: Option<bool>,
/// Ignore the allocation policy and start a new media-set.
#[serde(rename = "force-media-set", skip_serializing_if = "Option::is_none")]
pub force_media_set: Option<bool>,
/// List of group filters.
#[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
pub group_filter: Option<Vec<String>>,
/// Backup latest snapshots only.
#[serde(rename = "latest-only", skip_serializing_if = "Option::is_none")]
pub latest_only: Option<bool>,
/// How many levels of namespaces should be operated on (0 == no recursion)
#[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
pub max_depth: Option<i32>,
/// Configure how notifications for this datastore should be sent. `legacy-sendmail` sends email notifications to the user configured in `notify-user` via the system's `sendmail` executable. `notification-system` emits matchable notification events to the notification system.
#[serde(rename = "notification-mode", skip_serializing_if = "Option::is_none")]
pub notification_mode: Option<models::PbsNotificationModeEnum>,
/// User ID
#[serde(rename = "notify-user", skip_serializing_if = "Option::is_none")]
pub notify_user: Option<String>,
/// Namespace.
#[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
pub ns: Option<String>,
/// Media pool name.
#[serde(rename = "pool")]
pub pool: String,
/// Datastore name.
#[serde(rename = "store")]
pub store: String,
/// The number of threads to use for the tape backup job.
#[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
pub worker_threads: Option<i32>,
}
impl TapeBackupCreateBackupRequest {
pub fn new(drive: String, pool: String, store: String) -> TapeBackupCreateBackupRequest {
TapeBackupCreateBackupRequest {
drive,
eject_media: None,
export_media_set: None,
force_media_set: None,
group_filter: None,
latest_only: None,
max_depth: None,
notification_mode: None,
notify_user: None,
ns: None,
pool,
store,
worker_threads: None,
}
}
}