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