From 324b4ec6dfb20d48231f7ace90f414f342ada030 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 28 Aug 2026 21:41:02 +0000 Subject: [PATCH] Regenerate client from commit ad7bd2a of spec repo --- .generator/schemas/v2/openapi.yaml | 35 ++++++++++++++++--- src/datadogV2/model/model_event.rs | 35 +++++++++++++++++++ src/datadogV2/model/model_event_attributes.rs | 9 ++--- src/datadogV2/model/model_event_priority.rs | 15 ++++++++ .../model/model_event_status_type.rs | 6 ++++ .../model/model_events_request_page.rs | 2 +- 6 files changed, 92 insertions(+), 10 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c441901f41..6c0be9be5c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -37460,12 +37460,17 @@ components: type: integer type: object Event: + additionalProperties: {} description: The metadata associated with a request. properties: id: description: Event ID. example: "6509751066204996294" type: string + integration_id: + description: The integration ID of the event. + example: "custom-events" + type: string name: description: The event name. type: string @@ -37478,8 +37483,13 @@ components: description: Event type. example: "error_tracking_alert" type: string + uid: + description: A unique identifier for the event. You can use this identifier to query or reference the event. + example: "AaBJ4QimAABPmEWRwc_8yAAA" + type: string type: object EventAttributes: + additionalProperties: {} description: Object description of attributes from your event. properties: aggregation_key: @@ -37729,16 +37739,27 @@ components: - CUSTOM_EVENTS EventPriority: description: |- - The priority of the event's monitor. For example, `normal` or `low`. + The priority of the event alert. Legacy events use `normal` or `low`. + Alert events use `1` (highest priority) through `5` (lowest priority). enum: - normal - low + - "1" + - "2" + - "3" + - "4" + - "5" example: "normal" nullable: true type: string x-enum-varnames: - NORMAL - LOW + - PRIORITY_ONE + - PRIORITY_TWO + - PRIORITY_THREE + - PRIORITY_FOUR + - PRIORITY_FIVE EventResponse: description: The object description of an event after being processed and stored by Datadog. properties: @@ -37774,13 +37795,15 @@ components: type: object EventStatusType: description: |- - If an alert event is enabled, its status is one of the following: - `failure`, `error`, `warning`, `info`, `success`, `user_update`, - `recommendation`, or `snapshot`. + The event status. Legacy events can use `failure`, `error`, `warning`, + `info`, `success`, `user_update`, `recommendation`, or `snapshot`. + Alert events can use `error`, `warn`, or `ok`. enum: - failure - error + - warn - warning + - ok - info - success - user_update @@ -37791,7 +37814,9 @@ components: x-enum-varnames: - FAILURE - ERROR + - WARN - WARNING + - OK - INFO - SUCCESS - USER_UPDATE @@ -38046,7 +38071,7 @@ components: type: string limit: default: 10 - description: The maximum number of logs in the response. + description: The maximum number of events in the response. example: 25 format: int32 maximum: 1000 diff --git a/src/datadogV2/model/model_event.rs b/src/datadogV2/model/model_event.rs index 320487b370..a9b851fc8d 100644 --- a/src/datadogV2/model/model_event.rs +++ b/src/datadogV2/model/model_event.rs @@ -14,6 +14,9 @@ pub struct Event { /// Event ID. #[serde(rename = "id")] pub id: Option, + /// The integration ID of the event. + #[serde(rename = "integration_id")] + pub integration_id: Option, /// The event name. #[serde(rename = "name")] pub name: Option, @@ -23,6 +26,9 @@ pub struct Event { /// Event type. #[serde(rename = "type")] pub type_: Option, + /// A unique identifier for the event. You can use this identifier to query or reference the event. + #[serde(rename = "uid")] + pub uid: Option, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -34,9 +40,11 @@ impl Event { pub fn new() -> Event { Event { id: None, + integration_id: None, name: None, source_id: None, type_: None, + uid: None, additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } @@ -47,6 +55,11 @@ impl Event { self } + pub fn integration_id(mut self, value: String) -> Self { + self.integration_id = Some(value); + self + } + pub fn name(mut self, value: String) -> Self { self.name = Some(value); self @@ -62,6 +75,11 @@ impl Event { self } + pub fn uid(mut self, value: String) -> Self { + self.uid = Some(value); + self + } + pub fn additional_properties( mut self, value: std::collections::BTreeMap, @@ -95,9 +113,11 @@ impl<'de> Deserialize<'de> for Event { M: MapAccess<'a>, { let mut id: Option = None; + let mut integration_id: Option = None; let mut name: Option = None; let mut source_id: Option = None; let mut type_: Option = None; + let mut uid: Option = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, @@ -112,6 +132,13 @@ impl<'de> Deserialize<'de> for Event { } id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "integration_id" => { + if v.is_null() { + continue; + } + integration_id = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "name" => { if v.is_null() { continue; @@ -130,6 +157,12 @@ impl<'de> Deserialize<'de> for Event { } type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "uid" => { + if v.is_null() { + continue; + } + uid = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } &_ => { if let Ok(value) = serde_json::from_value(v.clone()) { additional_properties.insert(k, value); @@ -140,9 +173,11 @@ impl<'de> Deserialize<'de> for Event { let content = Event { id, + integration_id, name, source_id, type_, + uid, additional_properties, _unparsed, }; diff --git a/src/datadogV2/model/model_event_attributes.rs b/src/datadogV2/model/model_event_attributes.rs index af287ff65b..070c7972da 100644 --- a/src/datadogV2/model/model_event_attributes.rs +++ b/src/datadogV2/model/model_event_attributes.rs @@ -55,7 +55,8 @@ pub struct EventAttributes { with = "::serde_with::rust::double_option" )] pub monitor_id: Option>, - /// The priority of the event's monitor. For example, `normal` or `low`. + /// The priority of the event alert. Legacy events use `normal` or `low`. + /// Alert events use `1` (highest priority) through `5` (lowest priority). #[serde( rename = "priority", default, @@ -76,9 +77,9 @@ pub struct EventAttributes { /// Identifier for the source of the event, such as a monitor alert, an externally-submitted event, or an integration. #[serde(rename = "sourcecategory")] pub sourcecategory: Option, - /// If an alert event is enabled, its status is one of the following: - /// `failure`, `error`, `warning`, `info`, `success`, `user_update`, - /// `recommendation`, or `snapshot`. + /// The event status. Legacy events can use `failure`, `error`, `warning`, + /// `info`, `success`, `user_update`, `recommendation`, or `snapshot`. + /// Alert events can use `error`, `warn`, or `ok`. #[serde(rename = "status")] pub status: Option, /// A list of tags to apply to the event. diff --git a/src/datadogV2/model/model_event_priority.rs b/src/datadogV2/model/model_event_priority.rs index befe360c55..cb7bd5afcb 100644 --- a/src/datadogV2/model/model_event_priority.rs +++ b/src/datadogV2/model/model_event_priority.rs @@ -9,6 +9,11 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; pub enum EventPriority { NORMAL, LOW, + PRIORITY_ONE, + PRIORITY_TWO, + PRIORITY_THREE, + PRIORITY_FOUR, + PRIORITY_FIVE, UnparsedObject(crate::datadog::UnparsedObject), } @@ -17,6 +22,11 @@ impl ToString for EventPriority { match self { Self::NORMAL => String::from("normal"), Self::LOW => String::from("low"), + Self::PRIORITY_ONE => String::from("1"), + Self::PRIORITY_TWO => String::from("2"), + Self::PRIORITY_THREE => String::from("3"), + Self::PRIORITY_FOUR => String::from("4"), + Self::PRIORITY_FIVE => String::from("5"), Self::UnparsedObject(v) => v.value.to_string(), } } @@ -43,6 +53,11 @@ impl<'de> Deserialize<'de> for EventPriority { Ok(match s.as_str() { "normal" => Self::NORMAL, "low" => Self::LOW, + "1" => Self::PRIORITY_ONE, + "2" => Self::PRIORITY_TWO, + "3" => Self::PRIORITY_THREE, + "4" => Self::PRIORITY_FOUR, + "5" => Self::PRIORITY_FIVE, _ => Self::UnparsedObject(crate::datadog::UnparsedObject { value: serde_json::Value::String(s.into()), }), diff --git a/src/datadogV2/model/model_event_status_type.rs b/src/datadogV2/model/model_event_status_type.rs index ba73088b68..e36f6c70e3 100644 --- a/src/datadogV2/model/model_event_status_type.rs +++ b/src/datadogV2/model/model_event_status_type.rs @@ -9,7 +9,9 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; pub enum EventStatusType { FAILURE, ERROR, + WARN, WARNING, + OK, INFO, SUCCESS, USER_UPDATE, @@ -23,7 +25,9 @@ impl ToString for EventStatusType { match self { Self::FAILURE => String::from("failure"), Self::ERROR => String::from("error"), + Self::WARN => String::from("warn"), Self::WARNING => String::from("warning"), + Self::OK => String::from("ok"), Self::INFO => String::from("info"), Self::SUCCESS => String::from("success"), Self::USER_UPDATE => String::from("user_update"), @@ -55,7 +59,9 @@ impl<'de> Deserialize<'de> for EventStatusType { Ok(match s.as_str() { "failure" => Self::FAILURE, "error" => Self::ERROR, + "warn" => Self::WARN, "warning" => Self::WARNING, + "ok" => Self::OK, "info" => Self::INFO, "success" => Self::SUCCESS, "user_update" => Self::USER_UPDATE, diff --git a/src/datadogV2/model/model_events_request_page.rs b/src/datadogV2/model/model_events_request_page.rs index 96979af545..951de496a0 100644 --- a/src/datadogV2/model/model_events_request_page.rs +++ b/src/datadogV2/model/model_events_request_page.rs @@ -14,7 +14,7 @@ pub struct EventsRequestPage { /// The returned paging point to use to get the next results. #[serde(rename = "cursor")] pub cursor: Option, - /// The maximum number of logs in the response. + /// The maximum number of events in the response. #[serde(rename = "limit")] pub limit: Option, #[serde(flatten)]