clientapi-pbs 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Backup Server API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/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 NodesNetworkCreateNetworkRequest {

    /// Autostart interface.
    #[serde(rename = "autostart", skip_serializing_if = "Option::is_none")]
    pub autostart: Option<bool>,

    /// Network interface name.
    #[serde(rename = "bond-primary", skip_serializing_if = "Option::is_none")]
    pub bond_primary: Option<String>,

    /// Linux Bond Mode
    #[serde(rename = "bond_mode", skip_serializing_if = "Option::is_none")]
    pub bond_mode: Option<models::PbsBondModeEnum>,

    /// Bond Transmit Hash Policy for LACP (802.3ad)
    #[serde(rename = "bond_xmit_hash_policy", skip_serializing_if = "Option::is_none")]
    pub bond_xmit_hash_policy: Option<models::PbsBondXmitHashPolicyEnum>,

    /// A list of network devices, comma separated.
    #[serde(rename = "bridge_ports", skip_serializing_if = "Option::is_none")]
    pub bridge_ports: Option<Box<models::PbsBridgePortsField>>,

    /// Enable bridge vlan support.
    #[serde(rename = "bridge_vlan_aware", skip_serializing_if = "Option::is_none")]
    pub bridge_vlan_aware: Option<bool>,

    /// IPv4 address with netmask (CIDR notation).
    #[serde(rename = "cidr", skip_serializing_if = "Option::is_none")]
    pub cidr: Option<String>,

    /// IPv6 address with netmask (CIDR notation).
    #[serde(rename = "cidr6", skip_serializing_if = "Option::is_none")]
    pub cidr6: Option<String>,

    /// Comments (inet, may span multiple lines)
    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
    pub comments: Option<String>,

    /// Comments (inet5, may span multiple lines)
    #[serde(rename = "comments6", skip_serializing_if = "Option::is_none")]
    pub comments6: Option<String>,

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

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

    /// Network interface name.
    #[serde(rename = "iface")]
    pub iface: String,

    /// Interface configuration method
    #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
    pub method: Option<models::PbsNodesNetworkMethodEnum>,

    /// Interface configuration method
    #[serde(rename = "method6", skip_serializing_if = "Option::is_none")]
    pub method6: Option<models::PbsNodesNetworkMethodEnum>,

    /// Maximum Transmission Unit.
    #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
    pub mtu: Option<i32>,

    /// A list of network devices, comma separated.
    #[serde(rename = "slaves", skip_serializing_if = "Option::is_none")]
    pub slaves: Option<Box<models::PbsBridgePortsField>>,

    /// Network interface type
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::PbsNodesNetworkTypeEnum>,

    /// VLAN ID.
    #[serde(rename = "vlan-id", skip_serializing_if = "Option::is_none")]
    pub vlan_id: Option<i64>,

    /// Network interface name.
    #[serde(rename = "vlan-raw-device", skip_serializing_if = "Option::is_none")]
    pub vlan_raw_device: Option<String>,


}

impl NodesNetworkCreateNetworkRequest {
    pub fn new(iface: String) -> NodesNetworkCreateNetworkRequest {
        NodesNetworkCreateNetworkRequest {
            
            autostart: None,
            
            bond_primary: None,
            
            bond_mode: None,
            
            bond_xmit_hash_policy: None,
            
            bridge_ports: None,
            
            bridge_vlan_aware: None,
            
            cidr: None,
            
            cidr6: None,
            
            comments: None,
            
            comments6: None,
            
            gateway: None,
            
            gateway6: None,
            
            iface,
            
            method: None,
            
            method6: None,
            
            mtu: None,
            
            slaves: None,
            
            r#type: None,
            
            vlan_id: None,
            
            vlan_raw_device: None,
            
        }
    }
}