#[non_exhaustive]pub struct Router {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub description: String,
pub network: String,
pub interface: Vec<Interface>,
pub bgp_peer: Vec<BgpPeer>,
pub bgp: Option<Bgp>,
pub state: ResourceState,
pub route_advertisements: Vec<String>,
/* private fields */
}Expand description
Message describing Router object
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: StringRequired. The canonical resource name of the router.
create_time: Option<Timestamp>Output only. The time when the router was created.
update_time: Option<Timestamp>Output only. The time when the router was last updated.
labels: HashMap<String, String>Labels associated with this resource.
description: StringOptional. A free-text description of the resource. Max length 1024 characters.
network: StringRequired. The canonical name of the network to which this router belongs.
The name is in the form of
projects/{project}/locations/{location}/zones/{zone}/networks/{network}.
interface: Vec<Interface>Router interfaces.
bgp_peer: Vec<BgpPeer>BGP peers.
bgp: Option<Bgp>BGP information specific to this router.
state: ResourceStateOutput only. Current stage of the resource to the device by config push.
route_advertisements: Vec<String>Optional. A list of CIDRs in IP/Length format to advertise northbound as static routes from this router.
Implementations§
Source§impl Router
impl Router
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Router::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Router::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Router::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Router::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Router::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Router::new().set_or_clear_update_time(None::<Timestamp>);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_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
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_interface<T, V>(self, v: T) -> Self
pub fn set_interface<T, V>(self, v: T) -> Self
Sourcepub fn set_bgp_peer<T, V>(self, v: T) -> Self
pub fn set_bgp_peer<T, V>(self, v: T) -> Self
Sourcepub fn set_or_clear_bgp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_bgp<T>(self, v: Option<T>) -> Self
Sourcepub fn set_state<T: Into<ResourceState>>(self, v: T) -> Self
pub fn set_state<T: Into<ResourceState>>(self, v: T) -> Self
Sourcepub fn set_route_advertisements<T, V>(self, v: T) -> Self
pub fn set_route_advertisements<T, V>(self, v: T) -> Self
Sets the value of route_advertisements.
§Example
let x = Router::new().set_route_advertisements(["a", "b", "c"]);