@@ -11,12 +11,12 @@ import (
1111// SecurityMonitoringRuleNewValueOptions Options on new value detection method.
1212type SecurityMonitoringRuleNewValueOptions struct {
1313 // The duration in days after which a learned value is forgotten.
14- ForgetAfter * SecurityMonitoringRuleNewValueOptionsForgetAfter `json:"forgetAfter,omitempty"`
14+ ForgetAfter * int32 `json:"forgetAfter,omitempty"`
1515 // When set to true, Datadog uses previous values that fall within the defined learning window to construct the baseline, enabling the system to establish an accurate baseline more rapidly rather than relying solely on gradual learning over time.
1616 InstantaneousBaseline * bool `json:"instantaneousBaseline,omitempty"`
1717 // The duration in days during which values are learned, and after which signals will be generated for values that
1818 // weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned.
19- LearningDuration * SecurityMonitoringRuleNewValueOptionsLearningDuration `json:"learningDuration,omitempty"`
19+ LearningDuration * int32 `json:"learningDuration,omitempty"`
2020 // The learning method used to determine when signals should be generated for values that weren't learned.
2121 LearningMethod * SecurityMonitoringRuleNewValueOptionsLearningMethod `json:"learningMethod,omitempty"`
2222 // A number of occurrences after which signals will be generated for values that weren't learned.
@@ -32,7 +32,7 @@ type SecurityMonitoringRuleNewValueOptions struct {
3232// will change when the set of required properties is changed.
3333func NewSecurityMonitoringRuleNewValueOptions () * SecurityMonitoringRuleNewValueOptions {
3434 this := SecurityMonitoringRuleNewValueOptions {}
35- var learningDuration SecurityMonitoringRuleNewValueOptionsLearningDuration = SECURITYMONITORINGRULENEWVALUEOPTIONSLEARNINGDURATION_ZERO_DAYS
35+ var learningDuration int32 = 0
3636 this .LearningDuration = & learningDuration
3737 var learningMethod SecurityMonitoringRuleNewValueOptionsLearningMethod = SECURITYMONITORINGRULENEWVALUEOPTIONSLEARNINGMETHOD_DURATION
3838 this .LearningMethod = & learningMethod
@@ -46,7 +46,7 @@ func NewSecurityMonitoringRuleNewValueOptions() *SecurityMonitoringRuleNewValueO
4646// but it doesn't guarantee that properties required by API are set.
4747func NewSecurityMonitoringRuleNewValueOptionsWithDefaults () * SecurityMonitoringRuleNewValueOptions {
4848 this := SecurityMonitoringRuleNewValueOptions {}
49- var learningDuration SecurityMonitoringRuleNewValueOptionsLearningDuration = SECURITYMONITORINGRULENEWVALUEOPTIONSLEARNINGDURATION_ZERO_DAYS
49+ var learningDuration int32 = 0
5050 this .LearningDuration = & learningDuration
5151 var learningMethod SecurityMonitoringRuleNewValueOptionsLearningMethod = SECURITYMONITORINGRULENEWVALUEOPTIONSLEARNINGMETHOD_DURATION
5252 this .LearningMethod = & learningMethod
@@ -56,17 +56,17 @@ func NewSecurityMonitoringRuleNewValueOptionsWithDefaults() *SecurityMonitoringR
5656}
5757
5858// GetForgetAfter returns the ForgetAfter field value if set, zero value otherwise.
59- func (o * SecurityMonitoringRuleNewValueOptions ) GetForgetAfter () SecurityMonitoringRuleNewValueOptionsForgetAfter {
59+ func (o * SecurityMonitoringRuleNewValueOptions ) GetForgetAfter () int32 {
6060 if o == nil || o .ForgetAfter == nil {
61- var ret SecurityMonitoringRuleNewValueOptionsForgetAfter
61+ var ret int32
6262 return ret
6363 }
6464 return * o .ForgetAfter
6565}
6666
6767// GetForgetAfterOk returns a tuple with the ForgetAfter field value if set, nil otherwise
6868// and a boolean to check if the value has been set.
69- func (o * SecurityMonitoringRuleNewValueOptions ) GetForgetAfterOk () (* SecurityMonitoringRuleNewValueOptionsForgetAfter , bool ) {
69+ func (o * SecurityMonitoringRuleNewValueOptions ) GetForgetAfterOk () (* int32 , bool ) {
7070 if o == nil || o .ForgetAfter == nil {
7171 return nil , false
7272 }
@@ -78,8 +78,8 @@ func (o *SecurityMonitoringRuleNewValueOptions) HasForgetAfter() bool {
7878 return o != nil && o .ForgetAfter != nil
7979}
8080
81- // SetForgetAfter gets a reference to the given SecurityMonitoringRuleNewValueOptionsForgetAfter and assigns it to the ForgetAfter field.
82- func (o * SecurityMonitoringRuleNewValueOptions ) SetForgetAfter (v SecurityMonitoringRuleNewValueOptionsForgetAfter ) {
81+ // SetForgetAfter gets a reference to the given int32 and assigns it to the ForgetAfter field.
82+ func (o * SecurityMonitoringRuleNewValueOptions ) SetForgetAfter (v int32 ) {
8383 o .ForgetAfter = & v
8484}
8585
@@ -112,17 +112,17 @@ func (o *SecurityMonitoringRuleNewValueOptions) SetInstantaneousBaseline(v bool)
112112}
113113
114114// GetLearningDuration returns the LearningDuration field value if set, zero value otherwise.
115- func (o * SecurityMonitoringRuleNewValueOptions ) GetLearningDuration () SecurityMonitoringRuleNewValueOptionsLearningDuration {
115+ func (o * SecurityMonitoringRuleNewValueOptions ) GetLearningDuration () int32 {
116116 if o == nil || o .LearningDuration == nil {
117- var ret SecurityMonitoringRuleNewValueOptionsLearningDuration
117+ var ret int32
118118 return ret
119119 }
120120 return * o .LearningDuration
121121}
122122
123123// GetLearningDurationOk returns a tuple with the LearningDuration field value if set, nil otherwise
124124// and a boolean to check if the value has been set.
125- func (o * SecurityMonitoringRuleNewValueOptions ) GetLearningDurationOk () (* SecurityMonitoringRuleNewValueOptionsLearningDuration , bool ) {
125+ func (o * SecurityMonitoringRuleNewValueOptions ) GetLearningDurationOk () (* int32 , bool ) {
126126 if o == nil || o .LearningDuration == nil {
127127 return nil , false
128128 }
@@ -134,8 +134,8 @@ func (o *SecurityMonitoringRuleNewValueOptions) HasLearningDuration() bool {
134134 return o != nil && o .LearningDuration != nil
135135}
136136
137- // SetLearningDuration gets a reference to the given SecurityMonitoringRuleNewValueOptionsLearningDuration and assigns it to the LearningDuration field.
138- func (o * SecurityMonitoringRuleNewValueOptions ) SetLearningDuration (v SecurityMonitoringRuleNewValueOptionsLearningDuration ) {
137+ // SetLearningDuration gets a reference to the given int32 and assigns it to the LearningDuration field.
138+ func (o * SecurityMonitoringRuleNewValueOptions ) SetLearningDuration (v int32 ) {
139139 o .LearningDuration = & v
140140}
141141
@@ -226,9 +226,9 @@ func (o SecurityMonitoringRuleNewValueOptions) MarshalJSON() ([]byte, error) {
226226// UnmarshalJSON deserializes the given payload.
227227func (o * SecurityMonitoringRuleNewValueOptions ) UnmarshalJSON (bytes []byte ) (err error ) {
228228 all := struct {
229- ForgetAfter * SecurityMonitoringRuleNewValueOptionsForgetAfter `json:"forgetAfter,omitempty"`
229+ ForgetAfter * int32 `json:"forgetAfter,omitempty"`
230230 InstantaneousBaseline * bool `json:"instantaneousBaseline,omitempty"`
231- LearningDuration * SecurityMonitoringRuleNewValueOptionsLearningDuration `json:"learningDuration,omitempty"`
231+ LearningDuration * int32 `json:"learningDuration,omitempty"`
232232 LearningMethod * SecurityMonitoringRuleNewValueOptionsLearningMethod `json:"learningMethod,omitempty"`
233233 LearningThreshold * SecurityMonitoringRuleNewValueOptionsLearningThreshold `json:"learningThreshold,omitempty"`
234234 }{}
@@ -243,17 +243,9 @@ func (o *SecurityMonitoringRuleNewValueOptions) UnmarshalJSON(bytes []byte) (err
243243 }
244244
245245 hasInvalidField := false
246- if all .ForgetAfter != nil && ! all .ForgetAfter .IsValid () {
247- hasInvalidField = true
248- } else {
249- o .ForgetAfter = all .ForgetAfter
250- }
246+ o .ForgetAfter = all .ForgetAfter
251247 o .InstantaneousBaseline = all .InstantaneousBaseline
252- if all .LearningDuration != nil && ! all .LearningDuration .IsValid () {
253- hasInvalidField = true
254- } else {
255- o .LearningDuration = all .LearningDuration
256- }
248+ o .LearningDuration = all .LearningDuration
257249 if all .LearningMethod != nil && ! all .LearningMethod .IsValid () {
258250 hasInvalidField = true
259251 } else {
0 commit comments