#[non_exhaustive]pub struct LifecycleConfig {
pub idle_delete_ttl: Option<Duration>,
pub idle_stop_ttl: Option<Duration>,
pub idle_start_time: Option<Timestamp>,
pub ttl: Option<Ttl>,
pub stop_ttl: Option<StopTtl>,
/* private fields */
}Expand description
Specifies the cluster auto-delete schedule configuration.
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.idle_delete_ttl: Option<Duration>Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON representation of Duration).
idle_stop_ttl: Option<Duration>Optional. The duration to keep the cluster started while idling (when no jobs are running). Passing this threshold will cause the cluster to be stopped. Minimum value is 5 minutes; maximum value is 14 days (see JSON representation of Duration).
idle_start_time: Option<Timestamp>Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp).
ttl: Option<Ttl>Either the exact time the cluster should be deleted at or the cluster maximum age.
stop_ttl: Option<StopTtl>Either the exact time the cluster should be stopped at or the cluster maximum age.
Implementations§
Source§impl LifecycleConfig
impl LifecycleConfig
Sourcepub fn set_idle_delete_ttl<T>(self, v: T) -> Self
pub fn set_idle_delete_ttl<T>(self, v: T) -> Self
Sets the value of idle_delete_ttl.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_idle_delete_ttl(Duration::default()/* use setters */);Sourcepub fn set_or_clear_idle_delete_ttl<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_idle_delete_ttl<T>(self, v: Option<T>) -> Self
Sets or clears the value of idle_delete_ttl.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_or_clear_idle_delete_ttl(Some(Duration::default()/* use setters */));
let x = LifecycleConfig::new().set_or_clear_idle_delete_ttl(None::<Duration>);Sourcepub fn set_idle_stop_ttl<T>(self, v: T) -> Self
pub fn set_idle_stop_ttl<T>(self, v: T) -> Self
Sets the value of idle_stop_ttl.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_idle_stop_ttl(Duration::default()/* use setters */);Sourcepub fn set_or_clear_idle_stop_ttl<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_idle_stop_ttl<T>(self, v: Option<T>) -> Self
Sets or clears the value of idle_stop_ttl.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_or_clear_idle_stop_ttl(Some(Duration::default()/* use setters */));
let x = LifecycleConfig::new().set_or_clear_idle_stop_ttl(None::<Duration>);Sourcepub fn set_idle_start_time<T>(self, v: T) -> Self
pub fn set_idle_start_time<T>(self, v: T) -> Self
Sets the value of idle_start_time.
§Example
use wkt::Timestamp;
let x = LifecycleConfig::new().set_idle_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_idle_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_idle_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of idle_start_time.
§Example
use wkt::Timestamp;
let x = LifecycleConfig::new().set_or_clear_idle_start_time(Some(Timestamp::default()/* use setters */));
let x = LifecycleConfig::new().set_or_clear_idle_start_time(None::<Timestamp>);Sourcepub fn auto_delete_time(&self) -> Option<&Box<Timestamp>>
pub fn auto_delete_time(&self) -> Option<&Box<Timestamp>>
The value of ttl
if it holds a AutoDeleteTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_delete_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_auto_delete_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of ttl
to hold a AutoDeleteTime.
Note that all the setters affecting ttl are
mutually exclusive.
§Example
use wkt::Timestamp;
let x = LifecycleConfig::new().set_auto_delete_time(Timestamp::default()/* use setters */);
assert!(x.auto_delete_time().is_some());
assert!(x.auto_delete_ttl().is_none());Sourcepub fn auto_delete_ttl(&self) -> Option<&Box<Duration>>
pub fn auto_delete_ttl(&self) -> Option<&Box<Duration>>
The value of ttl
if it holds a AutoDeleteTtl, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_delete_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_auto_delete_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of ttl
to hold a AutoDeleteTtl.
Note that all the setters affecting ttl are
mutually exclusive.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_auto_delete_ttl(Duration::default()/* use setters */);
assert!(x.auto_delete_ttl().is_some());
assert!(x.auto_delete_time().is_none());Sourcepub fn set_stop_ttl<T: Into<Option<StopTtl>>>(self, v: T) -> Self
pub fn set_stop_ttl<T: Into<Option<StopTtl>>>(self, v: T) -> Self
Sourcepub fn auto_stop_time(&self) -> Option<&Box<Timestamp>>
pub fn auto_stop_time(&self) -> Option<&Box<Timestamp>>
The value of stop_ttl
if it holds a AutoStopTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_stop_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_auto_stop_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of stop_ttl
to hold a AutoStopTime.
Note that all the setters affecting stop_ttl are
mutually exclusive.
§Example
use wkt::Timestamp;
let x = LifecycleConfig::new().set_auto_stop_time(Timestamp::default()/* use setters */);
assert!(x.auto_stop_time().is_some());
assert!(x.auto_stop_ttl().is_none());Sourcepub fn auto_stop_ttl(&self) -> Option<&Box<Duration>>
pub fn auto_stop_ttl(&self) -> Option<&Box<Duration>>
The value of stop_ttl
if it holds a AutoStopTtl, None if the field is not set or
holds a different branch.
Sourcepub fn set_auto_stop_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_auto_stop_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of stop_ttl
to hold a AutoStopTtl.
Note that all the setters affecting stop_ttl are
mutually exclusive.
§Example
use wkt::Duration;
let x = LifecycleConfig::new().set_auto_stop_ttl(Duration::default()/* use setters */);
assert!(x.auto_stop_ttl().is_some());
assert!(x.auto_stop_time().is_none());Trait Implementations§
Source§impl Clone for LifecycleConfig
impl Clone for LifecycleConfig
Source§fn clone(&self) -> LifecycleConfig
fn clone(&self) -> LifecycleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleConfig
impl Debug for LifecycleConfig
Source§impl Default for LifecycleConfig
impl Default for LifecycleConfig
Source§fn default() -> LifecycleConfig
fn default() -> LifecycleConfig
Source§impl Message for LifecycleConfig
impl Message for LifecycleConfig
Source§impl PartialEq for LifecycleConfig
impl PartialEq for LifecycleConfig
impl StructuralPartialEq for LifecycleConfig
Auto Trait Implementations§
impl Freeze for LifecycleConfig
impl RefUnwindSafe for LifecycleConfig
impl Send for LifecycleConfig
impl Sync for LifecycleConfig
impl Unpin for LifecycleConfig
impl UnsafeUnpin for LifecycleConfig
impl UnwindSafe for LifecycleConfig
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