clientapi-pbs 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * 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 TapeBackupCreateBackupRequest {

    /// Drive Identifier.
    #[serde(rename = "drive")]
    pub drive: String,

    /// Eject media upon job completion.
    #[serde(rename = "eject-media", skip_serializing_if = "Option::is_none")]
    pub eject_media: Option<bool>,

    /// Export media set upon job completion.
    #[serde(rename = "export-media-set", skip_serializing_if = "Option::is_none")]
    pub export_media_set: Option<bool>,

    /// Ignore the allocation policy and start a new media-set.
    #[serde(rename = "force-media-set", skip_serializing_if = "Option::is_none")]
    pub force_media_set: Option<bool>,

    /// List of group filters.
    #[serde(rename = "group-filter", skip_serializing_if = "Option::is_none")]
    pub group_filter: Option<Vec<String>>,

    /// Backup latest snapshots only.
    #[serde(rename = "latest-only", skip_serializing_if = "Option::is_none")]
    pub latest_only: Option<bool>,

    /// How many levels of namespaces should be operated on (0 == no recursion)
    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
    pub max_depth: Option<i32>,

    /// 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>,

    /// Namespace.
    #[serde(rename = "ns", skip_serializing_if = "Option::is_none")]
    pub ns: Option<String>,

    /// Media pool name.
    #[serde(rename = "pool")]
    pub pool: String,

    /// Datastore name.
    #[serde(rename = "store")]
    pub store: String,

    /// The number of threads to use for the tape backup job.
    #[serde(rename = "worker-threads", skip_serializing_if = "Option::is_none")]
    pub worker_threads: Option<i32>,


}

impl TapeBackupCreateBackupRequest {
    pub fn new(drive: String, pool: String, store: String) -> TapeBackupCreateBackupRequest {
        TapeBackupCreateBackupRequest {
            
            drive,
            
            eject_media: None,
            
            export_media_set: None,
            
            force_media_set: None,
            
            group_filter: None,
            
            latest_only: None,
            
            max_depth: None,
            
            notification_mode: None,
            
            notify_user: None,
            
            ns: None,
            
            pool,
            
            store,
            
            worker_threads: None,
            
        }
    }
}