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>
The Incident’s id
name: Option<String>
The Incident’s name
state: i32
The Incident’s current state, the internal state of the incident, usually is derived from the operational events of the incident
status: i32
The Incident’s current status, the status of the incident can be derived from state of the incident 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, contextual labels are dynamic labels that gives contextual information about the incident ( for example: alert_name label can appear in an incident created by an event originated from the alerting system )
display_labels: HashMap<String, String>
The Incident’s current display labels, display labels are dynamic labels that gives more of an extension to the name of the incident, for identification and naming 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 Incident’s last event payload key that caused the incident to change state
is_muted: Option<bool>
Is the incident muted/suppressed
meta_labels: Vec<MetaLabel>
The Incident’s current meta labels
duration: Option<Duration>
The Incident duration between created at and close time
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