proxmox_api/generated/nodes/node/
replication.rs

1pub mod id;
2pub struct ReplicationClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> ReplicationClient<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, "/replication"),
14        }
15    }
16}
17impl<T> ReplicationClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "List status of all replication jobs on this node."]
22    pub fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
23        let path = self.path.to_string();
24        self.client.get(&path, &params)
25    }
26}
27impl GetOutputItems {
28    pub fn new(id: String) -> Self {
29        Self {
30            id,
31            additional_properties: Default::default(),
32        }
33    }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37    pub id: 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}
45#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
46pub struct GetParams {
47    #[serde(skip_serializing_if = "Option::is_none", default)]
48    #[doc = "Only list replication jobs for this guest."]
49    pub guest: Option<crate::types::VmId>,
50    #[serde(
51        flatten,
52        default,
53        skip_serializing_if = "::std::collections::HashMap::is_empty"
54    )]
55    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
56}
57impl<T> ReplicationClient<T>
58where
59    T: crate::client::Client,
60{
61    pub fn id(&self, id: &str) -> id::IdClient<T> {
62        id::IdClient::<T>::new(self.client.clone(), &self.path, id)
63    }
64}