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 ConfigDatastoreCreateDatastoreRequest {

    /// Datastore backend config
    #[serde(rename = "backend", skip_serializing_if = "Option::is_none")]
    pub backend: Option<String>,

    /// The UUID of the filesystem partition for removable datastores.
    #[serde(rename = "backing-device", skip_serializing_if = "Option::is_none")]
    pub backing_device: Option<String>,

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

    /// Reset notification threshold related counters at specified schedule.
    #[serde(rename = "counter-reset-schedule", skip_serializing_if = "Option::is_none")]
    pub counter_reset_schedule: Option<String>,

    /// Run garbage collection before unmounting a removable datastore.
    #[serde(rename = "gc-on-unmount", skip_serializing_if = "Option::is_none")]
    pub gc_on_unmount: Option<bool>,

    /// Run garbage collection job at specified schedule.
    #[serde(rename = "gc-schedule", skip_serializing_if = "Option::is_none")]
    pub gc_schedule: Option<String>,

    /// Number of daily backups to keep.
    #[serde(rename = "keep-daily", skip_serializing_if = "Option::is_none")]
    pub keep_daily: Option<i64>,

    /// Number of hourly backups to keep.
    #[serde(rename = "keep-hourly", skip_serializing_if = "Option::is_none")]
    pub keep_hourly: Option<i64>,

    /// Number of backups to keep.
    #[serde(rename = "keep-last", skip_serializing_if = "Option::is_none")]
    pub keep_last: Option<i64>,

    /// Number of monthly backups to keep.
    #[serde(rename = "keep-monthly", skip_serializing_if = "Option::is_none")]
    pub keep_monthly: Option<i64>,

    /// Number of weekly backups to keep.
    #[serde(rename = "keep-weekly", skip_serializing_if = "Option::is_none")]
    pub keep_weekly: Option<i64>,

    /// Number of yearly backups to keep.
    #[serde(rename = "keep-yearly", skip_serializing_if = "Option::is_none")]
    pub keep_yearly: Option<i64>,

    /// Maintenance mode, type is either 'offline' or 'read-only', message should be enclosed in \"
    #[serde(rename = "maintenance-mode", skip_serializing_if = "Option::is_none")]
    pub maintenance_mode: Option<Box<models::PbsMaintenanceField>>,

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

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

    /// Threshold values for notifications
    #[serde(rename = "notification-thresholds", skip_serializing_if = "Option::is_none")]
    pub notification_thresholds: Option<Box<models::PbsNotificationThresholdsField>>,

    /// Datastore notification setting, enum can be one of 'always', 'never', or 'error'.
    #[serde(rename = "notify", skip_serializing_if = "Option::is_none")]
    pub notify: Option<Box<models::PbsNotifyField>>,

    /// User ID
    #[serde(rename = "notify-user", skip_serializing_if = "Option::is_none")]
    pub notify_user: Option<String>,

    /// Overwrite in use marker (S3 backed datastores only).
    #[serde(rename = "overwrite-in-use", skip_serializing_if = "Option::is_none")]
    pub overwrite_in_use: Option<bool>,

    /// Either the absolute path to the datastore directory, or a relative on-device path for removable datastores.
    #[serde(rename = "path")]
    pub path: String,

    /// Run prune job at specified schedule.
    #[serde(rename = "prune-schedule", skip_serializing_if = "Option::is_none")]
    pub prune_schedule: Option<String>,

    /// Re-use existing datastore directory.
    #[serde(rename = "reuse-datastore", skip_serializing_if = "Option::is_none")]
    pub reuse_datastore: Option<bool>,

    /// Datastore tuning options
    #[serde(rename = "tuning", skip_serializing_if = "Option::is_none")]
    pub tuning: Option<Box<models::PbsTuningField>>,

    /// If enabled, all new backups will be verified right after completion.
    #[serde(rename = "verify-new", skip_serializing_if = "Option::is_none")]
    pub verify_new: Option<bool>,


}

impl ConfigDatastoreCreateDatastoreRequest {
    pub fn new(name: String, path: String) -> ConfigDatastoreCreateDatastoreRequest {
        ConfigDatastoreCreateDatastoreRequest {
            
            backend: None,
            
            backing_device: None,
            
            comment: None,
            
            counter_reset_schedule: None,
            
            gc_on_unmount: None,
            
            gc_schedule: None,
            
            keep_daily: None,
            
            keep_hourly: None,
            
            keep_last: None,
            
            keep_monthly: None,
            
            keep_weekly: None,
            
            keep_yearly: None,
            
            maintenance_mode: None,
            
            name,
            
            notification_mode: None,
            
            notification_thresholds: None,
            
            notify: None,
            
            notify_user: None,
            
            overwrite_in_use: None,
            
            path,
            
            prune_schedule: None,
            
            reuse_datastore: None,
            
            tuning: None,
            
            verify_new: None,
            
        }
    }
}