proxmox_api/generated/nodes/node/disks/lvmthin/
name.rs

1pub struct NameClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> NameClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str, name: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}/{}", parent_path, name),
13        }
14    }
15}
16impl<T> NameClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Remove an LVM thin pool."]
21    pub fn delete(&self, params: DeleteParams) -> Result<String, T::Error> {
22        let path = self.path.to_string();
23        self.client.delete(&path, &params)
24    }
25}
26impl DeleteParams {
27    pub fn new(volume_group: String) -> Self {
28        Self {
29            volume_group,
30            cleanup_config: Default::default(),
31            cleanup_disks: Default::default(),
32            additional_properties: Default::default(),
33        }
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct DeleteParams {
38    #[serde(rename = "cleanup-config")]
39    #[serde(
40        serialize_with = "crate::types::serialize_bool_optional",
41        deserialize_with = "crate::types::deserialize_bool_optional"
42    )]
43    #[serde(skip_serializing_if = "Option::is_none", default)]
44    #[doc = "Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only)."]
45    pub cleanup_config: Option<bool>,
46    #[serde(rename = "cleanup-disks")]
47    #[serde(
48        serialize_with = "crate::types::serialize_bool_optional",
49        deserialize_with = "crate::types::deserialize_bool_optional"
50    )]
51    #[serde(skip_serializing_if = "Option::is_none", default)]
52    #[doc = "Also wipe disks so they can be repurposed afterwards."]
53    pub cleanup_disks: Option<bool>,
54    #[serde(rename = "volume-group")]
55    #[doc = "The storage identifier."]
56    pub volume_group: String,
57    #[serde(
58        flatten,
59        default,
60        skip_serializing_if = "::std::collections::HashMap::is_empty"
61    )]
62    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
63}