@@ -28,6 +28,8 @@ type CloudWorkloadSecurityAgentPolicyAttributes struct {
2828 MonitoringRulesCount * int32 `json:"monitoringRulesCount,omitempty"`
2929 // The name of the policy
3030 Name * string `json:"name,omitempty"`
31+ // Whether the policy is pinned
32+ Pinned * bool `json:"pinned,omitempty"`
3133 // The version of the policy
3234 PolicyVersion * string `json:"policyVersion,omitempty"`
3335 // The priority of the policy
@@ -40,6 +42,8 @@ type CloudWorkloadSecurityAgentPolicyAttributes struct {
4042 UpdatedAt * int64 `json:"updatedAt,omitempty"`
4143 // The attributes of the user who last updated the policy
4244 Updater * CloudWorkloadSecurityAgentPolicyUpdaterAttributes `json:"updater,omitempty"`
45+ // The versions of the policy
46+ Versions []CloudWorkloadSecurityAgentPolicyVersion `json:"versions,omitempty"`
4347 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
4448 UnparsedObject map [string ]interface {} `json:"-"`
4549 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -314,6 +318,34 @@ func (o *CloudWorkloadSecurityAgentPolicyAttributes) SetName(v string) {
314318 o .Name = & v
315319}
316320
321+ // GetPinned returns the Pinned field value if set, zero value otherwise.
322+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) GetPinned () bool {
323+ if o == nil || o .Pinned == nil {
324+ var ret bool
325+ return ret
326+ }
327+ return * o .Pinned
328+ }
329+
330+ // GetPinnedOk returns a tuple with the Pinned field value if set, nil otherwise
331+ // and a boolean to check if the value has been set.
332+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) GetPinnedOk () (* bool , bool ) {
333+ if o == nil || o .Pinned == nil {
334+ return nil , false
335+ }
336+ return o .Pinned , true
337+ }
338+
339+ // HasPinned returns a boolean if a field has been set.
340+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) HasPinned () bool {
341+ return o != nil && o .Pinned != nil
342+ }
343+
344+ // SetPinned gets a reference to the given bool and assigns it to the Pinned field.
345+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) SetPinned (v bool ) {
346+ o .Pinned = & v
347+ }
348+
317349// GetPolicyVersion returns the PolicyVersion field value if set, zero value otherwise.
318350func (o * CloudWorkloadSecurityAgentPolicyAttributes ) GetPolicyVersion () string {
319351 if o == nil || o .PolicyVersion == nil {
@@ -482,6 +514,34 @@ func (o *CloudWorkloadSecurityAgentPolicyAttributes) SetUpdater(v CloudWorkloadS
482514 o .Updater = & v
483515}
484516
517+ // GetVersions returns the Versions field value if set, zero value otherwise.
518+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) GetVersions () []CloudWorkloadSecurityAgentPolicyVersion {
519+ if o == nil || o .Versions == nil {
520+ var ret []CloudWorkloadSecurityAgentPolicyVersion
521+ return ret
522+ }
523+ return o .Versions
524+ }
525+
526+ // GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise
527+ // and a boolean to check if the value has been set.
528+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) GetVersionsOk () (* []CloudWorkloadSecurityAgentPolicyVersion , bool ) {
529+ if o == nil || o .Versions == nil {
530+ return nil , false
531+ }
532+ return & o .Versions , true
533+ }
534+
535+ // HasVersions returns a boolean if a field has been set.
536+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) HasVersions () bool {
537+ return o != nil && o .Versions != nil
538+ }
539+
540+ // SetVersions gets a reference to the given []CloudWorkloadSecurityAgentPolicyVersion and assigns it to the Versions field.
541+ func (o * CloudWorkloadSecurityAgentPolicyAttributes ) SetVersions (v []CloudWorkloadSecurityAgentPolicyVersion ) {
542+ o .Versions = v
543+ }
544+
485545// MarshalJSON serializes the struct using spec logic.
486546func (o CloudWorkloadSecurityAgentPolicyAttributes ) MarshalJSON () ([]byte , error ) {
487547 toSerialize := map [string ]interface {}{}
@@ -515,6 +575,9 @@ func (o CloudWorkloadSecurityAgentPolicyAttributes) MarshalJSON() ([]byte, error
515575 if o .Name != nil {
516576 toSerialize ["name" ] = o .Name
517577 }
578+ if o .Pinned != nil {
579+ toSerialize ["pinned" ] = o .Pinned
580+ }
518581 if o .PolicyVersion != nil {
519582 toSerialize ["policyVersion" ] = o .PolicyVersion
520583 }
@@ -533,6 +596,9 @@ func (o CloudWorkloadSecurityAgentPolicyAttributes) MarshalJSON() ([]byte, error
533596 if o .Updater != nil {
534597 toSerialize ["updater" ] = o .Updater
535598 }
599+ if o .Versions != nil {
600+ toSerialize ["versions" ] = o .Versions
601+ }
536602
537603 for key , value := range o .AdditionalProperties {
538604 toSerialize [key ] = value
@@ -552,19 +618,21 @@ func (o *CloudWorkloadSecurityAgentPolicyAttributes) UnmarshalJSON(bytes []byte)
552618 HostTagsLists [][]string `json:"hostTagsLists,omitempty"`
553619 MonitoringRulesCount * int32 `json:"monitoringRulesCount,omitempty"`
554620 Name * string `json:"name,omitempty"`
621+ Pinned * bool `json:"pinned,omitempty"`
555622 PolicyVersion * string `json:"policyVersion,omitempty"`
556623 Priority * int64 `json:"priority,omitempty"`
557624 RuleCount * int32 `json:"ruleCount,omitempty"`
558625 UpdateDate * int64 `json:"updateDate,omitempty"`
559626 UpdatedAt * int64 `json:"updatedAt,omitempty"`
560627 Updater * CloudWorkloadSecurityAgentPolicyUpdaterAttributes `json:"updater,omitempty"`
628+ Versions []CloudWorkloadSecurityAgentPolicyVersion `json:"versions,omitempty"`
561629 }{}
562630 if err = datadog .Unmarshal (bytes , & all ); err != nil {
563631 return datadog .Unmarshal (bytes , & o .UnparsedObject )
564632 }
565633 additionalProperties := make (map [string ]interface {})
566634 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
567- datadog .DeleteKeys (additionalProperties , & []string {"blockingRulesCount" , "datadogManaged" , "description" , "disabledRulesCount" , "enabled" , "hostTags" , "hostTagsLists" , "monitoringRulesCount" , "name" , "policyVersion" , "priority" , "ruleCount" , "updateDate" , "updatedAt" , "updater" })
635+ datadog .DeleteKeys (additionalProperties , & []string {"blockingRulesCount" , "datadogManaged" , "description" , "disabledRulesCount" , "enabled" , "hostTags" , "hostTagsLists" , "monitoringRulesCount" , "name" , "pinned" , " policyVersion" , "priority" , "ruleCount" , "updateDate" , "updatedAt" , "updater" , "versions " })
568636 } else {
569637 return err
570638 }
@@ -579,6 +647,7 @@ func (o *CloudWorkloadSecurityAgentPolicyAttributes) UnmarshalJSON(bytes []byte)
579647 o .HostTagsLists = all .HostTagsLists
580648 o .MonitoringRulesCount = all .MonitoringRulesCount
581649 o .Name = all .Name
650+ o .Pinned = all .Pinned
582651 o .PolicyVersion = all .PolicyVersion
583652 o .Priority = all .Priority
584653 o .RuleCount = all .RuleCount
@@ -588,6 +657,7 @@ func (o *CloudWorkloadSecurityAgentPolicyAttributes) UnmarshalJSON(bytes []byte)
588657 hasInvalidField = true
589658 }
590659 o .Updater = all .Updater
660+ o .Versions = all .Versions
591661
592662 if len (additionalProperties ) > 0 {
593663 o .AdditionalProperties = additionalProperties
0 commit comments