Skip to main content

RouterInterface

Struct RouterInterface 

Source
#[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 */ }
Available on crate feature routers only.

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.
§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

Source

pub fn new() -> Self

Source

pub fn set_ip_range<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ip_range.

§Example
let x = RouterInterface::new().set_ip_range("example");
Source

pub fn set_or_clear_ip_range<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ip_range.

§Example
let x = RouterInterface::new().set_or_clear_ip_range(Some("example"));
let x = RouterInterface::new().set_or_clear_ip_range(None::<String>);
Source

pub fn set_ip_version<T>(self, v: T) -> Self
where T: Into<IpVersion>,

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);
Source

pub fn set_or_clear_ip_version<T>(self, v: Option<T>) -> Self
where T: Into<IpVersion>,

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>);
Source

pub fn set_linked_interconnect_attachment<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of linked_interconnect_attachment.

§Example
let x = RouterInterface::new().set_linked_interconnect_attachment("example");
Source

pub fn set_or_clear_linked_interconnect_attachment<T>( self, v: Option<T>, ) -> Self
where T: Into<String>,

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>);
Source

pub fn set_linked_vpn_tunnel<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of linked_vpn_tunnel.

§Example
let x = RouterInterface::new().set_linked_vpn_tunnel("example");
Source

pub fn set_or_clear_linked_vpn_tunnel<T>(self, v: Option<T>) -> Self
where T: Into<String>,

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>);
Source

pub fn set_management_type<T>(self, v: T) -> Self
where 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);
Source

pub fn set_or_clear_management_type<T>(self, v: Option<T>) -> Self
where 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>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = RouterInterface::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = RouterInterface::new().set_or_clear_name(Some("example"));
let x = RouterInterface::new().set_or_clear_name(None::<String>);
Source

pub fn set_private_ip_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of private_ip_address.

§Example
let x = RouterInterface::new().set_private_ip_address("example");
Source

pub fn set_or_clear_private_ip_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

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>);
Source

pub fn set_redundant_interface<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of redundant_interface.

§Example
let x = RouterInterface::new().set_redundant_interface("example");
Source

pub fn set_or_clear_redundant_interface<T>(self, v: Option<T>) -> Self
where T: Into<String>,

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>);
Source

pub fn set_subnetwork<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of subnetwork.

§Example
let x = RouterInterface::new().set_subnetwork("example");
Source

pub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
where T: Into<String>,

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

Source§

fn clone(&self) -> RouterInterface

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RouterInterface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RouterInterface

Source§

fn default() -> RouterInterface

Returns the “default value” for a type. Read more
Source§

impl Message for RouterInterface

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for RouterInterface

Source§

fn eq(&self, other: &RouterInterface) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RouterInterface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,