#[non_exhaustive]pub struct UsableSubnetwork {
pub external_ipv_6_prefix: Option<String>,
pub internal_ipv_6_prefix: Option<String>,
pub ip_cidr_range: Option<String>,
pub ipv_6_access_type: Option<Ipv6AccessType>,
pub network: Option<String>,
pub purpose: Option<Purpose>,
pub role: Option<Role>,
pub secondary_ip_ranges: Vec<UsableSubnetworkSecondaryRange>,
pub stack_type: Option<StackType>,
pub subnetwork: Option<String>,
/* private fields */
}subnetworks only.Expand description
Subnetwork which the current user has compute.subnetworks.use permission on.
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.external_ipv_6_prefix: Option<String>Output only. [Output Only] The external IPv6 address range that is assigned to this subnetwork.
internal_ipv_6_prefix: Option<String>Output only. [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
ip_cidr_range: Option<String>The range of internal addresses that are owned by this subnetwork.
ipv_6_access_type: Option<Ipv6AccessType>The access type of IPv6 address this subnet holds. It’s immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
network: Option<String>Network URL.
purpose: Option<Purpose>§role: Option<Role>The role of subnetwork. Currently, this field is only used when purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
secondary_ip_ranges: Vec<UsableSubnetworkSecondaryRange>Secondary IP ranges.
stack_type: Option<StackType>The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used.
This field can be both set at resource creation time and updated usingpatch.
subnetwork: Option<String>Subnetwork URL.
Implementations§
Source§impl UsableSubnetwork
impl UsableSubnetwork
pub fn new() -> Self
Sourcepub fn set_external_ipv_6_prefix<T>(self, v: T) -> Self
pub fn set_external_ipv_6_prefix<T>(self, v: T) -> Self
Sets the value of external_ipv_6_prefix.
§Example
let x = UsableSubnetwork::new().set_external_ipv_6_prefix("example");Sourcepub fn set_or_clear_external_ipv_6_prefix<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_external_ipv_6_prefix<T>(self, v: Option<T>) -> Self
Sets or clears the value of external_ipv_6_prefix.
§Example
let x = UsableSubnetwork::new().set_or_clear_external_ipv_6_prefix(Some("example"));
let x = UsableSubnetwork::new().set_or_clear_external_ipv_6_prefix(None::<String>);Sourcepub fn set_internal_ipv_6_prefix<T>(self, v: T) -> Self
pub fn set_internal_ipv_6_prefix<T>(self, v: T) -> Self
Sets the value of internal_ipv_6_prefix.
§Example
let x = UsableSubnetwork::new().set_internal_ipv_6_prefix("example");Sourcepub fn set_or_clear_internal_ipv_6_prefix<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_internal_ipv_6_prefix<T>(self, v: Option<T>) -> Self
Sets or clears the value of internal_ipv_6_prefix.
§Example
let x = UsableSubnetwork::new().set_or_clear_internal_ipv_6_prefix(Some("example"));
let x = UsableSubnetwork::new().set_or_clear_internal_ipv_6_prefix(None::<String>);Sourcepub fn set_ip_cidr_range<T>(self, v: T) -> Self
pub fn set_ip_cidr_range<T>(self, v: T) -> Self
Sets the value of ip_cidr_range.
§Example
let x = UsableSubnetwork::new().set_ip_cidr_range("example");Sourcepub fn set_or_clear_ip_cidr_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_cidr_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_cidr_range.
§Example
let x = UsableSubnetwork::new().set_or_clear_ip_cidr_range(Some("example"));
let x = UsableSubnetwork::new().set_or_clear_ip_cidr_range(None::<String>);Sourcepub fn set_ipv_6_access_type<T>(self, v: T) -> Selfwhere
T: Into<Ipv6AccessType>,
pub fn set_ipv_6_access_type<T>(self, v: T) -> Selfwhere
T: Into<Ipv6AccessType>,
Sets the value of ipv_6_access_type.
§Example
use google_cloud_compute_v1::model::usable_subnetwork::Ipv6AccessType;
let x0 = UsableSubnetwork::new().set_ipv_6_access_type(Ipv6AccessType::Internal);Sourcepub fn set_or_clear_ipv_6_access_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<Ipv6AccessType>,
pub fn set_or_clear_ipv_6_access_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<Ipv6AccessType>,
Sets or clears the value of ipv_6_access_type.
§Example
use google_cloud_compute_v1::model::usable_subnetwork::Ipv6AccessType;
let x0 = UsableSubnetwork::new().set_or_clear_ipv_6_access_type(Some(Ipv6AccessType::Internal));
let x_none = UsableSubnetwork::new().set_or_clear_ipv_6_access_type(None::<Ipv6AccessType>);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_purpose<T>(self, v: T) -> Self
pub fn set_purpose<T>(self, v: T) -> Self
Sets the value of purpose.
§Example
use google_cloud_compute_v1::model::usable_subnetwork::Purpose;
let x0 = UsableSubnetwork::new().set_purpose(Purpose::InternalHttpsLoadBalancer);
let x1 = UsableSubnetwork::new().set_purpose(Purpose::PeerMigration);
let x2 = UsableSubnetwork::new().set_purpose(Purpose::Private);Sourcepub fn set_or_clear_purpose<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_purpose<T>(self, v: Option<T>) -> Self
Sets or clears the value of purpose.
§Example
use google_cloud_compute_v1::model::usable_subnetwork::Purpose;
let x0 = UsableSubnetwork::new().set_or_clear_purpose(Some(Purpose::InternalHttpsLoadBalancer));
let x1 = UsableSubnetwork::new().set_or_clear_purpose(Some(Purpose::PeerMigration));
let x2 = UsableSubnetwork::new().set_or_clear_purpose(Some(Purpose::Private));
let x_none = UsableSubnetwork::new().set_or_clear_purpose(None::<Purpose>);Sourcepub fn set_or_clear_role<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_role<T>(self, v: Option<T>) -> Self
Sourcepub fn set_secondary_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_secondary_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of secondary_ip_ranges.
§Example
use google_cloud_compute_v1::model::UsableSubnetworkSecondaryRange;
let x = UsableSubnetwork::new()
.set_secondary_ip_ranges([
UsableSubnetworkSecondaryRange::default()/* use setters */,
UsableSubnetworkSecondaryRange::default()/* use (different) setters */,
]);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::usable_subnetwork::StackType;
let x0 = UsableSubnetwork::new().set_stack_type(StackType::Ipv4Only);
let x1 = UsableSubnetwork::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::usable_subnetwork::StackType;
let x0 = UsableSubnetwork::new().set_or_clear_stack_type(Some(StackType::Ipv4Only));
let x1 = UsableSubnetwork::new().set_or_clear_stack_type(Some(StackType::Ipv6Only));
let x_none = UsableSubnetwork::new().set_or_clear_stack_type(None::<StackType>);Sourcepub fn set_subnetwork<T>(self, v: T) -> Self
pub fn set_subnetwork<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subnetwork<T>(self, v: Option<T>) -> Self
Sets or clears the value of subnetwork.
§Example
let x = UsableSubnetwork::new().set_or_clear_subnetwork(Some("example"));
let x = UsableSubnetwork::new().set_or_clear_subnetwork(None::<String>);Trait Implementations§
Source§impl Clone for UsableSubnetwork
impl Clone for UsableSubnetwork
Source§fn clone(&self) -> UsableSubnetwork
fn clone(&self) -> UsableSubnetwork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more