Skip to content

Commit a85eff9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a760f9b of spec repo
1 parent daadd49 commit a85eff9

46 files changed

Lines changed: 7315 additions & 40 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: 1157 additions & 0 deletions
Large diffs are not rendered by default.

api/datadog/configuration.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,18 +780,21 @@ func NewConfiguration() *Configuration {
780780
"v2.GetAWSCloudAuthPersonaMapping": false,
781781
"v2.ListAWSCloudAuthPersonaMappings": false,
782782
"v2.ActivateContentPack": false,
783+
"v2.BatchGetSecurityMonitoringDatasetDependencies": false,
783784
"v2.BulkCreateSampleLogGenerationSubscriptions": false,
784785
"v2.BulkExportSecurityMonitoringTerraformResources": false,
785786
"v2.CancelHistoricalJob": false,
786787
"v2.ConvertJobResultToSignal": false,
787788
"v2.ConvertSecurityMonitoringTerraformResource": false,
788789
"v2.CreateSampleLogGenerationSubscription": false,
790+
"v2.CreateSecurityMonitoringDataset": false,
789791
"v2.CreateSecurityMonitoringIntegrationConfig": false,
790792
"v2.CreateStaticAnalysisAst": false,
791793
"v2.CreateStaticAnalysisServerAnalysis": false,
792794
"v2.DeactivateContentPack": false,
793795
"v2.DeleteHistoricalJob": false,
794796
"v2.DeleteSampleLogGenerationSubscription": false,
797+
"v2.DeleteSecurityMonitoringDataset": false,
795798
"v2.DeleteSecurityMonitoringIntegrationConfig": false,
796799
"v2.ExportSecurityMonitoringTerraformResource": false,
797800
"v2.GetContentPacksStates": false,
@@ -801,6 +804,9 @@ func NewConfiguration() *Configuration {
801804
"v2.GetIndicatorOfCompromise": false,
802805
"v2.GetRuleVersionHistory": false,
803806
"v2.GetSecretsRules": false,
807+
"v2.GetSecurityMonitoringDataset": false,
808+
"v2.GetSecurityMonitoringDatasetByVersion": false,
809+
"v2.GetSecurityMonitoringDatasetVersionHistory": false,
804810
"v2.GetSecurityMonitoringHistsignal": false,
805811
"v2.GetSecurityMonitoringHistsignalsByJobId": false,
806812
"v2.GetSecurityMonitoringIntegrationConfig": false,
@@ -815,6 +821,7 @@ func NewConfiguration() *Configuration {
815821
"v2.ListMultipleRulesets": false,
816822
"v2.ListSampleLogGenerationSubscriptions": false,
817823
"v2.ListScannedAssetsMetadata": false,
824+
"v2.ListSecurityMonitoringDatasets": false,
818825
"v2.ListSecurityMonitoringHistsignals": false,
819826
"v2.ListSecurityMonitoringIntegrationConfigs": false,
820827
"v2.ListStaticAnalysisCodegenRulesets": false,
@@ -824,6 +831,7 @@ func NewConfiguration() *Configuration {
824831
"v2.MuteSecurityFindings": false,
825832
"v2.RunHistoricalJob": false,
826833
"v2.SearchSecurityMonitoringHistsignals": false,
834+
"v2.UpdateSecurityMonitoringDataset": false,
827835
"v2.UpdateSecurityMonitoringIntegrationConfig": false,
828836
"v2.ValidateSecurityMonitoringIntegrationConfig": false,
829837
"v2.ValidateSecurityMonitoringIntegrationCredentials": false,

api/datadogV2/api_security_monitoring.go

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

api/datadogV2/doc.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@
851851
// - [SecurityMonitoringApi.ActivateContentPack]
852852
// - [SecurityMonitoringApi.AttachCase]
853853
// - [SecurityMonitoringApi.AttachJiraIssue]
854+
// - [SecurityMonitoringApi.BatchGetSecurityMonitoringDatasetDependencies]
854855
// - [SecurityMonitoringApi.BulkCreateSampleLogGenerationSubscriptions]
855856
// - [SecurityMonitoringApi.BulkDeleteSecurityMonitoringRules]
856857
// - [SecurityMonitoringApi.BulkEditSecurityMonitoringSignals]
@@ -869,6 +870,7 @@
869870
// - [SecurityMonitoringApi.CreateSampleLogGenerationSubscription]
870871
// - [SecurityMonitoringApi.CreateSecurityFilter]
871872
// - [SecurityMonitoringApi.CreateSecurityMonitoringCriticalAsset]
873+
// - [SecurityMonitoringApi.CreateSecurityMonitoringDataset]
872874
// - [SecurityMonitoringApi.CreateSecurityMonitoringIntegrationConfig]
873875
// - [SecurityMonitoringApi.CreateSecurityMonitoringRule]
874876
// - [SecurityMonitoringApi.CreateSecurityMonitoringSuppression]
@@ -882,6 +884,7 @@
882884
// - [SecurityMonitoringApi.DeleteSampleLogGenerationSubscription]
883885
// - [SecurityMonitoringApi.DeleteSecurityFilter]
884886
// - [SecurityMonitoringApi.DeleteSecurityMonitoringCriticalAsset]
887+
// - [SecurityMonitoringApi.DeleteSecurityMonitoringDataset]
885888
// - [SecurityMonitoringApi.DeleteSecurityMonitoringIntegrationConfig]
886889
// - [SecurityMonitoringApi.DeleteSecurityMonitoringRule]
887890
// - [SecurityMonitoringApi.DeleteSecurityMonitoringSuppression]
@@ -907,6 +910,9 @@
907910
// - [SecurityMonitoringApi.GetSecretsRules]
908911
// - [SecurityMonitoringApi.GetSecurityFilter]
909912
// - [SecurityMonitoringApi.GetSecurityMonitoringCriticalAsset]
913+
// - [SecurityMonitoringApi.GetSecurityMonitoringDataset]
914+
// - [SecurityMonitoringApi.GetSecurityMonitoringDatasetByVersion]
915+
// - [SecurityMonitoringApi.GetSecurityMonitoringDatasetVersionHistory]
910916
// - [SecurityMonitoringApi.GetSecurityMonitoringHistsignal]
911917
// - [SecurityMonitoringApi.GetSecurityMonitoringHistsignalsByJobId]
912918
// - [SecurityMonitoringApi.GetSecurityMonitoringIntegrationConfig]
@@ -937,6 +943,7 @@
937943
// - [SecurityMonitoringApi.ListSecurityFilters]
938944
// - [SecurityMonitoringApi.ListSecurityFindings]
939945
// - [SecurityMonitoringApi.ListSecurityMonitoringCriticalAssets]
946+
// - [SecurityMonitoringApi.ListSecurityMonitoringDatasets]
940947
// - [SecurityMonitoringApi.ListSecurityMonitoringHistsignals]
941948
// - [SecurityMonitoringApi.ListSecurityMonitoringIntegrationConfigs]
942949
// - [SecurityMonitoringApi.ListSecurityMonitoringRules]
@@ -959,6 +966,7 @@
959966
// - [SecurityMonitoringApi.UpdateResourceEvaluationFilters]
960967
// - [SecurityMonitoringApi.UpdateSecurityFilter]
961968
// - [SecurityMonitoringApi.UpdateSecurityMonitoringCriticalAsset]
969+
// - [SecurityMonitoringApi.UpdateSecurityMonitoringDataset]
962970
// - [SecurityMonitoringApi.UpdateSecurityMonitoringIntegrationConfig]
963971
// - [SecurityMonitoringApi.UpdateSecurityMonitoringRule]
964972
// - [SecurityMonitoringApi.UpdateSecurityMonitoringSuppression]
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
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+
// SecurityMonitoringDatasetAttributesRequest The attributes of a dataset create or update request.
14+
type SecurityMonitoringDatasetAttributesRequest struct {
15+
// The definition of the dataset. The shape depends on the value of `data_source`.
16+
// Use `reference_table` or `managed_resource` for a referential dataset, `formula` for
17+
// a Squire-based dataset, or one of the event platform sources (for example `logs`,
18+
// `audit`, `events`, `spans`, `rum`) for an event platform dataset.
19+
Definition SecurityMonitoringDatasetDefinition `json:"definition"`
20+
// The description of the dataset. Maximum 255 characters.
21+
Description *string `json:"description,omitempty"`
22+
// The expected current version of the dataset for optimistic concurrency control on updates.
23+
// If the dataset's current version does not match, the request is rejected with a 409 Conflict.
24+
Version *int64 `json:"version,omitempty"`
25+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
26+
UnparsedObject map[string]interface{} `json:"-"`
27+
AdditionalProperties map[string]interface{} `json:"-"`
28+
}
29+
30+
// NewSecurityMonitoringDatasetAttributesRequest instantiates a new SecurityMonitoringDatasetAttributesRequest object.
31+
// This constructor will assign default values to properties that have it defined,
32+
// and makes sure properties required by API are set, but the set of arguments
33+
// will change when the set of required properties is changed.
34+
func NewSecurityMonitoringDatasetAttributesRequest(definition SecurityMonitoringDatasetDefinition) *SecurityMonitoringDatasetAttributesRequest {
35+
this := SecurityMonitoringDatasetAttributesRequest{}
36+
this.Definition = definition
37+
return &this
38+
}
39+
40+
// NewSecurityMonitoringDatasetAttributesRequestWithDefaults instantiates a new SecurityMonitoringDatasetAttributesRequest object.
41+
// This constructor will only assign default values to properties that have it defined,
42+
// but it doesn't guarantee that properties required by API are set.
43+
func NewSecurityMonitoringDatasetAttributesRequestWithDefaults() *SecurityMonitoringDatasetAttributesRequest {
44+
this := SecurityMonitoringDatasetAttributesRequest{}
45+
return &this
46+
}
47+
48+
// GetDefinition returns the Definition field value.
49+
func (o *SecurityMonitoringDatasetAttributesRequest) GetDefinition() SecurityMonitoringDatasetDefinition {
50+
if o == nil {
51+
var ret SecurityMonitoringDatasetDefinition
52+
return ret
53+
}
54+
return o.Definition
55+
}
56+
57+
// GetDefinitionOk returns a tuple with the Definition field value
58+
// and a boolean to check if the value has been set.
59+
func (o *SecurityMonitoringDatasetAttributesRequest) GetDefinitionOk() (*SecurityMonitoringDatasetDefinition, bool) {
60+
if o == nil {
61+
return nil, false
62+
}
63+
return &o.Definition, true
64+
}
65+
66+
// SetDefinition sets field value.
67+
func (o *SecurityMonitoringDatasetAttributesRequest) SetDefinition(v SecurityMonitoringDatasetDefinition) {
68+
o.Definition = v
69+
}
70+
71+
// GetDescription returns the Description field value if set, zero value otherwise.
72+
func (o *SecurityMonitoringDatasetAttributesRequest) GetDescription() string {
73+
if o == nil || o.Description == nil {
74+
var ret string
75+
return ret
76+
}
77+
return *o.Description
78+
}
79+
80+
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
81+
// and a boolean to check if the value has been set.
82+
func (o *SecurityMonitoringDatasetAttributesRequest) GetDescriptionOk() (*string, bool) {
83+
if o == nil || o.Description == nil {
84+
return nil, false
85+
}
86+
return o.Description, true
87+
}
88+
89+
// HasDescription returns a boolean if a field has been set.
90+
func (o *SecurityMonitoringDatasetAttributesRequest) HasDescription() bool {
91+
return o != nil && o.Description != nil
92+
}
93+
94+
// SetDescription gets a reference to the given string and assigns it to the Description field.
95+
func (o *SecurityMonitoringDatasetAttributesRequest) SetDescription(v string) {
96+
o.Description = &v
97+
}
98+
99+
// GetVersion returns the Version field value if set, zero value otherwise.
100+
func (o *SecurityMonitoringDatasetAttributesRequest) GetVersion() int64 {
101+
if o == nil || o.Version == nil {
102+
var ret int64
103+
return ret
104+
}
105+
return *o.Version
106+
}
107+
108+
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
109+
// and a boolean to check if the value has been set.
110+
func (o *SecurityMonitoringDatasetAttributesRequest) GetVersionOk() (*int64, bool) {
111+
if o == nil || o.Version == nil {
112+
return nil, false
113+
}
114+
return o.Version, true
115+
}
116+
117+
// HasVersion returns a boolean if a field has been set.
118+
func (o *SecurityMonitoringDatasetAttributesRequest) HasVersion() bool {
119+
return o != nil && o.Version != nil
120+
}
121+
122+
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
123+
func (o *SecurityMonitoringDatasetAttributesRequest) SetVersion(v int64) {
124+
o.Version = &v
125+
}
126+
127+
// MarshalJSON serializes the struct using spec logic.
128+
func (o SecurityMonitoringDatasetAttributesRequest) MarshalJSON() ([]byte, error) {
129+
toSerialize := map[string]interface{}{}
130+
if o.UnparsedObject != nil {
131+
return datadog.Marshal(o.UnparsedObject)
132+
}
133+
toSerialize["definition"] = o.Definition
134+
if o.Description != nil {
135+
toSerialize["description"] = o.Description
136+
}
137+
if o.Version != nil {
138+
toSerialize["version"] = o.Version
139+
}
140+
141+
for key, value := range o.AdditionalProperties {
142+
toSerialize[key] = value
143+
}
144+
return datadog.Marshal(toSerialize)
145+
}
146+
147+
// UnmarshalJSON deserializes the given payload.
148+
func (o *SecurityMonitoringDatasetAttributesRequest) UnmarshalJSON(bytes []byte) (err error) {
149+
all := struct {
150+
Definition *SecurityMonitoringDatasetDefinition `json:"definition"`
151+
Description *string `json:"description,omitempty"`
152+
Version *int64 `json:"version,omitempty"`
153+
}{}
154+
if err = datadog.Unmarshal(bytes, &all); err != nil {
155+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
156+
}
157+
if all.Definition == nil {
158+
return fmt.Errorf("required field definition missing")
159+
}
160+
additionalProperties := make(map[string]interface{})
161+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
162+
datadog.DeleteKeys(additionalProperties, &[]string{"definition", "description", "version"})
163+
} else {
164+
return err
165+
}
166+
167+
hasInvalidField := false
168+
if all.Definition.UnparsedObject != nil && o.UnparsedObject == nil {
169+
hasInvalidField = true
170+
}
171+
o.Definition = *all.Definition
172+
o.Description = all.Description
173+
o.Version = all.Version
174+
175+
if len(additionalProperties) > 0 {
176+
o.AdditionalProperties = additionalProperties
177+
}
178+
179+
if hasInvalidField {
180+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
181+
}
182+
183+
return nil
184+
}

0 commit comments

Comments
 (0)