proxmox_api/generated/nodes/node/lxc/vmid/
interfaces.rs1pub struct InterfacesClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> InterfacesClient<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, "/interfaces"),
13 }
14 }
15}
16impl<T> InterfacesClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Get IP addresses of the specified container interface."]
21 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, &())
24 }
25}
26impl GetOutputItems {
27 pub fn new(hwaddr: String, name: String) -> Self {
28 Self {
29 hwaddr,
30 name,
31 inet: Default::default(),
32 inet6: Default::default(),
33 additional_properties: Default::default(),
34 }
35 }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetOutputItems {
39 #[doc = "The MAC address of the interface"]
40 pub hwaddr: String,
41 #[serde(skip_serializing_if = "Option::is_none", default)]
42 #[doc = "The IPv4 address of the interface"]
43 pub inet: Option<String>,
44 #[serde(skip_serializing_if = "Option::is_none", default)]
45 #[doc = "The IPv6 address of the interface"]
46 pub inet6: Option<String>,
47 #[doc = "The name of the interface"]
48 pub name: String,
49 #[serde(
50 flatten,
51 default,
52 skip_serializing_if = "::std::collections::HashMap::is_empty"
53 )]
54 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
55}