datadog_api_client 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +558 -8
- data/.generator/schemas/v2/openapi.yaml +973 -253
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +3 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +26 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
- data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +1 -1
- data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
- data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
- data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
- data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -1
- data/lib/datadog_api_client/inflector.rb +51 -1
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
- data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
- data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
- data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
- data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
- data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
- data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
- data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
- data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +76 -8
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +65 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
- data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +70 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
@@ -0,0 +1,275 @@
|
|
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
|
+
# Create a new rule.
|
21
|
+
class SecurityMonitoringStandardRuleCreatePayload
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Cases for generating signals.
|
29
|
+
attr_accessor :cases
|
30
|
+
|
31
|
+
# Additional queries to filter matched events before they are processed.
|
32
|
+
attr_accessor :filters
|
33
|
+
|
34
|
+
# Whether the notifications include the triggering group-by values in their title.
|
35
|
+
attr_accessor :has_extended_title
|
36
|
+
|
37
|
+
# Whether the rule is enabled.
|
38
|
+
attr_accessor :is_enabled
|
39
|
+
|
40
|
+
# Message for generated signals.
|
41
|
+
attr_accessor :message
|
42
|
+
|
43
|
+
# The name of the rule.
|
44
|
+
attr_accessor :name
|
45
|
+
|
46
|
+
# Options on rules.
|
47
|
+
attr_accessor :options
|
48
|
+
|
49
|
+
# Queries for selecting logs which are part of the rule.
|
50
|
+
attr_accessor :queries
|
51
|
+
|
52
|
+
# Tags for generated signals.
|
53
|
+
attr_accessor :tags
|
54
|
+
|
55
|
+
# The rule type.
|
56
|
+
attr_accessor :type
|
57
|
+
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
59
|
+
# @!visibility private
|
60
|
+
def self.attribute_map
|
61
|
+
{
|
62
|
+
:'cases' => :'cases',
|
63
|
+
:'filters' => :'filters',
|
64
|
+
:'has_extended_title' => :'hasExtendedTitle',
|
65
|
+
:'is_enabled' => :'isEnabled',
|
66
|
+
:'message' => :'message',
|
67
|
+
:'name' => :'name',
|
68
|
+
:'options' => :'options',
|
69
|
+
:'queries' => :'queries',
|
70
|
+
:'tags' => :'tags',
|
71
|
+
:'type' => :'type'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
# @!visibility private
|
77
|
+
def self.acceptable_attributes
|
78
|
+
attribute_map.values
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute type mapping.
|
82
|
+
# @!visibility private
|
83
|
+
def self.openapi_types
|
84
|
+
{
|
85
|
+
:'cases' => :'Array<SecurityMonitoringRuleCaseCreate>',
|
86
|
+
:'filters' => :'Array<SecurityMonitoringFilter>',
|
87
|
+
:'has_extended_title' => :'Boolean',
|
88
|
+
:'is_enabled' => :'Boolean',
|
89
|
+
:'message' => :'String',
|
90
|
+
:'name' => :'String',
|
91
|
+
:'options' => :'SecurityMonitoringRuleOptions',
|
92
|
+
:'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
|
93
|
+
:'tags' => :'Array<String>',
|
94
|
+
:'type' => :'SecurityMonitoringRuleTypeCreate'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# List of attributes with nullable: true
|
99
|
+
# @!visibility private
|
100
|
+
def self.openapi_nullable
|
101
|
+
Set.new([
|
102
|
+
])
|
103
|
+
end
|
104
|
+
|
105
|
+
# Initializes the object
|
106
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
107
|
+
# @!visibility private
|
108
|
+
def initialize(attributes = {})
|
109
|
+
if (!attributes.is_a?(Hash))
|
110
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload` initialize method"
|
111
|
+
end
|
112
|
+
|
113
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
115
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
117
|
+
end
|
118
|
+
h[k.to_sym] = v
|
119
|
+
}
|
120
|
+
|
121
|
+
if attributes.key?(:'cases')
|
122
|
+
if (value = attributes[:'cases']).is_a?(Array)
|
123
|
+
self.cases = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'filters')
|
128
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
129
|
+
self.filters = value
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'has_extended_title')
|
134
|
+
self.has_extended_title = attributes[:'has_extended_title']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'is_enabled')
|
138
|
+
self.is_enabled = attributes[:'is_enabled']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'message')
|
142
|
+
self.message = attributes[:'message']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'name')
|
146
|
+
self.name = attributes[:'name']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'options')
|
150
|
+
self.options = attributes[:'options']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'queries')
|
154
|
+
if (value = attributes[:'queries']).is_a?(Array)
|
155
|
+
self.queries = value
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'tags')
|
160
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
161
|
+
self.tags = value
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'type')
|
166
|
+
self.type = attributes[:'type']
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Check to see if the all the properties in the model are valid
|
171
|
+
# @return true if the model is valid
|
172
|
+
# @!visibility private
|
173
|
+
def valid?
|
174
|
+
return false if @cases.nil?
|
175
|
+
return false if @is_enabled.nil?
|
176
|
+
return false if @message.nil?
|
177
|
+
return false if @name.nil?
|
178
|
+
return false if @options.nil?
|
179
|
+
return false if @queries.nil?
|
180
|
+
true
|
181
|
+
end
|
182
|
+
|
183
|
+
# Custom attribute writer method with validation
|
184
|
+
# @param cases [Object] Object to be assigned
|
185
|
+
# @!visibility private
|
186
|
+
def cases=(cases)
|
187
|
+
if cases.nil?
|
188
|
+
fail ArgumentError, 'invalid value for "cases", cases cannot be nil.'
|
189
|
+
end
|
190
|
+
@cases = cases
|
191
|
+
end
|
192
|
+
|
193
|
+
# Custom attribute writer method with validation
|
194
|
+
# @param is_enabled [Object] Object to be assigned
|
195
|
+
# @!visibility private
|
196
|
+
def is_enabled=(is_enabled)
|
197
|
+
if is_enabled.nil?
|
198
|
+
fail ArgumentError, 'invalid value for "is_enabled", is_enabled cannot be nil.'
|
199
|
+
end
|
200
|
+
@is_enabled = is_enabled
|
201
|
+
end
|
202
|
+
|
203
|
+
# Custom attribute writer method with validation
|
204
|
+
# @param message [Object] Object to be assigned
|
205
|
+
# @!visibility private
|
206
|
+
def message=(message)
|
207
|
+
if message.nil?
|
208
|
+
fail ArgumentError, 'invalid value for "message", message cannot be nil.'
|
209
|
+
end
|
210
|
+
@message = message
|
211
|
+
end
|
212
|
+
|
213
|
+
# Custom attribute writer method with validation
|
214
|
+
# @param name [Object] Object to be assigned
|
215
|
+
# @!visibility private
|
216
|
+
def name=(name)
|
217
|
+
if name.nil?
|
218
|
+
fail ArgumentError, 'invalid value for "name", name cannot be nil.'
|
219
|
+
end
|
220
|
+
@name = name
|
221
|
+
end
|
222
|
+
|
223
|
+
# Custom attribute writer method with validation
|
224
|
+
# @param options [Object] Object to be assigned
|
225
|
+
# @!visibility private
|
226
|
+
def options=(options)
|
227
|
+
if options.nil?
|
228
|
+
fail ArgumentError, 'invalid value for "options", options cannot be nil.'
|
229
|
+
end
|
230
|
+
@options = options
|
231
|
+
end
|
232
|
+
|
233
|
+
# Custom attribute writer method with validation
|
234
|
+
# @param queries [Object] Object to be assigned
|
235
|
+
# @!visibility private
|
236
|
+
def queries=(queries)
|
237
|
+
if queries.nil?
|
238
|
+
fail ArgumentError, 'invalid value for "queries", queries cannot be nil.'
|
239
|
+
end
|
240
|
+
@queries = queries
|
241
|
+
end
|
242
|
+
|
243
|
+
# Checks equality by comparing each attribute.
|
244
|
+
# @param o [Object] Object to be compared
|
245
|
+
# @!visibility private
|
246
|
+
def ==(o)
|
247
|
+
return true if self.equal?(o)
|
248
|
+
self.class == o.class &&
|
249
|
+
cases == o.cases &&
|
250
|
+
filters == o.filters &&
|
251
|
+
has_extended_title == o.has_extended_title &&
|
252
|
+
is_enabled == o.is_enabled &&
|
253
|
+
message == o.message &&
|
254
|
+
name == o.name &&
|
255
|
+
options == o.options &&
|
256
|
+
queries == o.queries &&
|
257
|
+
tags == o.tags &&
|
258
|
+
type == o.type
|
259
|
+
end
|
260
|
+
|
261
|
+
# @see the `==` method
|
262
|
+
# @param o [Object] Object to be compared
|
263
|
+
# @!visibility private
|
264
|
+
def eql?(o)
|
265
|
+
self == o
|
266
|
+
end
|
267
|
+
|
268
|
+
# Calculates hash code according to all attributes.
|
269
|
+
# @return [Integer] Hash code
|
270
|
+
# @!visibility private
|
271
|
+
def hash
|
272
|
+
[cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, type].hash
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
@@ -18,7 +18,7 @@ require 'time'
|
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
20
|
# Query for matching rule.
|
21
|
-
class
|
21
|
+
class SecurityMonitoringStandardRuleQuery
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
24
|
# Whether the object has unparsed attributes
|
@@ -93,13 +93,13 @@ module DatadogAPIClient::V2
|
|
93
93
|
# @!visibility private
|
94
94
|
def initialize(attributes = {})
|
95
95
|
if (!attributes.is_a?(Hash))
|
96
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery` initialize method"
|
97
97
|
end
|
98
98
|
|
99
99
|
# check to see if the attribute exists and convert string to symbol for hash key
|
100
100
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
101
101
|
if (!self.class.attribute_map.key?(k.to_sym))
|
102
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
103
103
|
end
|
104
104
|
h[k.to_sym] = v
|
105
105
|
}
|
@@ -0,0 +1,279 @@
|
|
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
|
+
# Rule.
|
21
|
+
class SecurityMonitoringStandardRuleResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Whether the object has unparsed attributes
|
25
|
+
# @!visibility private
|
26
|
+
attr_accessor :_unparsed
|
27
|
+
|
28
|
+
# Cases for generating signals.
|
29
|
+
attr_accessor :cases
|
30
|
+
|
31
|
+
# When the rule was created, timestamp in milliseconds.
|
32
|
+
attr_accessor :created_at
|
33
|
+
|
34
|
+
# User ID of the user who created the rule.
|
35
|
+
attr_accessor :creation_author_id
|
36
|
+
|
37
|
+
# Additional queries to filter matched events before they are processed.
|
38
|
+
attr_accessor :filters
|
39
|
+
|
40
|
+
# Whether the notifications include the triggering group-by values in their title.
|
41
|
+
attr_accessor :has_extended_title
|
42
|
+
|
43
|
+
# The ID of the rule.
|
44
|
+
attr_accessor :id
|
45
|
+
|
46
|
+
# Whether the rule is included by default.
|
47
|
+
attr_accessor :is_default
|
48
|
+
|
49
|
+
# Whether the rule has been deleted.
|
50
|
+
attr_accessor :is_deleted
|
51
|
+
|
52
|
+
# Whether the rule is enabled.
|
53
|
+
attr_accessor :is_enabled
|
54
|
+
|
55
|
+
# Message for generated signals.
|
56
|
+
attr_accessor :message
|
57
|
+
|
58
|
+
# The name of the rule.
|
59
|
+
attr_accessor :name
|
60
|
+
|
61
|
+
# Options on rules.
|
62
|
+
attr_accessor :options
|
63
|
+
|
64
|
+
# Queries for selecting logs which are part of the rule.
|
65
|
+
attr_accessor :queries
|
66
|
+
|
67
|
+
# Tags for generated signals.
|
68
|
+
attr_accessor :tags
|
69
|
+
|
70
|
+
# The rule type.
|
71
|
+
attr_accessor :type
|
72
|
+
|
73
|
+
# User ID of the user who updated the rule.
|
74
|
+
attr_accessor :update_author_id
|
75
|
+
|
76
|
+
# The version of the rule.
|
77
|
+
attr_accessor :version
|
78
|
+
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
80
|
+
# @!visibility private
|
81
|
+
def self.attribute_map
|
82
|
+
{
|
83
|
+
:'cases' => :'cases',
|
84
|
+
:'created_at' => :'createdAt',
|
85
|
+
:'creation_author_id' => :'creationAuthorId',
|
86
|
+
:'filters' => :'filters',
|
87
|
+
:'has_extended_title' => :'hasExtendedTitle',
|
88
|
+
:'id' => :'id',
|
89
|
+
:'is_default' => :'isDefault',
|
90
|
+
:'is_deleted' => :'isDeleted',
|
91
|
+
:'is_enabled' => :'isEnabled',
|
92
|
+
:'message' => :'message',
|
93
|
+
:'name' => :'name',
|
94
|
+
:'options' => :'options',
|
95
|
+
:'queries' => :'queries',
|
96
|
+
:'tags' => :'tags',
|
97
|
+
:'type' => :'type',
|
98
|
+
:'update_author_id' => :'updateAuthorId',
|
99
|
+
:'version' => :'version'
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
# Returns all the JSON keys this model knows about
|
104
|
+
# @!visibility private
|
105
|
+
def self.acceptable_attributes
|
106
|
+
attribute_map.values
|
107
|
+
end
|
108
|
+
|
109
|
+
# Attribute type mapping.
|
110
|
+
# @!visibility private
|
111
|
+
def self.openapi_types
|
112
|
+
{
|
113
|
+
:'cases' => :'Array<SecurityMonitoringRuleCase>',
|
114
|
+
:'created_at' => :'Integer',
|
115
|
+
:'creation_author_id' => :'Integer',
|
116
|
+
:'filters' => :'Array<SecurityMonitoringFilter>',
|
117
|
+
:'has_extended_title' => :'Boolean',
|
118
|
+
:'id' => :'String',
|
119
|
+
:'is_default' => :'Boolean',
|
120
|
+
:'is_deleted' => :'Boolean',
|
121
|
+
:'is_enabled' => :'Boolean',
|
122
|
+
:'message' => :'String',
|
123
|
+
:'name' => :'String',
|
124
|
+
:'options' => :'SecurityMonitoringRuleOptions',
|
125
|
+
:'queries' => :'Array<SecurityMonitoringStandardRuleQuery>',
|
126
|
+
:'tags' => :'Array<String>',
|
127
|
+
:'type' => :'SecurityMonitoringRuleTypeRead',
|
128
|
+
:'update_author_id' => :'Integer',
|
129
|
+
:'version' => :'Integer'
|
130
|
+
}
|
131
|
+
end
|
132
|
+
|
133
|
+
# List of attributes with nullable: true
|
134
|
+
# @!visibility private
|
135
|
+
def self.openapi_nullable
|
136
|
+
Set.new([
|
137
|
+
])
|
138
|
+
end
|
139
|
+
|
140
|
+
# Initializes the object
|
141
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
142
|
+
# @!visibility private
|
143
|
+
def initialize(attributes = {})
|
144
|
+
if (!attributes.is_a?(Hash))
|
145
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleResponse` initialize method"
|
146
|
+
end
|
147
|
+
|
148
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
149
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
150
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
151
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringStandardRuleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
152
|
+
end
|
153
|
+
h[k.to_sym] = v
|
154
|
+
}
|
155
|
+
|
156
|
+
if attributes.key?(:'cases')
|
157
|
+
if (value = attributes[:'cases']).is_a?(Array)
|
158
|
+
self.cases = value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'created_at')
|
163
|
+
self.created_at = attributes[:'created_at']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'creation_author_id')
|
167
|
+
self.creation_author_id = attributes[:'creation_author_id']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'filters')
|
171
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
172
|
+
self.filters = value
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.key?(:'has_extended_title')
|
177
|
+
self.has_extended_title = attributes[:'has_extended_title']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.key?(:'id')
|
181
|
+
self.id = attributes[:'id']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'is_default')
|
185
|
+
self.is_default = attributes[:'is_default']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.key?(:'is_deleted')
|
189
|
+
self.is_deleted = attributes[:'is_deleted']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.key?(:'is_enabled')
|
193
|
+
self.is_enabled = attributes[:'is_enabled']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.key?(:'message')
|
197
|
+
self.message = attributes[:'message']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'name')
|
201
|
+
self.name = attributes[:'name']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'options')
|
205
|
+
self.options = attributes[:'options']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'queries')
|
209
|
+
if (value = attributes[:'queries']).is_a?(Array)
|
210
|
+
self.queries = value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'tags')
|
215
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
216
|
+
self.tags = value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'type')
|
221
|
+
self.type = attributes[:'type']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'update_author_id')
|
225
|
+
self.update_author_id = attributes[:'update_author_id']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'version')
|
229
|
+
self.version = attributes[:'version']
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Check to see if the all the properties in the model are valid
|
234
|
+
# @return true if the model is valid
|
235
|
+
# @!visibility private
|
236
|
+
def valid?
|
237
|
+
true
|
238
|
+
end
|
239
|
+
|
240
|
+
# Checks equality by comparing each attribute.
|
241
|
+
# @param o [Object] Object to be compared
|
242
|
+
# @!visibility private
|
243
|
+
def ==(o)
|
244
|
+
return true if self.equal?(o)
|
245
|
+
self.class == o.class &&
|
246
|
+
cases == o.cases &&
|
247
|
+
created_at == o.created_at &&
|
248
|
+
creation_author_id == o.creation_author_id &&
|
249
|
+
filters == o.filters &&
|
250
|
+
has_extended_title == o.has_extended_title &&
|
251
|
+
id == o.id &&
|
252
|
+
is_default == o.is_default &&
|
253
|
+
is_deleted == o.is_deleted &&
|
254
|
+
is_enabled == o.is_enabled &&
|
255
|
+
message == o.message &&
|
256
|
+
name == o.name &&
|
257
|
+
options == o.options &&
|
258
|
+
queries == o.queries &&
|
259
|
+
tags == o.tags &&
|
260
|
+
type == o.type &&
|
261
|
+
update_author_id == o.update_author_id &&
|
262
|
+
version == o.version
|
263
|
+
end
|
264
|
+
|
265
|
+
# @see the `==` method
|
266
|
+
# @param o [Object] Object to be compared
|
267
|
+
# @!visibility private
|
268
|
+
def eql?(o)
|
269
|
+
self == o
|
270
|
+
end
|
271
|
+
|
272
|
+
# Calculates hash code according to all attributes.
|
273
|
+
# @return [Integer] Hash code
|
274
|
+
# @!visibility private
|
275
|
+
def hash
|
276
|
+
[cases, created_at, creation_author_id, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|