proxmox_api/generated/nodes/node/qemu/vmid/firewall/
refs.rs1pub struct RefsClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> RefsClient<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, "/refs"),
13 }
14 }
15}
16impl<T> RefsClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Lists possible IPSet/Alias reference which are allowed in source/dest properties."]
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(name: String, reference: String, scope: String, ty: Type) -> Self {
28 Self {
29 name,
30 reference,
31 scope,
32 ty,
33 comment: Default::default(),
34 additional_properties: Default::default(),
35 }
36 }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
39pub struct GetOutputItems {
40 #[serde(skip_serializing_if = "Option::is_none", default)]
41 pub comment: Option<String>,
42 pub name: String,
43 #[serde(rename = "ref")]
44 pub reference: String,
45 pub scope: String,
46 #[serde(rename = "type")]
47 pub ty: Type,
48 #[serde(
49 flatten,
50 default,
51 skip_serializing_if = "::std::collections::HashMap::is_empty"
52 )]
53 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
54}
55#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
56pub struct GetParams {
57 #[serde(rename = "type")]
58 #[serde(skip_serializing_if = "Option::is_none", default)]
59 #[doc = "Only list references of specified type."]
60 pub ty: Option<Type>,
61 #[serde(
62 flatten,
63 default,
64 skip_serializing_if = "::std::collections::HashMap::is_empty"
65 )]
66 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
67}
68#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
69pub enum Type {
70 #[serde(rename = "alias")]
71 Alias,
72 #[serde(rename = "ipset")]
73 Ipset,
74}