datadog_api_client 2.37.0 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +20 -1
- data/.generator/schemas/v2/openapi.yaml +1083 -74
- data/CHANGELOG.md +20 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/lib/datadog_api_client/configuration.rb +59 -0
- data/lib/datadog_api_client/inflector.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/events_api.rb +8 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -0
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +41 -1
@@ -0,0 +1,105 @@
|
|
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
|
+
# Links to the event.
|
21
|
+
class EventCreateResponsePayloadLinks
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# The URL of the event. This link is only functional when using the default subdomain.
|
25
|
+
attr_accessor :_self
|
26
|
+
|
27
|
+
attr_accessor :additional_properties
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
# @!visibility private
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'_self' => :'self'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'_self' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
47
|
+
# @!visibility private
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventCreateResponsePayloadLinks` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
self.additional_properties = {}
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
self.additional_properties[k.to_sym] = v
|
58
|
+
else
|
59
|
+
h[k.to_sym] = v
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'_self')
|
64
|
+
self._self = attributes[:'_self']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
69
|
+
# @return [Hash] Returns the object in the form of hash
|
70
|
+
# @!visibility private
|
71
|
+
def to_hash
|
72
|
+
hash = {}
|
73
|
+
self.class.attribute_map.each_pair do |attr, param|
|
74
|
+
value = self.send(attr)
|
75
|
+
if value.nil?
|
76
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
77
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
78
|
+
end
|
79
|
+
|
80
|
+
hash[param] = _to_hash(value)
|
81
|
+
end
|
82
|
+
self.additional_properties.each_pair do |attr, value|
|
83
|
+
hash[attr] = value
|
84
|
+
end
|
85
|
+
hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param o [Object] Object to be compared
|
90
|
+
# @!visibility private
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
_self == o._self &&
|
95
|
+
additional_properties == o.additional_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
# @!visibility private
|
101
|
+
def hash
|
102
|
+
[_self, additional_properties].hash
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -21,32 +21,33 @@ module DatadogAPIClient::V2
|
|
21
21
|
class EventPayload
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
#
|
24
|
+
# A string used for aggregation when [correlating](https://docs.datadoghq.com/service_management/events/correlation/) events. If you specify a key, events are deduplicated to alerts based on this key. Limited to 100 characters.
|
25
25
|
attr_reader :aggregation_key
|
26
26
|
|
27
|
-
# JSON object for
|
27
|
+
# JSON object for category-specific attributes. Schema is different per event category.
|
28
28
|
attr_reader :attributes
|
29
29
|
|
30
|
-
# Event category
|
30
|
+
# Event category identifying the type of event.
|
31
31
|
attr_reader :category
|
32
32
|
|
33
|
-
#
|
33
|
+
# Integration ID sourced from integration manifests.
|
34
|
+
attr_accessor :integration_id
|
35
|
+
|
36
|
+
# Free formed text associated with the event. It's suggested to use `data.attributes.attributes.custom` for well-structured attributes. Limited to 4000 characters.
|
34
37
|
attr_reader :message
|
35
38
|
|
36
|
-
# A list of tags
|
39
|
+
# A list of tags associated with the event. Maximum of 100 tags allowed.
|
37
40
|
# Refer to [Tags docs](https://docs.datadoghq.com/getting_started/tagging/).
|
38
|
-
|
41
|
+
attr_reader :tags
|
39
42
|
|
40
43
|
# Timestamp when the event occurred. Must follow [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
41
44
|
# For example `"2017-01-15T01:30:15.010000Z"`.
|
42
45
|
# Defaults to the timestamp of receipt. Limited to values no older than 18 hours.
|
43
46
|
attr_accessor :timestamp
|
44
47
|
|
45
|
-
# The event
|
48
|
+
# The title of the event. Limited to 500 characters.
|
46
49
|
attr_reader :title
|
47
50
|
|
48
|
-
attr_accessor :additional_properties
|
49
|
-
|
50
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
52
|
# @!visibility private
|
52
53
|
def self.attribute_map
|
@@ -54,6 +55,7 @@ module DatadogAPIClient::V2
|
|
54
55
|
:'aggregation_key' => :'aggregation_key',
|
55
56
|
:'attributes' => :'attributes',
|
56
57
|
:'category' => :'category',
|
58
|
+
:'integration_id' => :'integration_id',
|
57
59
|
:'message' => :'message',
|
58
60
|
:'tags' => :'tags',
|
59
61
|
:'timestamp' => :'timestamp',
|
@@ -68,6 +70,7 @@ module DatadogAPIClient::V2
|
|
68
70
|
:'aggregation_key' => :'String',
|
69
71
|
:'attributes' => :'EventPayloadAttributes',
|
70
72
|
:'category' => :'EventCategory',
|
73
|
+
:'integration_id' => :'EventPayloadIntegrationId',
|
71
74
|
:'message' => :'String',
|
72
75
|
:'tags' => :'Array<String>',
|
73
76
|
:'timestamp' => :'String',
|
@@ -83,14 +86,12 @@ module DatadogAPIClient::V2
|
|
83
86
|
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EventPayload` initialize method"
|
84
87
|
end
|
85
88
|
|
86
|
-
self.additional_properties = {}
|
87
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
88
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
91
|
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
-
|
91
|
-
else
|
92
|
-
h[k.to_sym] = v
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::EventPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
93
|
end
|
94
|
+
h[k.to_sym] = v
|
94
95
|
}
|
95
96
|
|
96
97
|
if attributes.key?(:'aggregation_key')
|
@@ -105,6 +106,10 @@ module DatadogAPIClient::V2
|
|
105
106
|
self.category = attributes[:'category']
|
106
107
|
end
|
107
108
|
|
109
|
+
if attributes.key?(:'integration_id')
|
110
|
+
self.integration_id = attributes[:'integration_id']
|
111
|
+
end
|
112
|
+
|
108
113
|
if attributes.key?(:'message')
|
109
114
|
self.message = attributes[:'message']
|
110
115
|
end
|
@@ -129,11 +134,16 @@ module DatadogAPIClient::V2
|
|
129
134
|
# @!visibility private
|
130
135
|
def valid?
|
131
136
|
return false if !@aggregation_key.nil? && @aggregation_key.to_s.length > 100
|
137
|
+
return false if !@aggregation_key.nil? && @aggregation_key.to_s.length < 1
|
132
138
|
return false if @attributes.nil?
|
133
139
|
return false if @category.nil?
|
134
140
|
return false if !@message.nil? && @message.to_s.length > 4000
|
141
|
+
return false if !@message.nil? && @message.to_s.length < 1
|
142
|
+
return false if !@tags.nil? && @tags.length > 100
|
143
|
+
return false if !@tags.nil? && @tags.length < 1
|
135
144
|
return false if @title.nil?
|
136
145
|
return false if @title.to_s.length > 500
|
146
|
+
return false if @title.to_s.length < 1
|
137
147
|
true
|
138
148
|
end
|
139
149
|
|
@@ -144,6 +154,9 @@ module DatadogAPIClient::V2
|
|
144
154
|
if !aggregation_key.nil? && aggregation_key.to_s.length > 100
|
145
155
|
fail ArgumentError, 'invalid value for "aggregation_key", the character length must be smaller than or equal to 100.'
|
146
156
|
end
|
157
|
+
if !aggregation_key.nil? && aggregation_key.to_s.length < 1
|
158
|
+
fail ArgumentError, 'invalid value for "aggregation_key", the character length must be great than or equal to 1.'
|
159
|
+
end
|
147
160
|
@aggregation_key = aggregation_key
|
148
161
|
end
|
149
162
|
|
@@ -174,9 +187,25 @@ module DatadogAPIClient::V2
|
|
174
187
|
if !message.nil? && message.to_s.length > 4000
|
175
188
|
fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 4000.'
|
176
189
|
end
|
190
|
+
if !message.nil? && message.to_s.length < 1
|
191
|
+
fail ArgumentError, 'invalid value for "message", the character length must be great than or equal to 1.'
|
192
|
+
end
|
177
193
|
@message = message
|
178
194
|
end
|
179
195
|
|
196
|
+
# Custom attribute writer method with validation
|
197
|
+
# @param tags [Object] Object to be assigned
|
198
|
+
# @!visibility private
|
199
|
+
def tags=(tags)
|
200
|
+
if !tags.nil? && tags.length > 100
|
201
|
+
fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 100.'
|
202
|
+
end
|
203
|
+
if !tags.nil? && tags.length < 1
|
204
|
+
fail ArgumentError, 'invalid value for "tags", number of items must be greater than or equal to 1.'
|
205
|
+
end
|
206
|
+
@tags = tags
|
207
|
+
end
|
208
|
+
|
180
209
|
# Custom attribute writer method with validation
|
181
210
|
# @param title [Object] Object to be assigned
|
182
211
|
# @!visibility private
|
@@ -187,27 +216,10 @@ module DatadogAPIClient::V2
|
|
187
216
|
if title.to_s.length > 500
|
188
217
|
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 500.'
|
189
218
|
end
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
# Returns the object in the form of hash, with additionalProperties support.
|
194
|
-
# @return [Hash] Returns the object in the form of hash
|
195
|
-
# @!visibility private
|
196
|
-
def to_hash
|
197
|
-
hash = {}
|
198
|
-
self.class.attribute_map.each_pair do |attr, param|
|
199
|
-
value = self.send(attr)
|
200
|
-
if value.nil?
|
201
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
-
end
|
204
|
-
|
205
|
-
hash[param] = _to_hash(value)
|
206
|
-
end
|
207
|
-
self.additional_properties.each_pair do |attr, value|
|
208
|
-
hash[attr] = value
|
219
|
+
if title.to_s.length < 1
|
220
|
+
fail ArgumentError, 'invalid value for "title", the character length must be great than or equal to 1.'
|
209
221
|
end
|
210
|
-
|
222
|
+
@title = title
|
211
223
|
end
|
212
224
|
|
213
225
|
# Checks equality by comparing each attribute.
|
@@ -219,18 +231,18 @@ module DatadogAPIClient::V2
|
|
219
231
|
aggregation_key == o.aggregation_key &&
|
220
232
|
attributes == o.attributes &&
|
221
233
|
category == o.category &&
|
234
|
+
integration_id == o.integration_id &&
|
222
235
|
message == o.message &&
|
223
236
|
tags == o.tags &&
|
224
237
|
timestamp == o.timestamp &&
|
225
|
-
title == o.title
|
226
|
-
additional_properties == o.additional_properties
|
238
|
+
title == o.title
|
227
239
|
end
|
228
240
|
|
229
241
|
# Calculates hash code according to all attributes.
|
230
242
|
# @return [Integer] Hash code
|
231
243
|
# @!visibility private
|
232
244
|
def hash
|
233
|
-
[aggregation_key, attributes, category, message, tags, timestamp, title
|
245
|
+
[aggregation_key, attributes, category, integration_id, message, tags, timestamp, title].hash
|
234
246
|
end
|
235
247
|
end
|
236
248
|
end
|
@@ -17,7 +17,7 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
# JSON object for
|
20
|
+
# JSON object for category-specific attributes. Schema is different per event category.
|
21
21
|
module EventPayloadAttributes
|
22
22
|
class << self
|
23
23
|
include BaseOneOfModel
|
@@ -26,7 +26,8 @@ module DatadogAPIClient::V2
|
|
26
26
|
# List of class defined in oneOf (OpenAPI v3)
|
27
27
|
def openapi_one_of
|
28
28
|
[
|
29
|
-
:'ChangeEventCustomAttributes'
|
29
|
+
:'ChangeEventCustomAttributes',
|
30
|
+
:'AlertEventCustomAttributes'
|
30
31
|
]
|
31
32
|
end
|
32
33
|
# Builds the object
|
@@ -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
|
+
# Integration ID sourced from integration manifests.
|
21
|
+
class EventPayloadIntegrationId
|
22
|
+
include BaseEnumModel
|
23
|
+
|
24
|
+
CUSTOM_EVENTS = "custom-events".freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,105 @@
|
|
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 response object after getting an app key registration.
|
21
|
+
class GetAppKeyRegistrationResponse
|
22
|
+
include BaseGenericModel
|
23
|
+
|
24
|
+
# Data related to the app key registration.
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
attr_accessor :additional_properties
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
# @!visibility private
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'data' => :'data'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
# @!visibility private
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'data' => :'AppKeyRegistrationData'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
47
|
+
# @!visibility private
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetAppKeyRegistrationResponse` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
self.additional_properties = {}
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
self.additional_properties[k.to_sym] = v
|
58
|
+
else
|
59
|
+
h[k.to_sym] = v
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'data')
|
64
|
+
self.data = attributes[:'data']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
69
|
+
# @return [Hash] Returns the object in the form of hash
|
70
|
+
# @!visibility private
|
71
|
+
def to_hash
|
72
|
+
hash = {}
|
73
|
+
self.class.attribute_map.each_pair do |attr, param|
|
74
|
+
value = self.send(attr)
|
75
|
+
if value.nil?
|
76
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
77
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
78
|
+
end
|
79
|
+
|
80
|
+
hash[param] = _to_hash(value)
|
81
|
+
end
|
82
|
+
self.additional_properties.each_pair do |attr, value|
|
83
|
+
hash[attr] = value
|
84
|
+
end
|
85
|
+
hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param o [Object] Object to be compared
|
90
|
+
# @!visibility private
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
data == o.data &&
|
95
|
+
additional_properties == o.additional_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
# @!visibility private
|
101
|
+
def hash
|
102
|
+
[data, additional_properties].hash
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -36,6 +36,9 @@ module DatadogAPIClient::V2
|
|
36
36
|
# An array of initial timeline cells to be placed at the beginning of the incident timeline.
|
37
37
|
attr_accessor :initial_cells
|
38
38
|
|
39
|
+
# A flag indicating whether the incident is a test incident.
|
40
|
+
attr_accessor :is_test
|
41
|
+
|
39
42
|
# Notification handles that will be notified of the incident at creation.
|
40
43
|
attr_accessor :notification_handles
|
41
44
|
|
@@ -53,6 +56,7 @@ module DatadogAPIClient::V2
|
|
53
56
|
:'fields' => :'fields',
|
54
57
|
:'incident_type_uuid' => :'incident_type_uuid',
|
55
58
|
:'initial_cells' => :'initial_cells',
|
59
|
+
:'is_test' => :'is_test',
|
56
60
|
:'notification_handles' => :'notification_handles',
|
57
61
|
:'title' => :'title'
|
58
62
|
}
|
@@ -67,6 +71,7 @@ module DatadogAPIClient::V2
|
|
67
71
|
:'fields' => :'Hash<String, IncidentFieldAttributes>',
|
68
72
|
:'incident_type_uuid' => :'String',
|
69
73
|
:'initial_cells' => :'Array<IncidentTimelineCellCreateAttributes>',
|
74
|
+
:'is_test' => :'Boolean',
|
70
75
|
:'notification_handles' => :'Array<IncidentNotificationHandle>',
|
71
76
|
:'title' => :'String'
|
72
77
|
}
|
@@ -112,6 +117,10 @@ module DatadogAPIClient::V2
|
|
112
117
|
end
|
113
118
|
end
|
114
119
|
|
120
|
+
if attributes.key?(:'is_test')
|
121
|
+
self.is_test = attributes[:'is_test']
|
122
|
+
end
|
123
|
+
|
115
124
|
if attributes.key?(:'notification_handles')
|
116
125
|
if (value = attributes[:'notification_handles']).is_a?(Array)
|
117
126
|
self.notification_handles = value
|
@@ -183,6 +192,7 @@ module DatadogAPIClient::V2
|
|
183
192
|
fields == o.fields &&
|
184
193
|
incident_type_uuid == o.incident_type_uuid &&
|
185
194
|
initial_cells == o.initial_cells &&
|
195
|
+
is_test == o.is_test &&
|
186
196
|
notification_handles == o.notification_handles &&
|
187
197
|
title == o.title &&
|
188
198
|
additional_properties == o.additional_properties
|
@@ -192,7 +202,7 @@ module DatadogAPIClient::V2
|
|
192
202
|
# @return [Integer] Hash code
|
193
203
|
# @!visibility private
|
194
204
|
def hash
|
195
|
-
[customer_impact_scope, customer_impacted, fields, incident_type_uuid, initial_cells, notification_handles, title, additional_properties].hash
|
205
|
+
[customer_impact_scope, customer_impacted, fields, incident_type_uuid, initial_cells, is_test, notification_handles, title, additional_properties].hash
|
196
206
|
end
|
197
207
|
end
|
198
208
|
end
|
@@ -55,6 +55,9 @@ module DatadogAPIClient::V2
|
|
55
55
|
# A unique identifier that represents an incident type.
|
56
56
|
attr_accessor :incident_type_uuid
|
57
57
|
|
58
|
+
# A flag indicating whether the incident is a test incident.
|
59
|
+
attr_accessor :is_test
|
60
|
+
|
58
61
|
# Timestamp when the incident was last modified.
|
59
62
|
attr_accessor :modified
|
60
63
|
|
@@ -112,6 +115,7 @@ module DatadogAPIClient::V2
|
|
112
115
|
:'detected' => :'detected',
|
113
116
|
:'fields' => :'fields',
|
114
117
|
:'incident_type_uuid' => :'incident_type_uuid',
|
118
|
+
:'is_test' => :'is_test',
|
115
119
|
:'modified' => :'modified',
|
116
120
|
:'non_datadog_creator' => :'non_datadog_creator',
|
117
121
|
:'notification_handles' => :'notification_handles',
|
@@ -143,6 +147,7 @@ module DatadogAPIClient::V2
|
|
143
147
|
:'detected' => :'Time',
|
144
148
|
:'fields' => :'Hash<String, IncidentFieldAttributes>',
|
145
149
|
:'incident_type_uuid' => :'String',
|
150
|
+
:'is_test' => :'Boolean',
|
146
151
|
:'modified' => :'Time',
|
147
152
|
:'non_datadog_creator' => :'IncidentNonDatadogCreator',
|
148
153
|
:'notification_handles' => :'Array<IncidentNotificationHandle>',
|
@@ -239,6 +244,10 @@ module DatadogAPIClient::V2
|
|
239
244
|
self.incident_type_uuid = attributes[:'incident_type_uuid']
|
240
245
|
end
|
241
246
|
|
247
|
+
if attributes.key?(:'is_test')
|
248
|
+
self.is_test = attributes[:'is_test']
|
249
|
+
end
|
250
|
+
|
242
251
|
if attributes.key?(:'modified')
|
243
252
|
self.modified = attributes[:'modified']
|
244
253
|
end
|
@@ -349,6 +358,7 @@ module DatadogAPIClient::V2
|
|
349
358
|
detected == o.detected &&
|
350
359
|
fields == o.fields &&
|
351
360
|
incident_type_uuid == o.incident_type_uuid &&
|
361
|
+
is_test == o.is_test &&
|
352
362
|
modified == o.modified &&
|
353
363
|
non_datadog_creator == o.non_datadog_creator &&
|
354
364
|
notification_handles == o.notification_handles &&
|
@@ -369,7 +379,7 @@ module DatadogAPIClient::V2
|
|
369
379
|
# @return [Integer] Hash code
|
370
380
|
# @!visibility private
|
371
381
|
def hash
|
372
|
-
[archived, case_id, created, customer_impact_duration, customer_impact_end, customer_impact_scope, customer_impact_start, customer_impacted, detected, fields, incident_type_uuid, modified, non_datadog_creator, notification_handles, public_id, resolved, severity, state, time_to_detect, time_to_internal_response, time_to_repair, time_to_resolve, title, visibility, additional_properties].hash
|
382
|
+
[archived, case_id, created, customer_impact_duration, customer_impact_end, customer_impact_scope, customer_impact_start, customer_impacted, detected, fields, incident_type_uuid, is_test, modified, non_datadog_creator, notification_handles, public_id, resolved, severity, state, time_to_detect, time_to_internal_response, time_to_repair, time_to_resolve, title, visibility, additional_properties].hash
|
373
383
|
end
|
374
384
|
end
|
375
385
|
end
|
@@ -21,9 +21,6 @@ module DatadogAPIClient::V2
|
|
21
21
|
class JobDefinitionFromRule
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
# Index of the rule case applied by the job.
|
25
|
-
attr_reader :case_index
|
26
|
-
|
27
24
|
# Starting time of data analyzed by the job.
|
28
25
|
attr_reader :from
|
29
26
|
|
@@ -45,7 +42,6 @@ module DatadogAPIClient::V2
|
|
45
42
|
# @!visibility private
|
46
43
|
def self.attribute_map
|
47
44
|
{
|
48
|
-
:'case_index' => :'caseIndex',
|
49
45
|
:'from' => :'from',
|
50
46
|
:'id' => :'id',
|
51
47
|
:'index' => :'index',
|
@@ -58,7 +54,6 @@ module DatadogAPIClient::V2
|
|
58
54
|
# @!visibility private
|
59
55
|
def self.openapi_types
|
60
56
|
{
|
61
|
-
:'case_index' => :'Integer',
|
62
57
|
:'from' => :'Integer',
|
63
58
|
:'id' => :'String',
|
64
59
|
:'index' => :'String',
|
@@ -85,10 +80,6 @@ module DatadogAPIClient::V2
|
|
85
80
|
end
|
86
81
|
}
|
87
82
|
|
88
|
-
if attributes.key?(:'case_index')
|
89
|
-
self.case_index = attributes[:'case_index']
|
90
|
-
end
|
91
|
-
|
92
83
|
if attributes.key?(:'from')
|
93
84
|
self.from = attributes[:'from']
|
94
85
|
end
|
@@ -116,8 +107,6 @@ module DatadogAPIClient::V2
|
|
116
107
|
# @return true if the model is valid
|
117
108
|
# @!visibility private
|
118
109
|
def valid?
|
119
|
-
return false if @case_index.nil?
|
120
|
-
return false if @case_index > 9
|
121
110
|
return false if @from.nil?
|
122
111
|
return false if @id.nil?
|
123
112
|
return false if @index.nil?
|
@@ -125,19 +114,6 @@ module DatadogAPIClient::V2
|
|
125
114
|
true
|
126
115
|
end
|
127
116
|
|
128
|
-
# Custom attribute writer method with validation
|
129
|
-
# @param case_index [Object] Object to be assigned
|
130
|
-
# @!visibility private
|
131
|
-
def case_index=(case_index)
|
132
|
-
if case_index.nil?
|
133
|
-
fail ArgumentError, 'invalid value for "case_index", case_index cannot be nil.'
|
134
|
-
end
|
135
|
-
if case_index > 9
|
136
|
-
fail ArgumentError, 'invalid value for "case_index", must be smaller than or equal to 9.'
|
137
|
-
end
|
138
|
-
@case_index = case_index
|
139
|
-
end
|
140
|
-
|
141
117
|
# Custom attribute writer method with validation
|
142
118
|
# @param from [Object] Object to be assigned
|
143
119
|
# @!visibility private
|
@@ -204,7 +180,6 @@ module DatadogAPIClient::V2
|
|
204
180
|
def ==(o)
|
205
181
|
return true if self.equal?(o)
|
206
182
|
self.class == o.class &&
|
207
|
-
case_index == o.case_index &&
|
208
183
|
from == o.from &&
|
209
184
|
id == o.id &&
|
210
185
|
index == o.index &&
|
@@ -217,7 +192,7 @@ module DatadogAPIClient::V2
|
|
217
192
|
# @return [Integer] Hash code
|
218
193
|
# @!visibility private
|
219
194
|
def hash
|
220
|
-
[
|
195
|
+
[from, id, index, notifications, to, additional_properties].hash
|
221
196
|
end
|
222
197
|
end
|
223
198
|
end
|