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

    /// List of cluster node names.
    #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
    pub nodes: Option<String>,

    /// VNI for the zone VRF.
    #[serde(rename = "vrf-vxlan")]
    pub vrf_vxlan: i32,

    /// Controller for this zone.
    #[serde(rename = "controller")]
    pub controller: String,

    /// List of cluster node names.
    #[serde(rename = "exitnodes", skip_serializing_if = "Option::is_none")]
    pub exitnodes: Option<String>,

    /// Allow exitnodes to connect to EVPN guests.
    #[serde(rename = "exitnodes-local-routing", skip_serializing_if = "Option::is_none")]
    pub exitnodes_local_routing: Option<models::PveBoolean>,

    /// Force traffic through this exitnode first.
    #[serde(rename = "exitnodes-primary", skip_serializing_if = "Option::is_none")]
    pub exitnodes_primary: Option<String>,

    /// Advertise IP prefixes (Type-5 routes) instead of MAC/IP pairs (Type-2 routes).
    #[serde(rename = "advertise-subnets", skip_serializing_if = "Option::is_none")]
    pub advertise_subnets: Option<models::PveBoolean>,

    /// Suppress IPv4 ARP && IPv6 Neighbour Discovery messages.
    #[serde(rename = "disable-arp-nd-suppression", skip_serializing_if = "Option::is_none")]
    pub disable_arp_nd_suppression: Option<models::PveBoolean>,

    /// Disable auto mac learning.
    #[serde(rename = "bridge-disable-mac-learning", skip_serializing_if = "Option::is_none")]
    pub bridge_disable_mac_learning: Option<models::PveBoolean>,

    /// List of Route Targets that should be imported into the VRF of the zone.
    #[serde(rename = "rt-import", skip_serializing_if = "Option::is_none")]
    pub rt_import: Option<String>,

    /// UDP port that should be used for the VXLAN tunnel (default 4789).
    #[serde(rename = "vxlan-port", skip_serializing_if = "Option::is_none")]
    pub vxlan_port: Option<i32>,

    /// MTU of the zone, will be used for the created VNet bridges.
    #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
    pub mtu: Option<i64>,

    /// Anycast logical router mac address.
    #[serde(rename = "mac", skip_serializing_if = "Option::is_none")]
    pub mac: Option<String>,

    /// dns api server
    #[serde(rename = "dns", skip_serializing_if = "Option::is_none")]
    pub dns: Option<String>,

    /// reverse dns api server
    #[serde(rename = "reversedns", skip_serializing_if = "Option::is_none")]
    pub reversedns: Option<String>,

    /// dns domain zone  ex: mydomain.com
    #[serde(rename = "dnszone", skip_serializing_if = "Option::is_none")]
    pub dnszone: Option<String>,

    /// use a specific ipam
    #[serde(rename = "ipam", skip_serializing_if = "Option::is_none")]
    pub ipam: Option<String>,

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


}

impl PveSdnZoneEvpnConfig {
    pub fn new(vrf_vxlan: i32, controller: String, r#type: Type) -> PveSdnZoneEvpnConfig {
        PveSdnZoneEvpnConfig {
            
            nodes: None,
            
            vrf_vxlan,
            
            controller,
            
            exitnodes: None,
            
            exitnodes_local_routing: None,
            
            exitnodes_primary: None,
            
            advertise_subnets: None,
            
            disable_arp_nd_suppression: None,
            
            bridge_disable_mac_learning: None,
            
            rt_import: None,
            
            vxlan_port: None,
            
            mtu: None,
            
            mac: None,
            
            dns: None,
            
            reversedns: None,
            
            dnszone: None,
            
            ipam: None,
            
            r#type,
            
        }
    }
}

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

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