#[non_exhaustive]pub struct NetworkRoutingConfig {
pub bgp_always_compare_med: Option<bool>,
pub bgp_best_path_selection_mode: Option<BgpBestPathSelectionMode>,
pub bgp_inter_region_cost: Option<BgpInterRegionCost>,
pub effective_bgp_always_compare_med: Option<bool>,
pub effective_bgp_inter_region_cost: Option<EffectiveBgpInterRegionCost>,
pub routing_mode: Option<RoutingMode>,
/* private fields */
}networks only.Expand description
A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.
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.bgp_always_compare_med: Option<bool>Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.
bgp_best_path_selection_mode: Option<BgpBestPathSelectionMode>The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.
bgp_inter_region_cost: Option<BgpInterRegionCost>Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT orADD_COST_TO_MED.
effective_bgp_always_compare_med: Option<bool>Output only. [Output Only] Effective value of the bgp_always_compare_med field.
effective_bgp_inter_region_cost: Option<EffectiveBgpInterRegionCost>Output only. [Output Only] Effective value of the bgp_inter_region_cost field.
routing_mode: Option<RoutingMode>The network-wide routing mode to use. If set to REGIONAL, this network’s Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set toGLOBAL, this network’s Cloud Routers will advertise routes with all subnets of this network, across regions.
Implementations§
Source§impl NetworkRoutingConfig
impl NetworkRoutingConfig
pub fn new() -> Self
Sourcepub fn set_bgp_always_compare_med<T>(self, v: T) -> Self
pub fn set_bgp_always_compare_med<T>(self, v: T) -> Self
Sets the value of bgp_always_compare_med.
§Example
let x = NetworkRoutingConfig::new().set_bgp_always_compare_med(true);Sourcepub fn set_or_clear_bgp_always_compare_med<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_bgp_always_compare_med<T>(self, v: Option<T>) -> Self
Sets or clears the value of bgp_always_compare_med.
§Example
let x = NetworkRoutingConfig::new().set_or_clear_bgp_always_compare_med(Some(false));
let x = NetworkRoutingConfig::new().set_or_clear_bgp_always_compare_med(None::<bool>);Sourcepub fn set_bgp_best_path_selection_mode<T>(self, v: T) -> Selfwhere
T: Into<BgpBestPathSelectionMode>,
pub fn set_bgp_best_path_selection_mode<T>(self, v: T) -> Selfwhere
T: Into<BgpBestPathSelectionMode>,
Sets the value of bgp_best_path_selection_mode.
§Example
use google_cloud_compute_v1::model::network_routing_config::BgpBestPathSelectionMode;
let x0 = NetworkRoutingConfig::new().set_bgp_best_path_selection_mode(BgpBestPathSelectionMode::Standard);Sourcepub fn set_or_clear_bgp_best_path_selection_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<BgpBestPathSelectionMode>,
pub fn set_or_clear_bgp_best_path_selection_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<BgpBestPathSelectionMode>,
Sets or clears the value of bgp_best_path_selection_mode.
§Example
use google_cloud_compute_v1::model::network_routing_config::BgpBestPathSelectionMode;
let x0 = NetworkRoutingConfig::new().set_or_clear_bgp_best_path_selection_mode(Some(BgpBestPathSelectionMode::Standard));
let x_none = NetworkRoutingConfig::new().set_or_clear_bgp_best_path_selection_mode(None::<BgpBestPathSelectionMode>);Sourcepub fn set_bgp_inter_region_cost<T>(self, v: T) -> Selfwhere
T: Into<BgpInterRegionCost>,
pub fn set_bgp_inter_region_cost<T>(self, v: T) -> Selfwhere
T: Into<BgpInterRegionCost>,
Sets the value of bgp_inter_region_cost.
§Example
use google_cloud_compute_v1::model::network_routing_config::BgpInterRegionCost;
let x0 = NetworkRoutingConfig::new().set_bgp_inter_region_cost(BgpInterRegionCost::Default);Sourcepub fn set_or_clear_bgp_inter_region_cost<T>(self, v: Option<T>) -> Selfwhere
T: Into<BgpInterRegionCost>,
pub fn set_or_clear_bgp_inter_region_cost<T>(self, v: Option<T>) -> Selfwhere
T: Into<BgpInterRegionCost>,
Sets or clears the value of bgp_inter_region_cost.
§Example
use google_cloud_compute_v1::model::network_routing_config::BgpInterRegionCost;
let x0 = NetworkRoutingConfig::new().set_or_clear_bgp_inter_region_cost(Some(BgpInterRegionCost::Default));
let x_none = NetworkRoutingConfig::new().set_or_clear_bgp_inter_region_cost(None::<BgpInterRegionCost>);Sourcepub fn set_effective_bgp_always_compare_med<T>(self, v: T) -> Self
pub fn set_effective_bgp_always_compare_med<T>(self, v: T) -> Self
Sets the value of effective_bgp_always_compare_med.
§Example
let x = NetworkRoutingConfig::new().set_effective_bgp_always_compare_med(true);Sourcepub fn set_or_clear_effective_bgp_always_compare_med<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_effective_bgp_always_compare_med<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of effective_bgp_always_compare_med.
§Example
let x = NetworkRoutingConfig::new().set_or_clear_effective_bgp_always_compare_med(Some(false));
let x = NetworkRoutingConfig::new().set_or_clear_effective_bgp_always_compare_med(None::<bool>);Sourcepub fn set_effective_bgp_inter_region_cost<T>(self, v: T) -> Selfwhere
T: Into<EffectiveBgpInterRegionCost>,
pub fn set_effective_bgp_inter_region_cost<T>(self, v: T) -> Selfwhere
T: Into<EffectiveBgpInterRegionCost>,
Sets the value of effective_bgp_inter_region_cost.
§Example
use google_cloud_compute_v1::model::network_routing_config::EffectiveBgpInterRegionCost;
let x0 = NetworkRoutingConfig::new().set_effective_bgp_inter_region_cost(EffectiveBgpInterRegionCost::Default);Sourcepub fn set_or_clear_effective_bgp_inter_region_cost<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<EffectiveBgpInterRegionCost>,
pub fn set_or_clear_effective_bgp_inter_region_cost<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<EffectiveBgpInterRegionCost>,
Sets or clears the value of effective_bgp_inter_region_cost.
§Example
use google_cloud_compute_v1::model::network_routing_config::EffectiveBgpInterRegionCost;
let x0 = NetworkRoutingConfig::new().set_or_clear_effective_bgp_inter_region_cost(Some(EffectiveBgpInterRegionCost::Default));
let x_none = NetworkRoutingConfig::new().set_or_clear_effective_bgp_inter_region_cost(None::<EffectiveBgpInterRegionCost>);Sourcepub fn set_routing_mode<T>(self, v: T) -> Selfwhere
T: Into<RoutingMode>,
pub fn set_routing_mode<T>(self, v: T) -> Selfwhere
T: Into<RoutingMode>,
Sets the value of routing_mode.
§Example
use google_cloud_compute_v1::model::network_routing_config::RoutingMode;
let x0 = NetworkRoutingConfig::new().set_routing_mode(RoutingMode::Regional);Sourcepub fn set_or_clear_routing_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<RoutingMode>,
pub fn set_or_clear_routing_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<RoutingMode>,
Sets or clears the value of routing_mode.
§Example
use google_cloud_compute_v1::model::network_routing_config::RoutingMode;
let x0 = NetworkRoutingConfig::new().set_or_clear_routing_mode(Some(RoutingMode::Regional));
let x_none = NetworkRoutingConfig::new().set_or_clear_routing_mode(None::<RoutingMode>);Trait Implementations§
Source§impl Clone for NetworkRoutingConfig
impl Clone for NetworkRoutingConfig
Source§fn clone(&self) -> NetworkRoutingConfig
fn clone(&self) -> NetworkRoutingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more