#[non_exhaustive]pub struct RouterInterface {
pub ip_range: Option<String>,
pub ip_version: Option<IpVersion>,
pub linked_interconnect_attachment: Option<String>,
pub linked_vpn_tunnel: Option<String>,
pub management_type: Option<ManagementType>,
pub name: Option<String>,
pub private_ip_address: Option<String>,
pub redundant_interface: Option<String>,
pub subnetwork: Option<String>,
/* private fields */
}routers only.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.ip_range: Option<String>IP address and range of the interface.
- For Internet Protocol version 4 (IPv4), the IP range must be in theRFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example, 169.254.0.1/30. Note: Do not truncate the IP address, as it represents the IP address of the interface.
- For Internet Protocol version 6 (IPv6), the value must be a unique local address (ULA) range from fdff:1::/64 with a mask length of 126 or less. This value should be a CIDR-formatted string, for example, fdff:1::1/112. Within the router’s VPC, this IPv6 prefix will be reserved exclusively for this connection and cannot be used for any other purpose.
ip_version: Option<IpVersion>IP version of this interface.
linked_interconnect_attachment: Option<String>URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork.
linked_vpn_tunnel: Option<String>URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork.
management_type: Option<ManagementType>Output only. [Output Only] The resource that configures and manages this interface.
- MANAGED_BY_USER is the default value and can be managed directly by users.
- MANAGED_BY_ATTACHMENT is an interface that is configured and managed by Cloud Interconnect, specifically, by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of interface when the PARTNER InterconnectAttachment is created, updated, or deleted.
name: Option<String>Name of this interface entry.
The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63
characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
private_ip_address: Option<String>The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.
redundant_interface: Option<String>Name of the interface that will be redundant with the current interface
you are creating. The redundantInterface must belong to the same Cloud
Router as the interface here. To establish the BGP session to a Router
Appliance VM, you must create two BGP peers. The two BGP peers must be
attached to two separate interfaces that are redundant with each other.
The redundant_interface must be 1-63 characters long, and comply withRFC1035. Specifically, the redundant_interface must
be 1-63 characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
subnetwork: Option<String>The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.
Implementations§
Source§impl RouterInterface
impl RouterInterface
pub fn new() -> Self
Sourcepub fn set_ip_range<T>(self, v: T) -> Self
pub fn set_ip_range<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_ip_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_range<T>(self, v: Option<T>) -> Self
Sourcepub fn set_ip_version<T>(self, v: T) -> Self
pub fn set_ip_version<T>(self, v: T) -> Self
Sets the value of ip_version.
§Example
use google_cloud_compute_v1::model::router_interface::IpVersion;
let x0 = RouterInterface::new().set_ip_version(IpVersion::Ipv6);Sourcepub fn set_or_clear_ip_version<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_version<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_version.
§Example
use google_cloud_compute_v1::model::router_interface::IpVersion;
let x0 = RouterInterface::new().set_or_clear_ip_version(Some(IpVersion::Ipv6));
let x_none = RouterInterface::new().set_or_clear_ip_version(None::<IpVersion>);Sourcepub fn set_linked_interconnect_attachment<T>(self, v: T) -> Self
pub fn set_linked_interconnect_attachment<T>(self, v: T) -> Self
Sets the value of linked_interconnect_attachment.
§Example
let x = RouterInterface::new().set_linked_interconnect_attachment("example");Sourcepub fn set_or_clear_linked_interconnect_attachment<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_linked_interconnect_attachment<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of linked_interconnect_attachment.
§Example
let x = RouterInterface::new().set_or_clear_linked_interconnect_attachment(Some("example"));
let x = RouterInterface::new().set_or_clear_linked_interconnect_attachment(None::<String>);Sourcepub fn set_linked_vpn_tunnel<T>(self, v: T) -> Self
pub fn set_linked_vpn_tunnel<T>(self, v: T) -> Self
Sets the value of linked_vpn_tunnel.
§Example
let x = RouterInterface::new().set_linked_vpn_tunnel("example");Sourcepub fn set_or_clear_linked_vpn_tunnel<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_linked_vpn_tunnel<T>(self, v: Option<T>) -> Self
Sets or clears the value of linked_vpn_tunnel.
§Example
let x = RouterInterface::new().set_or_clear_linked_vpn_tunnel(Some("example"));
let x = RouterInterface::new().set_or_clear_linked_vpn_tunnel(None::<String>);Sourcepub fn set_management_type<T>(self, v: T) -> Selfwhere
T: Into<ManagementType>,
pub fn set_management_type<T>(self, v: T) -> Selfwhere
T: Into<ManagementType>,
Sets the value of management_type.
§Example
use google_cloud_compute_v1::model::router_interface::ManagementType;
let x0 = RouterInterface::new().set_management_type(ManagementType::ManagedByUser);Sourcepub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagementType>,
pub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<ManagementType>,
Sets or clears the value of management_type.
§Example
use google_cloud_compute_v1::model::router_interface::ManagementType;
let x0 = RouterInterface::new().set_or_clear_management_type(Some(ManagementType::ManagedByUser));
let x_none = RouterInterface::new().set_or_clear_management_type(None::<ManagementType>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_private_ip_address<T>(self, v: T) -> Self
pub fn set_private_ip_address<T>(self, v: T) -> Self
Sets the value of private_ip_address.
§Example
let x = RouterInterface::new().set_private_ip_address("example");Sourcepub fn set_or_clear_private_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_private_ip_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of private_ip_address.
§Example
let x = RouterInterface::new().set_or_clear_private_ip_address(Some("example"));
let x = RouterInterface::new().set_or_clear_private_ip_address(None::<String>);Sourcepub fn set_redundant_interface<T>(self, v: T) -> Self
pub fn set_redundant_interface<T>(self, v: T) -> Self
Sets the value of redundant_interface.
§Example
let x = RouterInterface::new().set_redundant_interface("example");Sourcepub fn set_or_clear_redundant_interface<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_redundant_interface<T>(self, v: Option<T>) -> Self
Sets or clears the value of redundant_interface.
§Example
let x = RouterInterface::new().set_or_clear_redundant_interface(Some("example"));
let x = RouterInterface::new().set_or_clear_redundant_interface(None::<String>);Sourcepub fn set_subnetwork<T>(self, v: T) -> Self
pub fn set_subnetwork<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
Sets or clears the value of subnetwork.
§Example
let x = RouterInterface::new().set_or_clear_subnetwork(Some("example"));
let x = RouterInterface::new().set_or_clear_subnetwork(None::<String>);Trait Implementations§
Source§impl Clone for RouterInterface
impl Clone for RouterInterface
Source§fn clone(&self) -> RouterInterface
fn clone(&self) -> RouterInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more