Skip to main content

clientapi_pbs/models/
tape_create_restore_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 TapeCreateRestoreRequest {
16
17    /// Drive Identifier.
18    #[serde(rename = "drive")]
19    pub drive: String,
20
21    /// Media set UUID.
22    #[serde(rename = "media-set")]
23    pub media_set: String,
24
25    /// List of namespace to restore.
26    #[serde(rename = "namespaces", skip_serializing_if = "Option::is_none")]
27    pub namespaces: Option<Vec<models::TapeCreateRestoreRequestNamespacesInner>>,
28
29    /// 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.
30    #[serde(rename = "notification-mode", skip_serializing_if = "Option::is_none")]
31    pub notification_mode: Option<models::PbsNotificationModeEnum>,
32
33    /// User ID
34    #[serde(rename = "notify-user", skip_serializing_if = "Option::is_none")]
35    pub notify_user: Option<String>,
36
37    /// Authentication ID
38    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
39    pub owner: Option<String>,
40
41    /// List of snapshots.
42    #[serde(rename = "snapshots", skip_serializing_if = "Option::is_none")]
43    pub snapshots: Option<Vec<String>>,
44
45    /// 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.
46    #[serde(rename = "store")]
47    pub store: Box<models::PbsStoreField>,
48
49
50}
51
52impl TapeCreateRestoreRequest {
53    pub fn new(drive: String, media_set: String, store: models::PbsStoreField) -> TapeCreateRestoreRequest {
54        TapeCreateRestoreRequest {
55            
56            drive,
57            
58            media_set,
59            
60            namespaces: None,
61            
62            notification_mode: None,
63            
64            notify_user: None,
65            
66            owner: None,
67            
68            snapshots: None,
69            
70            store: Box::new(store),
71            
72        }
73    }
74}
75
76