proxmox_api/generated/nodes/node/scan/
nfs.rs1#[derive(Debug, Clone)]
2pub struct NfsClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> NfsClient<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, "/nfs"),
14 }
15 }
16}
17impl<T> NfsClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Scan remote NFS server."]
22 #[doc = ""]
23 #[doc = "Permission check: perm(\"/storage\", [\"Datastore.Allocate\"])"]
24 pub async fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
25 let path = self.path.to_string();
26 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, ¶ms).await?;
27 Ok(optional_vec.unwrap_or_default())
28 }
29}
30impl GetOutputItems {
31 pub fn new(options: String, path: String) -> Self {
32 Self {
33 options,
34 path,
35 additional_properties: ::std::default::Default::default(),
36 }
37 }
38}
39#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
40pub struct GetOutputItems {
41 #[doc = "NFS export options."]
42 #[doc = ""]
43 pub options: String,
44 #[doc = "The exported path."]
45 #[doc = ""]
46 pub path: String,
47 #[serde(
48 flatten,
49 default,
50 skip_serializing_if = "::std::collections::HashMap::is_empty"
51 )]
52 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
53}
54impl GetParams {
55 pub fn new(server: String) -> Self {
56 Self {
57 server,
58 additional_properties: ::std::default::Default::default(),
59 }
60 }
61}
62#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
63pub struct GetParams {
64 #[doc = "The server address (name or IP)."]
65 #[doc = ""]
66 pub server: String,
67 #[serde(
68 flatten,
69 default,
70 skip_serializing_if = "::std::collections::HashMap::is_empty"
71 )]
72 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
73}