proxmox_api/generated/nodes/node/apt/
update.rs

1pub struct UpdateClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> UpdateClient<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, "/update"),
13        }
14    }
15}
16impl<T> UpdateClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "List available updates."]
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<T> UpdateClient<T>
27where
28    T: crate::client::Client,
29{
30    #[doc = "This is used to resynchronize the package index files from their sources (apt-get update)."]
31    pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
32        let path = self.path.to_string();
33        self.client.post(&path, &params)
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
37pub struct GetOutputItems {
38    #[serde(
39        flatten,
40        default,
41        skip_serializing_if = "::std::collections::HashMap::is_empty"
42    )]
43    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
44}
45#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
46pub struct PostParams {
47    #[serde(
48        serialize_with = "crate::types::serialize_bool_optional",
49        deserialize_with = "crate::types::deserialize_bool_optional"
50    )]
51    #[serde(skip_serializing_if = "Option::is_none", default)]
52    #[doc = "Send notification about new packages."]
53    pub notify: Option<bool>,
54    #[serde(
55        serialize_with = "crate::types::serialize_bool_optional",
56        deserialize_with = "crate::types::deserialize_bool_optional"
57    )]
58    #[serde(skip_serializing_if = "Option::is_none", default)]
59    #[doc = "Only produces output suitable for logging, omitting progress indicators."]
60    pub quiet: Option<bool>,
61    #[serde(
62        flatten,
63        default,
64        skip_serializing_if = "::std::collections::HashMap::is_empty"
65    )]
66    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
67}