Skip to main content

Subnetwork

Struct Subnetwork 

Source
#[non_exhaustive]
pub struct Subnetwork {
Show 32 fields pub allow_subnet_cidr_routes_overlap: Option<bool>, pub creation_timestamp: Option<String>, pub description: Option<String>, pub enable_flow_logs: Option<bool>, pub external_ipv_6_prefix: Option<String>, pub fingerprint: Option<Bytes>, pub gateway_address: Option<String>, pub id: Option<u64>, pub internal_ipv_6_prefix: Option<String>, pub ip_cidr_range: Option<String>, pub ip_collection: Option<String>, pub ipv_6_access_type: Option<Ipv6AccessType>, pub ipv_6_cidr_range: Option<String>, pub ipv_6_gce_endpoint: Option<Ipv6GceEndpoint>, pub kind: Option<String>, pub log_config: Option<SubnetworkLogConfig>, pub name: Option<String>, pub network: Option<String>, pub params: Option<SubnetworkParams>, pub private_ip_google_access: Option<bool>, pub private_ipv_6_google_access: Option<PrivateIpv6GoogleAccess>, pub purpose: Option<Purpose>, pub region: Option<String>, pub reserved_internal_range: Option<String>, pub role: Option<Role>, pub secondary_ip_ranges: Vec<SubnetworkSecondaryRange>, pub self_link: Option<String>, pub stack_type: Option<StackType>, pub state: Option<State>, pub system_reserved_external_ipv_6_ranges: Vec<String>, pub system_reserved_internal_ipv_6_ranges: Vec<String>, pub utilization_details: Option<SubnetworkUtilizationDetails>, /* private fields */
}
Available on crate feature subnetworks only.
Expand description

Represents a Subnetwork resource.

A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§allow_subnet_cidr_routes_overlap: Option<bool>

Whether this subnetwork’s ranges can conflict with existing static routes. Setting this to true allows this subnetwork’s primary and secondary ranges to overlap with (and contain) static routes that have already been configured on the corresponding network.

For example if a static route has range 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if allow_conflicting_routes=true.

Overlapping is only allowed on subnetwork operations; routes whose ranges conflict with this subnetwork’s ranges won’t be allowed unless route.allow_conflicting_subnetworks is set to true.

Typically packets destined to IPs within the subnetwork (which may contain private/sensitive data) are prevented from leaving the virtual network. Setting this field to true will disable this feature.

The default value is false and applies to all existing subnetworks and automatically created subnetworks.

This field cannot be set to true at resource creation time.

§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. This field can be set only at resource creation time.

§enable_flow_logs: Option<bool>

Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn’t supported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY. It is recommended to uselogConfig.enable field instead.

§external_ipv_6_prefix: Option<String>

The external IPv6 address range that is owned by this subnetwork.

§fingerprint: Option<Bytes>

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve a Subnetwork.

§gateway_address: Option<String>

Output only. [Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork.

§id: Option<u64>

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

§internal_ipv_6_prefix: Option<String>

The internal IPv6 address range that is owned by this subnetwork.

§ip_cidr_range: Option<String>

The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in theValid ranges list. The range can be expanded after creation usingexpandIpCidrRange.

§ip_collection: Option<String>

Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL_IPV6_SUBNETWORK_CREATION or INTERNAL_IPV6_SUBNETWORK_CREATION mode.

Use one of the following formats to specify a sub-PDP when creating a dual stack or IPv6-only subnetwork with external access using BYOIP:

§Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name

Partial URL, as in

      - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name
      - regions/region/publicDelegatedPrefixes/sub-pdp-name
§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.

§ipv_6_cidr_range: Option<String>

Output only. [Output Only] This field is for internal use.

§ipv_6_gce_endpoint: Option<Ipv6GceEndpoint>

Output only. [Output Only] Possible endpoints of this subnetwork. It can be one of the following:

  • VM_ONLY: The subnetwork can be used for creating instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 ranges from a public delegated prefix and cannot be used to create NetLb.
  • VM_AND_FR: The subnetwork can be used for creating both VM instances and Forwarding Rules. It can also be used to reserve IPv6 addresses with both VM and FR endpoint types. Such a subnetwork gets its IPv6 range from Google IP Pool directly.
§kind: Option<String>

Output only. [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.

§log_config: Option<SubnetworkLogConfig>

This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Cloud Logging.

§name: Option<String>

The name of the resource, provided by the client when initially creating the resource. 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>

The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time.

§params: Option<SubnetworkParams>

Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.

§private_ip_google_access: Option<bool>

Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.

§private_ipv_6_google_access: Option<PrivateIpv6GoogleAccess>

This field is for internal use.

This field can be both set at resource creation time and updated usingpatch.

§purpose: Option<Purpose>§region: Option<String>

URL of the region where the Subnetwork resides. This field can be set only at resource creation time.

§reserved_internal_range: Option<String>

The URL of the reserved internal range.

§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<SubnetworkSecondaryRange>

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with apatch request.

§self_link: Option<String>

[Output Only] Server-defined URL for the resource.

§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.

§state: Option<State>

Output only. [Output Only] The state of the subnetwork, which can be one of the following values:READY: Subnetwork is created and ready to useDRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status ofREADY

§system_reserved_external_ipv_6_ranges: Vec<String>

Output only. [Output Only] The array of external IPv6 network ranges reserved from the subnetwork’s external IPv6 range for system use.

§system_reserved_internal_ipv_6_ranges: Vec<String>

Output only. [Output Only] The array of internal IPv6 network ranges reserved from the subnetwork’s internal IPv6 range for system use.

§utilization_details: Option<SubnetworkUtilizationDetails>

Output only. [Output Only] The current IP utilization of all subnetwork ranges. Contains the total number of allocated and free IPs in each range.

Implementations§

Source§

impl Subnetwork

Source

pub fn new() -> Self

Source

pub fn set_allow_subnet_cidr_routes_overlap<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of allow_subnet_cidr_routes_overlap.

§Example
let x = Subnetwork::new().set_allow_subnet_cidr_routes_overlap(true);
Source

pub fn set_or_clear_allow_subnet_cidr_routes_overlap<T>( self, v: Option<T>, ) -> Self
where T: Into<bool>,

Sets or clears the value of allow_subnet_cidr_routes_overlap.

§Example
let x = Subnetwork::new().set_or_clear_allow_subnet_cidr_routes_overlap(Some(false));
let x = Subnetwork::new().set_or_clear_allow_subnet_cidr_routes_overlap(None::<bool>);
Source

pub fn set_creation_timestamp<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of creation_timestamp.

§Example
let x = Subnetwork::new().set_creation_timestamp("example");
Source

pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of creation_timestamp.

§Example
let x = Subnetwork::new().set_or_clear_creation_timestamp(Some("example"));
let x = Subnetwork::new().set_or_clear_creation_timestamp(None::<String>);
Source

pub fn set_description<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of description.

§Example
let x = Subnetwork::new().set_description("example");
Source

pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of description.

§Example
let x = Subnetwork::new().set_or_clear_description(Some("example"));
let x = Subnetwork::new().set_or_clear_description(None::<String>);
Source

pub fn set_enable_flow_logs<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of enable_flow_logs.

§Example
let x = Subnetwork::new().set_enable_flow_logs(true);
Source

pub fn set_or_clear_enable_flow_logs<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of enable_flow_logs.

§Example
let x = Subnetwork::new().set_or_clear_enable_flow_logs(Some(false));
let x = Subnetwork::new().set_or_clear_enable_flow_logs(None::<bool>);
Source

pub fn set_external_ipv_6_prefix<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of external_ipv_6_prefix.

§Example
let x = Subnetwork::new().set_external_ipv_6_prefix("example");
Source

pub fn set_or_clear_external_ipv_6_prefix<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of external_ipv_6_prefix.

§Example
let x = Subnetwork::new().set_or_clear_external_ipv_6_prefix(Some("example"));
let x = Subnetwork::new().set_or_clear_external_ipv_6_prefix(None::<String>);
Source

pub fn set_fingerprint<T>(self, v: T) -> Self
where T: Into<Bytes>,

Sets the value of fingerprint.

§Example
let x = Subnetwork::new().set_fingerprint(bytes::Bytes::from_static(b"example"));
Source

pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
where T: Into<Bytes>,

Sets or clears the value of fingerprint.

§Example
let x = Subnetwork::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = Subnetwork::new().set_or_clear_fingerprint(None::<bytes::Bytes>);
Source

pub fn set_gateway_address<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of gateway_address.

§Example
let x = Subnetwork::new().set_gateway_address("example");
Source

pub fn set_or_clear_gateway_address<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of gateway_address.

§Example
let x = Subnetwork::new().set_or_clear_gateway_address(Some("example"));
let x = Subnetwork::new().set_or_clear_gateway_address(None::<String>);
Source

pub fn set_id<T>(self, v: T) -> Self
where T: Into<u64>,

Sets the value of id.

§Example
let x = Subnetwork::new().set_id(42_u32);
Source

pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
where T: Into<u64>,

Sets or clears the value of id.

§Example
let x = Subnetwork::new().set_or_clear_id(Some(42_u32));
let x = Subnetwork::new().set_or_clear_id(None::<u32>);
Source

pub fn set_internal_ipv_6_prefix<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of internal_ipv_6_prefix.

§Example
let x = Subnetwork::new().set_internal_ipv_6_prefix("example");
Source

pub fn set_or_clear_internal_ipv_6_prefix<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of internal_ipv_6_prefix.

§Example
let x = Subnetwork::new().set_or_clear_internal_ipv_6_prefix(Some("example"));
let x = Subnetwork::new().set_or_clear_internal_ipv_6_prefix(None::<String>);
Source

pub fn set_ip_cidr_range<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ip_cidr_range.

§Example
let x = Subnetwork::new().set_ip_cidr_range("example");
Source

pub fn set_or_clear_ip_cidr_range<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ip_cidr_range.

§Example
let x = Subnetwork::new().set_or_clear_ip_cidr_range(Some("example"));
let x = Subnetwork::new().set_or_clear_ip_cidr_range(None::<String>);
Source

pub fn set_ip_collection<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ip_collection.

§Example
let x = Subnetwork::new().set_ip_collection("example");
Source

pub fn set_or_clear_ip_collection<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ip_collection.

§Example
let x = Subnetwork::new().set_or_clear_ip_collection(Some("example"));
let x = Subnetwork::new().set_or_clear_ip_collection(None::<String>);
Source

pub fn set_ipv_6_access_type<T>(self, v: T) -> Self
where T: Into<Ipv6AccessType>,

Sets the value of ipv_6_access_type.

§Example
use google_cloud_compute_v1::model::subnetwork::Ipv6AccessType;
let x0 = Subnetwork::new().set_ipv_6_access_type(Ipv6AccessType::Internal);
Source

pub fn set_or_clear_ipv_6_access_type<T>(self, v: Option<T>) -> Self
where T: Into<Ipv6AccessType>,

Sets or clears the value of ipv_6_access_type.

§Example
use google_cloud_compute_v1::model::subnetwork::Ipv6AccessType;
let x0 = Subnetwork::new().set_or_clear_ipv_6_access_type(Some(Ipv6AccessType::Internal));
let x_none = Subnetwork::new().set_or_clear_ipv_6_access_type(None::<Ipv6AccessType>);
Source

pub fn set_ipv_6_cidr_range<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of ipv_6_cidr_range.

§Example
let x = Subnetwork::new().set_ipv_6_cidr_range("example");
Source

pub fn set_or_clear_ipv_6_cidr_range<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of ipv_6_cidr_range.

§Example
let x = Subnetwork::new().set_or_clear_ipv_6_cidr_range(Some("example"));
let x = Subnetwork::new().set_or_clear_ipv_6_cidr_range(None::<String>);
Source

pub fn set_ipv_6_gce_endpoint<T>(self, v: T) -> Self

Sets the value of ipv_6_gce_endpoint.

§Example
use google_cloud_compute_v1::model::subnetwork::Ipv6GceEndpoint;
let x0 = Subnetwork::new().set_ipv_6_gce_endpoint(Ipv6GceEndpoint::VmOnly);
Source

pub fn set_or_clear_ipv_6_gce_endpoint<T>(self, v: Option<T>) -> Self

Sets or clears the value of ipv_6_gce_endpoint.

§Example
use google_cloud_compute_v1::model::subnetwork::Ipv6GceEndpoint;
let x0 = Subnetwork::new().set_or_clear_ipv_6_gce_endpoint(Some(Ipv6GceEndpoint::VmOnly));
let x_none = Subnetwork::new().set_or_clear_ipv_6_gce_endpoint(None::<Ipv6GceEndpoint>);
Source

pub fn set_kind<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of kind.

§Example
let x = Subnetwork::new().set_kind("example");
Source

pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of kind.

§Example
let x = Subnetwork::new().set_or_clear_kind(Some("example"));
let x = Subnetwork::new().set_or_clear_kind(None::<String>);
Source

pub fn set_log_config<T>(self, v: T) -> Self

Sets the value of log_config.

§Example
use google_cloud_compute_v1::model::SubnetworkLogConfig;
let x = Subnetwork::new().set_log_config(SubnetworkLogConfig::default()/* use setters */);
Source

pub fn set_or_clear_log_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of log_config.

§Example
use google_cloud_compute_v1::model::SubnetworkLogConfig;
let x = Subnetwork::new().set_or_clear_log_config(Some(SubnetworkLogConfig::default()/* use setters */));
let x = Subnetwork::new().set_or_clear_log_config(None::<SubnetworkLogConfig>);
Source

pub fn set_name<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of name.

§Example
let x = Subnetwork::new().set_name("example");
Source

pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of name.

§Example
let x = Subnetwork::new().set_or_clear_name(Some("example"));
let x = Subnetwork::new().set_or_clear_name(None::<String>);
Source

pub fn set_network<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of network.

§Example
let x = Subnetwork::new().set_network("example");
Source

pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of network.

§Example
let x = Subnetwork::new().set_or_clear_network(Some("example"));
let x = Subnetwork::new().set_or_clear_network(None::<String>);
Source

pub fn set_params<T>(self, v: T) -> Self

Sets the value of params.

§Example
use google_cloud_compute_v1::model::SubnetworkParams;
let x = Subnetwork::new().set_params(SubnetworkParams::default()/* use setters */);
Source

pub fn set_or_clear_params<T>(self, v: Option<T>) -> Self

Sets or clears the value of params.

§Example
use google_cloud_compute_v1::model::SubnetworkParams;
let x = Subnetwork::new().set_or_clear_params(Some(SubnetworkParams::default()/* use setters */));
let x = Subnetwork::new().set_or_clear_params(None::<SubnetworkParams>);
Source

pub fn set_private_ip_google_access<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of private_ip_google_access.

§Example
let x = Subnetwork::new().set_private_ip_google_access(true);
Source

pub fn set_or_clear_private_ip_google_access<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of private_ip_google_access.

§Example
let x = Subnetwork::new().set_or_clear_private_ip_google_access(Some(false));
let x = Subnetwork::new().set_or_clear_private_ip_google_access(None::<bool>);
Source

pub fn set_private_ipv_6_google_access<T>(self, v: T) -> Self

Sets the value of private_ipv_6_google_access.

§Example
use google_cloud_compute_v1::model::subnetwork::PrivateIpv6GoogleAccess;
let x0 = Subnetwork::new().set_private_ipv_6_google_access(PrivateIpv6GoogleAccess::EnableBidirectionalAccessToGoogle);
let x1 = Subnetwork::new().set_private_ipv_6_google_access(PrivateIpv6GoogleAccess::EnableOutboundVmAccessToGoogle);
Source

pub fn set_or_clear_private_ipv_6_google_access<T>(self, v: Option<T>) -> Self

Sets or clears the value of private_ipv_6_google_access.

§Example
use google_cloud_compute_v1::model::subnetwork::PrivateIpv6GoogleAccess;
let x0 = Subnetwork::new().set_or_clear_private_ipv_6_google_access(Some(PrivateIpv6GoogleAccess::EnableBidirectionalAccessToGoogle));
let x1 = Subnetwork::new().set_or_clear_private_ipv_6_google_access(Some(PrivateIpv6GoogleAccess::EnableOutboundVmAccessToGoogle));
let x_none = Subnetwork::new().set_or_clear_private_ipv_6_google_access(None::<PrivateIpv6GoogleAccess>);
Source

pub fn set_purpose<T>(self, v: T) -> Self
where T: Into<Purpose>,

Sets the value of purpose.

§Example
use google_cloud_compute_v1::model::subnetwork::Purpose;
let x0 = Subnetwork::new().set_purpose(Purpose::InternalHttpsLoadBalancer);
let x1 = Subnetwork::new().set_purpose(Purpose::PeerMigration);
let x2 = Subnetwork::new().set_purpose(Purpose::Private);
Source

pub fn set_or_clear_purpose<T>(self, v: Option<T>) -> Self
where T: Into<Purpose>,

Sets or clears the value of purpose.

§Example
use google_cloud_compute_v1::model::subnetwork::Purpose;
let x0 = Subnetwork::new().set_or_clear_purpose(Some(Purpose::InternalHttpsLoadBalancer));
let x1 = Subnetwork::new().set_or_clear_purpose(Some(Purpose::PeerMigration));
let x2 = Subnetwork::new().set_or_clear_purpose(Some(Purpose::Private));
let x_none = Subnetwork::new().set_or_clear_purpose(None::<Purpose>);
Source

pub fn set_region<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of region.

§Example
let x = Subnetwork::new().set_region("example");
Source

pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of region.

§Example
let x = Subnetwork::new().set_or_clear_region(Some("example"));
let x = Subnetwork::new().set_or_clear_region(None::<String>);
Source

pub fn set_reserved_internal_range<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of reserved_internal_range.

§Example
let x = Subnetwork::new().set_reserved_internal_range("example");
Source

pub fn set_or_clear_reserved_internal_range<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of reserved_internal_range.

§Example
let x = Subnetwork::new().set_or_clear_reserved_internal_range(Some("example"));
let x = Subnetwork::new().set_or_clear_reserved_internal_range(None::<String>);
Source

pub fn set_role<T>(self, v: T) -> Self
where T: Into<Role>,

Sets the value of role.

§Example
use google_cloud_compute_v1::model::subnetwork::Role;
let x0 = Subnetwork::new().set_role(Role::Backup);
Source

pub fn set_or_clear_role<T>(self, v: Option<T>) -> Self
where T: Into<Role>,

Sets or clears the value of role.

§Example
use google_cloud_compute_v1::model::subnetwork::Role;
let x0 = Subnetwork::new().set_or_clear_role(Some(Role::Backup));
let x_none = Subnetwork::new().set_or_clear_role(None::<Role>);
Source

pub fn set_secondary_ip_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<SubnetworkSecondaryRange>,

Sets the value of secondary_ip_ranges.

§Example
use google_cloud_compute_v1::model::SubnetworkSecondaryRange;
let x = Subnetwork::new()
    .set_secondary_ip_ranges([
        SubnetworkSecondaryRange::default()/* use setters */,
        SubnetworkSecondaryRange::default()/* use (different) setters */,
    ]);

Sets the value of self_link.

§Example
let x = Subnetwork::new().set_self_link("example");

Sets or clears the value of self_link.

§Example
let x = Subnetwork::new().set_or_clear_self_link(Some("example"));
let x = Subnetwork::new().set_or_clear_self_link(None::<String>);
Source

pub fn set_stack_type<T>(self, v: T) -> Self
where T: Into<StackType>,

Sets the value of stack_type.

§Example
use google_cloud_compute_v1::model::subnetwork::StackType;
let x0 = Subnetwork::new().set_stack_type(StackType::Ipv4Only);
let x1 = Subnetwork::new().set_stack_type(StackType::Ipv6Only);
Source

pub fn set_or_clear_stack_type<T>(self, v: Option<T>) -> Self
where T: Into<StackType>,

Sets or clears the value of stack_type.

§Example
use google_cloud_compute_v1::model::subnetwork::StackType;
let x0 = Subnetwork::new().set_or_clear_stack_type(Some(StackType::Ipv4Only));
let x1 = Subnetwork::new().set_or_clear_stack_type(Some(StackType::Ipv6Only));
let x_none = Subnetwork::new().set_or_clear_stack_type(None::<StackType>);
Source

pub fn set_state<T>(self, v: T) -> Self
where T: Into<State>,

Sets the value of state.

§Example
use google_cloud_compute_v1::model::subnetwork::State;
let x0 = Subnetwork::new().set_state(State::Ready);
Source

pub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
where T: Into<State>,

Sets or clears the value of state.

§Example
use google_cloud_compute_v1::model::subnetwork::State;
let x0 = Subnetwork::new().set_or_clear_state(Some(State::Ready));
let x_none = Subnetwork::new().set_or_clear_state(None::<State>);
Source

pub fn set_system_reserved_external_ipv_6_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of system_reserved_external_ipv_6_ranges.

§Example
let x = Subnetwork::new().set_system_reserved_external_ipv_6_ranges(["a", "b", "c"]);
Source

pub fn set_system_reserved_internal_ipv_6_ranges<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of system_reserved_internal_ipv_6_ranges.

§Example
let x = Subnetwork::new().set_system_reserved_internal_ipv_6_ranges(["a", "b", "c"]);
Source

pub fn set_utilization_details<T>(self, v: T) -> Self

Sets the value of utilization_details.

§Example
use google_cloud_compute_v1::model::SubnetworkUtilizationDetails;
let x = Subnetwork::new().set_utilization_details(SubnetworkUtilizationDetails::default()/* use setters */);
Source

pub fn set_or_clear_utilization_details<T>(self, v: Option<T>) -> Self

Sets or clears the value of utilization_details.

§Example
use google_cloud_compute_v1::model::SubnetworkUtilizationDetails;
let x = Subnetwork::new().set_or_clear_utilization_details(Some(SubnetworkUtilizationDetails::default()/* use setters */));
let x = Subnetwork::new().set_or_clear_utilization_details(None::<SubnetworkUtilizationDetails>);

Trait Implementations§

Source§

impl Clone for Subnetwork

Source§

fn clone(&self) -> Subnetwork

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Subnetwork

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Subnetwork

Source§

fn default() -> Subnetwork

Returns the “default value” for a type. Read more
Source§

impl Message for Subnetwork

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Subnetwork

Source§

fn eq(&self, other: &Subnetwork) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Subnetwork

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,