proxmox_api/generated/nodes/node/
scan.rs1pub mod cifs;
2pub mod glusterfs;
3pub mod iscsi;
4pub mod lvm;
5pub mod lvmthin;
6pub mod nfs;
7pub mod pbs;
8pub mod zfs;
9pub struct ScanClient<T> {
10 client: T,
11 path: String,
12}
13impl<T> ScanClient<T>
14where
15 T: crate::client::Client,
16{
17 pub fn new(client: T, parent_path: &str) -> Self {
18 Self {
19 client,
20 path: format!("{}{}", parent_path, "/scan"),
21 }
22 }
23}
24impl<T> ScanClient<T>
25where
26 T: crate::client::Client,
27{
28 #[doc = "Index of available scan methods"]
29 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
30 let path = self.path.to_string();
31 self.client.get(&path, &())
32 }
33}
34impl GetOutputItems {
35 pub fn new(method: String) -> Self {
36 Self {
37 method,
38 additional_properties: Default::default(),
39 }
40 }
41}
42#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
43pub struct GetOutputItems {
44 pub method: String,
45 #[serde(
46 flatten,
47 default,
48 skip_serializing_if = "::std::collections::HashMap::is_empty"
49 )]
50 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
51}
52impl<T> ScanClient<T>
53where
54 T: crate::client::Client,
55{
56 pub fn nfs(&self) -> nfs::NfsClient<T> {
57 nfs::NfsClient::<T>::new(self.client.clone(), &self.path)
58 }
59}
60impl<T> ScanClient<T>
61where
62 T: crate::client::Client,
63{
64 pub fn cifs(&self) -> cifs::CifsClient<T> {
65 cifs::CifsClient::<T>::new(self.client.clone(), &self.path)
66 }
67}
68impl<T> ScanClient<T>
69where
70 T: crate::client::Client,
71{
72 pub fn pbs(&self) -> pbs::PbsClient<T> {
73 pbs::PbsClient::<T>::new(self.client.clone(), &self.path)
74 }
75}
76impl<T> ScanClient<T>
77where
78 T: crate::client::Client,
79{
80 pub fn glusterfs(&self) -> glusterfs::GlusterfsClient<T> {
81 glusterfs::GlusterfsClient::<T>::new(self.client.clone(), &self.path)
82 }
83}
84impl<T> ScanClient<T>
85where
86 T: crate::client::Client,
87{
88 pub fn iscsi(&self) -> iscsi::IscsiClient<T> {
89 iscsi::IscsiClient::<T>::new(self.client.clone(), &self.path)
90 }
91}
92impl<T> ScanClient<T>
93where
94 T: crate::client::Client,
95{
96 pub fn lvm(&self) -> lvm::LvmClient<T> {
97 lvm::LvmClient::<T>::new(self.client.clone(), &self.path)
98 }
99}
100impl<T> ScanClient<T>
101where
102 T: crate::client::Client,
103{
104 pub fn lvmthin(&self) -> lvmthin::LvmthinClient<T> {
105 lvmthin::LvmthinClient::<T>::new(self.client.clone(), &self.path)
106 }
107}
108impl<T> ScanClient<T>
109where
110 T: crate::client::Client,
111{
112 pub fn zfs(&self) -> zfs::ZfsClient<T> {
113 zfs::ZfsClient::<T>::new(self.client.clone(), &self.path)
114 }
115}