@@ -28,6 +28,8 @@ type FindingAttributes struct {
2828 Status * FindingStatus `json:"status,omitempty"`
2929 // The tags associated with this finding.
3030 Tags []string `json:"tags,omitempty"`
31+ // The vulnerability type of the finding.
32+ VulnerabilityType * FindingVulnerabilityType `json:"vulnerability_type,omitempty"`
3133 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3234 UnparsedObject map [string ]interface {} `json:"-"`
3335 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -302,6 +304,34 @@ func (o *FindingAttributes) SetTags(v []string) {
302304 o .Tags = v
303305}
304306
307+ // GetVulnerabilityType returns the VulnerabilityType field value if set, zero value otherwise.
308+ func (o * FindingAttributes ) GetVulnerabilityType () FindingVulnerabilityType {
309+ if o == nil || o .VulnerabilityType == nil {
310+ var ret FindingVulnerabilityType
311+ return ret
312+ }
313+ return * o .VulnerabilityType
314+ }
315+
316+ // GetVulnerabilityTypeOk returns a tuple with the VulnerabilityType field value if set, nil otherwise
317+ // and a boolean to check if the value has been set.
318+ func (o * FindingAttributes ) GetVulnerabilityTypeOk () (* FindingVulnerabilityType , bool ) {
319+ if o == nil || o .VulnerabilityType == nil {
320+ return nil , false
321+ }
322+ return o .VulnerabilityType , true
323+ }
324+
325+ // HasVulnerabilityType returns a boolean if a field has been set.
326+ func (o * FindingAttributes ) HasVulnerabilityType () bool {
327+ return o != nil && o .VulnerabilityType != nil
328+ }
329+
330+ // SetVulnerabilityType gets a reference to the given FindingVulnerabilityType and assigns it to the VulnerabilityType field.
331+ func (o * FindingAttributes ) SetVulnerabilityType (v FindingVulnerabilityType ) {
332+ o .VulnerabilityType = & v
333+ }
334+
305335// MarshalJSON serializes the struct using spec logic.
306336func (o FindingAttributes ) MarshalJSON () ([]byte , error ) {
307337 toSerialize := map [string ]interface {}{}
@@ -335,6 +365,9 @@ func (o FindingAttributes) MarshalJSON() ([]byte, error) {
335365 if o .Tags != nil {
336366 toSerialize ["tags" ] = o .Tags
337367 }
368+ if o .VulnerabilityType != nil {
369+ toSerialize ["vulnerability_type" ] = o .VulnerabilityType
370+ }
338371
339372 for key , value := range o .AdditionalProperties {
340373 toSerialize [key ] = value
@@ -345,22 +378,23 @@ func (o FindingAttributes) MarshalJSON() ([]byte, error) {
345378// UnmarshalJSON deserializes the given payload.
346379func (o * FindingAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
347380 all := struct {
348- Evaluation * FindingEvaluation `json:"evaluation,omitempty"`
349- EvaluationChangedAt * int64 `json:"evaluation_changed_at,omitempty"`
350- Mute * FindingMute `json:"mute,omitempty"`
351- Resource * string `json:"resource,omitempty"`
352- ResourceDiscoveryDate * int64 `json:"resource_discovery_date,omitempty"`
353- ResourceType * string `json:"resource_type,omitempty"`
354- Rule * FindingRule `json:"rule,omitempty"`
355- Status * FindingStatus `json:"status,omitempty"`
356- Tags []string `json:"tags,omitempty"`
381+ Evaluation * FindingEvaluation `json:"evaluation,omitempty"`
382+ EvaluationChangedAt * int64 `json:"evaluation_changed_at,omitempty"`
383+ Mute * FindingMute `json:"mute,omitempty"`
384+ Resource * string `json:"resource,omitempty"`
385+ ResourceDiscoveryDate * int64 `json:"resource_discovery_date,omitempty"`
386+ ResourceType * string `json:"resource_type,omitempty"`
387+ Rule * FindingRule `json:"rule,omitempty"`
388+ Status * FindingStatus `json:"status,omitempty"`
389+ Tags []string `json:"tags,omitempty"`
390+ VulnerabilityType * FindingVulnerabilityType `json:"vulnerability_type,omitempty"`
357391 }{}
358392 if err = datadog .Unmarshal (bytes , & all ); err != nil {
359393 return datadog .Unmarshal (bytes , & o .UnparsedObject )
360394 }
361395 additionalProperties := make (map [string ]interface {})
362396 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
363- datadog .DeleteKeys (additionalProperties , & []string {"evaluation" , "evaluation_changed_at" , "mute" , "resource" , "resource_discovery_date" , "resource_type" , "rule" , "status" , "tags" })
397+ datadog .DeleteKeys (additionalProperties , & []string {"evaluation" , "evaluation_changed_at" , "mute" , "resource" , "resource_discovery_date" , "resource_type" , "rule" , "status" , "tags" , "vulnerability_type" })
364398 } else {
365399 return err
366400 }
@@ -389,6 +423,11 @@ func (o *FindingAttributes) UnmarshalJSON(bytes []byte) (err error) {
389423 o .Status = all .Status
390424 }
391425 o .Tags = all .Tags
426+ if all .VulnerabilityType != nil && ! all .VulnerabilityType .IsValid () {
427+ hasInvalidField = true
428+ } else {
429+ o .VulnerabilityType = all .VulnerabilityType
430+ }
392431
393432 if len (additionalProperties ) > 0 {
394433 o .AdditionalProperties = additionalProperties
0 commit comments