pub struct Incident {Show 17 fields
pub id: Option<String>,
pub name: Option<String>,
pub state: i32,
pub status: i32,
pub assignments: Vec<Assignment>,
pub description: Option<String>,
pub severity: i32,
pub contextual_labels: HashMap<String, String>,
pub display_labels: HashMap<String, String>,
pub events: Vec<IncidentEvent>,
pub created_at: Option<Timestamp>,
pub closed_at: Option<Timestamp>,
pub last_state_update_time: Option<Timestamp>,
pub last_state_update_key: Option<String>,
pub is_muted: Option<bool>,
pub meta_labels: Vec<MetaLabel>,
pub duration: Option<Duration>,
}
Expand description
Represents an Incident.
Fields§
§id: Option<String>
Incident id
name: Option<String>
Incident name
state: i32
The incident’s current internal state, usually derived from the operational events of the incident
status: i32
The incident’s current status. Can be derived from the incident state and/or administrative user operation (i.e acknowledging the incident)
assignments: Vec<Assignment>
The incident’s current assignments
description: Option<String>
The incident’s current description
severity: i32
The incident’s current severity
contextual_labels: HashMap<String, String>
The incident’s current contextual labels - dynamic labels that give contextual information about the incident (for example, the alert_name label can appear in an incident created by an event originating from the alerting system).
display_labels: HashMap<String, String>
The incident’s current display labels - dynamic labels that extend the incident name for identification purposes
events: Vec<IncidentEvent>
The incident’s current events
created_at: Option<Timestamp>
§closed_at: Option<Timestamp>
§last_state_update_time: Option<Timestamp>
§last_state_update_key: Option<String>
The payload key of the last event that caused the incident’s to state change
is_muted: Option<bool>
Is the incident muted/suppressed
meta_labels: Vec<MetaLabel>
The incident’s current meta labels
duration: Option<Duration>
The time duration between created at and closed time of the incident
Implementations§
Source§impl Incident
impl Incident
Sourcepub fn state(&self) -> IncidentState
pub fn state(&self) -> IncidentState
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: IncidentState)
pub fn set_state(&mut self, value: IncidentState)
Sets state
to the provided enum value.
Sourcepub fn status(&self) -> IncidentStatus
pub fn status(&self) -> IncidentStatus
Returns the enum value of status
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: IncidentStatus)
pub fn set_status(&mut self, value: IncidentStatus)
Sets status
to the provided enum value.
Sourcepub fn severity(&self) -> IncidentSeverity
pub fn severity(&self) -> IncidentSeverity
Returns the enum value of severity
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_severity(&mut self, value: IncidentSeverity)
pub fn set_severity(&mut self, value: IncidentSeverity)
Sets severity
to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Incident
impl<'de> Deserialize<'de> for Incident
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>,
Source§impl Message for Incident
impl Message for Incident
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for Incident
Auto Trait Implementations§
impl Freeze for Incident
impl RefUnwindSafe for Incident
impl Send for Incident
impl Sync for Incident
impl Unpin for Incident
impl UnwindSafe for Incident
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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