Skip to content

Commit 3368782

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 266da8c of spec repo (#3465)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent ca3ba4c commit 3368782

6 files changed

Lines changed: 51 additions & 15 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52651,6 +52651,9 @@ components:
5265152651
modifiedAt:
5265252652
description: Last modification time of the job.
5265352653
type: string
52654+
signalOutput:
52655+
description: Whether the job outputs signals.
52656+
type: boolean
5265452657
type: object
5265552658
ThreatHuntingJobResponseData:
5265652659
description: Threat hunting job response data.

api/datadogV2/model_threat_hunting_job_response_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type ThreatHuntingJobResponseAttributes struct {
2626
JobStatus *string `json:"jobStatus,omitempty"`
2727
// Last modification time of the job.
2828
ModifiedAt *string `json:"modifiedAt,omitempty"`
29+
// Whether the job outputs signals.
30+
SignalOutput *bool `json:"signalOutput,omitempty"`
2931
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3032
UnparsedObject map[string]interface{} `json:"-"`
3133
AdditionalProperties map[string]interface{} `json:"-"`
@@ -272,6 +274,34 @@ func (o *ThreatHuntingJobResponseAttributes) SetModifiedAt(v string) {
272274
o.ModifiedAt = &v
273275
}
274276

277+
// GetSignalOutput returns the SignalOutput field value if set, zero value otherwise.
278+
func (o *ThreatHuntingJobResponseAttributes) GetSignalOutput() bool {
279+
if o == nil || o.SignalOutput == nil {
280+
var ret bool
281+
return ret
282+
}
283+
return *o.SignalOutput
284+
}
285+
286+
// GetSignalOutputOk returns a tuple with the SignalOutput field value if set, nil otherwise
287+
// and a boolean to check if the value has been set.
288+
func (o *ThreatHuntingJobResponseAttributes) GetSignalOutputOk() (*bool, bool) {
289+
if o == nil || o.SignalOutput == nil {
290+
return nil, false
291+
}
292+
return o.SignalOutput, true
293+
}
294+
295+
// HasSignalOutput returns a boolean if a field has been set.
296+
func (o *ThreatHuntingJobResponseAttributes) HasSignalOutput() bool {
297+
return o != nil && o.SignalOutput != nil
298+
}
299+
300+
// SetSignalOutput gets a reference to the given bool and assigns it to the SignalOutput field.
301+
func (o *ThreatHuntingJobResponseAttributes) SetSignalOutput(v bool) {
302+
o.SignalOutput = &v
303+
}
304+
275305
// MarshalJSON serializes the struct using spec logic.
276306
func (o ThreatHuntingJobResponseAttributes) MarshalJSON() ([]byte, error) {
277307
toSerialize := map[string]interface{}{}
@@ -302,6 +332,9 @@ func (o ThreatHuntingJobResponseAttributes) MarshalJSON() ([]byte, error) {
302332
if o.ModifiedAt != nil {
303333
toSerialize["modifiedAt"] = o.ModifiedAt
304334
}
335+
if o.SignalOutput != nil {
336+
toSerialize["signalOutput"] = o.SignalOutput
337+
}
305338

306339
for key, value := range o.AdditionalProperties {
307340
toSerialize[key] = value
@@ -320,13 +353,14 @@ func (o *ThreatHuntingJobResponseAttributes) UnmarshalJSON(bytes []byte) (err er
320353
JobName *string `json:"jobName,omitempty"`
321354
JobStatus *string `json:"jobStatus,omitempty"`
322355
ModifiedAt *string `json:"modifiedAt,omitempty"`
356+
SignalOutput *bool `json:"signalOutput,omitempty"`
323357
}{}
324358
if err = datadog.Unmarshal(bytes, &all); err != nil {
325359
return datadog.Unmarshal(bytes, &o.UnparsedObject)
326360
}
327361
additionalProperties := make(map[string]interface{})
328362
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
329-
datadog.DeleteKeys(additionalProperties, &[]string{"createdAt", "createdByHandle", "createdByName", "createdFromRuleId", "jobDefinition", "jobName", "jobStatus", "modifiedAt"})
363+
datadog.DeleteKeys(additionalProperties, &[]string{"createdAt", "createdByHandle", "createdByName", "createdFromRuleId", "jobDefinition", "jobName", "jobStatus", "modifiedAt", "signalOutput"})
330364
} else {
331365
return err
332366
}
@@ -343,6 +377,7 @@ func (o *ThreatHuntingJobResponseAttributes) UnmarshalJSON(bytes []byte) (err er
343377
o.JobName = all.JobName
344378
o.JobStatus = all.JobStatus
345379
o.ModifiedAt = all.ModifiedAt
380+
o.SignalOutput = all.SignalOutput
346381

347382
if len(additionalProperties) > 0 {
348383
o.AdditionalProperties = additionalProperties
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-10-24T14:24:01.707Z
1+
2025-11-11T21:36:52.314Z

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs
1414
response:
15-
body: '{"data":{"id":"071b3516-4072-44d9-9288-d4adaa1db921","type":"historicalDetectionsJob"}}'
15+
body: '{"data":{"id":"66896986-212c-4e6c-9890-14e5cfd0fc19","type":"historicalDetectionsJob"}}'
1616
code: 201
1717
duration: 0ms
1818
headers:
@@ -27,15 +27,14 @@ interactions:
2727
- application/json
2828
id: 1
2929
method: GET
30-
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs/071b3516-4072-44d9-9288-d4adaa1db921
30+
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs/66896986-212c-4e6c-9890-14e5cfd0fc19
3131
response:
32-
body: '{"data":{"id":"071b3516-4072-44d9-9288-d4adaa1db921","type":"historicalDetectionsJob","attributes":{"createdAt":"2025-10-24
33-
14:24:02.057923+00","createdByHandle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","createdByName":"CI
34-
Account","jobDefinition":{"from":1730387522611,"to":1730387532611,"index":"main","name":"Excessive
32+
body: '{"data":{"id":"66896986-212c-4e6c-9890-14e5cfd0fc19","type":"historicalDetectionsJob","attributes":{"createdAt":"2025-11-11
33+
21:36:52.581297+00","createdByHandle":"frog@datadoghq.com","createdByName":"frog","jobDefinition":{"from":1730387522611,"to":1730387532611,"index":"main","name":"Excessive
3534
number of failed attempts.","cases":[{"name":"Condition 1","status":"info","notifications":[],"condition":"a
3635
\u003e 1"}],"queries":[{"query":"source:non_existing_src_weekend","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"","dataSource":"logs"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"message":"A
3736
large number of failed login attempts.","tags":[],"type":"log_detection"},"jobName":"Excessive
38-
number of failed attempts.","jobStatus":"pending","modifiedAt":"2025-10-24 14:24:02.057923+00"}}}'
37+
number of failed attempts.","jobStatus":"pending","modifiedAt":"2025-11-11 21:36:52.581297+00","signalOutput":false}}}'
3938
code: 200
4039
duration: 0ms
4140
headers:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-10-24T14:24:02.188Z
1+
2025-11-11T21:36:57.169Z

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs
1414
response:
15-
body: '{"data":{"id":"e935c6c8-ba76-4ebf-8770-bb772a5ec1ed","type":"historicalDetectionsJob"}}'
15+
body: '{"data":{"id":"c3564eed-ff70-43e1-ab6f-593de95bd21f","type":"historicalDetectionsJob"}}'
1616
code: 201
1717
duration: 0ms
1818
headers:
@@ -27,15 +27,14 @@ interactions:
2727
- application/json
2828
id: 1
2929
method: GET
30-
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs?filter%5Bquery%5D=id%3Ae935c6c8-ba76-4ebf-8770-bb772a5ec1ed
30+
url: https://api.datadoghq.com/api/v2/siem-threat-hunting/jobs?filter%5Bquery%5D=id%3Ac3564eed-ff70-43e1-ab6f-593de95bd21f
3131
response:
32-
body: '{"data":[{"id":"e935c6c8-ba76-4ebf-8770-bb772a5ec1ed","type":"historicalDetectionsJob","attributes":{"createdAt":"2025-10-24
33-
14:24:02.256887+00","createdByHandle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","createdByName":"CI
34-
Account","jobDefinition":{"from":1730387522611,"to":1730387532611,"index":"main","name":"Excessive
32+
body: '{"data":[{"id":"c3564eed-ff70-43e1-ab6f-593de95bd21f","type":"historicalDetectionsJob","attributes":{"createdAt":"2025-11-11
33+
21:36:57.303304+00","createdByHandle":"frog@datadoghq.com","createdByName":"frog","jobDefinition":{"from":1730387522611,"to":1730387532611,"index":"main","name":"Excessive
3534
number of failed attempts.","cases":[{"name":"Condition 1","status":"info","notifications":[],"condition":"a
3635
\u003e 1"}],"queries":[{"query":"source:non_existing_src_weekend","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"","dataSource":"logs"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"message":"A
3736
large number of failed login attempts.","tags":[],"type":"log_detection"},"jobName":"Excessive
38-
number of failed attempts.","jobStatus":"pending","modifiedAt":"2025-10-24 14:24:02.256887+00"}}],"meta":{"totalCount":1}}'
37+
number of failed attempts.","jobStatus":"pending","modifiedAt":"2025-11-11 21:36:57.303304+00","signalOutput":false}}],"meta":{"totalCount":1}}'
3938
code: 200
4039
duration: 0ms
4140
headers:

0 commit comments

Comments
 (0)