#[non_exhaustive]pub struct NetworkInterface {
pub network: String,
pub subnetwork: String,
pub internal_ip: String,
pub external_ip: String,
pub network_tier: ComputeEngineNetworkTier,
/* private fields */
}Expand description
NetworkInterface represents a NIC of a VM.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.network: StringOptional. The network to connect the NIC to.
subnetwork: StringOptional. The subnetwork to connect the NIC to.
internal_ip: StringOptional. The internal IP to define in the NIC.
The formats accepted are: ephemeral \ ipv4 address \ a named address
resource full path.
external_ip: StringOptional. The external IP to define in the NIC.
network_tier: ComputeEngineNetworkTierOptional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.
Implementations§
Source§impl NetworkInterface
impl NetworkInterface
Sourcepub fn set_network<T: Into<String>>(self, v: T) -> Self
pub fn set_network<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
pub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_internal_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_internal_ip<T: Into<String>>(self, v: T) -> Self
Sets the value of internal_ip.
§Example
ⓘ
let x = NetworkInterface::new().set_internal_ip("example");Sourcepub fn set_external_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_external_ip<T: Into<String>>(self, v: T) -> Self
Sets the value of external_ip.
§Example
ⓘ
let x = NetworkInterface::new().set_external_ip("example");Sourcepub fn set_network_tier<T: Into<ComputeEngineNetworkTier>>(self, v: T) -> Self
pub fn set_network_tier<T: Into<ComputeEngineNetworkTier>>(self, v: T) -> Self
Sets the value of network_tier.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::ComputeEngineNetworkTier;
let x0 = NetworkInterface::new().set_network_tier(ComputeEngineNetworkTier::NetworkTierStandard);
let x1 = NetworkInterface::new().set_network_tier(ComputeEngineNetworkTier::NetworkTierPremium);Trait Implementations§
Source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
Source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkInterface
impl Debug for NetworkInterface
Source§impl Default for NetworkInterface
impl Default for NetworkInterface
Source§fn default() -> NetworkInterface
fn default() -> NetworkInterface
Returns the “default value” for a type. Read more
Source§impl Message for NetworkInterface
impl Message for NetworkInterface
Source§impl PartialEq for NetworkInterface
impl PartialEq for NetworkInterface
Source§fn eq(&self, other: &NetworkInterface) -> bool
fn eq(&self, other: &NetworkInterface) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NetworkInterface
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnsafeUnpin for NetworkInterface
impl UnwindSafe for NetworkInterface
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
Mutably borrows from an owned value. Read more