Skip to main content

incus_client/models/
instance_state_network.rs

1/*
2 * Incus external REST API
3 *
4 * This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation.  The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
5 *
6 * The version of the OpenAPI document: 1.0
7 * Contact: lxc-devel@lists.linuxcontainers.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InstanceStateNetwork {
16    /// List of IP addresses
17    #[serde(rename = "addresses", skip_serializing_if = "Option::is_none")]
18    pub addresses: Option<Vec<models::InstanceStateNetworkAddress>>,
19    #[serde(rename = "counters", skip_serializing_if = "Option::is_none")]
20    pub counters: Option<Box<models::InstanceStateNetworkCounters>>,
21    /// Name of the interface on the host
22    #[serde(rename = "host_name", skip_serializing_if = "Option::is_none")]
23    pub host_name: Option<String>,
24    /// MAC address
25    #[serde(rename = "hwaddr", skip_serializing_if = "Option::is_none")]
26    pub hwaddr: Option<String>,
27    /// MTU (maximum transmit unit) for the interface
28    #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
29    pub mtu: Option<i64>,
30    /// Administrative state of the interface (up/down)
31    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
32    pub state: Option<String>,
33    /// Type of interface (broadcast, loopback, point-to-point, ...)
34    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
35    pub r#type: Option<String>,
36}
37
38impl InstanceStateNetwork {
39    pub fn new() -> InstanceStateNetwork {
40        InstanceStateNetwork {
41            addresses: None,
42            counters: None,
43            host_name: None,
44            hwaddr: None,
45            mtu: None,
46            state: None,
47            r#type: None,
48        }
49    }
50}
51