#[non_exhaustive]pub struct ResourcePolicySnapshotSchedulePolicy {
pub retention_policy: Option<ResourcePolicySnapshotSchedulePolicyRetentionPolicy>,
pub schedule: Option<ResourcePolicySnapshotSchedulePolicySchedule>,
pub snapshot_properties: Option<ResourcePolicySnapshotSchedulePolicySnapshotProperties>,
/* private fields */
}Available on crate feature
resource-policies only.Expand description
A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.
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.retention_policy: Option<ResourcePolicySnapshotSchedulePolicyRetentionPolicy>Retention policy applied to snapshots created by this resource policy.
schedule: Option<ResourcePolicySnapshotSchedulePolicySchedule>A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
snapshot_properties: Option<ResourcePolicySnapshotSchedulePolicySnapshotProperties>Properties with which snapshots are created such as labels, encryption keys.
Implementations§
Source§impl ResourcePolicySnapshotSchedulePolicy
impl ResourcePolicySnapshotSchedulePolicy
pub fn new() -> Self
Sourcepub fn set_retention_policy<T>(self, v: T) -> Self
pub fn set_retention_policy<T>(self, v: T) -> Self
Sets the value of retention_policy.
§Example
ⓘ
use google_cloud_compute_v1::model::ResourcePolicySnapshotSchedulePolicyRetentionPolicy;
let x = ResourcePolicySnapshotSchedulePolicy::new().set_retention_policy(ResourcePolicySnapshotSchedulePolicyRetentionPolicy::default()/* use setters */);Sourcepub fn set_or_clear_retention_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_retention_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of retention_policy.
§Example
ⓘ
use google_cloud_compute_v1::model::ResourcePolicySnapshotSchedulePolicyRetentionPolicy;
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_retention_policy(Some(ResourcePolicySnapshotSchedulePolicyRetentionPolicy::default()/* use setters */));
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_retention_policy(None::<ResourcePolicySnapshotSchedulePolicyRetentionPolicy>);Sourcepub fn set_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicySnapshotSchedulePolicySchedule>,
pub fn set_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicySnapshotSchedulePolicySchedule>,
Sourcepub fn set_or_clear_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicySnapshotSchedulePolicySchedule>,
pub fn set_or_clear_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicySnapshotSchedulePolicySchedule>,
Sets or clears the value of schedule.
§Example
ⓘ
use google_cloud_compute_v1::model::ResourcePolicySnapshotSchedulePolicySchedule;
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_schedule(Some(ResourcePolicySnapshotSchedulePolicySchedule::default()/* use setters */));
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_schedule(None::<ResourcePolicySnapshotSchedulePolicySchedule>);Sourcepub fn set_snapshot_properties<T>(self, v: T) -> Self
pub fn set_snapshot_properties<T>(self, v: T) -> Self
Sets the value of snapshot_properties.
§Example
ⓘ
use google_cloud_compute_v1::model::ResourcePolicySnapshotSchedulePolicySnapshotProperties;
let x = ResourcePolicySnapshotSchedulePolicy::new().set_snapshot_properties(ResourcePolicySnapshotSchedulePolicySnapshotProperties::default()/* use setters */);Sourcepub fn set_or_clear_snapshot_properties<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_snapshot_properties<T>(self, v: Option<T>) -> Self
Sets or clears the value of snapshot_properties.
§Example
ⓘ
use google_cloud_compute_v1::model::ResourcePolicySnapshotSchedulePolicySnapshotProperties;
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_snapshot_properties(Some(ResourcePolicySnapshotSchedulePolicySnapshotProperties::default()/* use setters */));
let x = ResourcePolicySnapshotSchedulePolicy::new().set_or_clear_snapshot_properties(None::<ResourcePolicySnapshotSchedulePolicySnapshotProperties>);Trait Implementations§
Source§impl Clone for ResourcePolicySnapshotSchedulePolicy
impl Clone for ResourcePolicySnapshotSchedulePolicy
Source§fn clone(&self) -> ResourcePolicySnapshotSchedulePolicy
fn clone(&self) -> ResourcePolicySnapshotSchedulePolicy
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 ResourcePolicySnapshotSchedulePolicy
impl Default for ResourcePolicySnapshotSchedulePolicy
Source§fn default() -> ResourcePolicySnapshotSchedulePolicy
fn default() -> ResourcePolicySnapshotSchedulePolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for ResourcePolicySnapshotSchedulePolicy
impl PartialEq for ResourcePolicySnapshotSchedulePolicy
Source§fn eq(&self, other: &ResourcePolicySnapshotSchedulePolicy) -> bool
fn eq(&self, other: &ResourcePolicySnapshotSchedulePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResourcePolicySnapshotSchedulePolicy
Auto Trait Implementations§
impl Freeze for ResourcePolicySnapshotSchedulePolicy
impl RefUnwindSafe for ResourcePolicySnapshotSchedulePolicy
impl Send for ResourcePolicySnapshotSchedulePolicy
impl Sync for ResourcePolicySnapshotSchedulePolicy
impl Unpin for ResourcePolicySnapshotSchedulePolicy
impl UnwindSafe for ResourcePolicySnapshotSchedulePolicy
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