firecracker_rs_sdk/models/balloon.rs
1use serde::{Deserialize, Serialize};
2
3/// Balloon device descriptor.
4#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
5pub struct Balloon {
6 /// Target balloon size in MiB
7 /// Required: true
8 #[serde(rename = "amount_mib")]
9 pub amount_mib: i64,
10
11 /// Whether the balloon should deflate when then guest has memory pressure
12 /// Required: true
13 #[serde(rename = "deflate_on_oom")]
14 pub deflate_on_oom: bool,
15
16 /// Interval in seconds between refreshing statistics
17 /// non-zero value will enable statistics
18 /// Defaults to 0
19 #[serde(
20 rename = "stats_polling_interval_s",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub stats_polling_interval_s: Option<i64>,
24}