clientapi-pve 2026.5.24

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

    /// Server IP or DNS name.
    #[serde(rename = "server")]
    pub server: String,

    /// Proxmox Backup Server datastore name.
    #[serde(rename = "datastore")]
    pub datastore: String,

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

    /// Use this port to connect to the storage instead of the default one (for example, with PBS or ESXi). For NFS and CIFS, use the 'options' option to configure the port via the mount options.
    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
    pub port: Option<i32>,

    /// List of nodes for which the storage configuration applies.
    #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
    pub nodes: Option<String>,

    /// Flag to disable the storage.
    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
    pub disable: Option<models::PveBoolean>,

    /// Allowed content types.  NOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs. 
    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,

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

    /// Password for accessing the share/datastore.
    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,

    /// Encryption key. Use 'autogen' to generate one automatically without passphrase.
    #[serde(rename = "encryption-key", skip_serializing_if = "Option::is_none")]
    pub encryption_key: Option<String>,

    /// Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.
    #[serde(rename = "master-pubkey", skip_serializing_if = "Option::is_none")]
    pub master_pubkey: Option<String>,

    /// The retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups.
    #[serde(rename = "prune-backups", skip_serializing_if = "Option::is_none")]
    pub prune_backups: Option<String>,

    /// Maximal number of protected backups per guest. Use '-1' for unlimited.
    #[serde(rename = "max-protected-backups", skip_serializing_if = "Option::is_none")]
    pub max_protected_backups: Option<i64>,

    /// Certificate SHA 256 fingerprint.
    #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
    pub fingerprint: Option<String>,

    #[serde(rename = "type")]
    pub r#type: Type,


}

impl PveStoragePbsConfig {
    pub fn new(server: String, datastore: String, r#type: Type) -> PveStoragePbsConfig {
        PveStoragePbsConfig {
            
            server,
            
            datastore,
            
            namespace: None,
            
            port: None,
            
            nodes: None,
            
            disable: None,
            
            content: None,
            
            username: None,
            
            password: None,
            
            encryption_key: None,
            
            master_pubkey: None,
            
            prune_backups: None,
            
            max_protected_backups: None,
            
            fingerprint: None,
            
            r#type,
            
        }
    }
}

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "pbs")]
    Pbs,
}

impl Default for Type {
    fn default() -> Type {
        Self::Pbs
    }
}