@@ -10,10 +10,16 @@ import (
1010
1111// FindingAttributes The JSON:API attributes of the finding.
1212type FindingAttributes struct {
13+ // The Datadog relative link for this finding.
14+ DatadogLink * string `json:"datadog_link,omitempty"`
15+ // The description and remediation steps for this finding.
16+ Description * string `json:"description,omitempty"`
1317 // The evaluation of the finding.
1418 Evaluation * FindingEvaluation `json:"evaluation,omitempty"`
1519 // The date on which the evaluation for this finding changed (Unix ms).
1620 EvaluationChangedAt * int64 `json:"evaluation_changed_at,omitempty"`
21+ // The cloud-based ID for the resource related to the finding.
22+ ExternalId * string `json:"external_id,omitempty"`
1723 // Information about the mute status of this finding.
1824 Mute * FindingMute `json:"mute,omitempty"`
1925 // The resource name of this finding.
@@ -52,6 +58,62 @@ func NewFindingAttributesWithDefaults() *FindingAttributes {
5258 return & this
5359}
5460
61+ // GetDatadogLink returns the DatadogLink field value if set, zero value otherwise.
62+ func (o * FindingAttributes ) GetDatadogLink () string {
63+ if o == nil || o .DatadogLink == nil {
64+ var ret string
65+ return ret
66+ }
67+ return * o .DatadogLink
68+ }
69+
70+ // GetDatadogLinkOk returns a tuple with the DatadogLink field value if set, nil otherwise
71+ // and a boolean to check if the value has been set.
72+ func (o * FindingAttributes ) GetDatadogLinkOk () (* string , bool ) {
73+ if o == nil || o .DatadogLink == nil {
74+ return nil , false
75+ }
76+ return o .DatadogLink , true
77+ }
78+
79+ // HasDatadogLink returns a boolean if a field has been set.
80+ func (o * FindingAttributes ) HasDatadogLink () bool {
81+ return o != nil && o .DatadogLink != nil
82+ }
83+
84+ // SetDatadogLink gets a reference to the given string and assigns it to the DatadogLink field.
85+ func (o * FindingAttributes ) SetDatadogLink (v string ) {
86+ o .DatadogLink = & v
87+ }
88+
89+ // GetDescription returns the Description field value if set, zero value otherwise.
90+ func (o * FindingAttributes ) GetDescription () string {
91+ if o == nil || o .Description == nil {
92+ var ret string
93+ return ret
94+ }
95+ return * o .Description
96+ }
97+
98+ // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
99+ // and a boolean to check if the value has been set.
100+ func (o * FindingAttributes ) GetDescriptionOk () (* string , bool ) {
101+ if o == nil || o .Description == nil {
102+ return nil , false
103+ }
104+ return o .Description , true
105+ }
106+
107+ // HasDescription returns a boolean if a field has been set.
108+ func (o * FindingAttributes ) HasDescription () bool {
109+ return o != nil && o .Description != nil
110+ }
111+
112+ // SetDescription gets a reference to the given string and assigns it to the Description field.
113+ func (o * FindingAttributes ) SetDescription (v string ) {
114+ o .Description = & v
115+ }
116+
55117// GetEvaluation returns the Evaluation field value if set, zero value otherwise.
56118func (o * FindingAttributes ) GetEvaluation () FindingEvaluation {
57119 if o == nil || o .Evaluation == nil {
@@ -108,6 +170,34 @@ func (o *FindingAttributes) SetEvaluationChangedAt(v int64) {
108170 o .EvaluationChangedAt = & v
109171}
110172
173+ // GetExternalId returns the ExternalId field value if set, zero value otherwise.
174+ func (o * FindingAttributes ) GetExternalId () string {
175+ if o == nil || o .ExternalId == nil {
176+ var ret string
177+ return ret
178+ }
179+ return * o .ExternalId
180+ }
181+
182+ // GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
183+ // and a boolean to check if the value has been set.
184+ func (o * FindingAttributes ) GetExternalIdOk () (* string , bool ) {
185+ if o == nil || o .ExternalId == nil {
186+ return nil , false
187+ }
188+ return o .ExternalId , true
189+ }
190+
191+ // HasExternalId returns a boolean if a field has been set.
192+ func (o * FindingAttributes ) HasExternalId () bool {
193+ return o != nil && o .ExternalId != nil
194+ }
195+
196+ // SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
197+ func (o * FindingAttributes ) SetExternalId (v string ) {
198+ o .ExternalId = & v
199+ }
200+
111201// GetMute returns the Mute field value if set, zero value otherwise.
112202func (o * FindingAttributes ) GetMute () FindingMute {
113203 if o == nil || o .Mute == nil {
@@ -338,12 +428,21 @@ func (o FindingAttributes) MarshalJSON() ([]byte, error) {
338428 if o .UnparsedObject != nil {
339429 return datadog .Marshal (o .UnparsedObject )
340430 }
431+ if o .DatadogLink != nil {
432+ toSerialize ["datadog_link" ] = o .DatadogLink
433+ }
434+ if o .Description != nil {
435+ toSerialize ["description" ] = o .Description
436+ }
341437 if o .Evaluation != nil {
342438 toSerialize ["evaluation" ] = o .Evaluation
343439 }
344440 if o .EvaluationChangedAt != nil {
345441 toSerialize ["evaluation_changed_at" ] = o .EvaluationChangedAt
346442 }
443+ if o .ExternalId != nil {
444+ toSerialize ["external_id" ] = o .ExternalId
445+ }
347446 if o .Mute != nil {
348447 toSerialize ["mute" ] = o .Mute
349448 }
@@ -378,8 +477,11 @@ func (o FindingAttributes) MarshalJSON() ([]byte, error) {
378477// UnmarshalJSON deserializes the given payload.
379478func (o * FindingAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
380479 all := struct {
480+ DatadogLink * string `json:"datadog_link,omitempty"`
481+ Description * string `json:"description,omitempty"`
381482 Evaluation * FindingEvaluation `json:"evaluation,omitempty"`
382483 EvaluationChangedAt * int64 `json:"evaluation_changed_at,omitempty"`
484+ ExternalId * string `json:"external_id,omitempty"`
383485 Mute * FindingMute `json:"mute,omitempty"`
384486 Resource * string `json:"resource,omitempty"`
385487 ResourceDiscoveryDate * int64 `json:"resource_discovery_date,omitempty"`
@@ -394,18 +496,21 @@ func (o *FindingAttributes) UnmarshalJSON(bytes []byte) (err error) {
394496 }
395497 additionalProperties := make (map [string ]interface {})
396498 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
397- datadog .DeleteKeys (additionalProperties , & []string {"evaluation" , "evaluation_changed_at" , "mute" , "resource" , "resource_discovery_date" , "resource_type" , "rule" , "status" , "tags" , "vulnerability_type" })
499+ datadog .DeleteKeys (additionalProperties , & []string {"datadog_link" , "description" , " evaluation" , "evaluation_changed_at" , "external_id " , "mute" , "resource" , "resource_discovery_date" , "resource_type" , "rule" , "status" , "tags" , "vulnerability_type" })
398500 } else {
399501 return err
400502 }
401503
402504 hasInvalidField := false
505+ o .DatadogLink = all .DatadogLink
506+ o .Description = all .Description
403507 if all .Evaluation != nil && ! all .Evaluation .IsValid () {
404508 hasInvalidField = true
405509 } else {
406510 o .Evaluation = all .Evaluation
407511 }
408512 o .EvaluationChangedAt = all .EvaluationChangedAt
513+ o .ExternalId = all .ExternalId
409514 if all .Mute != nil && all .Mute .UnparsedObject != nil && o .UnparsedObject == nil {
410515 hasInvalidField = true
411516 }
0 commit comments