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

    /// A list of IPs that are routable via this node in the WireGuard fabric.
    #[serde(rename = "allowed_ips", skip_serializing_if = "Option::is_none")]
    pub allowed_ips: Option<Vec<String>>,

    /// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
    pub digest: Option<String>,

    /// The endpoint used for connecting to this node.
    #[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
    pub endpoint: Option<String>,

    #[serde(rename = "interfaces")]
    pub interfaces: Vec<serde_json::Value>,

    /// IPv4 address for this node
    #[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
    pub ip: Option<String>,

    /// IPv6 address for this node
    #[serde(rename = "ip6", skip_serializing_if = "Option::is_none")]
    pub ip6: Option<String>,

    /// the token for unlocking the global SDN configuration
    #[serde(rename = "lock-token", skip_serializing_if = "Option::is_none")]
    pub lock_token: Option<String>,

    /// Identifier for nodes in an SDN fabric
    #[serde(rename = "node_id")]
    pub node_id: String,

    #[serde(rename = "peers", skip_serializing_if = "Option::is_none")]
    pub peers: Option<Vec<models::ClusterSdnListAllResponseDataNodesInnerPeersInner>>,

    /// Type of configuration entry in an SDN Fabric section config
    #[serde(rename = "protocol")]
    pub protocol: models::PveProtocolEnum,

    /// The public key for the external node.
    #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
    pub public_key: Option<String>,

    /// The role of this node in the WireGuard fabric.
    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
    pub role: Option<models::PveRoleEnum>,


}

impl ClusterSdnAddNodeRequest {
    pub fn new(interfaces: Vec<serde_json::Value>, node_id: String, protocol: models::PveProtocolEnum) -> ClusterSdnAddNodeRequest {
        ClusterSdnAddNodeRequest {
            
            allowed_ips: None,
            
            digest: None,
            
            endpoint: None,
            
            interfaces,
            
            ip: None,
            
            ip6: None,
            
            lock_token: None,
            
            node_id,
            
            peers: None,
            
            protocol,
            
            public_key: None,
            
            role: None,
            
        }
    }
}