#[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
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 (const: unstable) · 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
impl StructuralPartialEq for ResourcePolicyInstanceSchedulePolicy
Auto Trait Implementations§
impl Freeze for ResourcePolicyInstanceSchedulePolicy
impl RefUnwindSafe for ResourcePolicyInstanceSchedulePolicy
impl Send for ResourcePolicyInstanceSchedulePolicy
impl Sync for ResourcePolicyInstanceSchedulePolicy
impl Unpin for ResourcePolicyInstanceSchedulePolicy
impl UnsafeUnpin for ResourcePolicyInstanceSchedulePolicy
impl UnwindSafe for ResourcePolicyInstanceSchedulePolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request