datadog_api_client 2.41.0 → 2.42.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/.generator/schemas/v1/openapi.yaml +69 -8
- data/.generator/schemas/v2/openapi.yaml +1568 -40
- data/CHANGELOG.md +15 -0
- data/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb +24 -0
- data/examples/v2/actions-datastores/CreateDatastore.rb +15 -0
- data/examples/v2/actions-datastores/DeleteDatastore.rb +8 -0
- data/examples/v2/actions-datastores/DeleteDatastoreItem.rb +17 -0
- data/examples/v2/actions-datastores/GetDatastore.rb +8 -0
- data/examples/v2/actions-datastores/ListDatastoreItems.rb +8 -0
- data/examples/v2/actions-datastores/ListDatastores.rb +5 -0
- data/examples/v2/actions-datastores/UpdateDatastore.rb +18 -0
- data/examples/v2/actions-datastores/UpdateDatastoreItem.rb +18 -0
- data/examples/v2/aws-integration/CreateAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +0 -3
- data/examples/v2/aws-integration/CreateNewAWSExternalID.rb +0 -3
- data/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.rb +0 -3
- data/examples/v2/aws-integration/DeleteAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/GetAWSAccount.rb +0 -3
- data/examples/v2/aws-integration/ListAWSAccounts.rb +0 -3
- data/examples/v2/aws-integration/ListAWSNamespaces.rb +0 -3
- data/examples/v2/aws-integration/ListAWSNamespaces_3031307873.rb +0 -3
- data/examples/v2/aws-integration/UpdateAWSAccount.rb +0 -3
- data/examples/v2/aws-logs-integration/ListAWSLogsServices.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_2836340212.rb +52 -0
- data/examples/v2/incidents/CreateIncidentNotificationRule.rb +50 -0
- data/examples/v2/incidents/CreateIncidentNotificationRule_3029800608.rb +42 -0
- data/examples/v2/incidents/DeleteIncidentNotificationRule.rb +8 -0
- data/examples/v2/incidents/DeleteIncidentNotificationRule_4148107167.rb +11 -0
- data/examples/v2/incidents/GetIncidentNotificationRule.rb +8 -0
- data/examples/v2/incidents/GetIncidentNotificationRule_67441486.rb +11 -0
- data/examples/v2/incidents/ListIncidentNotificationRules.rb +8 -0
- data/examples/v2/incidents/UpdateIncidentNotificationRule.rb +51 -0
- data/examples/v2/incidents/UpdateIncidentNotificationRule_1207309457.rb +45 -0
- data/lib/datadog_api_client/configuration.rb +5 -8
- data/lib/datadog_api_client/inflector.rb +67 -0
- data/lib/datadog_api_client/v1/api/aws_integration_api.rb +27 -0
- data/lib/datadog_api_client/v1/api/aws_logs_integration_api.rb +9 -0
- data/lib/datadog_api_client/v1/models/gcp_account.rb +18 -4
- data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config.rb +118 -0
- data/lib/datadog_api_client/v1/models/gcp_monitored_resource_config_type.rb +28 -0
- data/lib/datadog_api_client/v2/api/actions_datastores_api.rb +655 -0
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +0 -42
- data/lib/datadog_api_client/v2/api/aws_logs_integration_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/incidents_api.rb +367 -0
- data/lib/datadog_api_client/v2/api/org_connections_api.rb +8 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb +139 -0
- data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request.rb +2 -2
- data/lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_data_single_or_array.rb +63 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb +180 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb +28 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_apps_datastore_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/create_incident_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/datastore.rb +105 -0
- data/lib/datadog_api_client/v2/models/datastore_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/datastore_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/datastore_data_attributes.rb +205 -0
- data/lib/datadog_api_client/v2/models/datastore_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb +27 -0
- data/lib/datadog_api_client/v2/models/datastore_items_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb +27 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.rb +137 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config.rb +118 -0
- data/lib/datadog_api_client/v2/models/gcp_monitored_resource_config_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +17 -2
- data/lib/datadog_api_client/v2/models/incident_notification_rule.rb +135 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array.rb +147 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_array_meta_page.rb +125 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes.rb +265 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_attributes_visibility.rb +28 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_conditions_items.rb +146 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes.rb +201 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes_visibility.rb +28 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_create_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_included_items.rb +64 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_relationships.rb +135 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_response_data.rb +164 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_notification_rule_update_data.rb +175 -0
- data/lib/datadog_api_client/v2/models/incident_notification_template_object.rb +164 -0
- data/lib/datadog_api_client/v2/models/item_api_payload.rb +105 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_array.rb +139 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb +185 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb +125 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb +117 -0
- data/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb +144 -0
- data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb +129 -0
- data/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/put_incident_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template.rb +123 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_notification_template_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_convert_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb +158 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb +115 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +87 -1
|
@@ -0,0 +1,265 @@
|
|
|
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 notification rule's attributes.
|
|
21
|
+
class IncidentNotificationRuleAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The conditions that trigger this notification rule.
|
|
25
|
+
attr_reader :conditions
|
|
26
|
+
|
|
27
|
+
# Timestamp when the notification rule was created.
|
|
28
|
+
attr_reader :created
|
|
29
|
+
|
|
30
|
+
# Whether the notification rule is enabled.
|
|
31
|
+
attr_reader :enabled
|
|
32
|
+
|
|
33
|
+
# The notification handles (targets) for this rule.
|
|
34
|
+
attr_reader :handles
|
|
35
|
+
|
|
36
|
+
# Timestamp when the notification rule was last modified.
|
|
37
|
+
attr_reader :modified
|
|
38
|
+
|
|
39
|
+
# List of incident fields that trigger re-notification when changed.
|
|
40
|
+
attr_accessor :renotify_on
|
|
41
|
+
|
|
42
|
+
# The trigger event for this notification rule.
|
|
43
|
+
attr_reader :trigger
|
|
44
|
+
|
|
45
|
+
# The visibility of the notification rule.
|
|
46
|
+
attr_reader :visibility
|
|
47
|
+
|
|
48
|
+
attr_accessor :additional_properties
|
|
49
|
+
|
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
|
+
# @!visibility private
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'conditions' => :'conditions',
|
|
55
|
+
:'created' => :'created',
|
|
56
|
+
:'enabled' => :'enabled',
|
|
57
|
+
:'handles' => :'handles',
|
|
58
|
+
:'modified' => :'modified',
|
|
59
|
+
:'renotify_on' => :'renotify_on',
|
|
60
|
+
:'trigger' => :'trigger',
|
|
61
|
+
:'visibility' => :'visibility'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
# @!visibility private
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'conditions' => :'Array<IncidentNotificationRuleConditionsItems>',
|
|
70
|
+
:'created' => :'Time',
|
|
71
|
+
:'enabled' => :'Boolean',
|
|
72
|
+
:'handles' => :'Array<String>',
|
|
73
|
+
:'modified' => :'Time',
|
|
74
|
+
:'renotify_on' => :'Array<String>',
|
|
75
|
+
:'trigger' => :'String',
|
|
76
|
+
:'visibility' => :'IncidentNotificationRuleAttributesVisibility'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
82
|
+
# @!visibility private
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentNotificationRuleAttributes` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
self.additional_properties = {}
|
|
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
|
+
self.additional_properties[k.to_sym] = v
|
|
93
|
+
else
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
end
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'conditions')
|
|
99
|
+
if (value = attributes[:'conditions']).is_a?(Array)
|
|
100
|
+
self.conditions = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'created')
|
|
105
|
+
self.created = attributes[:'created']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'enabled')
|
|
109
|
+
self.enabled = attributes[:'enabled']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'handles')
|
|
113
|
+
if (value = attributes[:'handles']).is_a?(Array)
|
|
114
|
+
self.handles = value
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'modified')
|
|
119
|
+
self.modified = attributes[:'modified']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'renotify_on')
|
|
123
|
+
if (value = attributes[:'renotify_on']).is_a?(Array)
|
|
124
|
+
self.renotify_on = value
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'trigger')
|
|
129
|
+
self.trigger = attributes[:'trigger']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'visibility')
|
|
133
|
+
self.visibility = attributes[:'visibility']
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
# @!visibility private
|
|
140
|
+
def valid?
|
|
141
|
+
return false if @conditions.nil?
|
|
142
|
+
return false if @created.nil?
|
|
143
|
+
return false if @enabled.nil?
|
|
144
|
+
return false if @handles.nil?
|
|
145
|
+
return false if @modified.nil?
|
|
146
|
+
return false if @trigger.nil?
|
|
147
|
+
return false if @visibility.nil?
|
|
148
|
+
true
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param conditions [Object] Object to be assigned
|
|
153
|
+
# @!visibility private
|
|
154
|
+
def conditions=(conditions)
|
|
155
|
+
if conditions.nil?
|
|
156
|
+
fail ArgumentError, 'invalid value for "conditions", conditions cannot be nil.'
|
|
157
|
+
end
|
|
158
|
+
@conditions = conditions
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param created [Object] Object to be assigned
|
|
163
|
+
# @!visibility private
|
|
164
|
+
def created=(created)
|
|
165
|
+
if created.nil?
|
|
166
|
+
fail ArgumentError, 'invalid value for "created", created cannot be nil.'
|
|
167
|
+
end
|
|
168
|
+
@created = created
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param enabled [Object] Object to be assigned
|
|
173
|
+
# @!visibility private
|
|
174
|
+
def enabled=(enabled)
|
|
175
|
+
if enabled.nil?
|
|
176
|
+
fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
|
|
177
|
+
end
|
|
178
|
+
@enabled = enabled
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param handles [Object] Object to be assigned
|
|
183
|
+
# @!visibility private
|
|
184
|
+
def handles=(handles)
|
|
185
|
+
if handles.nil?
|
|
186
|
+
fail ArgumentError, 'invalid value for "handles", handles cannot be nil.'
|
|
187
|
+
end
|
|
188
|
+
@handles = handles
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method with validation
|
|
192
|
+
# @param modified [Object] Object to be assigned
|
|
193
|
+
# @!visibility private
|
|
194
|
+
def modified=(modified)
|
|
195
|
+
if modified.nil?
|
|
196
|
+
fail ArgumentError, 'invalid value for "modified", modified cannot be nil.'
|
|
197
|
+
end
|
|
198
|
+
@modified = modified
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Custom attribute writer method with validation
|
|
202
|
+
# @param trigger [Object] Object to be assigned
|
|
203
|
+
# @!visibility private
|
|
204
|
+
def trigger=(trigger)
|
|
205
|
+
if trigger.nil?
|
|
206
|
+
fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.'
|
|
207
|
+
end
|
|
208
|
+
@trigger = trigger
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Custom attribute writer method with validation
|
|
212
|
+
# @param visibility [Object] Object to be assigned
|
|
213
|
+
# @!visibility private
|
|
214
|
+
def visibility=(visibility)
|
|
215
|
+
if visibility.nil?
|
|
216
|
+
fail ArgumentError, 'invalid value for "visibility", visibility cannot be nil.'
|
|
217
|
+
end
|
|
218
|
+
@visibility = visibility
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
# @!visibility private
|
|
224
|
+
def to_hash
|
|
225
|
+
hash = {}
|
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
227
|
+
value = self.send(attr)
|
|
228
|
+
if value.nil?
|
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
hash[param] = _to_hash(value)
|
|
234
|
+
end
|
|
235
|
+
self.additional_properties.each_pair do |attr, value|
|
|
236
|
+
hash[attr] = value
|
|
237
|
+
end
|
|
238
|
+
hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Checks equality by comparing each attribute.
|
|
242
|
+
# @param o [Object] Object to be compared
|
|
243
|
+
# @!visibility private
|
|
244
|
+
def ==(o)
|
|
245
|
+
return true if self.equal?(o)
|
|
246
|
+
self.class == o.class &&
|
|
247
|
+
conditions == o.conditions &&
|
|
248
|
+
created == o.created &&
|
|
249
|
+
enabled == o.enabled &&
|
|
250
|
+
handles == o.handles &&
|
|
251
|
+
modified == o.modified &&
|
|
252
|
+
renotify_on == o.renotify_on &&
|
|
253
|
+
trigger == o.trigger &&
|
|
254
|
+
visibility == o.visibility &&
|
|
255
|
+
additional_properties == o.additional_properties
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Calculates hash code according to all attributes.
|
|
259
|
+
# @return [Integer] Hash code
|
|
260
|
+
# @!visibility private
|
|
261
|
+
def hash
|
|
262
|
+
[conditions, created, enabled, handles, modified, renotify_on, trigger, visibility, additional_properties].hash
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
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 visibility of the notification rule.
|
|
21
|
+
class IncidentNotificationRuleAttributesVisibility
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
ALL = "all".freeze
|
|
25
|
+
ORGANIZATION = "organization".freeze
|
|
26
|
+
PRIVATE = "private".freeze
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
# A condition that must be met to trigger the notification rule.
|
|
21
|
+
class IncidentNotificationRuleConditionsItems
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The incident field to evaluate
|
|
25
|
+
attr_reader :field
|
|
26
|
+
|
|
27
|
+
# The value(s) to compare against. Multiple values are `ORed` together.
|
|
28
|
+
attr_reader :values
|
|
29
|
+
|
|
30
|
+
attr_accessor :additional_properties
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
# @!visibility private
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'field' => :'field',
|
|
37
|
+
:'values' => :'values'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
# @!visibility private
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'field' => :'String',
|
|
46
|
+
:'values' => :'Array<String>'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
52
|
+
# @!visibility private
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
self.additional_properties = {}
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
self.additional_properties[k.to_sym] = v
|
|
63
|
+
else
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
end
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'field')
|
|
69
|
+
self.field = attributes[:'field']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'values')
|
|
73
|
+
if (value = attributes[:'values']).is_a?(Array)
|
|
74
|
+
self.values = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
# @!visibility private
|
|
82
|
+
def valid?
|
|
83
|
+
return false if @field.nil?
|
|
84
|
+
return false if @values.nil?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Custom attribute writer method with validation
|
|
89
|
+
# @param field [Object] Object to be assigned
|
|
90
|
+
# @!visibility private
|
|
91
|
+
def field=(field)
|
|
92
|
+
if field.nil?
|
|
93
|
+
fail ArgumentError, 'invalid value for "field", field cannot be nil.'
|
|
94
|
+
end
|
|
95
|
+
@field = field
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Custom attribute writer method with validation
|
|
99
|
+
# @param values [Object] Object to be assigned
|
|
100
|
+
# @!visibility private
|
|
101
|
+
def values=(values)
|
|
102
|
+
if values.nil?
|
|
103
|
+
fail ArgumentError, 'invalid value for "values", values cannot be nil.'
|
|
104
|
+
end
|
|
105
|
+
@values = values
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
109
|
+
# @return [Hash] Returns the object in the form of hash
|
|
110
|
+
# @!visibility private
|
|
111
|
+
def to_hash
|
|
112
|
+
hash = {}
|
|
113
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
114
|
+
value = self.send(attr)
|
|
115
|
+
if value.nil?
|
|
116
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
117
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
hash[param] = _to_hash(value)
|
|
121
|
+
end
|
|
122
|
+
self.additional_properties.each_pair do |attr, value|
|
|
123
|
+
hash[attr] = value
|
|
124
|
+
end
|
|
125
|
+
hash
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param o [Object] Object to be compared
|
|
130
|
+
# @!visibility private
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
field == o.field &&
|
|
135
|
+
values == o.values &&
|
|
136
|
+
additional_properties == o.additional_properties
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Calculates hash code according to all attributes.
|
|
140
|
+
# @return [Integer] Hash code
|
|
141
|
+
# @!visibility private
|
|
142
|
+
def hash
|
|
143
|
+
[field, values, additional_properties].hash
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,201 @@
|
|
|
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 attributes for creating a notification rule.
|
|
21
|
+
class IncidentNotificationRuleCreateAttributes
|
|
22
|
+
include BaseGenericModel
|
|
23
|
+
|
|
24
|
+
# The conditions that trigger this notification rule.
|
|
25
|
+
attr_reader :conditions
|
|
26
|
+
|
|
27
|
+
# Whether the notification rule is enabled.
|
|
28
|
+
attr_accessor :enabled
|
|
29
|
+
|
|
30
|
+
# The notification handles (targets) for this rule.
|
|
31
|
+
attr_reader :handles
|
|
32
|
+
|
|
33
|
+
# List of incident fields that trigger re-notification when changed.
|
|
34
|
+
attr_accessor :renotify_on
|
|
35
|
+
|
|
36
|
+
# The trigger event for this notification rule.
|
|
37
|
+
attr_reader :trigger
|
|
38
|
+
|
|
39
|
+
# The visibility of the notification rule.
|
|
40
|
+
attr_accessor :visibility
|
|
41
|
+
|
|
42
|
+
attr_accessor :additional_properties
|
|
43
|
+
|
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
|
+
# @!visibility private
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'conditions' => :'conditions',
|
|
49
|
+
:'enabled' => :'enabled',
|
|
50
|
+
:'handles' => :'handles',
|
|
51
|
+
:'renotify_on' => :'renotify_on',
|
|
52
|
+
:'trigger' => :'trigger',
|
|
53
|
+
:'visibility' => :'visibility'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
# @!visibility private
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'conditions' => :'Array<IncidentNotificationRuleConditionsItems>',
|
|
62
|
+
:'enabled' => :'Boolean',
|
|
63
|
+
:'handles' => :'Array<String>',
|
|
64
|
+
:'renotify_on' => :'Array<String>',
|
|
65
|
+
:'trigger' => :'String',
|
|
66
|
+
:'visibility' => :'IncidentNotificationRuleCreateAttributesVisibility'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
|
72
|
+
# @!visibility private
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
self.additional_properties = {}
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
82
|
+
self.additional_properties[k.to_sym] = v
|
|
83
|
+
else
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
end
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'conditions')
|
|
89
|
+
if (value = attributes[:'conditions']).is_a?(Array)
|
|
90
|
+
self.conditions = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'enabled')
|
|
95
|
+
self.enabled = attributes[:'enabled']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'handles')
|
|
99
|
+
if (value = attributes[:'handles']).is_a?(Array)
|
|
100
|
+
self.handles = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'renotify_on')
|
|
105
|
+
if (value = attributes[:'renotify_on']).is_a?(Array)
|
|
106
|
+
self.renotify_on = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'trigger')
|
|
111
|
+
self.trigger = attributes[:'trigger']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'visibility')
|
|
115
|
+
self.visibility = attributes[:'visibility']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
# @!visibility private
|
|
122
|
+
def valid?
|
|
123
|
+
return false if @conditions.nil?
|
|
124
|
+
return false if @handles.nil?
|
|
125
|
+
return false if @trigger.nil?
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param conditions [Object] Object to be assigned
|
|
131
|
+
# @!visibility private
|
|
132
|
+
def conditions=(conditions)
|
|
133
|
+
if conditions.nil?
|
|
134
|
+
fail ArgumentError, 'invalid value for "conditions", conditions cannot be nil.'
|
|
135
|
+
end
|
|
136
|
+
@conditions = conditions
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param handles [Object] Object to be assigned
|
|
141
|
+
# @!visibility private
|
|
142
|
+
def handles=(handles)
|
|
143
|
+
if handles.nil?
|
|
144
|
+
fail ArgumentError, 'invalid value for "handles", handles cannot be nil.'
|
|
145
|
+
end
|
|
146
|
+
@handles = handles
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param trigger [Object] Object to be assigned
|
|
151
|
+
# @!visibility private
|
|
152
|
+
def trigger=(trigger)
|
|
153
|
+
if trigger.nil?
|
|
154
|
+
fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.'
|
|
155
|
+
end
|
|
156
|
+
@trigger = trigger
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Returns the object in the form of hash, with additionalProperties support.
|
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
|
161
|
+
# @!visibility private
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
if value.nil?
|
|
167
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
168
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
self.additional_properties.each_pair do |attr, value|
|
|
174
|
+
hash[attr] = value
|
|
175
|
+
end
|
|
176
|
+
hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Checks equality by comparing each attribute.
|
|
180
|
+
# @param o [Object] Object to be compared
|
|
181
|
+
# @!visibility private
|
|
182
|
+
def ==(o)
|
|
183
|
+
return true if self.equal?(o)
|
|
184
|
+
self.class == o.class &&
|
|
185
|
+
conditions == o.conditions &&
|
|
186
|
+
enabled == o.enabled &&
|
|
187
|
+
handles == o.handles &&
|
|
188
|
+
renotify_on == o.renotify_on &&
|
|
189
|
+
trigger == o.trigger &&
|
|
190
|
+
visibility == o.visibility &&
|
|
191
|
+
additional_properties == o.additional_properties
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Calculates hash code according to all attributes.
|
|
195
|
+
# @return [Integer] Hash code
|
|
196
|
+
# @!visibility private
|
|
197
|
+
def hash
|
|
198
|
+
[conditions, enabled, handles, renotify_on, trigger, visibility, additional_properties].hash
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
data/lib/datadog_api_client/v2/models/incident_notification_rule_create_attributes_visibility.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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 visibility of the notification rule.
|
|
21
|
+
class IncidentNotificationRuleCreateAttributesVisibility
|
|
22
|
+
include BaseEnumModel
|
|
23
|
+
|
|
24
|
+
ALL = "all".freeze
|
|
25
|
+
ORGANIZATION = "organization".freeze
|
|
26
|
+
PRIVATE = "private".freeze
|
|
27
|
+
end
|
|
28
|
+
end
|