#[non_exhaustive]pub struct QueueingPolicy {
pub start_timing_constraints: Option<StartTimingConstraints>,
/* private fields */
}Expand description
Defines the policy of the QueuedRequest.
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.start_timing_constraints: Option<StartTimingConstraints>Time flexibility specification.
Implementations§
Source§impl QueueingPolicy
impl QueueingPolicy
pub fn new() -> Self
Sourcepub fn set_start_timing_constraints<T: Into<Option<StartTimingConstraints>>>(
self,
v: T,
) -> Self
pub fn set_start_timing_constraints<T: Into<Option<StartTimingConstraints>>>( self, v: T, ) -> Self
Sets the value of start_timing_constraints.
Note that all the setters affecting start_timing_constraints are mutually
exclusive.
§Example
use wkt::Duration;
let x = QueueingPolicy::new().set_start_timing_constraints(Some(
google_cloud_tpu_v2::model::queued_resource::queueing_policy::StartTimingConstraints::ValidUntilDuration(Duration::default().into())));Sourcepub fn valid_until_duration(&self) -> Option<&Box<Duration>>
pub fn valid_until_duration(&self) -> Option<&Box<Duration>>
The value of start_timing_constraints
if it holds a ValidUntilDuration, None if the field is not set or
holds a different branch.
Sourcepub fn set_valid_until_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_valid_until_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of start_timing_constraints
to hold a ValidUntilDuration.
Note that all the setters affecting start_timing_constraints are
mutually exclusive.
§Example
use wkt::Duration;
let x = QueueingPolicy::new().set_valid_until_duration(Duration::default()/* use setters */);
assert!(x.valid_until_duration().is_some());
assert!(x.valid_until_time().is_none());
assert!(x.valid_after_duration().is_none());
assert!(x.valid_after_time().is_none());
assert!(x.valid_interval().is_none());Sourcepub fn valid_until_time(&self) -> Option<&Box<Timestamp>>
pub fn valid_until_time(&self) -> Option<&Box<Timestamp>>
The value of start_timing_constraints
if it holds a ValidUntilTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_valid_until_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_valid_until_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of start_timing_constraints
to hold a ValidUntilTime.
Note that all the setters affecting start_timing_constraints are
mutually exclusive.
§Example
use wkt::Timestamp;
let x = QueueingPolicy::new().set_valid_until_time(Timestamp::default()/* use setters */);
assert!(x.valid_until_time().is_some());
assert!(x.valid_until_duration().is_none());
assert!(x.valid_after_duration().is_none());
assert!(x.valid_after_time().is_none());
assert!(x.valid_interval().is_none());Sourcepub fn valid_after_duration(&self) -> Option<&Box<Duration>>
pub fn valid_after_duration(&self) -> Option<&Box<Duration>>
The value of start_timing_constraints
if it holds a ValidAfterDuration, None if the field is not set or
holds a different branch.
Sourcepub fn set_valid_after_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_valid_after_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of start_timing_constraints
to hold a ValidAfterDuration.
Note that all the setters affecting start_timing_constraints are
mutually exclusive.
§Example
use wkt::Duration;
let x = QueueingPolicy::new().set_valid_after_duration(Duration::default()/* use setters */);
assert!(x.valid_after_duration().is_some());
assert!(x.valid_until_duration().is_none());
assert!(x.valid_until_time().is_none());
assert!(x.valid_after_time().is_none());
assert!(x.valid_interval().is_none());Sourcepub fn valid_after_time(&self) -> Option<&Box<Timestamp>>
pub fn valid_after_time(&self) -> Option<&Box<Timestamp>>
The value of start_timing_constraints
if it holds a ValidAfterTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_valid_after_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_valid_after_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of start_timing_constraints
to hold a ValidAfterTime.
Note that all the setters affecting start_timing_constraints are
mutually exclusive.
§Example
use wkt::Timestamp;
let x = QueueingPolicy::new().set_valid_after_time(Timestamp::default()/* use setters */);
assert!(x.valid_after_time().is_some());
assert!(x.valid_until_duration().is_none());
assert!(x.valid_until_time().is_none());
assert!(x.valid_after_duration().is_none());
assert!(x.valid_interval().is_none());Sourcepub fn valid_interval(&self) -> Option<&Box<Interval>>
pub fn valid_interval(&self) -> Option<&Box<Interval>>
The value of start_timing_constraints
if it holds a ValidInterval, None if the field is not set or
holds a different branch.
Sourcepub fn set_valid_interval<T: Into<Box<Interval>>>(self, v: T) -> Self
pub fn set_valid_interval<T: Into<Box<Interval>>>(self, v: T) -> Self
Sets the value of start_timing_constraints
to hold a ValidInterval.
Note that all the setters affecting start_timing_constraints are
mutually exclusive.
§Example
use google_cloud_type::model::Interval;
let x = QueueingPolicy::new().set_valid_interval(Interval::default()/* use setters */);
assert!(x.valid_interval().is_some());
assert!(x.valid_until_duration().is_none());
assert!(x.valid_until_time().is_none());
assert!(x.valid_after_duration().is_none());
assert!(x.valid_after_time().is_none());Trait Implementations§
Source§impl Clone for QueueingPolicy
impl Clone for QueueingPolicy
Source§fn clone(&self) -> QueueingPolicy
fn clone(&self) -> QueueingPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more