#[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
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);Sourcepub fn set_gateway_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_gateway_ip<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request