#[non_exhaustive]pub struct NetworksAddPeeringRequest {
pub auto_create_routes: Option<bool>,
pub name: Option<String>,
pub network_peering: Option<NetworkPeering>,
pub peer_network: Option<String>,
/* private fields */
}networks 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.auto_create_routes: Option<bool>This field will be deprecated soon. Useexchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state isACTIVE.
name: Option<String>Name of the peering, which should conform to RFC1035.
network_peering: Option<NetworkPeering>Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer network,exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon.
peer_network: Option<String>URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.
Implementations§
Source§impl NetworksAddPeeringRequest
impl NetworksAddPeeringRequest
pub fn new() -> Self
Sourcepub fn set_auto_create_routes<T>(self, v: T) -> Self
pub fn set_auto_create_routes<T>(self, v: T) -> Self
Sets the value of auto_create_routes.
§Example
let x = NetworksAddPeeringRequest::new().set_auto_create_routes(true);Sourcepub fn set_or_clear_auto_create_routes<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_auto_create_routes<T>(self, v: Option<T>) -> Self
Sets or clears the value of auto_create_routes.
§Example
let x = NetworksAddPeeringRequest::new().set_or_clear_auto_create_routes(Some(false));
let x = NetworksAddPeeringRequest::new().set_or_clear_auto_create_routes(None::<bool>);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_network_peering<T>(self, v: T) -> Selfwhere
T: Into<NetworkPeering>,
pub fn set_network_peering<T>(self, v: T) -> Selfwhere
T: Into<NetworkPeering>,
Sets the value of network_peering.
§Example
use google_cloud_compute_v1::model::NetworkPeering;
let x = NetworksAddPeeringRequest::new().set_network_peering(NetworkPeering::default()/* use setters */);Sourcepub fn set_or_clear_network_peering<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkPeering>,
pub fn set_or_clear_network_peering<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkPeering>,
Sets or clears the value of network_peering.
§Example
use google_cloud_compute_v1::model::NetworkPeering;
let x = NetworksAddPeeringRequest::new().set_or_clear_network_peering(Some(NetworkPeering::default()/* use setters */));
let x = NetworksAddPeeringRequest::new().set_or_clear_network_peering(None::<NetworkPeering>);Sourcepub fn set_peer_network<T>(self, v: T) -> Self
pub fn set_peer_network<T>(self, v: T) -> Self
Sets the value of peer_network.
§Example
let x = NetworksAddPeeringRequest::new().set_peer_network("example");Sourcepub fn set_or_clear_peer_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_peer_network<T>(self, v: Option<T>) -> Self
Sets or clears the value of peer_network.
§Example
let x = NetworksAddPeeringRequest::new().set_or_clear_peer_network(Some("example"));
let x = NetworksAddPeeringRequest::new().set_or_clear_peer_network(None::<String>);Trait Implementations§
Source§impl Clone for NetworksAddPeeringRequest
impl Clone for NetworksAddPeeringRequest
Source§fn clone(&self) -> NetworksAddPeeringRequest
fn clone(&self) -> NetworksAddPeeringRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more