proxmox_api/generated/nodes/node/scan/
pbs.rs1pub struct PbsClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> PbsClient<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, "/pbs"),
13 }
14 }
15}
16impl<T> PbsClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Scan remote Proxmox Backup Server."]
21 pub fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, ¶ms)
24 }
25}
26impl GetOutputItems {
27 pub fn new(store: String) -> Self {
28 Self {
29 store,
30 comment: Default::default(),
31 additional_properties: Default::default(),
32 }
33 }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37 #[serde(skip_serializing_if = "Option::is_none", default)]
38 #[doc = "Comment from server."]
39 pub comment: Option<String>,
40 #[doc = "The datastore name."]
41 pub store: String,
42 #[serde(
43 flatten,
44 default,
45 skip_serializing_if = "::std::collections::HashMap::is_empty"
46 )]
47 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
48}
49impl GetParams {
50 pub fn new(password: String, server: String, username: String) -> Self {
51 Self {
52 password,
53 server,
54 username,
55 fingerprint: Default::default(),
56 port: Default::default(),
57 additional_properties: Default::default(),
58 }
59 }
60}
61#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
62pub struct GetParams {
63 #[serde(skip_serializing_if = "Option::is_none", default)]
64 #[doc = "Certificate SHA 256 fingerprint."]
65 pub fingerprint: Option<String>,
66 #[doc = "User password or API token secret."]
67 pub password: String,
68 #[serde(
69 serialize_with = "crate::types::serialize_int_optional",
70 deserialize_with = "crate::types::deserialize_int_optional"
71 )]
72 #[serde(skip_serializing_if = "Option::is_none", default)]
73 #[doc = "Optional port."]
74 pub port: Option<u64>,
75 #[doc = "The server address (name or IP)."]
76 pub server: String,
77 #[doc = "User-name or API token-ID."]
78 pub username: String,
79 #[serde(
80 flatten,
81 default,
82 skip_serializing_if = "::std::collections::HashMap::is_empty"
83 )]
84 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
85}