@@ -14,6 +14,10 @@ type CloudWorkloadSecurityAgentRuleAction struct {
1414 Filter * string `json:"filter,omitempty"`
1515 // Kill system call applied on the container matching the rule
1616 Kill * CloudWorkloadSecurityAgentRuleKill `json:"kill,omitempty"`
17+ // The metadata action applied on the scope matching the rule
18+ Metadata * CloudWorkloadSecurityAgentRuleActionMetadata `json:"metadata,omitempty"`
19+ // The set action applied on the scope matching the rule
20+ Set * CloudWorkloadSecurityAgentRuleActionSet `json:"set,omitempty"`
1721 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1822 UnparsedObject map [string ]interface {} `json:"-"`
1923 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -92,6 +96,62 @@ func (o *CloudWorkloadSecurityAgentRuleAction) SetKill(v CloudWorkloadSecurityAg
9296 o .Kill = & v
9397}
9498
99+ // GetMetadata returns the Metadata field value if set, zero value otherwise.
100+ func (o * CloudWorkloadSecurityAgentRuleAction ) GetMetadata () CloudWorkloadSecurityAgentRuleActionMetadata {
101+ if o == nil || o .Metadata == nil {
102+ var ret CloudWorkloadSecurityAgentRuleActionMetadata
103+ return ret
104+ }
105+ return * o .Metadata
106+ }
107+
108+ // GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
109+ // and a boolean to check if the value has been set.
110+ func (o * CloudWorkloadSecurityAgentRuleAction ) GetMetadataOk () (* CloudWorkloadSecurityAgentRuleActionMetadata , bool ) {
111+ if o == nil || o .Metadata == nil {
112+ return nil , false
113+ }
114+ return o .Metadata , true
115+ }
116+
117+ // HasMetadata returns a boolean if a field has been set.
118+ func (o * CloudWorkloadSecurityAgentRuleAction ) HasMetadata () bool {
119+ return o != nil && o .Metadata != nil
120+ }
121+
122+ // SetMetadata gets a reference to the given CloudWorkloadSecurityAgentRuleActionMetadata and assigns it to the Metadata field.
123+ func (o * CloudWorkloadSecurityAgentRuleAction ) SetMetadata (v CloudWorkloadSecurityAgentRuleActionMetadata ) {
124+ o .Metadata = & v
125+ }
126+
127+ // GetSet returns the Set field value if set, zero value otherwise.
128+ func (o * CloudWorkloadSecurityAgentRuleAction ) GetSet () CloudWorkloadSecurityAgentRuleActionSet {
129+ if o == nil || o .Set == nil {
130+ var ret CloudWorkloadSecurityAgentRuleActionSet
131+ return ret
132+ }
133+ return * o .Set
134+ }
135+
136+ // GetSetOk returns a tuple with the Set field value if set, nil otherwise
137+ // and a boolean to check if the value has been set.
138+ func (o * CloudWorkloadSecurityAgentRuleAction ) GetSetOk () (* CloudWorkloadSecurityAgentRuleActionSet , bool ) {
139+ if o == nil || o .Set == nil {
140+ return nil , false
141+ }
142+ return o .Set , true
143+ }
144+
145+ // HasSet returns a boolean if a field has been set.
146+ func (o * CloudWorkloadSecurityAgentRuleAction ) HasSet () bool {
147+ return o != nil && o .Set != nil
148+ }
149+
150+ // SetSet gets a reference to the given CloudWorkloadSecurityAgentRuleActionSet and assigns it to the Set field.
151+ func (o * CloudWorkloadSecurityAgentRuleAction ) SetSet (v CloudWorkloadSecurityAgentRuleActionSet ) {
152+ o .Set = & v
153+ }
154+
95155// MarshalJSON serializes the struct using spec logic.
96156func (o CloudWorkloadSecurityAgentRuleAction ) MarshalJSON () ([]byte , error ) {
97157 toSerialize := map [string ]interface {}{}
@@ -104,6 +164,12 @@ func (o CloudWorkloadSecurityAgentRuleAction) MarshalJSON() ([]byte, error) {
104164 if o .Kill != nil {
105165 toSerialize ["kill" ] = o .Kill
106166 }
167+ if o .Metadata != nil {
168+ toSerialize ["metadata" ] = o .Metadata
169+ }
170+ if o .Set != nil {
171+ toSerialize ["set" ] = o .Set
172+ }
107173
108174 for key , value := range o .AdditionalProperties {
109175 toSerialize [key ] = value
@@ -114,15 +180,17 @@ func (o CloudWorkloadSecurityAgentRuleAction) MarshalJSON() ([]byte, error) {
114180// UnmarshalJSON deserializes the given payload.
115181func (o * CloudWorkloadSecurityAgentRuleAction ) UnmarshalJSON (bytes []byte ) (err error ) {
116182 all := struct {
117- Filter * string `json:"filter,omitempty"`
118- Kill * CloudWorkloadSecurityAgentRuleKill `json:"kill,omitempty"`
183+ Filter * string `json:"filter,omitempty"`
184+ Kill * CloudWorkloadSecurityAgentRuleKill `json:"kill,omitempty"`
185+ Metadata * CloudWorkloadSecurityAgentRuleActionMetadata `json:"metadata,omitempty"`
186+ Set * CloudWorkloadSecurityAgentRuleActionSet `json:"set,omitempty"`
119187 }{}
120188 if err = datadog .Unmarshal (bytes , & all ); err != nil {
121189 return datadog .Unmarshal (bytes , & o .UnparsedObject )
122190 }
123191 additionalProperties := make (map [string ]interface {})
124192 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
125- datadog .DeleteKeys (additionalProperties , & []string {"filter" , "kill" })
193+ datadog .DeleteKeys (additionalProperties , & []string {"filter" , "kill" , "metadata" , "set" })
126194 } else {
127195 return err
128196 }
@@ -133,6 +201,14 @@ func (o *CloudWorkloadSecurityAgentRuleAction) UnmarshalJSON(bytes []byte) (err
133201 hasInvalidField = true
134202 }
135203 o .Kill = all .Kill
204+ if all .Metadata != nil && all .Metadata .UnparsedObject != nil && o .UnparsedObject == nil {
205+ hasInvalidField = true
206+ }
207+ o .Metadata = all .Metadata
208+ if all .Set != nil && all .Set .UnparsedObject != nil && o .UnparsedObject == nil {
209+ hasInvalidField = true
210+ }
211+ o .Set = all .Set
136212
137213 if len (additionalProperties ) > 0 {
138214 o .AdditionalProperties = additionalProperties
0 commit comments