proxmox_api/generated/nodes/node/scan/
cifs.rs

1pub struct CifsClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> CifsClient<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, "/cifs"),
13        }
14    }
15}
16impl<T> CifsClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Scan remote CIFS 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, &params)
24    }
25}
26impl GetOutputItems {
27    pub fn new(description: String, share: String) -> Self {
28        Self {
29            description,
30            share,
31            additional_properties: Default::default(),
32        }
33    }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37    #[doc = "Descriptive text from server."]
38    pub description: String,
39    #[doc = "The cifs share name."]
40    pub share: String,
41    #[serde(
42        flatten,
43        default,
44        skip_serializing_if = "::std::collections::HashMap::is_empty"
45    )]
46    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
47}
48impl GetParams {
49    pub fn new(server: String) -> Self {
50        Self {
51            server,
52            domain: Default::default(),
53            password: Default::default(),
54            username: Default::default(),
55            additional_properties: Default::default(),
56        }
57    }
58}
59#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
60pub struct GetParams {
61    #[serde(skip_serializing_if = "Option::is_none", default)]
62    #[doc = "SMB domain (Workgroup)."]
63    pub domain: Option<String>,
64    #[serde(skip_serializing_if = "Option::is_none", default)]
65    #[doc = "User password."]
66    pub password: Option<String>,
67    #[doc = "The server address (name or IP)."]
68    pub server: String,
69    #[serde(skip_serializing_if = "Option::is_none", default)]
70    #[doc = "User name."]
71    pub username: Option<String>,
72    #[serde(
73        flatten,
74        default,
75        skip_serializing_if = "::std::collections::HashMap::is_empty"
76    )]
77    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
78}