axiom_rs/annotations/
model.rs

1use chrono::FixedOffset;
2use serde::{Deserialize, Serialize};
3use url::Url;
4
5/// An annotation.
6#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
7#[serde(rename_all = "camelCase")]
8pub struct Annotation {
9    /// Unique ID of the annotation
10    pub id: String,
11    /// Type of the event marked by the annotation. Use only alphanumeric characters or hyphens. For example, "production-deployment".
12    #[serde(rename = "type")]
13    pub annotation_type: String,
14    /// Dataset names for which the annotation appears on charts
15    pub datasets: Vec<String>,
16    /// Explanation of the event the annotation marks on the charts
17    pub description: Option<String>,
18    /// Summary of the annotation that appears on the charts
19    pub title: Option<String>,
20    /// URL relevant for the event marked by the annotation. For example, link to GitHub pull request.
21    pub url: Option<Url>,
22    /// Time the annotation marks on the charts. If you don't include this field, Axiom assigns the time of the API request to the annotation.
23    pub time: chrono::DateTime<FixedOffset>,
24    ///End time of the annotation
25    pub end_time: Option<chrono::DateTime<FixedOffset>>,
26}