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

    /// The cluster node name.
    #[serde(rename = "node")]
    pub node: String,

    /// autonomous system number
    #[serde(rename = "asn")]
    pub asn: i32,

    /// peers address list.
    #[serde(rename = "peers")]
    pub peers: String,

    /// Consider different AS paths of equal length for multipath computation.
    #[serde(rename = "bgp-multipath-as-path-relax", skip_serializing_if = "Option::is_none")]
    pub bgp_multipath_as_path_relax: Option<models::PveBoolean>,

    /// Enable eBGP (remote-as external).
    #[serde(rename = "ebgp", skip_serializing_if = "Option::is_none")]
    pub ebgp: Option<models::PveBoolean>,

    /// Set maximum amount of hops for eBGP peers.
    #[serde(rename = "ebgp-multihop", skip_serializing_if = "Option::is_none")]
    pub ebgp_multihop: Option<i64>,

    /// Name of the loopback/dummy interface that provides the Router-IP.
    #[serde(rename = "loopback", skip_serializing_if = "Option::is_none")]
    pub loopback: Option<String>,

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


}

impl PveSdnControllerBgpConfig {
    pub fn new(node: String, asn: i32, peers: String, r#type: Type) -> PveSdnControllerBgpConfig {
        PveSdnControllerBgpConfig {
            
            node,
            
            asn,
            
            peers,
            
            bgp_multipath_as_path_relax: None,
            
            ebgp: None,
            
            ebgp_multihop: None,
            
            loopback: None,
            
            r#type,
            
        }
    }
}

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

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