use proxmox_schema::*;
use crate::{
- Authid, BackupNamespace, BackupType, RateLimitConfig, Userid, BACKUP_GROUP_SCHEMA,
- BACKUP_NAMESPACE_SCHEMA, BACKUP_NS_RE, DATASTORE_SCHEMA, DRIVE_NAME_SCHEMA,
- MEDIA_POOL_NAME_SCHEMA, NS_MAX_DEPTH_REDUCED_SCHEMA, PROXMOX_SAFE_ID_FORMAT,
+ Authid, BackupNamespace, BackupType, NotificationMode, RateLimitConfig, Userid,
+ BACKUP_GROUP_SCHEMA, BACKUP_NAMESPACE_SCHEMA, BACKUP_NS_RE, DATASTORE_SCHEMA,
+ DRIVE_NAME_SCHEMA, MEDIA_POOL_NAME_SCHEMA, NS_MAX_DEPTH_REDUCED_SCHEMA, PROXMOX_SAFE_ID_FORMAT,
PROXMOX_SAFE_ID_REGEX_STR, REMOTE_ID_SCHEMA, SINGLE_LINE_COMMENT_SCHEMA,
};
#[serde(skip_serializing_if = "Option::is_none")]
pub notify_user: Option<Userid>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub notification_mode: Option<NotificationMode>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub group_filter: Option<Vec<GroupFilter>>,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub ns: Option<BackupNamespace>,
LatestOnly,
/// Delete the 'notify-user' property
NotifyUser,
+ /// Delete the 'notification-mode' property
+ NotificationMode,
/// Delete the 'group_filter' property
GroupFilter,
/// Delete the 'max-depth' property
DeletableProperty::NotifyUser => {
data.setup.notify_user = None;
}
+ DeletableProperty::NotificationMode => {
+ data.setup.notification_mode = None;
+ }
DeletableProperty::Schedule => {
data.schedule = None;
}
if update.setup.notify_user.is_some() {
data.setup.notify_user = update.setup.notify_user;
}
+ if update.setup.notification_mode.is_some() {
+ data.setup.notification_mode = update.setup.notification_mode;
+ }
if update.setup.group_filter.is_some() {
data.setup.group_filter = update.setup.group_filter;
}