incus_client/models/instance_state_network_address.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/// InstanceStateNetworkAddress : InstanceStateNetworkAddress represents a network address as part of the network section of an instance's state.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InstanceStateNetworkAddress {
17 /// IP address
18 #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
19 pub address: Option<String>,
20 /// Network family (inet or inet6)
21 #[serde(rename = "family", skip_serializing_if = "Option::is_none")]
22 pub family: Option<String>,
23 /// Network mask
24 #[serde(rename = "netmask", skip_serializing_if = "Option::is_none")]
25 pub netmask: Option<String>,
26 /// Address scope (local, link or global)
27 #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
28 pub scope: Option<String>,
29}
30
31impl InstanceStateNetworkAddress {
32 /// InstanceStateNetworkAddress represents a network address as part of the network section of an instance's state.
33 pub fn new() -> InstanceStateNetworkAddress {
34 InstanceStateNetworkAddress {
35 address: None,
36 family: None,
37 netmask: None,
38 scope: None,
39 }
40 }
41}
42