proxmox_api/generated/cluster/
nextid.rs

1pub struct NextidClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> NextidClient<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, "/nextid"),
13        }
14    }
15}
16impl<T> NextidClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get next free VMID. Pass a VMID to assert that its free (at time of check)."]
21    pub fn get(&self, params: GetParams) -> Result<u64, T::Error> {
22        let path = self.path.to_string();
23        Ok(self
24            .client
25            .get::<_, crate::types::Integer>(&path, &params)?
26            .get())
27    }
28}
29#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
30pub struct GetParams {
31    #[serde(skip_serializing_if = "Option::is_none", default)]
32    #[doc = "The (unique) ID of the VM."]
33    pub vmid: Option<crate::types::VmId>,
34    #[serde(
35        flatten,
36        default,
37        skip_serializing_if = "::std::collections::HashMap::is_empty"
38    )]
39    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
40}