@@ -14,6 +14,9 @@ pub struct HistoricalJobQuery {
14
14
/// The aggregation type.
15
15
#[ serde( rename = "aggregation" ) ]
16
16
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 > ,
17
20
/// Field for which the cardinality is measured. Sent as an array.
18
21
#[ serde( rename = "distinctFields" ) ]
19
22
pub distinct_fields : Option < Vec < String > > ,
@@ -43,6 +46,7 @@ impl HistoricalJobQuery {
43
46
pub fn new ( ) -> HistoricalJobQuery {
44
47
HistoricalJobQuery {
45
48
aggregation : None ,
49
+ data_source : None ,
46
50
distinct_fields : None ,
47
51
group_by_fields : None ,
48
52
has_optional_group_by_fields : None ,
@@ -62,6 +66,14 @@ impl HistoricalJobQuery {
62
66
self
63
67
}
64
68
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
+
65
77
pub fn distinct_fields ( mut self , value : Vec < String > ) -> Self {
66
78
self . distinct_fields = Some ( value) ;
67
79
self
@@ -127,6 +139,9 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
127
139
let mut aggregation: Option <
128
140
crate :: datadogV2:: model:: SecurityMonitoringRuleQueryAggregation ,
129
141
> = None ;
142
+ let mut data_source: Option <
143
+ crate :: datadogV2:: model:: SecurityMonitoringStandardDataSource ,
144
+ > = None ;
130
145
let mut distinct_fields: Option < Vec < String > > = None ;
131
146
let mut group_by_fields: Option < Vec < String > > = None ;
132
147
let mut has_optional_group_by_fields: Option < bool > = None ;
@@ -156,6 +171,21 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
156
171
}
157
172
}
158
173
}
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
+ }
159
189
"distinctFields" => {
160
190
if v. is_null ( ) {
161
191
continue ;
@@ -205,6 +235,7 @@ impl<'de> Deserialize<'de> for HistoricalJobQuery {
205
235
206
236
let content = HistoricalJobQuery {
207
237
aggregation,
238
+ data_source,
208
239
distinct_fields,
209
240
group_by_fields,
210
241
has_optional_group_by_fields,
0 commit comments