#[non_exhaustive]pub struct RouterNatSubnetworkToNat {
pub name: Option<String>,
pub secondary_ip_range_names: Vec<String>,
pub source_ip_ranges_to_nat: Vec<SourceIpRangesToNat>,
/* private fields */
}Available on crate feature
routers only.Expand description
Defines the IP ranges that want to use NAT for a subnetwork.
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.name: Option<String>URL for the subnetwork resource that will use NAT.
secondary_ip_range_names: Vec<String>A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if “LIST_OF_SECONDARY_IP_RANGES” is one of the values in source_ip_ranges_to_nat.
source_ip_ranges_to_nat: Vec<SourceIpRangesToNat>Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple values is: [“PRIMARY_IP_RANGE”, “LIST_OF_SECONDARY_IP_RANGES”] Default: [ALL_IP_RANGES]
Implementations§
Source§impl RouterNatSubnetworkToNat
impl RouterNatSubnetworkToNat
pub fn new() -> 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_secondary_ip_range_names<T, V>(self, v: T) -> Self
pub fn set_secondary_ip_range_names<T, V>(self, v: T) -> Self
Sets the value of secondary_ip_range_names.
§Example
ⓘ
let x = RouterNatSubnetworkToNat::new().set_secondary_ip_range_names(["a", "b", "c"]);Sourcepub fn set_source_ip_ranges_to_nat<T, V>(self, v: T) -> Self
pub fn set_source_ip_ranges_to_nat<T, V>(self, v: T) -> Self
Sets the value of source_ip_ranges_to_nat.
§Example
ⓘ
use google_cloud_compute_v1::model::router_nat_subnetwork_to_nat::SourceIpRangesToNat;
let x = RouterNatSubnetworkToNat::new().set_source_ip_ranges_to_nat([
SourceIpRangesToNat::ListOfSecondaryIpRanges,
SourceIpRangesToNat::PrimaryIpRange,
]);Trait Implementations§
Source§impl Clone for RouterNatSubnetworkToNat
impl Clone for RouterNatSubnetworkToNat
Source§fn clone(&self) -> RouterNatSubnetworkToNat
fn clone(&self) -> RouterNatSubnetworkToNat
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouterNatSubnetworkToNat
impl Debug for RouterNatSubnetworkToNat
Source§impl Default for RouterNatSubnetworkToNat
impl Default for RouterNatSubnetworkToNat
Source§fn default() -> RouterNatSubnetworkToNat
fn default() -> RouterNatSubnetworkToNat
Returns the “default value” for a type. Read more
Source§impl Message for RouterNatSubnetworkToNat
impl Message for RouterNatSubnetworkToNat
Source§impl PartialEq for RouterNatSubnetworkToNat
impl PartialEq for RouterNatSubnetworkToNat
impl StructuralPartialEq for RouterNatSubnetworkToNat
Auto Trait Implementations§
impl Freeze for RouterNatSubnetworkToNat
impl RefUnwindSafe for RouterNatSubnetworkToNat
impl Send for RouterNatSubnetworkToNat
impl Sync for RouterNatSubnetworkToNat
impl Unpin for RouterNatSubnetworkToNat
impl UnwindSafe for RouterNatSubnetworkToNat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more