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
/*
* 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 TapeCreateRestoreRequest {
/// Drive Identifier.
#[serde(rename = "drive")]
pub drive: String,
/// Media set UUID.
#[serde(rename = "media-set")]
pub media_set: String,
/// List of namespace to restore.
#[serde(rename = "namespaces", skip_serializing_if = "Option::is_none")]
pub namespaces: Option<Vec<models::TapeCreateRestoreRequestNamespacesInner>>,
/// 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>,
/// Authentication ID
#[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
/// List of snapshots.
#[serde(rename = "snapshots", skip_serializing_if = "Option::is_none")]
pub snapshots: Option<Vec<String>>,
/// A list of Datastore mappings (or single datastore), comma separated. For example 'a=b,e' maps the source datastore 'a' to target 'b and all other sources to the default 'e'. If no default is given, only the specified sources are mapped.
#[serde(rename = "store")]
pub store: Box<models::PbsStoreField>,
}
impl TapeCreateRestoreRequest {
pub fn new(drive: String, media_set: String, store: models::PbsStoreField) -> TapeCreateRestoreRequest {
TapeCreateRestoreRequest {
drive,
media_set,
namespaces: None,
notification_mode: None,
notify_user: None,
owner: None,
snapshots: None,
store: Box::new(store),
}
}
}