proxmox_api/generated/nodes/node/lxc/vmid/
status.rs

1pub mod current;
2pub mod reboot;
3pub mod resume;
4pub mod shutdown;
5pub mod start;
6pub mod stop;
7pub mod suspend;
8pub struct StatusClient<T> {
9    client: T,
10    path: String,
11}
12impl<T> StatusClient<T>
13where
14    T: crate::client::Client,
15{
16    pub fn new(client: T, parent_path: &str) -> Self {
17        Self {
18            client,
19            path: format!("{}{}", parent_path, "/status"),
20        }
21    }
22}
23impl<T> StatusClient<T>
24where
25    T: crate::client::Client,
26{
27    #[doc = "Directory index"]
28    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
29        let path = self.path.to_string();
30        self.client.get(&path, &())
31    }
32}
33impl GetOutputItems {
34    pub fn new(subdir: String) -> Self {
35        Self {
36            subdir,
37            additional_properties: Default::default(),
38        }
39    }
40}
41#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
42pub struct GetOutputItems {
43    pub subdir: String,
44    #[serde(
45        flatten,
46        default,
47        skip_serializing_if = "::std::collections::HashMap::is_empty"
48    )]
49    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
50}
51impl<T> StatusClient<T>
52where
53    T: crate::client::Client,
54{
55    pub fn current(&self) -> current::CurrentClient<T> {
56        current::CurrentClient::<T>::new(self.client.clone(), &self.path)
57    }
58}
59impl<T> StatusClient<T>
60where
61    T: crate::client::Client,
62{
63    pub fn start(&self) -> start::StartClient<T> {
64        start::StartClient::<T>::new(self.client.clone(), &self.path)
65    }
66}
67impl<T> StatusClient<T>
68where
69    T: crate::client::Client,
70{
71    pub fn stop(&self) -> stop::StopClient<T> {
72        stop::StopClient::<T>::new(self.client.clone(), &self.path)
73    }
74}
75impl<T> StatusClient<T>
76where
77    T: crate::client::Client,
78{
79    pub fn shutdown(&self) -> shutdown::ShutdownClient<T> {
80        shutdown::ShutdownClient::<T>::new(self.client.clone(), &self.path)
81    }
82}
83impl<T> StatusClient<T>
84where
85    T: crate::client::Client,
86{
87    pub fn suspend(&self) -> suspend::SuspendClient<T> {
88        suspend::SuspendClient::<T>::new(self.client.clone(), &self.path)
89    }
90}
91impl<T> StatusClient<T>
92where
93    T: crate::client::Client,
94{
95    pub fn resume(&self) -> resume::ResumeClient<T> {
96        resume::ResumeClient::<T>::new(self.client.clone(), &self.path)
97    }
98}
99impl<T> StatusClient<T>
100where
101    T: crate::client::Client,
102{
103    pub fn reboot(&self) -> reboot::RebootClient<T> {
104        reboot::RebootClient::<T>::new(self.client.clone(), &self.path)
105    }
106}