Skip to main content

clientapi_pbs/models/
config_datastore_create_datastore_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 ConfigDatastoreCreateDatastoreRequest {
16
17    /// Datastore backend config
18    #[serde(rename = "backend", skip_serializing_if = "Option::is_none")]
19    pub backend: Option<String>,
20
21    /// The UUID of the filesystem partition for removable datastores.
22    #[serde(rename = "backing-device", skip_serializing_if = "Option::is_none")]
23    pub backing_device: Option<String>,
24
25    /// Comment.
26    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
27    pub comment: Option<String>,
28
29    /// Reset notification threshold related counters at specified schedule.
30    #[serde(rename = "counter-reset-schedule", skip_serializing_if = "Option::is_none")]
31    pub counter_reset_schedule: Option<String>,
32
33    /// Run garbage collection before unmounting a removable datastore.
34    #[serde(rename = "gc-on-unmount", skip_serializing_if = "Option::is_none")]
35    pub gc_on_unmount: Option<bool>,
36
37    /// Run garbage collection job at specified schedule.
38    #[serde(rename = "gc-schedule", skip_serializing_if = "Option::is_none")]
39    pub gc_schedule: Option<String>,
40
41    /// Number of daily backups to keep.
42    #[serde(rename = "keep-daily", skip_serializing_if = "Option::is_none")]
43    pub keep_daily: Option<i64>,
44
45    /// Number of hourly backups to keep.
46    #[serde(rename = "keep-hourly", skip_serializing_if = "Option::is_none")]
47    pub keep_hourly: Option<i64>,
48
49    /// Number of backups to keep.
50    #[serde(rename = "keep-last", skip_serializing_if = "Option::is_none")]
51    pub keep_last: Option<i64>,
52
53    /// Number of monthly backups to keep.
54    #[serde(rename = "keep-monthly", skip_serializing_if = "Option::is_none")]
55    pub keep_monthly: Option<i64>,
56
57    /// Number of weekly backups to keep.
58    #[serde(rename = "keep-weekly", skip_serializing_if = "Option::is_none")]
59    pub keep_weekly: Option<i64>,
60
61    /// Number of yearly backups to keep.
62    #[serde(rename = "keep-yearly", skip_serializing_if = "Option::is_none")]
63    pub keep_yearly: Option<i64>,
64
65    /// Maintenance mode, type is either 'offline' or 'read-only', message should be enclosed in \"
66    #[serde(rename = "maintenance-mode", skip_serializing_if = "Option::is_none")]
67    pub maintenance_mode: Option<Box<models::PbsMaintenanceField>>,
68
69    /// Datastore name.
70    #[serde(rename = "name")]
71    pub name: String,
72
73    /// 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.
74    #[serde(rename = "notification-mode", skip_serializing_if = "Option::is_none")]
75    pub notification_mode: Option<models::PbsNotificationModeEnum>,
76
77    /// Threshold values for notifications
78    #[serde(rename = "notification-thresholds", skip_serializing_if = "Option::is_none")]
79    pub notification_thresholds: Option<Box<models::PbsNotificationThresholdsField>>,
80
81    /// Datastore notification setting, enum can be one of 'always', 'never', or 'error'.
82    #[serde(rename = "notify", skip_serializing_if = "Option::is_none")]
83    pub notify: Option<Box<models::PbsNotifyField>>,
84
85    /// User ID
86    #[serde(rename = "notify-user", skip_serializing_if = "Option::is_none")]
87    pub notify_user: Option<String>,
88
89    /// Overwrite in use marker (S3 backed datastores only).
90    #[serde(rename = "overwrite-in-use", skip_serializing_if = "Option::is_none")]
91    pub overwrite_in_use: Option<bool>,
92
93    /// Either the absolute path to the datastore directory, or a relative on-device path for removable datastores.
94    #[serde(rename = "path")]
95    pub path: String,
96
97    /// Run prune job at specified schedule.
98    #[serde(rename = "prune-schedule", skip_serializing_if = "Option::is_none")]
99    pub prune_schedule: Option<String>,
100
101    /// Re-use existing datastore directory.
102    #[serde(rename = "reuse-datastore", skip_serializing_if = "Option::is_none")]
103    pub reuse_datastore: Option<bool>,
104
105    /// Datastore tuning options
106    #[serde(rename = "tuning", skip_serializing_if = "Option::is_none")]
107    pub tuning: Option<Box<models::PbsTuningField>>,
108
109    /// If enabled, all new backups will be verified right after completion.
110    #[serde(rename = "verify-new", skip_serializing_if = "Option::is_none")]
111    pub verify_new: Option<bool>,
112
113
114}
115
116impl ConfigDatastoreCreateDatastoreRequest {
117    pub fn new(name: String, path: String) -> ConfigDatastoreCreateDatastoreRequest {
118        ConfigDatastoreCreateDatastoreRequest {
119            
120            backend: None,
121            
122            backing_device: None,
123            
124            comment: None,
125            
126            counter_reset_schedule: None,
127            
128            gc_on_unmount: None,
129            
130            gc_schedule: None,
131            
132            keep_daily: None,
133            
134            keep_hourly: None,
135            
136            keep_last: None,
137            
138            keep_monthly: None,
139            
140            keep_weekly: None,
141            
142            keep_yearly: None,
143            
144            maintenance_mode: None,
145            
146            name,
147            
148            notification_mode: None,
149            
150            notification_thresholds: None,
151            
152            notify: None,
153            
154            notify_user: None,
155            
156            overwrite_in_use: None,
157            
158            path,
159            
160            prune_schedule: None,
161            
162            reuse_datastore: None,
163            
164            tuning: None,
165            
166            verify_new: None,
167            
168        }
169    }
170}
171
172