Skip to content

Commit 72ef33a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add datasource to job definition for security monitoring (#563)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 63e1ec9 commit 72ef33a

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-03-14 07:51:06.068505",
8-
"spec_repo_commit": "899883be"
7+
"regenerated": "2025-03-17 14:53:12.788730",
8+
"spec_repo_commit": "f73f9d61"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-14 07:51:06.084701",
13-
"spec_repo_commit": "899883be"
12+
"regenerated": "2025-03-17 14:53:12.806441",
13+
"spec_repo_commit": "f73f9d61"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14746,6 +14746,8 @@ components:
1474614746
properties:
1474714747
aggregation:
1474814748
$ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation'
14749+
dataSource:
14750+
$ref: '#/components/schemas/SecurityMonitoringStandardDataSource'
1474914751
distinctFields:
1475014752
description: Field for which the cardinality is measured. Sent as an array.
1475114753
items:

src/datadogV2/model/model_historical_job_query.rs

+31
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct HistoricalJobQuery {
1414
/// The aggregation type.
1515
#[serde(rename = "aggregation")]
1616
pub aggregation: Option<crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation>,
17+
/// Source of events, either logs or audit trail.
18+
#[serde(rename = "dataSource")]
19+
pub data_source: Option<crate::datadogV2::model::SecurityMonitoringStandardDataSource>,
1720
/// Field for which the cardinality is measured. Sent as an array.
1821
#[serde(rename = "distinctFields")]
1922
pub distinct_fields: Option<Vec<String>>,
@@ -43,6 +46,7 @@ impl HistoricalJobQuery {
4346
pub fn new() -> HistoricalJobQuery {
4447
HistoricalJobQuery {
4548
aggregation: None,
49+
data_source: None,
4650
distinct_fields: None,
4751
group_by_fields: None,
4852
has_optional_group_by_fields: None,
@@ -62,6 +66,14 @@ impl HistoricalJobQuery {
6266
self
6367
}
6468

69+
pub fn data_source(
70+
mut self,
71+
value: crate::datadogV2::model::SecurityMonitoringStandardDataSource,
72+
) -> Self {
73+
self.data_source = Some(value);
74+
self
75+
}
76+
6577
pub fn distinct_fields(mut self, value: Vec<String>) -> Self {
6678
self.distinct_fields = Some(value);
6779
self
@@ -127,6 +139,9 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
127139
let mut aggregation: Option<
128140
crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation,
129141
> = None;
142+
let mut data_source: Option<
143+
crate::datadogV2::model::SecurityMonitoringStandardDataSource,
144+
> = None;
130145
let mut distinct_fields: Option<Vec<String>> = None;
131146
let mut group_by_fields: Option<Vec<String>> = None;
132147
let mut has_optional_group_by_fields: Option<bool> = None;
@@ -156,6 +171,21 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
156171
}
157172
}
158173
}
174+
"dataSource" => {
175+
if v.is_null() {
176+
continue;
177+
}
178+
data_source =
179+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
180+
if let Some(ref _data_source) = data_source {
181+
match _data_source {
182+
crate::datadogV2::model::SecurityMonitoringStandardDataSource::UnparsedObject(_data_source) => {
183+
_unparsed = true;
184+
},
185+
_ => {}
186+
}
187+
}
188+
}
159189
"distinctFields" => {
160190
if v.is_null() {
161191
continue;
@@ -205,6 +235,7 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
205235

206236
let content = HistoricalJobQuery {
207237
aggregation,
238+
data_source,
208239
distinct_fields,
209240
group_by_fields,
210241
has_optional_group_by_fields,

0 commit comments

Comments
 (0)