proxmox_api/generated/nodes/node/qemu/vmid/
pending.rs

1pub struct PendingClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> PendingClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}{}", parent_path, "/pending"),
13        }
14    }
15}
16impl<T> PendingClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get the virtual machine configuration with both current and pending values."]
21    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &())
24    }
25}
26impl GetOutputItems {
27    pub fn new(key: String) -> Self {
28        Self {
29            key,
30            delete: Default::default(),
31            pending: Default::default(),
32            value: Default::default(),
33            additional_properties: Default::default(),
34        }
35    }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetOutputItems {
39    #[serde(
40        serialize_with = "crate::types::serialize_int_optional",
41        deserialize_with = "crate::types::deserialize_int_optional"
42    )]
43    #[serde(skip_serializing_if = "Option::is_none", default)]
44    #[doc = "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request."]
45    pub delete: Option<u64>,
46    #[doc = "Configuration option name."]
47    pub key: String,
48    #[serde(skip_serializing_if = "Option::is_none", default)]
49    #[doc = "Pending value."]
50    pub pending: Option<String>,
51    #[serde(skip_serializing_if = "Option::is_none", default)]
52    #[doc = "Current value."]
53    pub value: Option<String>,
54    #[serde(
55        flatten,
56        default,
57        skip_serializing_if = "::std::collections::HashMap::is_empty"
58    )]
59    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
60}