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

    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
    #[serde(rename = "burst-in", skip_serializing_if = "Option::is_none")]
    pub burst_in: Option<String>,

    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
    #[serde(rename = "burst-out", skip_serializing_if = "Option::is_none")]
    pub burst_out: Option<String>,

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

    /// Current ingress rate in bytes/second
    #[serde(rename = "cur-rate-in")]
    pub cur_rate_in: i64,

    /// Current egress rate in bytes/second
    #[serde(rename = "cur-rate-out")]
    pub cur_rate_out: i64,

    /// Rule ID.
    #[serde(rename = "name")]
    pub name: String,

    /// Rule applies to Source IPs within this networks
    #[serde(rename = "network")]
    pub network: Vec<String>,

    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
    #[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
    pub rate_in: Option<String>,

    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
    #[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
    pub rate_out: Option<String>,

    /// Enable the rule at specific times
    #[serde(rename = "timeframe", skip_serializing_if = "Option::is_none")]
    pub timeframe: Option<Vec<String>>,

    /// Rule applies to authenticated API requests of any of these users (overrides IP-only rules)
    #[serde(rename = "users", skip_serializing_if = "Option::is_none")]
    pub users: Option<Vec<String>>,


}

impl AdminGetTrafficControlResponseDataInner {
    pub fn new(cur_rate_in: i64, cur_rate_out: i64, name: String, network: Vec<String>) -> AdminGetTrafficControlResponseDataInner {
        AdminGetTrafficControlResponseDataInner {
            
            burst_in: None,
            
            burst_out: None,
            
            comment: None,
            
            cur_rate_in,
            
            cur_rate_out,
            
            name,
            
            network,
            
            rate_in: None,
            
            rate_out: None,
            
            timeframe: None,
            
            users: None,
            
        }
    }
}