#[non_exhaustive]pub struct VpnGateway {Show 13 fields
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub gateway_ip_version: Option<GatewayIpVersion>,
pub id: Option<u64>,
pub kind: Option<String>,
pub label_fingerprint: Option<Bytes>,
pub labels: HashMap<String, String>,
pub name: Option<String>,
pub network: Option<String>,
pub region: Option<String>,
pub self_link: Option<String>,
pub stack_type: Option<StackType>,
pub vpn_interfaces: Vec<VpnGatewayVpnGatewayInterface>,
/* private fields */
}vpn-gateways only.Expand description
Represents a HA VPN gateway.
HA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies .
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.creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
gateway_ip_version: Option<GatewayIpVersion>The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
label_fingerprint: Option<Bytes>A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
labels: HashMap<String, String>Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
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.
network: Option<String>URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
region: Option<String>Output only. [Output Only] URL of the region where the VPN gateway resides.
self_link: Option<String>Output only. [Output Only] Server-defined URL for the resource.
stack_type: Option<StackType>The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6.
vpn_interfaces: Vec<VpnGatewayVpnGatewayInterface>The list of VPN interfaces associated with this VPN gateway.
Implementations§
Source§impl VpnGateway
impl VpnGateway
pub fn new() -> Self
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = VpnGateway::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = VpnGateway::new().set_or_clear_creation_timestamp(Some("example"));
let x = VpnGateway::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = VpnGateway::new().set_or_clear_description(Some("example"));
let x = VpnGateway::new().set_or_clear_description(None::<String>);Sourcepub fn set_gateway_ip_version<T>(self, v: T) -> Selfwhere
T: Into<GatewayIpVersion>,
pub fn set_gateway_ip_version<T>(self, v: T) -> Selfwhere
T: Into<GatewayIpVersion>,
Sets the value of gateway_ip_version.
§Example
use google_cloud_compute_v1::model::vpn_gateway::GatewayIpVersion;
let x0 = VpnGateway::new().set_gateway_ip_version(GatewayIpVersion::Ipv6);Sourcepub fn set_or_clear_gateway_ip_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewayIpVersion>,
pub fn set_or_clear_gateway_ip_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewayIpVersion>,
Sets or clears the value of gateway_ip_version.
§Example
use google_cloud_compute_v1::model::vpn_gateway::GatewayIpVersion;
let x0 = VpnGateway::new().set_or_clear_gateway_ip_version(Some(GatewayIpVersion::Ipv6));
let x_none = VpnGateway::new().set_or_clear_gateway_ip_version(None::<GatewayIpVersion>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_label_fingerprint<T>(self, v: T) -> Self
pub fn set_label_fingerprint<T>(self, v: T) -> Self
Sets the value of label_fingerprint.
§Example
let x = VpnGateway::new().set_label_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_label_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_label_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of label_fingerprint.
§Example
let x = VpnGateway::new().set_or_clear_label_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = VpnGateway::new().set_or_clear_label_fingerprint(None::<bytes::Bytes>);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_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<T>(self, v: T) -> Self
pub fn set_network<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_stack_type<T>(self, v: T) -> Self
pub fn set_stack_type<T>(self, v: T) -> Self
Sets the value of stack_type.
§Example
use google_cloud_compute_v1::model::vpn_gateway::StackType;
let x0 = VpnGateway::new().set_stack_type(StackType::Ipv4Only);
let x1 = VpnGateway::new().set_stack_type(StackType::Ipv6Only);Sourcepub fn set_or_clear_stack_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_stack_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of stack_type.
§Example
use google_cloud_compute_v1::model::vpn_gateway::StackType;
let x0 = VpnGateway::new().set_or_clear_stack_type(Some(StackType::Ipv4Only));
let x1 = VpnGateway::new().set_or_clear_stack_type(Some(StackType::Ipv6Only));
let x_none = VpnGateway::new().set_or_clear_stack_type(None::<StackType>);Sourcepub fn set_vpn_interfaces<T, V>(self, v: T) -> Self
pub fn set_vpn_interfaces<T, V>(self, v: T) -> Self
Sets the value of vpn_interfaces.
§Example
use google_cloud_compute_v1::model::VpnGatewayVpnGatewayInterface;
let x = VpnGateway::new()
.set_vpn_interfaces([
VpnGatewayVpnGatewayInterface::default()/* use setters */,
VpnGatewayVpnGatewayInterface::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for VpnGateway
impl Clone for VpnGateway
Source§fn clone(&self) -> VpnGateway
fn clone(&self) -> VpnGateway
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more