datadog_api_client 2.19.0 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +97 -44
  4. data/.generator/schemas/v2/openapi.yaml +704 -42
  5. data/.generator/src/generator/templates/api.j2 +5 -5
  6. data/CHANGELOG.md +20 -0
  7. data/examples/v1/logs-indexes/CreateLogsIndex.rb +5 -0
  8. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +5 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +1 -1
  10. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  11. data/examples/v1/synthetics/TriggerCITests.rb +1 -1
  12. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -1
  13. data/examples/v1/usage-metering/GetUsageLambda.rb +5 -2
  14. data/examples/v2/api-management/CreateOpenAPI.rb +11 -0
  15. data/examples/v2/api-management/DeleteOpenAPI.rb +11 -0
  16. data/examples/v2/api-management/GetOpenAPI.rb +11 -0
  17. data/examples/v2/api-management/UpdateOpenAPI.rb +14 -0
  18. data/examples/v2/okta-integration/CreateOktaAccount.rb +1 -1
  19. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +19 -0
  20. data/examples/v2/security-monitoring/DeleteSecurityMonitoringSuppression.rb +8 -0
  21. data/examples/v2/security-monitoring/GetSecurityMonitoringSuppression.rb +8 -0
  22. data/examples/v2/security-monitoring/ListSecurityMonitoringSuppressions.rb +5 -0
  23. data/examples/v2/security-monitoring/UpdateSecurityMonitoringSuppression.rb +17 -0
  24. data/examples/v2/teams/GetTeamMemberships_3799131168.rb +8 -0
  25. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +1 -1
  26. data/lib/datadog_api_client/configuration.rb +4 -0
  27. data/lib/datadog_api_client/inflector.rb +22 -0
  28. data/lib/datadog_api_client/v1/api/organizations_api.rb +1 -1
  29. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  30. data/lib/datadog_api_client/v1/models/dashboard.rb +5 -1
  31. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +2 -0
  32. data/lib/datadog_api_client/v1/models/log.rb +1 -1
  33. data/lib/datadog_api_client/v1/models/logs_daily_limit_reset.rb +90 -0
  34. data/lib/datadog_api_client/v1/models/logs_index.rb +36 -1
  35. data/lib/datadog_api_client/v1/models/logs_index_update_request.rb +36 -1
  36. data/lib/datadog_api_client/v1/models/metrics_payload.rb +1 -1
  37. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -1
  38. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +1 -1
  39. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +1 -1
  40. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +1 -1
  41. data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +2 -2
  42. data/lib/datadog_api_client/v1/models/slo_history_metrics_series.rb +1 -1
  43. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
  44. data/lib/datadog_api_client/v1/models/slo_history_sli_data.rb +1 -1
  45. data/lib/datadog_api_client/v1/models/split_config.rb +6 -6
  46. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/usage_lambda_hour.rb +1 -1
  48. data/lib/datadog_api_client/v1/models/usage_lambda_response.rb +1 -1
  49. data/lib/datadog_api_client/v2/api/api_management_api.rb +319 -0
  50. data/lib/datadog_api_client/v2/api/organizations_api.rb +1 -1
  51. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +329 -0
  52. data/lib/datadog_api_client/v2/api/teams_api.rb +22 -0
  53. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  54. data/lib/datadog_api_client/v2/models/create_open_api_response.rb +80 -0
  55. data/lib/datadog_api_client/v2/models/create_open_api_response_attributes.rb +82 -0
  56. data/lib/datadog_api_client/v2/models/create_open_api_response_data.rb +90 -0
  57. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  58. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +11 -1
  59. data/lib/datadog_api_client/v2/models/metric_payload.rb +1 -1
  60. data/lib/datadog_api_client/v2/models/open_api_endpoint.rb +90 -0
  61. data/lib/datadog_api_client/v2/models/open_api_file.rb +80 -0
  62. data/lib/datadog_api_client/v2/models/security_monitoring_suppression.rb +100 -0
  63. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +198 -0
  64. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +181 -0
  65. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_data.rb +119 -0
  66. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_request.rb +98 -0
  67. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_response.rb +80 -0
  68. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_type.rb +26 -0
  69. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +166 -0
  70. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_data.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_request.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/security_monitoring_suppressions_response.rb +82 -0
  73. data/lib/datadog_api_client/v2/models/security_monitoring_user.rb +98 -0
  74. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +1 -1
  75. data/lib/datadog_api_client/v2/models/update_open_api_response.rb +80 -0
  76. data/lib/datadog_api_client/v2/models/update_open_api_response_attributes.rb +82 -0
  77. data/lib/datadog_api_client/v2/models/update_open_api_response_data.rb +90 -0
  78. data/lib/datadog_api_client/version.rb +1 -1
  79. metadata +34 -3
  80. data/examples/v1/usage-metering/GetUsageLambda_3132428705.rb +0 -8
@@ -0,0 +1,181 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Object containing the attributes of the suppression rule to be created.
21
+ class SecurityMonitoringSuppressionCreateAttributes
22
+ include BaseGenericModel
23
+
24
+ # A description for the suppression rule.
25
+ attr_accessor :description
26
+
27
+ # Whether the suppression rule is enabled.
28
+ attr_reader :enabled
29
+
30
+ # A Unix millisecond timestamp giving an expiration date for the suppression rule. After this date, it won't suppress signals anymore.
31
+ attr_accessor :expiration_date
32
+
33
+ # The name of the suppression rule.
34
+ attr_reader :name
35
+
36
+ # The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
37
+ attr_reader :rule_query
38
+
39
+ # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered . Same syntax as the queries to search signals in the signal explorer.
40
+ attr_reader :suppression_query
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ # @!visibility private
44
+ def self.attribute_map
45
+ {
46
+ :'description' => :'description',
47
+ :'enabled' => :'enabled',
48
+ :'expiration_date' => :'expiration_date',
49
+ :'name' => :'name',
50
+ :'rule_query' => :'rule_query',
51
+ :'suppression_query' => :'suppression_query'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ # @!visibility private
57
+ def self.openapi_types
58
+ {
59
+ :'description' => :'String',
60
+ :'enabled' => :'Boolean',
61
+ :'expiration_date' => :'Integer',
62
+ :'name' => :'String',
63
+ :'rule_query' => :'String',
64
+ :'suppression_query' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param attributes [Hash] Model attributes in the form of hash
70
+ # @!visibility private
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'description')
85
+ self.description = attributes[:'description']
86
+ end
87
+
88
+ if attributes.key?(:'enabled')
89
+ self.enabled = attributes[:'enabled']
90
+ end
91
+
92
+ if attributes.key?(:'expiration_date')
93
+ self.expiration_date = attributes[:'expiration_date']
94
+ end
95
+
96
+ if attributes.key?(:'name')
97
+ self.name = attributes[:'name']
98
+ end
99
+
100
+ if attributes.key?(:'rule_query')
101
+ self.rule_query = attributes[:'rule_query']
102
+ end
103
+
104
+ if attributes.key?(:'suppression_query')
105
+ self.suppression_query = attributes[:'suppression_query']
106
+ end
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ # @!visibility private
112
+ def valid?
113
+ return false if @enabled.nil?
114
+ return false if @name.nil?
115
+ return false if @rule_query.nil?
116
+ return false if @suppression_query.nil?
117
+ true
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param enabled [Object] Object to be assigned
122
+ # @!visibility private
123
+ def enabled=(enabled)
124
+ if enabled.nil?
125
+ fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
126
+ end
127
+ @enabled = enabled
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param name [Object] Object to be assigned
132
+ # @!visibility private
133
+ def name=(name)
134
+ if name.nil?
135
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
136
+ end
137
+ @name = name
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param rule_query [Object] Object to be assigned
142
+ # @!visibility private
143
+ def rule_query=(rule_query)
144
+ if rule_query.nil?
145
+ fail ArgumentError, 'invalid value for "rule_query", rule_query cannot be nil.'
146
+ end
147
+ @rule_query = rule_query
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param suppression_query [Object] Object to be assigned
152
+ # @!visibility private
153
+ def suppression_query=(suppression_query)
154
+ if suppression_query.nil?
155
+ fail ArgumentError, 'invalid value for "suppression_query", suppression_query cannot be nil.'
156
+ end
157
+ @suppression_query = suppression_query
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param o [Object] Object to be compared
162
+ # @!visibility private
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ description == o.description &&
167
+ enabled == o.enabled &&
168
+ expiration_date == o.expiration_date &&
169
+ name == o.name &&
170
+ rule_query == o.rule_query &&
171
+ suppression_query == o.suppression_query
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ # @!visibility private
177
+ def hash
178
+ [description, enabled, expiration_date, name, rule_query, suppression_query].hash
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,119 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Object for a single suppression rule.
21
+ class SecurityMonitoringSuppressionCreateData
22
+ include BaseGenericModel
23
+
24
+ # Object containing the attributes of the suppression rule to be created.
25
+ attr_reader :attributes
26
+
27
+ # The type of the resource. The value should always be `suppressions`.
28
+ attr_reader :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'SecurityMonitoringSuppressionCreateAttributes',
44
+ :'type' => :'SecurityMonitoringSuppressionType'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ # @!visibility private
76
+ def valid?
77
+ return false if @attributes.nil?
78
+ return false if @type.nil?
79
+ true
80
+ end
81
+
82
+ # Custom attribute writer method with validation
83
+ # @param attributes [Object] Object to be assigned
84
+ # @!visibility private
85
+ def attributes=(attributes)
86
+ if attributes.nil?
87
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
88
+ end
89
+ @attributes = attributes
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param type [Object] Object to be assigned
94
+ # @!visibility private
95
+ def type=(type)
96
+ if type.nil?
97
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
98
+ end
99
+ @type = type
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param o [Object] Object to be compared
104
+ # @!visibility private
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ attributes == o.attributes &&
109
+ type == o.type
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ # @!visibility private
115
+ def hash
116
+ [attributes, type].hash
117
+ end
118
+ end
119
+ end
@@ -0,0 +1,98 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Request object that includes the suppression rule that you would like to create.
21
+ class SecurityMonitoringSuppressionCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # Object for a single suppression rule.
25
+ attr_reader :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'SecurityMonitoringSuppressionCreateData'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ # @!visibility private
67
+ def valid?
68
+ return false if @data.nil?
69
+ true
70
+ end
71
+
72
+ # Custom attribute writer method with validation
73
+ # @param data [Object] Object to be assigned
74
+ # @!visibility private
75
+ def data=(data)
76
+ if data.nil?
77
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
78
+ end
79
+ @data = data
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ data == o.data
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [data].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,80 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Response object containing a single suppression rule.
21
+ class SecurityMonitoringSuppressionResponse
22
+ include BaseGenericModel
23
+
24
+ # The suppression rule's properties.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'SecurityMonitoringSuppression'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionResponse` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The type of the resource. The value should always be `suppressions`.
21
+ class SecurityMonitoringSuppressionType
22
+ include BaseEnumModel
23
+
24
+ SUPPRESSIONS = "suppressions".freeze
25
+ end
26
+ end
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The suppression rule properties to be updated.
21
+ class SecurityMonitoringSuppressionUpdateAttributes
22
+ include BaseGenericModel
23
+
24
+ # A description for the suppression rule.
25
+ attr_accessor :description
26
+
27
+ # Whether the suppression rule is enabled.
28
+ attr_accessor :enabled
29
+
30
+ # A Unix millisecond timestamp giving an expiration date for the suppression rule. After this date, it won't suppress signals anymore. If unset, the expiration date of the suppression rule is left untouched. If set to `null`, the expiration date is removed.
31
+ attr_accessor :expiration_date
32
+
33
+ # The name of the suppression rule.
34
+ attr_accessor :name
35
+
36
+ # The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
37
+ attr_accessor :rule_query
38
+
39
+ # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
40
+ attr_accessor :suppression_query
41
+
42
+ # The current version of the suppression. This is optional, but it can help prevent concurrent modifications.
43
+ attr_reader :version
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ # @!visibility private
47
+ def self.attribute_map
48
+ {
49
+ :'description' => :'description',
50
+ :'enabled' => :'enabled',
51
+ :'expiration_date' => :'expiration_date',
52
+ :'name' => :'name',
53
+ :'rule_query' => :'rule_query',
54
+ :'suppression_query' => :'suppression_query',
55
+ :'version' => :'version'
56
+ }
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ # @!visibility private
61
+ def self.openapi_types
62
+ {
63
+ :'description' => :'String',
64
+ :'enabled' => :'Boolean',
65
+ :'expiration_date' => :'Integer',
66
+ :'name' => :'String',
67
+ :'rule_query' => :'String',
68
+ :'suppression_query' => :'String',
69
+ :'version' => :'Integer'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ # @!visibility private
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ :'expiration_date',
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param attributes [Hash] Model attributes in the form of hash
83
+ # @!visibility private
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateAttributes` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!self.class.attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringSuppressionUpdateAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'description')
98
+ self.description = attributes[:'description']
99
+ end
100
+
101
+ if attributes.key?(:'enabled')
102
+ self.enabled = attributes[:'enabled']
103
+ end
104
+
105
+ if attributes.key?(:'expiration_date')
106
+ self.expiration_date = attributes[:'expiration_date']
107
+ end
108
+
109
+ if attributes.key?(:'name')
110
+ self.name = attributes[:'name']
111
+ end
112
+
113
+ if attributes.key?(:'rule_query')
114
+ self.rule_query = attributes[:'rule_query']
115
+ end
116
+
117
+ if attributes.key?(:'suppression_query')
118
+ self.suppression_query = attributes[:'suppression_query']
119
+ end
120
+
121
+ if attributes.key?(:'version')
122
+ self.version = attributes[:'version']
123
+ end
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ # @!visibility private
129
+ def valid?
130
+ return false if !@version.nil? && @version > 2147483647
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method with validation
135
+ # @param version [Object] Object to be assigned
136
+ # @!visibility private
137
+ def version=(version)
138
+ if !version.nil? && version > 2147483647
139
+ fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.'
140
+ end
141
+ @version = version
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param o [Object] Object to be compared
146
+ # @!visibility private
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ description == o.description &&
151
+ enabled == o.enabled &&
152
+ expiration_date == o.expiration_date &&
153
+ name == o.name &&
154
+ rule_query == o.rule_query &&
155
+ suppression_query == o.suppression_query &&
156
+ version == o.version
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ # @!visibility private
162
+ def hash
163
+ [description, enabled, expiration_date, name, rule_query, suppression_query, version].hash
164
+ end
165
+ end
166
+ end