Skip to content

Add quality_issues to monitor schema on monitor search API #546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-05 15:55:05.520239",
"spec_repo_commit": "fe5af5dc"
"regenerated": "2025-03-05 21:00:37.992691",
"spec_repo_commit": "6105a175"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-05 15:55:05.536111",
"spec_repo_commit": "fe5af5dc"
"regenerated": "2025-03-05 21:00:38.009046",
"spec_repo_commit": "6105a175"
}
}
}
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7551,6 +7551,9 @@ components:
- handle: [email protected]
name: Jane Doe
org_id: 1234
quality_issues:
- broken_at_handle
- noisy_monitor
scopes:
- '!availability-zone:us-east-1c'
- name:cassandra
Expand Down Expand Up @@ -7650,6 +7653,14 @@ components:
format: int64
readOnly: true
type: integer
quality_issues:
description: Quality issues detected with the monitor.
items:
description: A quality issue detected with the monitor.
readOnly: true
type: string
readOnly: true
type: array
query:
description: The monitor query.
example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100
Expand Down
18 changes: 18 additions & 0 deletions src/datadogV1/model/model_monitor_search_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ pub struct MonitorSearchResult {
/// The ID of the organization.
#[serde(rename = "org_id")]
pub org_id: Option<i64>,
/// Quality issues detected with the monitor.
#[serde(rename = "quality_issues")]
pub quality_issues: Option<Vec<String>>,
/// The monitor query.
#[serde(rename = "query")]
pub query: Option<String>,
Expand Down Expand Up @@ -75,6 +78,7 @@ impl MonitorSearchResult {
name: None,
notifications: None,
org_id: None,
quality_issues: None,
query: None,
scopes: None,
status: None,
Expand Down Expand Up @@ -128,6 +132,11 @@ impl MonitorSearchResult {
self
}

pub fn quality_issues(mut self, value: Vec<String>) -> Self {
self.quality_issues = Some(value);
self
}

pub fn query(mut self, value: String) -> Self {
self.query = Some(value);
self
Expand Down Expand Up @@ -195,6 +204,7 @@ impl<'de> Deserialize<'de> for MonitorSearchResult {
Vec<crate::datadogV1::model::MonitorSearchResultNotification>,
> = None;
let mut org_id: Option<i64> = None;
let mut quality_issues: Option<Vec<String>> = None;
let mut query: Option<String> = None;
let mut scopes: Option<Vec<String>> = None;
let mut status: Option<crate::datadogV1::model::MonitorOverallStates> = None;
Expand Down Expand Up @@ -256,6 +266,13 @@ impl<'de> Deserialize<'de> for MonitorSearchResult {
}
org_id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"quality_issues" => {
if v.is_null() {
continue;
}
quality_issues =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"query" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -321,6 +338,7 @@ impl<'de> Deserialize<'de> for MonitorSearchResult {
name,
notifications,
org_id,
quality_issues,
query,
scopes,
status,
Expand Down
Loading