Skip to main content

incus_client/models/
instance_state_memory.rs

1/*
2 * Incus external REST API
3 *
4 * This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation.  The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
5 *
6 * The version of the OpenAPI document: 1.0
7 * Contact: lxc-devel@lists.linuxcontainers.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InstanceStateMemory {
16    /// SWAP usage in bytes
17    #[serde(rename = "swap_usage", skip_serializing_if = "Option::is_none")]
18    pub swap_usage: Option<i64>,
19    /// Peak SWAP usage in bytes
20    #[serde(rename = "swap_usage_peak", skip_serializing_if = "Option::is_none")]
21    pub swap_usage_peak: Option<i64>,
22    /// Total memory size in bytes
23    #[serde(rename = "total", skip_serializing_if = "Option::is_none")]
24    pub total: Option<i64>,
25    /// Memory usage in bytes
26    #[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
27    pub usage: Option<i64>,
28    /// Peak memory usage in bytes
29    #[serde(rename = "usage_peak", skip_serializing_if = "Option::is_none")]
30    pub usage_peak: Option<i64>,
31}
32
33impl InstanceStateMemory {
34    pub fn new() -> InstanceStateMemory {
35        InstanceStateMemory {
36            swap_usage: None,
37            swap_usage_peak: None,
38            total: None,
39            usage: None,
40            usage_peak: None,
41        }
42    }
43}
44