Skip to content

Commit 413fb07

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 76086f13 of spec repo (#3181)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4b030d1 commit 413fb07

6 files changed

Lines changed: 10 additions & 49 deletions

File tree

.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-06-26 16:04:31.568102",
8-
"spec_repo_commit": "c051b78b"
7+
"regenerated": "2025-06-26 17:56:23.043504",
8+
"spec_repo_commit": "76086f13"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-26 16:04:31.584584",
13-
"spec_repo_commit": "c051b78b"
12+
"regenerated": "2025-06-26 17:56:23.062756",
13+
"spec_repo_commit": "76086f13"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19592,12 +19592,6 @@ components:
1959219592
JobDefinitionFromRule:
1959319593
description: Definition of a historical job based on a security monitoring rule.
1959419594
properties:
19595-
caseIndex:
19596-
description: Index of the rule case applied by the job.
19597-
example: 0
19598-
format: int32
19599-
maximum: 9
19600-
type: integer
1960119595
from:
1960219596
description: Starting time of data analyzed by the job.
1960319597
example: 1729843470000
@@ -19628,7 +19622,6 @@ components:
1962819622
- from
1962919623
- to
1963019624
- index
19631-
- caseIndex
1963219625
type: object
1963319626
KindAttributes:
1963419627
description: Kind attributes.

api/datadogV2/model_job_definition_from_rule.go

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212

1313
// JobDefinitionFromRule Definition of a historical job based on a security monitoring rule.
1414
type JobDefinitionFromRule struct {
15-
// Index of the rule case applied by the job.
16-
CaseIndex int32 `json:"caseIndex"`
1715
// Starting time of data analyzed by the job.
1816
From int64 `json:"from"`
1917
// ID of the detection rule used to create the job.
@@ -33,9 +31,8 @@ type JobDefinitionFromRule struct {
3331
// This constructor will assign default values to properties that have it defined,
3432
// and makes sure properties required by API are set, but the set of arguments
3533
// will change when the set of required properties is changed.
36-
func NewJobDefinitionFromRule(caseIndex int32, from int64, id string, index string, to int64) *JobDefinitionFromRule {
34+
func NewJobDefinitionFromRule(from int64, id string, index string, to int64) *JobDefinitionFromRule {
3735
this := JobDefinitionFromRule{}
38-
this.CaseIndex = caseIndex
3936
this.From = from
4037
this.Id = id
4138
this.Index = index
@@ -51,29 +48,6 @@ func NewJobDefinitionFromRuleWithDefaults() *JobDefinitionFromRule {
5148
return &this
5249
}
5350

54-
// GetCaseIndex returns the CaseIndex field value.
55-
func (o *JobDefinitionFromRule) GetCaseIndex() int32 {
56-
if o == nil {
57-
var ret int32
58-
return ret
59-
}
60-
return o.CaseIndex
61-
}
62-
63-
// GetCaseIndexOk returns a tuple with the CaseIndex field value
64-
// and a boolean to check if the value has been set.
65-
func (o *JobDefinitionFromRule) GetCaseIndexOk() (*int32, bool) {
66-
if o == nil {
67-
return nil, false
68-
}
69-
return &o.CaseIndex, true
70-
}
71-
72-
// SetCaseIndex sets field value.
73-
func (o *JobDefinitionFromRule) SetCaseIndex(v int32) {
74-
o.CaseIndex = v
75-
}
76-
7751
// GetFrom returns the From field value.
7852
func (o *JobDefinitionFromRule) GetFrom() int64 {
7953
if o == nil {
@@ -200,7 +174,6 @@ func (o JobDefinitionFromRule) MarshalJSON() ([]byte, error) {
200174
if o.UnparsedObject != nil {
201175
return datadog.Marshal(o.UnparsedObject)
202176
}
203-
toSerialize["caseIndex"] = o.CaseIndex
204177
toSerialize["from"] = o.From
205178
toSerialize["id"] = o.Id
206179
toSerialize["index"] = o.Index
@@ -218,7 +191,6 @@ func (o JobDefinitionFromRule) MarshalJSON() ([]byte, error) {
218191
// UnmarshalJSON deserializes the given payload.
219192
func (o *JobDefinitionFromRule) UnmarshalJSON(bytes []byte) (err error) {
220193
all := struct {
221-
CaseIndex *int32 `json:"caseIndex"`
222194
From *int64 `json:"from"`
223195
Id *string `json:"id"`
224196
Index *string `json:"index"`
@@ -228,9 +200,6 @@ func (o *JobDefinitionFromRule) UnmarshalJSON(bytes []byte) (err error) {
228200
if err = datadog.Unmarshal(bytes, &all); err != nil {
229201
return datadog.Unmarshal(bytes, &o.UnparsedObject)
230202
}
231-
if all.CaseIndex == nil {
232-
return fmt.Errorf("required field caseIndex missing")
233-
}
234203
if all.From == nil {
235204
return fmt.Errorf("required field from missing")
236205
}
@@ -245,11 +214,10 @@ func (o *JobDefinitionFromRule) UnmarshalJSON(bytes []byte) (err error) {
245214
}
246215
additionalProperties := make(map[string]interface{})
247216
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
248-
datadog.DeleteKeys(additionalProperties, &[]string{"caseIndex", "from", "id", "index", "notifications", "to"})
217+
datadog.DeleteKeys(additionalProperties, &[]string{"from", "id", "index", "notifications", "to"})
249218
} else {
250219
return err
251220
}
252-
o.CaseIndex = *all.CaseIndex
253221
o.From = *all.From
254222
o.Id = *all.Id
255223
o.Index = *all.Index
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-08T09:54:40.192Z
1+
2025-06-26T16:57:47.524Z

tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Run_a_historical_job_returns_Not_Found_response.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: |
4-
{"data":{"attributes":{"fromRule":{"caseIndex":0,"from":1730201035064,"id":"non-existng","index":"main","notifications":[],"to":1730204635115}},"type":"historicalDetectionsJobCreate"}}
4+
{"data":{"attributes":{"fromRule":{"from":1730201035064,"id":"non-existng","index":"main","notifications":[],"to":1730204635115}},"type":"historicalDetectionsJobCreate"}}
55
form: {}
66
headers:
77
Accept:
@@ -12,7 +12,7 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v2/siem-historical-detections/jobs
1414
response:
15-
body: '{"errors":[{"status":"404","detail":"failed to get rule details"}]}'
15+
body: '{"errors":[{"status":"404","title":"Not Found"}]}'
1616
code: 404
1717
duration: 0ms
1818
headers:

tests/scenarios/features/v2/security_monitoring.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ Feature: Security Monitoring
10951095
Scenario: Run a historical job returns "Not Found" response
10961096
Given operation "RunHistoricalJob" enabled
10971097
And new "RunHistoricalJob" request
1098-
And body with value {"data": { "type": "historicalDetectionsJobCreate", "attributes": {"fromRule": {"caseIndex": 0, "from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}}
1098+
And body with value {"data": { "type": "historicalDetectionsJobCreate", "attributes": {"fromRule": {"from": 1730201035064, "id": "non-existng", "index": "main", "notifications": [], "to": 1730204635115}}}}
10991099
When the request is sent
11001100
Then the response status is 404 Not Found
11011101

0 commit comments

Comments
 (0)