Skip to content

Commit 7b7812b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add datasource to job definition for security monitoring (#2763)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b9cb90c commit 7b7812b

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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.324305",
8-
"spec_repo_commit": "899883be"
7+
"regenerated": "2025-03-17 14:53:07.738836",
8+
"spec_repo_commit": "f73f9d61"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-14 07:51:06.339981",
13-
"spec_repo_commit": "899883be"
12+
"regenerated": "2025-03-17 14:53:07.755443",
13+
"spec_repo_commit": "f73f9d61"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 0 deletions
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/main/java/com/datadog/api/client/v2/model/HistoricalJobQuery.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/** Query for selecting logs analyzed by the historical job. */
2222
@JsonPropertyOrder({
2323
HistoricalJobQuery.JSON_PROPERTY_AGGREGATION,
24+
HistoricalJobQuery.JSON_PROPERTY_DATA_SOURCE,
2425
HistoricalJobQuery.JSON_PROPERTY_DISTINCT_FIELDS,
2526
HistoricalJobQuery.JSON_PROPERTY_GROUP_BY_FIELDS,
2627
HistoricalJobQuery.JSON_PROPERTY_HAS_OPTIONAL_GROUP_BY_FIELDS,
@@ -35,6 +36,10 @@ public class HistoricalJobQuery {
3536
public static final String JSON_PROPERTY_AGGREGATION = "aggregation";
3637
private SecurityMonitoringRuleQueryAggregation aggregation;
3738

39+
public static final String JSON_PROPERTY_DATA_SOURCE = "dataSource";
40+
private SecurityMonitoringStandardDataSource dataSource =
41+
SecurityMonitoringStandardDataSource.LOGS;
42+
3843
public static final String JSON_PROPERTY_DISTINCT_FIELDS = "distinctFields";
3944
private List<String> distinctFields = null;
4045

@@ -79,6 +84,31 @@ public void setAggregation(SecurityMonitoringRuleQueryAggregation aggregation) {
7984
this.aggregation = aggregation;
8085
}
8186

87+
public HistoricalJobQuery dataSource(SecurityMonitoringStandardDataSource dataSource) {
88+
this.dataSource = dataSource;
89+
this.unparsed |= !dataSource.isValid();
90+
return this;
91+
}
92+
93+
/**
94+
* Source of events, either logs or audit trail.
95+
*
96+
* @return dataSource
97+
*/
98+
@jakarta.annotation.Nullable
99+
@JsonProperty(JSON_PROPERTY_DATA_SOURCE)
100+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
101+
public SecurityMonitoringStandardDataSource getDataSource() {
102+
return dataSource;
103+
}
104+
105+
public void setDataSource(SecurityMonitoringStandardDataSource dataSource) {
106+
if (!dataSource.isValid()) {
107+
this.unparsed = true;
108+
}
109+
this.dataSource = dataSource;
110+
}
111+
82112
public HistoricalJobQuery distinctFields(List<String> distinctFields) {
83113
this.distinctFields = distinctFields;
84114
return this;
@@ -280,6 +310,7 @@ public boolean equals(Object o) {
280310
}
281311
HistoricalJobQuery historicalJobQuery = (HistoricalJobQuery) o;
282312
return Objects.equals(this.aggregation, historicalJobQuery.aggregation)
313+
&& Objects.equals(this.dataSource, historicalJobQuery.dataSource)
283314
&& Objects.equals(this.distinctFields, historicalJobQuery.distinctFields)
284315
&& Objects.equals(this.groupByFields, historicalJobQuery.groupByFields)
285316
&& Objects.equals(
@@ -294,6 +325,7 @@ public boolean equals(Object o) {
294325
public int hashCode() {
295326
return Objects.hash(
296327
aggregation,
328+
dataSource,
297329
distinctFields,
298330
groupByFields,
299331
hasOptionalGroupByFields,
@@ -308,6 +340,7 @@ public String toString() {
308340
StringBuilder sb = new StringBuilder();
309341
sb.append("class HistoricalJobQuery {\n");
310342
sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n");
343+
sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n");
311344
sb.append(" distinctFields: ").append(toIndentedString(distinctFields)).append("\n");
312345
sb.append(" groupByFields: ").append(toIndentedString(groupByFields)).append("\n");
313346
sb.append(" hasOptionalGroupByFields: ")

0 commit comments

Comments
 (0)