#[non_exhaustive]pub struct SnapshotSettingsAccessLocation {
pub locations: HashMap<String, SnapshotSettingsAccessLocationAccessLocationPreference>,
pub policy: Option<Policy>,
/* private fields */
}Available on crate features
region-snapshot-settings or snapshot-settings only.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.locations: HashMap<String, SnapshotSettingsAccessLocationAccessLocationPreference>List of regions that can restore a regional snapshot from the current region
policy: Option<Policy>Policy of which location is allowed to access snapshot.
Implementations§
Source§impl SnapshotSettingsAccessLocation
impl SnapshotSettingsAccessLocation
Sourcepub fn set_locations<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<SnapshotSettingsAccessLocationAccessLocationPreference>,
pub fn set_locations<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<SnapshotSettingsAccessLocationAccessLocationPreference>,
Sets the value of locations.
§Example
ⓘ
use google_cloud_compute_v1::model::SnapshotSettingsAccessLocationAccessLocationPreference;
let x = SnapshotSettingsAccessLocation::new().set_locations([
("key0", SnapshotSettingsAccessLocationAccessLocationPreference::default()/* use setters */),
("key1", SnapshotSettingsAccessLocationAccessLocationPreference::default()/* use (different) setters */),
]);Sourcepub fn set_policy<T>(self, v: T) -> Self
pub fn set_policy<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of policy.
§Example
ⓘ
use google_cloud_compute_v1::model::snapshot_settings_access_location::Policy;
let x0 = SnapshotSettingsAccessLocation::new().set_or_clear_policy(Some(Policy::Unspecified));
let x1 = SnapshotSettingsAccessLocation::new().set_or_clear_policy(Some(Policy::SpecificRegions));
let x_none = SnapshotSettingsAccessLocation::new().set_or_clear_policy(None::<Policy>);Trait Implementations§
Source§impl Clone for SnapshotSettingsAccessLocation
impl Clone for SnapshotSettingsAccessLocation
Source§fn clone(&self) -> SnapshotSettingsAccessLocation
fn clone(&self) -> SnapshotSettingsAccessLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SnapshotSettingsAccessLocation
impl Default for SnapshotSettingsAccessLocation
Source§fn default() -> SnapshotSettingsAccessLocation
fn default() -> SnapshotSettingsAccessLocation
Returns the “default value” for a type. Read more
Source§impl PartialEq for SnapshotSettingsAccessLocation
impl PartialEq for SnapshotSettingsAccessLocation
Source§fn eq(&self, other: &SnapshotSettingsAccessLocation) -> bool
fn eq(&self, other: &SnapshotSettingsAccessLocation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SnapshotSettingsAccessLocation
Auto Trait Implementations§
impl Freeze for SnapshotSettingsAccessLocation
impl RefUnwindSafe for SnapshotSettingsAccessLocation
impl Send for SnapshotSettingsAccessLocation
impl Sync for SnapshotSettingsAccessLocation
impl Unpin for SnapshotSettingsAccessLocation
impl UnsafeUnpin for SnapshotSettingsAccessLocation
impl UnwindSafe for SnapshotSettingsAccessLocation
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