#[non_exhaustive]pub struct SnapshotPolicy {
pub enabled: Option<bool>,
pub hourly_schedule: Option<HourlySchedule>,
pub daily_schedule: Option<DailySchedule>,
pub weekly_schedule: Option<WeeklySchedule>,
pub monthly_schedule: Option<MonthlySchedule>,
/* private fields */
}Expand description
Snapshot Policy for a volume.
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.enabled: Option<bool>If enabled, make snapshots automatically according to the schedules. Default is false.
hourly_schedule: Option<HourlySchedule>Hourly schedule policy.
daily_schedule: Option<DailySchedule>Daily schedule policy.
weekly_schedule: Option<WeeklySchedule>Weekly schedule policy.
monthly_schedule: Option<MonthlySchedule>Monthly schedule policy.
Implementations§
Source§impl SnapshotPolicy
impl SnapshotPolicy
pub fn new() -> Self
Sourcepub fn set_enabled<T>(self, v: T) -> Self
pub fn set_enabled<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enabled<T>(self, v: Option<T>) -> Self
Sourcepub fn set_hourly_schedule<T>(self, v: T) -> Selfwhere
T: Into<HourlySchedule>,
pub fn set_hourly_schedule<T>(self, v: T) -> Selfwhere
T: Into<HourlySchedule>,
Sets the value of hourly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::HourlySchedule;
let x = SnapshotPolicy::new().set_hourly_schedule(HourlySchedule::default()/* use setters */);Sourcepub fn set_or_clear_hourly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<HourlySchedule>,
pub fn set_or_clear_hourly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<HourlySchedule>,
Sets or clears the value of hourly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::HourlySchedule;
let x = SnapshotPolicy::new().set_or_clear_hourly_schedule(Some(HourlySchedule::default()/* use setters */));
let x = SnapshotPolicy::new().set_or_clear_hourly_schedule(None::<HourlySchedule>);Sourcepub fn set_daily_schedule<T>(self, v: T) -> Selfwhere
T: Into<DailySchedule>,
pub fn set_daily_schedule<T>(self, v: T) -> Selfwhere
T: Into<DailySchedule>,
Sets the value of daily_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::DailySchedule;
let x = SnapshotPolicy::new().set_daily_schedule(DailySchedule::default()/* use setters */);Sourcepub fn set_or_clear_daily_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<DailySchedule>,
pub fn set_or_clear_daily_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<DailySchedule>,
Sets or clears the value of daily_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::DailySchedule;
let x = SnapshotPolicy::new().set_or_clear_daily_schedule(Some(DailySchedule::default()/* use setters */));
let x = SnapshotPolicy::new().set_or_clear_daily_schedule(None::<DailySchedule>);Sourcepub fn set_weekly_schedule<T>(self, v: T) -> Selfwhere
T: Into<WeeklySchedule>,
pub fn set_weekly_schedule<T>(self, v: T) -> Selfwhere
T: Into<WeeklySchedule>,
Sets the value of weekly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::WeeklySchedule;
let x = SnapshotPolicy::new().set_weekly_schedule(WeeklySchedule::default()/* use setters */);Sourcepub fn set_or_clear_weekly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<WeeklySchedule>,
pub fn set_or_clear_weekly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<WeeklySchedule>,
Sets or clears the value of weekly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::WeeklySchedule;
let x = SnapshotPolicy::new().set_or_clear_weekly_schedule(Some(WeeklySchedule::default()/* use setters */));
let x = SnapshotPolicy::new().set_or_clear_weekly_schedule(None::<WeeklySchedule>);Sourcepub fn set_monthly_schedule<T>(self, v: T) -> Selfwhere
T: Into<MonthlySchedule>,
pub fn set_monthly_schedule<T>(self, v: T) -> Selfwhere
T: Into<MonthlySchedule>,
Sets the value of monthly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::MonthlySchedule;
let x = SnapshotPolicy::new().set_monthly_schedule(MonthlySchedule::default()/* use setters */);Sourcepub fn set_or_clear_monthly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<MonthlySchedule>,
pub fn set_or_clear_monthly_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<MonthlySchedule>,
Sets or clears the value of monthly_schedule.
§Example
ⓘ
use google_cloud_netapp_v1::model::MonthlySchedule;
let x = SnapshotPolicy::new().set_or_clear_monthly_schedule(Some(MonthlySchedule::default()/* use setters */));
let x = SnapshotPolicy::new().set_or_clear_monthly_schedule(None::<MonthlySchedule>);Trait Implementations§
Source§impl Clone for SnapshotPolicy
impl Clone for SnapshotPolicy
Source§fn clone(&self) -> SnapshotPolicy
fn clone(&self) -> SnapshotPolicy
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 SnapshotPolicy
impl Debug for SnapshotPolicy
Source§impl Default for SnapshotPolicy
impl Default for SnapshotPolicy
Source§fn default() -> SnapshotPolicy
fn default() -> SnapshotPolicy
Returns the “default value” for a type. Read more
Source§impl Message for SnapshotPolicy
impl Message for SnapshotPolicy
Source§impl PartialEq for SnapshotPolicy
impl PartialEq for SnapshotPolicy
impl StructuralPartialEq for SnapshotPolicy
Auto Trait Implementations§
impl Freeze for SnapshotPolicy
impl RefUnwindSafe for SnapshotPolicy
impl Send for SnapshotPolicy
impl Sync for SnapshotPolicy
impl Unpin for SnapshotPolicy
impl UnsafeUnpin for SnapshotPolicy
impl UnwindSafe for SnapshotPolicy
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