pub struct Downtime {Show 15 fields
pub id: i64,
pub scope: Vec<String>,
pub monitor_tags: Vec<String>,
pub start: Option<i64>,
pub end: Option<i64>,
pub message: Option<String>,
pub active: Option<bool>,
pub disabled: Option<bool>,
pub monitor_id: Option<i64>,
pub recurrence: Option<Value>,
pub created: Option<i64>,
pub modified: Option<i64>,
pub creator_id: Option<i64>,
pub parent_id: Option<i64>,
pub timezone: Option<String>,
}Expand description
A scheduled downtime as returned by GET /api/v1/downtime.
recurrence is preserved as raw JSON because Datadog encodes it as
either null, an object, or an array of objects depending on the
downtime kind.
Fields§
§id: i64Datadog downtime identifier.
scope: Vec<String>Scope tags the downtime applies to (e.g. ["env:prod"]).
Optional monitor tags filter.
start: Option<i64>Start time (epoch seconds).
end: Option<i64>End time (epoch seconds). Absent for indefinite downtimes.
message: Option<String>Notification message body.
active: Option<bool>Whether the downtime is currently active.
disabled: Option<bool>Whether the downtime has been disabled.
monitor_id: Option<i64>Underlying monitor id (for single-monitor downtimes).
recurrence: Option<Value>Recurrence rule (raw — null / object / array).
created: Option<i64>Creation timestamp (epoch seconds).
modified: Option<i64>Last-modified timestamp (epoch seconds).
creator_id: Option<i64>Creator user id.
parent_id: Option<i64>Parent downtime id (for child downtimes generated from a recurrence).
timezone: Option<String>Timezone for the downtime schedule.
Implementations§
Source§impl Downtime
impl Downtime
Sourcepub fn scope_label(&self) -> String
pub fn scope_label(&self) -> String
Joins scope tags with commas, falling back to * for empty
scope (the convention Datadog’s UI uses for “all”).
Sourcepub fn message_label(&self) -> &str
pub fn message_label(&self) -> &str
Message for table output (single-line, falling back to -).
Sourcepub fn monitor_label(&self) -> String
pub fn monitor_label(&self) -> String
Monitor id for table output (formatted, fallback -).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Downtime
impl<'de> Deserialize<'de> for Downtime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Downtime
impl StructuralPartialEq for Downtime
Auto Trait Implementations§
impl Freeze for Downtime
impl RefUnwindSafe for Downtime
impl Send for Downtime
impl Sync for Downtime
impl Unpin for Downtime
impl UnsafeUnpin for Downtime
impl UnwindSafe for Downtime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.