#[non_exhaustive]pub struct Network {Show 20 fields
pub i_pv_4_range: Option<String>,
pub auto_create_subnetworks: Option<bool>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub enable_ula_internal_ipv_6: Option<bool>,
pub firewall_policy: Option<String>,
pub gateway_i_pv_4: Option<String>,
pub id: Option<u64>,
pub internal_ipv_6_range: Option<String>,
pub kind: Option<String>,
pub mtu: Option<i32>,
pub name: Option<String>,
pub network_firewall_policy_enforcement_order: Option<NetworkFirewallPolicyEnforcementOrder>,
pub network_profile: Option<String>,
pub params: Option<NetworkParams>,
pub peerings: Vec<NetworkPeering>,
pub routing_config: Option<NetworkRoutingConfig>,
pub self_link: Option<String>,
pub self_link_with_id: Option<String>,
pub subnetworks: Vec<String>,
/* private fields */
}networks only.Expand description
Represents a VPC Network resource.
Networks connect resources to each other and to the internet. For more information, readVirtual Private Cloud (VPC) Network.
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.i_pv_4_range: Option<String>Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is created.
auto_create_subnetworks: Option<bool>Must be set to create a VPC network. If not set, a legacy network is created.
When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode.
An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described inAuto mode VPC network IP ranges.
For custom mode VPC networks, you can add subnets using the subnetworksinsert method.
creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this field when you create the resource.
enable_ula_internal_ipv_6: Option<bool>Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .
firewall_policy: Option<String>Output only. [Output Only] URL of the firewall policy the network is associated with.
gateway_i_pv_4: Option<String>[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
internal_ipv_6_range: Option<String>When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .
kind: Option<String>Output only. [Output Only] Type of the resource. Always compute#network for networks.
mtu: Option<i32>Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.
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])?. The first character must be a
lowercase letter, and all following characters (except for the last
character) must be a dash, lowercase letter, or digit. The last character
must be a lowercase letter or digit.
network_firewall_policy_enforcement_order: Option<NetworkFirewallPolicyEnforcementOrder>The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified.
network_profile: Option<String>A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs:
- https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name}
- projects/{project_id}/global/networkProfiles/{network_profile_name}
params: Option<NetworkParams>Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
peerings: Vec<NetworkPeering>Output only. [Output Only] A list of network peerings for the resource.
routing_config: Option<NetworkRoutingConfig>The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.
self_link: Option<String>[Output Only] Server-defined URL for the resource.
self_link_with_id: Option<String>Output only. [Output Only] Server-defined URL for this resource with the resource id.
subnetworks: Vec<String>[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.
Implementations§
Source§impl Network
impl Network
pub fn new() -> Self
Sourcepub fn set_i_pv_4_range<T>(self, v: T) -> Self
👎Deprecated
pub fn set_i_pv_4_range<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_i_pv_4_range<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_i_pv_4_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of i_pv_4_range.
§Example
let x = Network::new().set_or_clear_i_pv_4_range(Some("example"));
let x = Network::new().set_or_clear_i_pv_4_range(None::<String>);Sourcepub fn set_auto_create_subnetworks<T>(self, v: T) -> Self
pub fn set_auto_create_subnetworks<T>(self, v: T) -> Self
Sets the value of auto_create_subnetworks.
§Example
let x = Network::new().set_auto_create_subnetworks(true);Sourcepub fn set_or_clear_auto_create_subnetworks<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_auto_create_subnetworks<T>(self, v: Option<T>) -> Self
Sets or clears the value of auto_create_subnetworks.
§Example
let x = Network::new().set_or_clear_auto_create_subnetworks(Some(false));
let x = Network::new().set_or_clear_auto_create_subnetworks(None::<bool>);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 = Network::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 = Network::new().set_or_clear_creation_timestamp(Some("example"));
let x = Network::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 = Network::new().set_or_clear_description(Some("example"));
let x = Network::new().set_or_clear_description(None::<String>);Sourcepub fn set_enable_ula_internal_ipv_6<T>(self, v: T) -> Self
pub fn set_enable_ula_internal_ipv_6<T>(self, v: T) -> Self
Sets the value of enable_ula_internal_ipv_6.
§Example
let x = Network::new().set_enable_ula_internal_ipv_6(true);Sourcepub fn set_or_clear_enable_ula_internal_ipv_6<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable_ula_internal_ipv_6<T>(self, v: Option<T>) -> Self
Sets or clears the value of enable_ula_internal_ipv_6.
§Example
let x = Network::new().set_or_clear_enable_ula_internal_ipv_6(Some(false));
let x = Network::new().set_or_clear_enable_ula_internal_ipv_6(None::<bool>);Sourcepub fn set_firewall_policy<T>(self, v: T) -> Self
pub fn set_firewall_policy<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_firewall_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_firewall_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of firewall_policy.
§Example
let x = Network::new().set_or_clear_firewall_policy(Some("example"));
let x = Network::new().set_or_clear_firewall_policy(None::<String>);Sourcepub fn set_gateway_i_pv_4<T>(self, v: T) -> Self
pub fn set_gateway_i_pv_4<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_gateway_i_pv_4<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_gateway_i_pv_4<T>(self, v: Option<T>) -> Self
Sets or clears the value of gateway_i_pv_4.
§Example
let x = Network::new().set_or_clear_gateway_i_pv_4(Some("example"));
let x = Network::new().set_or_clear_gateway_i_pv_4(None::<String>);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_internal_ipv_6_range<T>(self, v: T) -> Self
pub fn set_internal_ipv_6_range<T>(self, v: T) -> Self
Sets the value of internal_ipv_6_range.
§Example
let x = Network::new().set_internal_ipv_6_range("example");Sourcepub fn set_or_clear_internal_ipv_6_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_internal_ipv_6_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of internal_ipv_6_range.
§Example
let x = Network::new().set_or_clear_internal_ipv_6_range(Some("example"));
let x = Network::new().set_or_clear_internal_ipv_6_range(None::<String>);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_or_clear_mtu<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mtu<T>(self, v: Option<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_firewall_policy_enforcement_order<T>(self, v: T) -> Selfwhere
T: Into<NetworkFirewallPolicyEnforcementOrder>,
pub fn set_network_firewall_policy_enforcement_order<T>(self, v: T) -> Selfwhere
T: Into<NetworkFirewallPolicyEnforcementOrder>,
Sets the value of network_firewall_policy_enforcement_order.
§Example
use google_cloud_compute_v1::model::network::NetworkFirewallPolicyEnforcementOrder;
let x0 = Network::new().set_network_firewall_policy_enforcement_order(NetworkFirewallPolicyEnforcementOrder::BeforeClassicFirewall);Sourcepub fn set_or_clear_network_firewall_policy_enforcement_order<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NetworkFirewallPolicyEnforcementOrder>,
pub fn set_or_clear_network_firewall_policy_enforcement_order<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NetworkFirewallPolicyEnforcementOrder>,
Sets or clears the value of network_firewall_policy_enforcement_order.
§Example
use google_cloud_compute_v1::model::network::NetworkFirewallPolicyEnforcementOrder;
let x0 = Network::new().set_or_clear_network_firewall_policy_enforcement_order(Some(NetworkFirewallPolicyEnforcementOrder::BeforeClassicFirewall));
let x_none = Network::new().set_or_clear_network_firewall_policy_enforcement_order(None::<NetworkFirewallPolicyEnforcementOrder>);Sourcepub fn set_network_profile<T>(self, v: T) -> Self
pub fn set_network_profile<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_network_profile<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_network_profile<T>(self, v: Option<T>) -> Self
Sets or clears the value of network_profile.
§Example
let x = Network::new().set_or_clear_network_profile(Some("example"));
let x = Network::new().set_or_clear_network_profile(None::<String>);Sourcepub fn set_params<T>(self, v: T) -> Selfwhere
T: Into<NetworkParams>,
pub fn set_params<T>(self, v: T) -> Selfwhere
T: Into<NetworkParams>,
Sourcepub fn set_or_clear_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkParams>,
pub fn set_or_clear_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkParams>,
Sourcepub fn set_peerings<T, V>(self, v: T) -> Self
pub fn set_peerings<T, V>(self, v: T) -> Self
Sourcepub fn set_routing_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkRoutingConfig>,
pub fn set_routing_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkRoutingConfig>,
Sets the value of routing_config.
§Example
use google_cloud_compute_v1::model::NetworkRoutingConfig;
let x = Network::new().set_routing_config(NetworkRoutingConfig::default()/* use setters */);Sourcepub fn set_or_clear_routing_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkRoutingConfig>,
pub fn set_or_clear_routing_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkRoutingConfig>,
Sets or clears the value of routing_config.
§Example
use google_cloud_compute_v1::model::NetworkRoutingConfig;
let x = Network::new().set_or_clear_routing_config(Some(NetworkRoutingConfig::default()/* use setters */));
let x = Network::new().set_or_clear_routing_config(None::<NetworkRoutingConfig>);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_self_link_with_id<T>(self, v: T) -> Self
pub fn set_self_link_with_id<T>(self, v: T) -> Self
Sets the value of self_link_with_id.
§Example
let x = Network::new().set_self_link_with_id("example");Sourcepub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of self_link_with_id.
§Example
let x = Network::new().set_or_clear_self_link_with_id(Some("example"));
let x = Network::new().set_or_clear_self_link_with_id(None::<String>);