#[non_exhaustive]pub struct Network {Show 16 fields
pub name: String,
pub id: String,
pub type: Type,
pub ip_address: String,
pub mac_address: Vec<String>,
pub state: State,
pub vlan_id: String,
pub cidr: String,
pub vrf: Option<Vrf>,
pub labels: HashMap<String, String>,
pub services_cidr: String,
pub reservations: Vec<NetworkAddressReservation>,
pub pod: String,
pub mount_points: Vec<NetworkMountPoint>,
pub jumbo_frames_enabled: bool,
pub gateway_ip: String,
/* private fields */
}Expand description
A Network.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The resource name of this Network.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names.
Format:
projects/{project}/locations/{location}/networks/{network}
id: StringAn identifier for the Network, generated by the backend.
type: TypeThe type of this network.
ip_address: StringIP address configured.
mac_address: Vec<String>List of physical interfaces.
state: StateThe Network state.
vlan_id: StringThe vlan id of the Network.
cidr: StringThe cidr of the Network.
vrf: Option<Vrf>The vrf for the Network.
labels: HashMap<String, String>Labels as key value pairs.
services_cidr: StringIP range for reserved for services (e.g. NFS).
reservations: Vec<NetworkAddressReservation>List of IP address reservations in this network. When updating this field, an error will be generated if a reservation conflicts with an IP address already allocated to a physical server.
pod: StringOutput only. Pod name.
mount_points: Vec<NetworkMountPoint>Input only. List of mount points to attach the network to.
jumbo_frames_enabled: boolWhether network uses standard frames or jumbo ones.
gateway_ip: StringOutput only. Gateway ip address.
Implementations§
Source§impl Network
impl Network
pub fn new() -> Self
Sourcepub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
pub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_mac_address<T, V>(self, v: T) -> Self
pub fn set_mac_address<T, V>(self, v: T) -> Self
Sourcepub fn set_vlan_id<T: Into<String>>(self, v: T) -> Self
pub fn set_vlan_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_vrf<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vrf<T>(self, v: Option<T>) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_services_cidr<T: Into<String>>(self, v: T) -> Self
pub fn set_services_cidr<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_reservations<T, V>(self, v: T) -> Self
pub fn set_reservations<T, V>(self, v: T) -> Self
Sets the value of reservations.
§Example
use google_cloud_baremetalsolution_v2::model::NetworkAddressReservation;
let x = Network::new()
.set_reservations([
NetworkAddressReservation::default()/* use setters */,
NetworkAddressReservation::default()/* use (different) setters */,
]);Sourcepub fn set_mount_points<T, V>(self, v: T) -> Self
pub fn set_mount_points<T, V>(self, v: T) -> Self
Sets the value of mount_points.
§Example
use google_cloud_baremetalsolution_v2::model::NetworkMountPoint;
let x = Network::new()
.set_mount_points([
NetworkMountPoint::default()/* use setters */,
NetworkMountPoint::default()/* use (different) setters */,
]);Sourcepub fn set_jumbo_frames_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_jumbo_frames_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of jumbo_frames_enabled.
§Example
let x = Network::new().set_jumbo_frames_enabled(true);