#[non_exhaustive]pub struct ResourcePolicyInstanceSchedulePolicy {
pub expiration_time: Option<String>,
pub start_time: Option<String>,
pub time_zone: Option<String>,
pub vm_start_schedule: Option<ResourcePolicyInstanceSchedulePolicySchedule>,
pub vm_stop_schedule: Option<ResourcePolicyInstanceSchedulePolicySchedule>,
/* private fields */
}resource-policies only.Expand description
An InstanceSchedulePolicy specifies when and how frequent certain operations are performed on the instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.expiration_time: Option<String>The expiration time of the schedule. The timestamp is an RFC3339 string.
start_time: Option<String>The start time of the schedule. The timestamp is an RFC3339 string.
time_zone: Option<String>Specifies the time zone to be used in interpreting Schedule.schedule. The value of this field must be a time zone name from the tz database: https://wikipedia.org/wiki/Tz_database.
vm_start_schedule: Option<ResourcePolicyInstanceSchedulePolicySchedule>Specifies the schedule for starting instances.
vm_stop_schedule: Option<ResourcePolicyInstanceSchedulePolicySchedule>Specifies the schedule for stopping instances.
Implementations§
Source§impl ResourcePolicyInstanceSchedulePolicy
impl ResourcePolicyInstanceSchedulePolicy
pub fn new() -> Self
Sourcepub fn set_expiration_time<T>(self, v: T) -> Self
pub fn set_expiration_time<T>(self, v: T) -> Self
Sets the value of expiration_time.
§Example
let x = ResourcePolicyInstanceSchedulePolicy::new().set_expiration_time("example");Sourcepub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expiration_time.
§Example
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_expiration_time(Some("example"));
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_expiration_time(None::<String>);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
let x = ResourcePolicyInstanceSchedulePolicy::new().set_start_time("example");Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_start_time(Some("example"));
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_start_time(None::<String>);Sourcepub fn set_time_zone<T>(self, v: T) -> Self
pub fn set_time_zone<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_time_zone<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_time_zone<T>(self, v: Option<T>) -> Self
Sourcepub fn set_vm_start_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
pub fn set_vm_start_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
Sets the value of vm_start_schedule.
§Example
use google_cloud_compute_v1::model::ResourcePolicyInstanceSchedulePolicySchedule;
let x = ResourcePolicyInstanceSchedulePolicy::new().set_vm_start_schedule(ResourcePolicyInstanceSchedulePolicySchedule::default()/* use setters */);Sourcepub fn set_or_clear_vm_start_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
pub fn set_or_clear_vm_start_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
Sets or clears the value of vm_start_schedule.
§Example
use google_cloud_compute_v1::model::ResourcePolicyInstanceSchedulePolicySchedule;
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_vm_start_schedule(Some(ResourcePolicyInstanceSchedulePolicySchedule::default()/* use setters */));
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_vm_start_schedule(None::<ResourcePolicyInstanceSchedulePolicySchedule>);Sourcepub fn set_vm_stop_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
pub fn set_vm_stop_schedule<T>(self, v: T) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
Sets the value of vm_stop_schedule.
§Example
use google_cloud_compute_v1::model::ResourcePolicyInstanceSchedulePolicySchedule;
let x = ResourcePolicyInstanceSchedulePolicy::new().set_vm_stop_schedule(ResourcePolicyInstanceSchedulePolicySchedule::default()/* use setters */);Sourcepub fn set_or_clear_vm_stop_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
pub fn set_or_clear_vm_stop_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourcePolicyInstanceSchedulePolicySchedule>,
Sets or clears the value of vm_stop_schedule.
§Example
use google_cloud_compute_v1::model::ResourcePolicyInstanceSchedulePolicySchedule;
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_vm_stop_schedule(Some(ResourcePolicyInstanceSchedulePolicySchedule::default()/* use setters */));
let x = ResourcePolicyInstanceSchedulePolicy::new().set_or_clear_vm_stop_schedule(None::<ResourcePolicyInstanceSchedulePolicySchedule>);Trait Implementations§
Source§impl Clone for ResourcePolicyInstanceSchedulePolicy
impl Clone for ResourcePolicyInstanceSchedulePolicy
Source§fn clone(&self) -> ResourcePolicyInstanceSchedulePolicy
fn clone(&self) -> ResourcePolicyInstanceSchedulePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ResourcePolicyInstanceSchedulePolicy
impl Default for ResourcePolicyInstanceSchedulePolicy
Source§fn default() -> ResourcePolicyInstanceSchedulePolicy
fn default() -> ResourcePolicyInstanceSchedulePolicy
Source§impl PartialEq for ResourcePolicyInstanceSchedulePolicy
impl PartialEq for ResourcePolicyInstanceSchedulePolicy
Source§fn eq(&self, other: &ResourcePolicyInstanceSchedulePolicy) -> bool
fn eq(&self, other: &ResourcePolicyInstanceSchedulePolicy) -> bool
self and other values to be equal, and is used by ==.