#[non_exhaustive]pub struct InterconnectAttachmentL2Forwarding {
pub appliance_mappings: HashMap<String, InterconnectAttachmentL2ForwardingApplianceMapping>,
pub default_appliance_ip_address: Option<String>,
pub geneve_header: Option<InterconnectAttachmentL2ForwardingGeneveHeader>,
pub network: Option<String>,
pub tunnel_endpoint_ip_address: Option<String>,
/* private fields */
}interconnect-attachments only.Expand description
L2 Interconnect Attachment related configuration.
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.appliance_mappings: HashMap<String, InterconnectAttachmentL2ForwardingApplianceMapping>Optional. A map of VLAN tags to appliances and optional inner mapping rules. If VLANs are not explicitly mapped to any appliance, the defaultApplianceIpAddress is used.
Each VLAN tag can be a single number or a range of numbers in the range of 1 to 4094, e.g., “1” or “4001-4094”. Non-empty and non-overlapping VLAN tag ranges are enforced, and violating operations will be rejected.
The VLAN tags in the Ethernet header must use an ethertype value of 0x88A8 or 0x8100.
default_appliance_ip_address: Option<String>Optional. A single IPv4 or IPv6 address used as the default destination IP when there is no VLAN mapping result found.
Unset field (null-value) indicates the unmatched packet should be dropped.
geneve_header: Option<InterconnectAttachmentL2ForwardingGeneveHeader>Optional. It represents the structure of a Geneve (Generic Network Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various protocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization environments.
network: Option<String>Required. Resource URL of the network to which this attachment belongs.
tunnel_endpoint_ip_address: Option<String>Required. A single IPv4 or IPv6 address. This address will be used as the source IP address for packets sent to the appliances, and must be used as the destination IP address for packets that should be sent out through this attachment.
Implementations§
Source§impl InterconnectAttachmentL2Forwarding
impl InterconnectAttachmentL2Forwarding
pub fn new() -> Self
Sourcepub fn set_appliance_mappings<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<InterconnectAttachmentL2ForwardingApplianceMapping>,
pub fn set_appliance_mappings<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<InterconnectAttachmentL2ForwardingApplianceMapping>,
Sets the value of appliance_mappings.
§Example
use google_cloud_compute_v1::model::InterconnectAttachmentL2ForwardingApplianceMapping;
let x = InterconnectAttachmentL2Forwarding::new().set_appliance_mappings([
("key0", InterconnectAttachmentL2ForwardingApplianceMapping::default()/* use setters */),
("key1", InterconnectAttachmentL2ForwardingApplianceMapping::default()/* use (different) setters */),
]);Sourcepub fn set_default_appliance_ip_address<T>(self, v: T) -> Self
pub fn set_default_appliance_ip_address<T>(self, v: T) -> Self
Sets the value of default_appliance_ip_address.
§Example
let x = InterconnectAttachmentL2Forwarding::new().set_default_appliance_ip_address("example");Sourcepub fn set_or_clear_default_appliance_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_default_appliance_ip_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of default_appliance_ip_address.
§Example
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_default_appliance_ip_address(Some("example"));
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_default_appliance_ip_address(None::<String>);Sourcepub fn set_geneve_header<T>(self, v: T) -> Self
pub fn set_geneve_header<T>(self, v: T) -> Self
Sets the value of geneve_header.
§Example
use google_cloud_compute_v1::model::InterconnectAttachmentL2ForwardingGeneveHeader;
let x = InterconnectAttachmentL2Forwarding::new().set_geneve_header(InterconnectAttachmentL2ForwardingGeneveHeader::default()/* use setters */);Sourcepub fn set_or_clear_geneve_header<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_geneve_header<T>(self, v: Option<T>) -> Self
Sets or clears the value of geneve_header.
§Example
use google_cloud_compute_v1::model::InterconnectAttachmentL2ForwardingGeneveHeader;
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_geneve_header(Some(InterconnectAttachmentL2ForwardingGeneveHeader::default()/* use setters */));
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_geneve_header(None::<InterconnectAttachmentL2ForwardingGeneveHeader>);Sourcepub fn set_network<T>(self, v: T) -> Self
pub fn set_network<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
Sourcepub fn set_tunnel_endpoint_ip_address<T>(self, v: T) -> Self
pub fn set_tunnel_endpoint_ip_address<T>(self, v: T) -> Self
Sets the value of tunnel_endpoint_ip_address.
§Example
let x = InterconnectAttachmentL2Forwarding::new().set_tunnel_endpoint_ip_address("example");Sourcepub fn set_or_clear_tunnel_endpoint_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_tunnel_endpoint_ip_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of tunnel_endpoint_ip_address.
§Example
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_tunnel_endpoint_ip_address(Some("example"));
let x = InterconnectAttachmentL2Forwarding::new().set_or_clear_tunnel_endpoint_ip_address(None::<String>);Trait Implementations§
Source§impl Clone for InterconnectAttachmentL2Forwarding
impl Clone for InterconnectAttachmentL2Forwarding
Source§fn clone(&self) -> InterconnectAttachmentL2Forwarding
fn clone(&self) -> InterconnectAttachmentL2Forwarding
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for InterconnectAttachmentL2Forwarding
impl Default for InterconnectAttachmentL2Forwarding
Source§fn default() -> InterconnectAttachmentL2Forwarding
fn default() -> InterconnectAttachmentL2Forwarding
Source§impl PartialEq for InterconnectAttachmentL2Forwarding
impl PartialEq for InterconnectAttachmentL2Forwarding
Source§fn eq(&self, other: &InterconnectAttachmentL2Forwarding) -> bool
fn eq(&self, other: &InterconnectAttachmentL2Forwarding) -> bool
self and other values to be equal, and is used by ==.