Skip to main content

proxmox_api/generated/nodes/node/
version.rs

1#[derive(Debug, Clone)]
2pub struct VersionClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> VersionClient<T>
7where
8    T: crate::client::Client,
9{
10    pub fn new(client: T, parent_path: &str) -> Self {
11        Self {
12            client,
13            path: format!("{}{}", parent_path, "/version"),
14        }
15    }
16}
17impl<T> VersionClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "API version details"]
22    #[doc = ""]
23    pub async fn get(&self) -> Result<GetOutput, T::Error> {
24        let path = self.path.to_string();
25        self.client.get(&path, &()).await
26    }
27}
28impl GetOutput {
29    pub fn new(release: String, repoid: String, version: String) -> Self {
30        Self {
31            release,
32            repoid,
33            version,
34            additional_properties: ::std::default::Default::default(),
35        }
36    }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
39pub struct GetOutput {
40    #[doc = "The current installed Proxmox VE Release"]
41    #[doc = ""]
42    pub release: String,
43    #[doc = "The short git commit hash ID from which this version was build"]
44    #[doc = ""]
45    pub repoid: String,
46    #[doc = "The current installed pve-manager package version"]
47    #[doc = ""]
48    pub version: String,
49    #[serde(
50        flatten,
51        default,
52        skip_serializing_if = "::std::collections::HashMap::is_empty"
53    )]
54    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
55}