#[non_exhaustive]pub struct SnapshotSettingsStorageLocationSettings {
pub locations: HashMap<String, SnapshotSettingsStorageLocationSettingsStorageLocationPreference>,
pub policy: Option<Policy>,
/* private fields */
}Available on crate feature
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, SnapshotSettingsStorageLocationSettingsStorageLocationPreference>When the policy is SPECIFIC_LOCATIONS, snapshots will be stored in the locations listed in this field. Keys are Cloud Storage bucket locations. Only one location can be specified.
policy: Option<Policy>The chosen location policy.
Implementations§
Source§impl SnapshotSettingsStorageLocationSettings
impl SnapshotSettingsStorageLocationSettings
pub fn new() -> Self
Sourcepub fn set_locations<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<SnapshotSettingsStorageLocationSettingsStorageLocationPreference>,
pub fn set_locations<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<SnapshotSettingsStorageLocationSettingsStorageLocationPreference>,
Sets the value of locations.
§Example
ⓘ
use google_cloud_compute_v1::model::SnapshotSettingsStorageLocationSettingsStorageLocationPreference;
let x = SnapshotSettingsStorageLocationSettings::new().set_locations([
("key0", SnapshotSettingsStorageLocationSettingsStorageLocationPreference::default()/* use setters */),
("key1", SnapshotSettingsStorageLocationSettingsStorageLocationPreference::default()/* use (different) setters */),
]);Sourcepub fn set_policy<T>(self, v: T) -> Self
pub fn set_policy<T>(self, v: T) -> Self
Sets the value of policy.
§Example
ⓘ
use google_cloud_compute_v1::model::snapshot_settings_storage_location_settings::Policy;
let x0 = SnapshotSettingsStorageLocationSettings::new().set_policy(Policy::NearestMultiRegion);
let x1 = SnapshotSettingsStorageLocationSettings::new().set_policy(Policy::SpecificLocations);
let x2 = SnapshotSettingsStorageLocationSettings::new().set_policy(Policy::StorageLocationPolicyUnspecified);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_storage_location_settings::Policy;
let x0 = SnapshotSettingsStorageLocationSettings::new().set_or_clear_policy(Some(Policy::NearestMultiRegion));
let x1 = SnapshotSettingsStorageLocationSettings::new().set_or_clear_policy(Some(Policy::SpecificLocations));
let x2 = SnapshotSettingsStorageLocationSettings::new().set_or_clear_policy(Some(Policy::StorageLocationPolicyUnspecified));
let x_none = SnapshotSettingsStorageLocationSettings::new().set_or_clear_policy(None::<Policy>);Trait Implementations§
Source§impl Clone for SnapshotSettingsStorageLocationSettings
impl Clone for SnapshotSettingsStorageLocationSettings
Source§fn clone(&self) -> SnapshotSettingsStorageLocationSettings
fn clone(&self) -> SnapshotSettingsStorageLocationSettings
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 Default for SnapshotSettingsStorageLocationSettings
impl Default for SnapshotSettingsStorageLocationSettings
Source§fn default() -> SnapshotSettingsStorageLocationSettings
fn default() -> SnapshotSettingsStorageLocationSettings
Returns the “default value” for a type. Read more
Source§impl PartialEq for SnapshotSettingsStorageLocationSettings
impl PartialEq for SnapshotSettingsStorageLocationSettings
Source§fn eq(&self, other: &SnapshotSettingsStorageLocationSettings) -> bool
fn eq(&self, other: &SnapshotSettingsStorageLocationSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SnapshotSettingsStorageLocationSettings
Auto Trait Implementations§
impl Freeze for SnapshotSettingsStorageLocationSettings
impl RefUnwindSafe for SnapshotSettingsStorageLocationSettings
impl Send for SnapshotSettingsStorageLocationSettings
impl Sync for SnapshotSettingsStorageLocationSettings
impl Unpin for SnapshotSettingsStorageLocationSettings
impl UnwindSafe for SnapshotSettingsStorageLocationSettings
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