Skip to content

Commit 1b724b6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1fa7a4c of spec repo
1 parent 6be4c93 commit 1b724b6

File tree

55 files changed

+2427
-3002
lines changed

Some content is hidden

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

55 files changed

+2427
-3002
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10205,11 +10205,11 @@ components:
1020510205
CloudWorkloadSecurityAgentPolicyVersion:
1020610206
description: The versions of the policy
1020710207
properties:
10208-
Date:
10208+
date:
1020910209
description: The date and time the version was created
1021010210
nullable: true
1021110211
type: string
10212-
Name:
10212+
name:
1021310213
description: The version of the policy
1021410214
example: 1.47.0-rc2
1021510215
type: string
@@ -10236,8 +10236,11 @@ components:
1023610236
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
1023710237
type: object
1023810238
CloudWorkloadSecurityAgentRuleActionHash:
10239-
additionalProperties: {}
10240-
description: An empty object indicating the hash action
10239+
description: Hash file specified by the field attribute
10240+
properties:
10241+
field:
10242+
description: The field of the hash action
10243+
type: string
1024110244
type: object
1024210245
CloudWorkloadSecurityAgentRuleActionMetadata:
1024310246
description: The metadata action applied on the scope matching the rule
@@ -10285,9 +10288,14 @@ components:
1028510288
format: int64
1028610289
type: integer
1028710290
value:
10288-
description: The value of the set action
10289-
type: string
10291+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSetValue'
1029010292
type: object
10293+
CloudWorkloadSecurityAgentRuleActionSetValue:
10294+
description: The value of the set action
10295+
oneOf:
10296+
- type: string
10297+
- type: integer
10298+
- type: boolean
1029110299
CloudWorkloadSecurityAgentRuleActions:
1029210300
description: The array of actions the rule can perform if triggered
1029310301
items:

api/datadogV2/model_cloud_workload_security_agent_policy_version.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
// CloudWorkloadSecurityAgentPolicyVersion The versions of the policy
1212
type CloudWorkloadSecurityAgentPolicyVersion struct {
1313
// The date and time the version was created
14-
Date datadog.NullableString `json:"Date,omitempty"`
14+
Date datadog.NullableString `json:"date,omitempty"`
1515
// The version of the policy
16-
Name *string `json:"Name,omitempty"`
16+
Name *string `json:"name,omitempty"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`
1919
AdditionalProperties map[string]interface{} `json:"-"`
@@ -110,10 +110,10 @@ func (o CloudWorkloadSecurityAgentPolicyVersion) MarshalJSON() ([]byte, error) {
110110
return datadog.Marshal(o.UnparsedObject)
111111
}
112112
if o.Date.IsSet() {
113-
toSerialize["Date"] = o.Date.Get()
113+
toSerialize["date"] = o.Date.Get()
114114
}
115115
if o.Name != nil {
116-
toSerialize["Name"] = o.Name
116+
toSerialize["name"] = o.Name
117117
}
118118

119119
for key, value := range o.AdditionalProperties {
@@ -125,15 +125,15 @@ func (o CloudWorkloadSecurityAgentPolicyVersion) MarshalJSON() ([]byte, error) {
125125
// UnmarshalJSON deserializes the given payload.
126126
func (o *CloudWorkloadSecurityAgentPolicyVersion) UnmarshalJSON(bytes []byte) (err error) {
127127
all := struct {
128-
Date datadog.NullableString `json:"Date,omitempty"`
129-
Name *string `json:"Name,omitempty"`
128+
Date datadog.NullableString `json:"date,omitempty"`
129+
Name *string `json:"name,omitempty"`
130130
}{}
131131
if err = datadog.Unmarshal(bytes, &all); err != nil {
132132
return datadog.Unmarshal(bytes, &o.UnparsedObject)
133133
}
134134
additionalProperties := make(map[string]interface{})
135135
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
136-
datadog.DeleteKeys(additionalProperties, &[]string{"Date", "Name"})
136+
datadog.DeleteKeys(additionalProperties, &[]string{"date", "name"})
137137
} else {
138138
return err
139139
}

api/datadogV2/model_cloud_workload_security_agent_rule_action.go

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
type CloudWorkloadSecurityAgentRuleAction struct {
1313
// SECL expression used to target the container to apply the action on
1414
Filter *string `json:"filter,omitempty"`
15-
// An empty object indicating the hash action
16-
Hash map[string]interface{} `json:"hash,omitempty"`
15+
// Hash file specified by the field attribute
16+
Hash *CloudWorkloadSecurityAgentRuleActionHash `json:"hash,omitempty"`
1717
// Kill system call applied on the container matching the rule
1818
Kill *CloudWorkloadSecurityAgentRuleKill `json:"kill,omitempty"`
1919
// The metadata action applied on the scope matching the rule
@@ -71,31 +71,31 @@ func (o *CloudWorkloadSecurityAgentRuleAction) SetFilter(v string) {
7171
}
7272

7373
// GetHash returns the Hash field value if set, zero value otherwise.
74-
func (o *CloudWorkloadSecurityAgentRuleAction) GetHash() map[string]interface{} {
74+
func (o *CloudWorkloadSecurityAgentRuleAction) GetHash() CloudWorkloadSecurityAgentRuleActionHash {
7575
if o == nil || o.Hash == nil {
76-
var ret map[string]interface{}
76+
var ret CloudWorkloadSecurityAgentRuleActionHash
7777
return ret
7878
}
79-
return o.Hash
79+
return *o.Hash
8080
}
8181

8282
// GetHashOk returns a tuple with the Hash field value if set, nil otherwise
8383
// and a boolean to check if the value has been set.
84-
func (o *CloudWorkloadSecurityAgentRuleAction) GetHashOk() (*map[string]interface{}, bool) {
84+
func (o *CloudWorkloadSecurityAgentRuleAction) GetHashOk() (*CloudWorkloadSecurityAgentRuleActionHash, bool) {
8585
if o == nil || o.Hash == nil {
8686
return nil, false
8787
}
88-
return &o.Hash, true
88+
return o.Hash, true
8989
}
9090

9191
// HasHash returns a boolean if a field has been set.
9292
func (o *CloudWorkloadSecurityAgentRuleAction) HasHash() bool {
9393
return o != nil && o.Hash != nil
9494
}
9595

96-
// SetHash gets a reference to the given map[string]interface{} and assigns it to the Hash field.
97-
func (o *CloudWorkloadSecurityAgentRuleAction) SetHash(v map[string]interface{}) {
98-
o.Hash = v
96+
// SetHash gets a reference to the given CloudWorkloadSecurityAgentRuleActionHash and assigns it to the Hash field.
97+
func (o *CloudWorkloadSecurityAgentRuleAction) SetHash(v CloudWorkloadSecurityAgentRuleActionHash) {
98+
o.Hash = &v
9999
}
100100

101101
// GetKill returns the Kill field value if set, zero value otherwise.
@@ -214,7 +214,7 @@ func (o CloudWorkloadSecurityAgentRuleAction) MarshalJSON() ([]byte, error) {
214214
func (o *CloudWorkloadSecurityAgentRuleAction) UnmarshalJSON(bytes []byte) (err error) {
215215
all := struct {
216216
Filter *string `json:"filter,omitempty"`
217-
Hash map[string]interface{} `json:"hash,omitempty"`
217+
Hash *CloudWorkloadSecurityAgentRuleActionHash `json:"hash,omitempty"`
218218
Kill *CloudWorkloadSecurityAgentRuleKill `json:"kill,omitempty"`
219219
Metadata *CloudWorkloadSecurityAgentRuleActionMetadata `json:"metadata,omitempty"`
220220
Set *CloudWorkloadSecurityAgentRuleActionSet `json:"set,omitempty"`
@@ -231,6 +231,9 @@ func (o *CloudWorkloadSecurityAgentRuleAction) UnmarshalJSON(bytes []byte) (err
231231

232232
hasInvalidField := false
233233
o.Filter = all.Filter
234+
if all.Hash != nil && all.Hash.UnparsedObject != nil && o.UnparsedObject == nil {
235+
hasInvalidField = true
236+
}
234237
o.Hash = all.Hash
235238
if all.Kill != nil && all.Kill.UnparsedObject != nil && o.UnparsedObject == nil {
236239
hasInvalidField = true
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// CloudWorkloadSecurityAgentRuleActionHash Hash file specified by the field attribute
12+
type CloudWorkloadSecurityAgentRuleActionHash struct {
13+
// The field of the hash action
14+
Field *string `json:"field,omitempty"`
15+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
16+
UnparsedObject map[string]interface{} `json:"-"`
17+
AdditionalProperties map[string]interface{} `json:"-"`
18+
}
19+
20+
// NewCloudWorkloadSecurityAgentRuleActionHash instantiates a new CloudWorkloadSecurityAgentRuleActionHash object.
21+
// This constructor will assign default values to properties that have it defined,
22+
// and makes sure properties required by API are set, but the set of arguments
23+
// will change when the set of required properties is changed.
24+
func NewCloudWorkloadSecurityAgentRuleActionHash() *CloudWorkloadSecurityAgentRuleActionHash {
25+
this := CloudWorkloadSecurityAgentRuleActionHash{}
26+
return &this
27+
}
28+
29+
// NewCloudWorkloadSecurityAgentRuleActionHashWithDefaults instantiates a new CloudWorkloadSecurityAgentRuleActionHash object.
30+
// This constructor will only assign default values to properties that have it defined,
31+
// but it doesn't guarantee that properties required by API are set.
32+
func NewCloudWorkloadSecurityAgentRuleActionHashWithDefaults() *CloudWorkloadSecurityAgentRuleActionHash {
33+
this := CloudWorkloadSecurityAgentRuleActionHash{}
34+
return &this
35+
}
36+
37+
// GetField returns the Field field value if set, zero value otherwise.
38+
func (o *CloudWorkloadSecurityAgentRuleActionHash) GetField() string {
39+
if o == nil || o.Field == nil {
40+
var ret string
41+
return ret
42+
}
43+
return *o.Field
44+
}
45+
46+
// GetFieldOk returns a tuple with the Field field value if set, nil otherwise
47+
// and a boolean to check if the value has been set.
48+
func (o *CloudWorkloadSecurityAgentRuleActionHash) GetFieldOk() (*string, bool) {
49+
if o == nil || o.Field == nil {
50+
return nil, false
51+
}
52+
return o.Field, true
53+
}
54+
55+
// HasField returns a boolean if a field has been set.
56+
func (o *CloudWorkloadSecurityAgentRuleActionHash) HasField() bool {
57+
return o != nil && o.Field != nil
58+
}
59+
60+
// SetField gets a reference to the given string and assigns it to the Field field.
61+
func (o *CloudWorkloadSecurityAgentRuleActionHash) SetField(v string) {
62+
o.Field = &v
63+
}
64+
65+
// MarshalJSON serializes the struct using spec logic.
66+
func (o CloudWorkloadSecurityAgentRuleActionHash) MarshalJSON() ([]byte, error) {
67+
toSerialize := map[string]interface{}{}
68+
if o.UnparsedObject != nil {
69+
return datadog.Marshal(o.UnparsedObject)
70+
}
71+
if o.Field != nil {
72+
toSerialize["field"] = o.Field
73+
}
74+
75+
for key, value := range o.AdditionalProperties {
76+
toSerialize[key] = value
77+
}
78+
return datadog.Marshal(toSerialize)
79+
}
80+
81+
// UnmarshalJSON deserializes the given payload.
82+
func (o *CloudWorkloadSecurityAgentRuleActionHash) UnmarshalJSON(bytes []byte) (err error) {
83+
all := struct {
84+
Field *string `json:"field,omitempty"`
85+
}{}
86+
if err = datadog.Unmarshal(bytes, &all); err != nil {
87+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
88+
}
89+
additionalProperties := make(map[string]interface{})
90+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
91+
datadog.DeleteKeys(additionalProperties, &[]string{"field"})
92+
} else {
93+
return err
94+
}
95+
o.Field = all.Field
96+
97+
if len(additionalProperties) > 0 {
98+
o.AdditionalProperties = additionalProperties
99+
}
100+
101+
return nil
102+
}

api/datadogV2/model_cloud_workload_security_agent_rule_action_set.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CloudWorkloadSecurityAgentRuleActionSet struct {
2929
// The time to live of the set action.
3030
Ttl *int64 `json:"ttl,omitempty"`
3131
// The value of the set action
32-
Value *string `json:"value,omitempty"`
32+
Value *CloudWorkloadSecurityAgentRuleActionSetValue `json:"value,omitempty"`
3333
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3434
UnparsedObject map[string]interface{} `json:"-"`
3535
AdditionalProperties map[string]interface{} `json:"-"`
@@ -305,17 +305,17 @@ func (o *CloudWorkloadSecurityAgentRuleActionSet) SetTtl(v int64) {
305305
}
306306

307307
// GetValue returns the Value field value if set, zero value otherwise.
308-
func (o *CloudWorkloadSecurityAgentRuleActionSet) GetValue() string {
308+
func (o *CloudWorkloadSecurityAgentRuleActionSet) GetValue() CloudWorkloadSecurityAgentRuleActionSetValue {
309309
if o == nil || o.Value == nil {
310-
var ret string
310+
var ret CloudWorkloadSecurityAgentRuleActionSetValue
311311
return ret
312312
}
313313
return *o.Value
314314
}
315315

316316
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
317317
// and a boolean to check if the value has been set.
318-
func (o *CloudWorkloadSecurityAgentRuleActionSet) GetValueOk() (*string, bool) {
318+
func (o *CloudWorkloadSecurityAgentRuleActionSet) GetValueOk() (*CloudWorkloadSecurityAgentRuleActionSetValue, bool) {
319319
if o == nil || o.Value == nil {
320320
return nil, false
321321
}
@@ -327,8 +327,8 @@ func (o *CloudWorkloadSecurityAgentRuleActionSet) HasValue() bool {
327327
return o != nil && o.Value != nil
328328
}
329329

330-
// SetValue gets a reference to the given string and assigns it to the Value field.
331-
func (o *CloudWorkloadSecurityAgentRuleActionSet) SetValue(v string) {
330+
// SetValue gets a reference to the given CloudWorkloadSecurityAgentRuleActionSetValue and assigns it to the Value field.
331+
func (o *CloudWorkloadSecurityAgentRuleActionSet) SetValue(v CloudWorkloadSecurityAgentRuleActionSetValue) {
332332
o.Value = &v
333333
}
334334

@@ -378,16 +378,16 @@ func (o CloudWorkloadSecurityAgentRuleActionSet) MarshalJSON() ([]byte, error) {
378378
// UnmarshalJSON deserializes the given payload.
379379
func (o *CloudWorkloadSecurityAgentRuleActionSet) UnmarshalJSON(bytes []byte) (err error) {
380380
all := struct {
381-
Append *bool `json:"append,omitempty"`
382-
DefaultValue *string `json:"default_value,omitempty"`
383-
Expression *string `json:"expression,omitempty"`
384-
Field *string `json:"field,omitempty"`
385-
Inherited *bool `json:"inherited,omitempty"`
386-
Name *string `json:"name,omitempty"`
387-
Scope *string `json:"scope,omitempty"`
388-
Size *int64 `json:"size,omitempty"`
389-
Ttl *int64 `json:"ttl,omitempty"`
390-
Value *string `json:"value,omitempty"`
381+
Append *bool `json:"append,omitempty"`
382+
DefaultValue *string `json:"default_value,omitempty"`
383+
Expression *string `json:"expression,omitempty"`
384+
Field *string `json:"field,omitempty"`
385+
Inherited *bool `json:"inherited,omitempty"`
386+
Name *string `json:"name,omitempty"`
387+
Scope *string `json:"scope,omitempty"`
388+
Size *int64 `json:"size,omitempty"`
389+
Ttl *int64 `json:"ttl,omitempty"`
390+
Value *CloudWorkloadSecurityAgentRuleActionSetValue `json:"value,omitempty"`
391391
}{}
392392
if err = datadog.Unmarshal(bytes, &all); err != nil {
393393
return datadog.Unmarshal(bytes, &o.UnparsedObject)

0 commit comments

Comments
 (0)