proxmox_api/generated/cluster/config/
nodes.rs1pub mod node;
2pub struct NodesClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> NodesClient<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, "/nodes"),
14 }
15 }
16}
17impl<T> NodesClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Corosync node list."]
22 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
23 let path = self.path.to_string();
24 self.client.get(&path, &())
25 }
26}
27impl GetOutputItems {
28 pub fn new(node: String) -> Self {
29 Self {
30 node,
31 additional_properties: Default::default(),
32 }
33 }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37 pub node: String,
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}
45impl<T> NodesClient<T>
46where
47 T: crate::client::Client,
48{
49 pub fn node(&self, node: &str) -> node::NodeClient<T> {
50 node::NodeClient::<T>::new(self.client.clone(), &self.path, node)
51 }
52}