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

    /// File system path.
    #[serde(rename = "path")]
    pub path: String,

    /// Overrides for default content type directories.
    #[serde(rename = "content-dirs", skip_serializing_if = "Option::is_none")]
    pub content_dirs: Option<String>,

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

    /// CIFS share.
    #[serde(rename = "share")]
    pub share: String,

    /// Subdir to mount.
    #[serde(rename = "subdir", skip_serializing_if = "Option::is_none")]
    pub subdir: Option<String>,

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

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

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

    /// Default image format.
    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
    pub format: Option<models::PveFormatFormatEnum>,

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

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

    /// SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server.
    #[serde(rename = "smbversion", skip_serializing_if = "Option::is_none")]
    pub smbversion: Option<models::PveSmbversionEnum>,

    /// Create the directory if it doesn't exist and populate it with default sub-dirs. NOTE: Deprecated, use the 'create-base-path' and 'create-subdirs' options instead.
    #[serde(rename = "mkdir", skip_serializing_if = "Option::is_none")]
    pub mkdir: Option<models::PveBoolean>,

    /// Create the base directory if it doesn't exist.
    #[serde(rename = "create-base-path", skip_serializing_if = "Option::is_none")]
    pub create_base_path: Option<models::PveBoolean>,

    /// Populate the directory with the default structure.
    #[serde(rename = "create-subdirs", skip_serializing_if = "Option::is_none")]
    pub create_subdirs: Option<models::PveBoolean>,

    /// Set I/O bandwidth limit for various operations (in KiB/s).
    #[serde(rename = "bwlimit", skip_serializing_if = "Option::is_none")]
    pub bwlimit: Option<Box<models::PveBwlimitField>>,

    /// Preallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off.
    #[serde(rename = "preallocation", skip_serializing_if = "Option::is_none")]
    pub preallocation: Option<models::PvePreallocationEnum>,

    /// NFS/CIFS mount options (see 'man nfs' or 'man mount.cifs')
    #[serde(rename = "options", skip_serializing_if = "Option::is_none")]
    pub options: Option<String>,

    /// Enable support for creating storage-vendor agnostic snapshot through volume backing-chains.
    #[serde(rename = "snapshot-as-volume-chain", skip_serializing_if = "Option::is_none")]
    pub snapshot_as_volume_chain: Option<models::PveBoolean>,

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


}

impl PveStorageCifsConfig {
    pub fn new(path: String, server: String, share: String, r#type: Type) -> PveStorageCifsConfig {
        PveStorageCifsConfig {
            
            path,
            
            content_dirs: None,
            
            server,
            
            share,
            
            subdir: None,
            
            nodes: None,
            
            disable: None,
            
            prune_backups: None,
            
            max_protected_backups: None,
            
            content: None,
            
            format: None,
            
            username: None,
            
            password: None,
            
            domain: None,
            
            smbversion: None,
            
            mkdir: None,
            
            create_base_path: None,
            
            create_subdirs: None,
            
            bwlimit: None,
            
            preallocation: None,
            
            options: None,
            
            snapshot_as_volume_chain: None,
            
            r#type,
            
        }
    }
}

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

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