Skip to main content

clientapi_pbs/models/
tape_backup_create_backup_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 TapeBackupCreateBackupRequest {
16
17    /// Drive Identifier.
18    #[serde(rename = "drive")]
19    pub drive: String,
20
21    /// Eject media upon job completion.
22    #[serde(rename = "eject-media", skip_serializing_if = "Option::is_none")]
23    pub eject_media: Option<bool>,
24
25    /// Export media set upon job completion.
26    #[serde(rename = "export-media-set", skip_serializing_if = "Option::is_none")]
27    pub export_media_set: Option<bool>,
28
29    /// Ignore the allocation policy and start a new media-set.
30    #[serde(rename = "force-media-set", skip_serializing_if = "Option::is_none")]
31    pub force_media_set: Option<bool>,
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    /// Backup latest snapshots only.
38    #[serde(rename = "latest-only", skip_serializing_if = "Option::is_none")]
39    pub latest_only: Option<bool>,
40
41    /// How many levels of namespaces should be operated on (0 == no recursion)
42    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
43    pub max_depth: Option<i32>,
44
45    /// 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.
46    #[serde(rename = "notification-mode", skip_serializing_if = "Option::is_none")]
47    pub notification_mode: Option<models::PbsNotificationModeEnum>,
48
49    /// User ID
50    #[serde(rename = "notify-user", skip_serializing_if = "Option::is_none")]
51    pub notify_user: Option<String>,
52
53    /// Namespace.
54    #[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
55    pub ns: Option<String>,
56
57    /// Media pool name.
58    #[serde(rename = "pool")]
59    pub pool: String,
60
61    /// Datastore name.
62    #[serde(rename = "store")]
63    pub store: String,
64
65    /// The number of threads to use for the tape backup job.
66    #[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
67    pub worker_threads: Option<i32>,
68
69
70}
71
72impl TapeBackupCreateBackupRequest {
73    pub fn new(drive: String, pool: String, store: String) -> TapeBackupCreateBackupRequest {
74        TapeBackupCreateBackupRequest {
75            
76            drive,
77            
78            eject_media: None,
79            
80            export_media_set: None,
81            
82            force_media_set: None,
83            
84            group_filter: None,
85            
86            latest_only: None,
87            
88            max_depth: None,
89            
90            notification_mode: None,
91            
92            notify_user: None,
93            
94            ns: None,
95            
96            pool,
97            
98            store,
99            
100            worker_threads: None,
101            
102        }
103    }
104}
105
106