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

    /// The cgroup mode the node operates under (for type 'node').
    #[serde(rename = "cgroup-mode", skip_serializing_if = "Option::is_none")]
    pub cgroup_mode: Option<i64>,

    /// Allowed storage content types (for type 'storage').
    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,

    /// CPU utilization (for types 'node', 'qemu' and 'lxc').
    #[serde(rename = "cpu", skip_serializing_if = "Option::is_none")]
    pub cpu: Option<f64>,

    /// Used disk space in bytes (for type 'storage'), used root image space for VMs (for types 'qemu' and 'lxc').
    #[serde(rename = "disk", skip_serializing_if = "Option::is_none")]
    pub disk: Option<i64>,

    /// The number of bytes the guest read from its block devices since the guest was started. This info is not available for all storage types. (for types 'qemu' and 'lxc')
    #[serde(rename = "diskread", skip_serializing_if = "Option::is_none")]
    pub diskread: Option<i64>,

    /// The number of bytes the guest wrote to its block devices since the guest was started. This info is not available for all storage types. (for types 'qemu' and 'lxc')
    #[serde(rename = "diskwrite", skip_serializing_if = "Option::is_none")]
    pub diskwrite: Option<i64>,

    /// HA service status (for HA managed VMs).
    #[serde(rename = "hastate", skip_serializing_if = "Option::is_none")]
    pub hastate: Option<String>,

    /// The node's CPU architecture. (for type 'node').
    #[serde(rename = "host-arch", skip_serializing_if = "Option::is_none")]
    pub host_arch: Option<models::PveArchEnum>,

    /// Resource id.
    #[serde(rename = "id")]
    pub id: String,

    /// Support level (for type 'node').
    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
    pub level: Option<String>,

    /// The guest's current config lock (for types 'qemu' and 'lxc')
    #[serde(rename = "lock", skip_serializing_if = "Option::is_none")]
    pub lock: Option<String>,

    /// Number of available CPUs (for types 'node', 'qemu' and 'lxc').
    #[serde(rename = "maxcpu", skip_serializing_if = "Option::is_none")]
    pub maxcpu: Option<f64>,

    /// Storage size in bytes (for type 'storage'), root image size for VMs (for types 'qemu' and 'lxc').
    #[serde(rename = "maxdisk", skip_serializing_if = "Option::is_none")]
    pub maxdisk: Option<i64>,

    /// Number of available memory in bytes (for types 'node', 'qemu' and 'lxc').
    #[serde(rename = "maxmem", skip_serializing_if = "Option::is_none")]
    pub maxmem: Option<i64>,

    /// Used memory in bytes (for types 'node', 'qemu' and 'lxc').
    #[serde(rename = "mem", skip_serializing_if = "Option::is_none")]
    pub mem: Option<i64>,

    /// Used memory in bytes from the point of view of the host (for types 'qemu').
    #[serde(rename = "memhost", skip_serializing_if = "Option::is_none")]
    pub memhost: Option<i64>,

    /// Name of the resource.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    /// The amount of traffic in bytes that was sent to the guest over the network since it was started. (for types 'qemu' and 'lxc')
    #[serde(rename = "netin", skip_serializing_if = "Option::is_none")]
    pub netin: Option<i64>,

    /// The amount of traffic in bytes that was sent from the guest over the network since it was started. (for types 'qemu' and 'lxc')
    #[serde(rename = "netout", skip_serializing_if = "Option::is_none")]
    pub netout: Option<i64>,

    /// The name of a Network entity (for type 'network').
    #[serde(rename = "network", skip_serializing_if = "Option::is_none")]
    pub network: Option<String>,

    /// The type of network resource (for type 'network').
    #[serde(rename = "network-type", skip_serializing_if = "Option::is_none")]
    pub network_type: Option<models::PveClusterNetworkTypeEnum>,

    /// The cluster node name (for types 'node', 'storage', 'qemu', and 'lxc').
    #[serde(rename = "node", skip_serializing_if = "Option::is_none")]
    pub node: Option<String>,

    /// More specific type, if available.
    #[serde(rename = "plugintype", skip_serializing_if = "Option::is_none")]
    pub plugintype: Option<String>,

    /// The pool name (for types 'pool', 'qemu' and 'lxc').
    #[serde(rename = "pool", skip_serializing_if = "Option::is_none")]
    pub pool: Option<String>,

    /// The protocol of a fabric (for type 'network', network-type 'fabric').
    #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
    pub protocol: Option<String>,

    /// The name of an SDN entity (for type 'sdn')
    #[serde(rename = "sdn", skip_serializing_if = "Option::is_none")]
    pub sdn: Option<String>,

    /// Determines whether the storage is shared
    #[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
    pub shared: Option<models::PveBoolean>,

    /// Resource type dependent status.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,

    /// The storage identifier (for type 'storage').
    #[serde(rename = "storage", skip_serializing_if = "Option::is_none")]
    pub storage: Option<String>,

    /// The guest's tags (for types 'qemu' and 'lxc')
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<String>,

    /// Determines if the guest is a template. (for types 'qemu' and 'lxc')
    #[serde(rename = "template", skip_serializing_if = "Option::is_none")]
    pub template: Option<models::PveBoolean>,

    /// Resource type.
    #[serde(rename = "type")]
    pub r#type: models::PveClusterTypeEnum2,

    /// Uptime of node or virtual guest in seconds (for types 'node', 'qemu' and 'lxc').
    #[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
    pub uptime: Option<i64>,

    /// The numerical vmid (for types 'qemu' and 'lxc').
    #[serde(rename = "vmid", skip_serializing_if = "Option::is_none")]
    pub vmid: Option<i32>,

    /// The type of an SDN zone (for type 'sdn').
    #[serde(rename = "zone-type", skip_serializing_if = "Option::is_none")]
    pub zone_type: Option<String>,


}

impl ClusterResourcesResponseDataInner {
    pub fn new(id: String, r#type: models::PveClusterTypeEnum2) -> ClusterResourcesResponseDataInner {
        ClusterResourcesResponseDataInner {
            
            cgroup_mode: None,
            
            content: None,
            
            cpu: None,
            
            disk: None,
            
            diskread: None,
            
            diskwrite: None,
            
            hastate: None,
            
            host_arch: None,
            
            id,
            
            level: None,
            
            lock: None,
            
            maxcpu: None,
            
            maxdisk: None,
            
            maxmem: None,
            
            mem: None,
            
            memhost: None,
            
            name: None,
            
            netin: None,
            
            netout: None,
            
            network: None,
            
            network_type: None,
            
            node: None,
            
            plugintype: None,
            
            pool: None,
            
            protocol: None,
            
            sdn: None,
            
            shared: None,
            
            status: None,
            
            storage: None,
            
            tags: None,
            
            template: None,
            
            r#type,
            
            uptime: None,
            
            vmid: None,
            
            zone_type: None,
            
        }
    }
}