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

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

    /// Indicate that this is a single storage with the same contents on all nodes (or all listed in the 'nodes' option). It will not make the contents of a local storage automatically accessible to other nodes, it just marks an already shared storage as such!
    #[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
    pub shared: Option<models::PveBoolean>,

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

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

    /// RBD Id.
    #[serde(rename = "username")]
    pub username: String,

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

    /// Disable TLS certificate verification, only enable on fully trusted networks!
    #[serde(rename = "skip-cert-verification", skip_serializing_if = "Option::is_none")]
    pub skip_cert_verification: Option<models::PveBoolean>,

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

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


}

impl PveStorageEsxiConfig {
    pub fn new(server: String, username: String, r#type: Type) -> PveStorageEsxiConfig {
        PveStorageEsxiConfig {
            
            nodes: None,
            
            shared: None,
            
            disable: None,
            
            content: None,
            
            server,
            
            username,
            
            password: None,
            
            skip_cert_verification: None,
            
            port: None,
            
            r#type,
            
        }
    }
}

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

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