Skip to content

Commit 35d30fa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 35f2099e of spec repo
1 parent 69a68f9 commit 35d30fa

File tree

6 files changed

+53
-93
lines changed

6 files changed

+53
-93
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-02-26 17:41:50.428929",
8-
"spec_repo_commit": "e04872fb"
7+
"regenerated": "2025-02-27 09:33:28.744212",
8+
"spec_repo_commit": "35f2099e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-26 17:41:50.444059",
13-
"spec_repo_commit": "e04872fb"
12+
"regenerated": "2025-02-27 09:33:28.759387",
13+
"spec_repo_commit": "35f2099e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25239,39 +25239,23 @@ components:
2523925239
type: object
2524025240
SecurityMonitoringRuleNewValueOptionsForgetAfter:
2524125241
description: The duration in days after which a learned value is forgotten.
25242-
enum:
25243-
- 1
25244-
- 2
25245-
- 7
25246-
- 14
25247-
- 21
25248-
- 28
2524925242
format: int32
25243+
maximum: 30
25244+
minimum: 1
2525025245
type: integer
25251-
x-enum-varnames:
25252-
- ONE_DAY
25253-
- TWO_DAYS
25254-
- ONE_WEEK
25255-
- TWO_WEEKS
25256-
- THREE_WEEKS
25257-
- FOUR_WEEKS
2525825246
SecurityMonitoringRuleNewValueOptionsLearningDuration:
2525925247
default: 0
2526025248
description: 'The duration in days during which values are learned, and after
2526125249
which signals will be generated for values that
2526225250

2526325251
weren''t learned. If set to 0, a signal will be generated for all new values
25264-
after the first value is learned.'
25265-
enum:
25266-
- 0
25267-
- 1
25268-
- 7
25252+
after the first value is learned.
25253+
25254+
The value must be between 0 and 30 (inclusive).'
2526925255
format: int32
25256+
maximum: 30
25257+
minimum: 0
2527025258
type: integer
25271-
x-enum-varnames:
25272-
- ZERO_DAYS
25273-
- ONE_DAY
25274-
- SEVEN_DAYS
2527525259
SecurityMonitoringRuleNewValueOptionsLearningMethod:
2527625260
default: duration
2527725261
description: The learning method used to determine when signals should be generated

lib/datadog_api_client/inflector.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,8 +2501,6 @@ def overrides
25012501
"v2.security_monitoring_rule_keep_alive" => "SecurityMonitoringRuleKeepAlive",
25022502
"v2.security_monitoring_rule_max_signal_duration" => "SecurityMonitoringRuleMaxSignalDuration",
25032503
"v2.security_monitoring_rule_new_value_options" => "SecurityMonitoringRuleNewValueOptions",
2504-
"v2.security_monitoring_rule_new_value_options_forget_after" => "SecurityMonitoringRuleNewValueOptionsForgetAfter",
2505-
"v2.security_monitoring_rule_new_value_options_learning_duration" => "SecurityMonitoringRuleNewValueOptionsLearningDuration",
25062504
"v2.security_monitoring_rule_new_value_options_learning_method" => "SecurityMonitoringRuleNewValueOptionsLearningMethod",
25072505
"v2.security_monitoring_rule_new_value_options_learning_threshold" => "SecurityMonitoringRuleNewValueOptionsLearningThreshold",
25082506
"v2.security_monitoring_rule_options" => "SecurityMonitoringRuleOptions",

lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ class SecurityMonitoringRuleNewValueOptions
2222
include BaseGenericModel
2323

2424
# The duration in days after which a learned value is forgotten.
25-
attr_accessor :forget_after
25+
attr_reader :forget_after
2626

2727
# The duration in days during which values are learned, and after which signals will be generated for values that
2828
# weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned.
29-
attr_accessor :learning_duration
29+
# The value must be between 0 and 30 (inclusive).
30+
attr_reader :learning_duration
3031

3132
# The learning method used to determine when signals should be generated for values that weren't learned.
3233
attr_accessor :learning_method
@@ -51,8 +52,8 @@ def self.attribute_map
5152
# @!visibility private
5253
def self.openapi_types
5354
{
54-
:'forget_after' => :'SecurityMonitoringRuleNewValueOptionsForgetAfter',
55-
:'learning_duration' => :'SecurityMonitoringRuleNewValueOptionsLearningDuration',
55+
:'forget_after' => :'Integer',
56+
:'learning_duration' => :'Integer',
5657
:'learning_method' => :'SecurityMonitoringRuleNewValueOptionsLearningMethod',
5758
:'learning_threshold' => :'SecurityMonitoringRuleNewValueOptionsLearningThreshold'
5859
}
@@ -93,6 +94,43 @@ def initialize(attributes = {})
9394
end
9495
end
9596

97+
# Check to see if the all the properties in the model are valid
98+
# @return true if the model is valid
99+
# @!visibility private
100+
def valid?
101+
return false if !@forget_after.nil? && @forget_after > 30
102+
return false if !@forget_after.nil? && @forget_after < 1
103+
return false if !@learning_duration.nil? && @learning_duration > 30
104+
return false if !@learning_duration.nil? && @learning_duration < 0
105+
true
106+
end
107+
108+
# Custom attribute writer method with validation
109+
# @param forget_after [Object] Object to be assigned
110+
# @!visibility private
111+
def forget_after=(forget_after)
112+
if !forget_after.nil? && forget_after > 30
113+
fail ArgumentError, 'invalid value for "forget_after", must be smaller than or equal to 30.'
114+
end
115+
if !forget_after.nil? && forget_after < 1
116+
fail ArgumentError, 'invalid value for "forget_after", must be greater than or equal to 1.'
117+
end
118+
@forget_after = forget_after
119+
end
120+
121+
# Custom attribute writer method with validation
122+
# @param learning_duration [Object] Object to be assigned
123+
# @!visibility private
124+
def learning_duration=(learning_duration)
125+
if !learning_duration.nil? && learning_duration > 30
126+
fail ArgumentError, 'invalid value for "learning_duration", must be smaller than or equal to 30.'
127+
end
128+
if !learning_duration.nil? && learning_duration < 0
129+
fail ArgumentError, 'invalid value for "learning_duration", must be greater than or equal to 0.'
130+
end
131+
@learning_duration = learning_duration
132+
end
133+
96134
# Returns the object in the form of hash, with additionalProperties support.
97135
# @return [Hash] Returns the object in the form of hash
98136
# @!visibility private

lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb

Lines changed: 0 additions & 31 deletions
This file was deleted.

lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)