Skip to content

Commit 8f012d5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Security Monitoring - Revert rename of historical job API endpoints to threat hunting (DataDog#3956)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3583fb0 commit 8f012d5

63 files changed

Lines changed: 1086 additions & 1178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 198 additions & 198 deletions
Large diffs are not rendered by default.

api/datadog/configuration.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -701,30 +701,30 @@ func NewConfiguration() *Configuration {
701701
"v2.ListAWSCloudAuthPersonaMappings": false,
702702
"v2.ActivateContentPack": false,
703703
"v2.BulkExportSecurityMonitoringTerraformResources": false,
704-
"v2.CancelThreatHuntingJob": false,
704+
"v2.CancelHistoricalJob": false,
705705
"v2.ConvertJobResultToSignal": false,
706706
"v2.ConvertSecurityMonitoringTerraformResource": false,
707707
"v2.DeactivateContentPack": false,
708-
"v2.DeleteThreatHuntingJob": false,
708+
"v2.DeleteHistoricalJob": false,
709709
"v2.ExportSecurityMonitoringTerraformResource": false,
710710
"v2.GetContentPacksStates": false,
711711
"v2.GetFinding": false,
712+
"v2.GetHistoricalJob": false,
712713
"v2.GetIndicatorOfCompromise": false,
713714
"v2.GetRuleVersionHistory": false,
714715
"v2.GetSecretsRules": false,
715716
"v2.GetSecurityMonitoringHistsignal": false,
716717
"v2.GetSecurityMonitoringHistsignalsByJobId": false,
717-
"v2.GetThreatHuntingJob": false,
718718
"v2.ListFindings": false,
719+
"v2.ListHistoricalJobs": false,
719720
"v2.ListIndicatorsOfCompromise": false,
720721
"v2.ListMultipleRulesets": false,
721722
"v2.ListScannedAssetsMetadata": false,
722723
"v2.ListSecurityMonitoringHistsignals": false,
723-
"v2.ListThreatHuntingJobs": false,
724724
"v2.ListVulnerabilities": false,
725725
"v2.ListVulnerableAssets": false,
726726
"v2.MuteFindings": false,
727-
"v2.RunThreatHuntingJob": false,
727+
"v2.RunHistoricalJob": false,
728728
"v2.SearchSecurityMonitoringHistsignals": false,
729729
"v2.GetCodeCoverageBranchSummary": false,
730730
"v2.GetCodeCoverageCommitSummary": false,

api/datadogV2/api_security_monitoring.go

Lines changed: 295 additions & 295 deletions
Large diffs are not rendered by default.

api/datadogV2/doc.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
// - [SecurityMonitoringApi.BulkEditSecurityMonitoringSignalsState]
736736
// - [SecurityMonitoringApi.BulkExportSecurityMonitoringRules]
737737
// - [SecurityMonitoringApi.BulkExportSecurityMonitoringTerraformResources]
738-
// - [SecurityMonitoringApi.CancelThreatHuntingJob]
738+
// - [SecurityMonitoringApi.CancelHistoricalJob]
739739
// - [SecurityMonitoringApi.ConvertExistingSecurityMonitoringRule]
740740
// - [SecurityMonitoringApi.ConvertJobResultToSignal]
741741
// - [SecurityMonitoringApi.ConvertSecurityMonitoringRuleFromJSONToTerraform]
@@ -751,12 +751,12 @@
751751
// - [SecurityMonitoringApi.CreateVulnerabilityNotificationRule]
752752
// - [SecurityMonitoringApi.DeactivateContentPack]
753753
// - [SecurityMonitoringApi.DeleteCustomFramework]
754+
// - [SecurityMonitoringApi.DeleteHistoricalJob]
754755
// - [SecurityMonitoringApi.DeleteSecurityFilter]
755756
// - [SecurityMonitoringApi.DeleteSecurityMonitoringCriticalAsset]
756757
// - [SecurityMonitoringApi.DeleteSecurityMonitoringRule]
757758
// - [SecurityMonitoringApi.DeleteSecurityMonitoringSuppression]
758759
// - [SecurityMonitoringApi.DeleteSignalNotificationRule]
759-
// - [SecurityMonitoringApi.DeleteThreatHuntingJob]
760760
// - [SecurityMonitoringApi.DeleteVulnerabilityNotificationRule]
761761
// - [SecurityMonitoringApi.DetachCase]
762762
// - [SecurityMonitoringApi.EditSecurityMonitoringSignalAssignee]
@@ -767,6 +767,7 @@
767767
// - [SecurityMonitoringApi.GetCriticalAssetsAffectingRule]
768768
// - [SecurityMonitoringApi.GetCustomFramework]
769769
// - [SecurityMonitoringApi.GetFinding]
770+
// - [SecurityMonitoringApi.GetHistoricalJob]
770771
// - [SecurityMonitoringApi.GetIndicatorOfCompromise]
771772
// - [SecurityMonitoringApi.GetInvestigationLogQueriesMatchingSignal]
772773
// - [SecurityMonitoringApi.GetResourceEvaluationFilters]
@@ -786,11 +787,11 @@
786787
// - [SecurityMonitoringApi.GetSuppressionVersionHistory]
787788
// - [SecurityMonitoringApi.GetSuppressionsAffectingFutureRule]
788789
// - [SecurityMonitoringApi.GetSuppressionsAffectingRule]
789-
// - [SecurityMonitoringApi.GetThreatHuntingJob]
790790
// - [SecurityMonitoringApi.GetVulnerabilityNotificationRule]
791791
// - [SecurityMonitoringApi.GetVulnerabilityNotificationRules]
792792
// - [SecurityMonitoringApi.ListAssetsSBOMs]
793793
// - [SecurityMonitoringApi.ListFindings]
794+
// - [SecurityMonitoringApi.ListHistoricalJobs]
794795
// - [SecurityMonitoringApi.ListIndicatorsOfCompromise]
795796
// - [SecurityMonitoringApi.ListMultipleRulesets]
796797
// - [SecurityMonitoringApi.ListScannedAssetsMetadata]
@@ -801,13 +802,12 @@
801802
// - [SecurityMonitoringApi.ListSecurityMonitoringRules]
802803
// - [SecurityMonitoringApi.ListSecurityMonitoringSignals]
803804
// - [SecurityMonitoringApi.ListSecurityMonitoringSuppressions]
804-
// - [SecurityMonitoringApi.ListThreatHuntingJobs]
805805
// - [SecurityMonitoringApi.ListVulnerabilities]
806806
// - [SecurityMonitoringApi.ListVulnerableAssets]
807807
// - [SecurityMonitoringApi.MuteFindings]
808808
// - [SecurityMonitoringApi.PatchSignalNotificationRule]
809809
// - [SecurityMonitoringApi.PatchVulnerabilityNotificationRule]
810-
// - [SecurityMonitoringApi.RunThreatHuntingJob]
810+
// - [SecurityMonitoringApi.RunHistoricalJob]
811811
// - [SecurityMonitoringApi.SearchSecurityFindings]
812812
// - [SecurityMonitoringApi.SearchSecurityMonitoringHistsignals]
813813
// - [SecurityMonitoringApi.SearchSecurityMonitoringSignals]

api/datadogV2/model_convert_job_results_to_signals_attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// ConvertJobResultsToSignalsAttributes Attributes for converting threat hunting job results to signals.
13+
// ConvertJobResultsToSignalsAttributes Attributes for converting historical job results to signals.
1414
type ConvertJobResultsToSignalsAttributes struct {
1515
// Request ID.
1616
Id *string `json:"id,omitempty"`

api/datadogV2/model_convert_job_results_to_signals_data.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
99
)
1010

11-
// ConvertJobResultsToSignalsData Data for converting threat hunting job results to signals.
11+
// ConvertJobResultsToSignalsData Data for converting historical job results to signals.
1212
type ConvertJobResultsToSignalsData struct {
13-
// Attributes for converting threat hunting job results to signals.
13+
// Attributes for converting historical job results to signals.
1414
Attributes *ConvertJobResultsToSignalsAttributes `json:"attributes,omitempty"`
1515
// Type of payload.
1616
Type *ConvertJobResultsToSignalsDataType `json:"type,omitempty"`

api/datadogV2/model_convert_job_results_to_signals_request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
99
)
1010

11-
// ConvertJobResultsToSignalsRequest Request for converting threat hunting job results to signals.
11+
// ConvertJobResultsToSignalsRequest Request for converting historical job results to signals.
1212
type ConvertJobResultsToSignalsRequest struct {
13-
// Data for converting threat hunting job results to signals.
13+
// Data for converting historical job results to signals.
1414
Data *ConvertJobResultsToSignalsData `json:"data,omitempty"`
1515
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1616
UnparsedObject map[string]interface{} `json:"-"`
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"fmt"
9+
10+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
11+
)
12+
13+
// HistoricalJobDataType Type of payload.
14+
type HistoricalJobDataType string
15+
16+
// List of HistoricalJobDataType.
17+
const (
18+
HISTORICALJOBDATATYPE_HISTORICALDETECTIONSJOB HistoricalJobDataType = "historicalDetectionsJob"
19+
)
20+
21+
var allowedHistoricalJobDataTypeEnumValues = []HistoricalJobDataType{
22+
HISTORICALJOBDATATYPE_HISTORICALDETECTIONSJOB,
23+
}
24+
25+
// GetAllowedValues reeturns the list of possible values.
26+
func (v *HistoricalJobDataType) GetAllowedValues() []HistoricalJobDataType {
27+
return allowedHistoricalJobDataTypeEnumValues
28+
}
29+
30+
// UnmarshalJSON deserializes the given payload.
31+
func (v *HistoricalJobDataType) UnmarshalJSON(src []byte) error {
32+
var value string
33+
err := datadog.Unmarshal(src, &value)
34+
if err != nil {
35+
return err
36+
}
37+
*v = HistoricalJobDataType(value)
38+
return nil
39+
}
40+
41+
// NewHistoricalJobDataTypeFromValue returns a pointer to a valid HistoricalJobDataType
42+
// for the value passed as argument, or an error if the value passed is not allowed by the enum.
43+
func NewHistoricalJobDataTypeFromValue(v string) (*HistoricalJobDataType, error) {
44+
ev := HistoricalJobDataType(v)
45+
if ev.IsValid() {
46+
return &ev, nil
47+
}
48+
return nil, fmt.Errorf("invalid value '%v' for HistoricalJobDataType: valid values are %v", v, allowedHistoricalJobDataTypeEnumValues)
49+
}
50+
51+
// IsValid return true if the value is valid for the enum, false otherwise.
52+
func (v HistoricalJobDataType) IsValid() bool {
53+
for _, existing := range allowedHistoricalJobDataTypeEnumValues {
54+
if existing == v {
55+
return true
56+
}
57+
}
58+
return false
59+
}
60+
61+
// Ptr returns reference to HistoricalJobDataType value.
62+
func (v HistoricalJobDataType) Ptr() *HistoricalJobDataType {
63+
return &v
64+
}

api/datadogV2/model_threat_hunting_job_list_meta.go renamed to api/datadogV2/model_historical_job_list_meta.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,34 @@ import (
88
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
99
)
1010

11-
// ThreatHuntingJobListMeta Metadata about the list of jobs.
12-
type ThreatHuntingJobListMeta struct {
11+
// HistoricalJobListMeta Metadata about the list of jobs.
12+
type HistoricalJobListMeta struct {
1313
// Number of jobs in the list.
1414
TotalCount *int32 `json:"totalCount,omitempty"`
1515
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1616
UnparsedObject map[string]interface{} `json:"-"`
1717
AdditionalProperties map[string]interface{} `json:"-"`
1818
}
1919

20-
// NewThreatHuntingJobListMeta instantiates a new ThreatHuntingJobListMeta object.
20+
// NewHistoricalJobListMeta instantiates a new HistoricalJobListMeta object.
2121
// This constructor will assign default values to properties that have it defined,
2222
// and makes sure properties required by API are set, but the set of arguments
2323
// will change when the set of required properties is changed.
24-
func NewThreatHuntingJobListMeta() *ThreatHuntingJobListMeta {
25-
this := ThreatHuntingJobListMeta{}
24+
func NewHistoricalJobListMeta() *HistoricalJobListMeta {
25+
this := HistoricalJobListMeta{}
2626
return &this
2727
}
2828

29-
// NewThreatHuntingJobListMetaWithDefaults instantiates a new ThreatHuntingJobListMeta object.
29+
// NewHistoricalJobListMetaWithDefaults instantiates a new HistoricalJobListMeta object.
3030
// This constructor will only assign default values to properties that have it defined,
3131
// but it doesn't guarantee that properties required by API are set.
32-
func NewThreatHuntingJobListMetaWithDefaults() *ThreatHuntingJobListMeta {
33-
this := ThreatHuntingJobListMeta{}
32+
func NewHistoricalJobListMetaWithDefaults() *HistoricalJobListMeta {
33+
this := HistoricalJobListMeta{}
3434
return &this
3535
}
3636

3737
// GetTotalCount returns the TotalCount field value if set, zero value otherwise.
38-
func (o *ThreatHuntingJobListMeta) GetTotalCount() int32 {
38+
func (o *HistoricalJobListMeta) GetTotalCount() int32 {
3939
if o == nil || o.TotalCount == nil {
4040
var ret int32
4141
return ret
@@ -45,25 +45,25 @@ func (o *ThreatHuntingJobListMeta) GetTotalCount() int32 {
4545

4646
// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise
4747
// and a boolean to check if the value has been set.
48-
func (o *ThreatHuntingJobListMeta) GetTotalCountOk() (*int32, bool) {
48+
func (o *HistoricalJobListMeta) GetTotalCountOk() (*int32, bool) {
4949
if o == nil || o.TotalCount == nil {
5050
return nil, false
5151
}
5252
return o.TotalCount, true
5353
}
5454

5555
// HasTotalCount returns a boolean if a field has been set.
56-
func (o *ThreatHuntingJobListMeta) HasTotalCount() bool {
56+
func (o *HistoricalJobListMeta) HasTotalCount() bool {
5757
return o != nil && o.TotalCount != nil
5858
}
5959

6060
// SetTotalCount gets a reference to the given int32 and assigns it to the TotalCount field.
61-
func (o *ThreatHuntingJobListMeta) SetTotalCount(v int32) {
61+
func (o *HistoricalJobListMeta) SetTotalCount(v int32) {
6262
o.TotalCount = &v
6363
}
6464

6565
// MarshalJSON serializes the struct using spec logic.
66-
func (o ThreatHuntingJobListMeta) MarshalJSON() ([]byte, error) {
66+
func (o HistoricalJobListMeta) MarshalJSON() ([]byte, error) {
6767
toSerialize := map[string]interface{}{}
6868
if o.UnparsedObject != nil {
6969
return datadog.Marshal(o.UnparsedObject)
@@ -79,7 +79,7 @@ func (o ThreatHuntingJobListMeta) MarshalJSON() ([]byte, error) {
7979
}
8080

8181
// UnmarshalJSON deserializes the given payload.
82-
func (o *ThreatHuntingJobListMeta) UnmarshalJSON(bytes []byte) (err error) {
82+
func (o *HistoricalJobListMeta) UnmarshalJSON(bytes []byte) (err error) {
8383
all := struct {
8484
TotalCount *int32 `json:"totalCount,omitempty"`
8585
}{}

0 commit comments

Comments
 (0)