incident_io_api 4.1.0 → 4.3.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/incident_io/api/alert_grouping_preferences_v3_api.rb +367 -0
  3. data/lib/incident_io/api/alert_rules_v3_api.rb +367 -0
  4. data/lib/incident_io/api/catalog_v3_api.rb +68 -0
  5. data/lib/incident_io/api/team_grouping_preferences_v3_api.rb +364 -0
  6. data/lib/incident_io/models/alert_grouping_conditional_branch_v3.rb +204 -0
  7. data/lib/incident_io/models/alert_grouping_default_branch_v3.rb +165 -0
  8. data/lib/incident_io/models/alert_grouping_preference_v3.rb +368 -0
  9. data/lib/incident_io/models/alert_grouping_preferences_create_payload_v3.rb +225 -0
  10. data/lib/incident_io/models/alert_grouping_preferences_create_result_v3.rb +164 -0
  11. data/lib/incident_io/models/alert_grouping_preferences_list_result_v3.rb +192 -0
  12. data/lib/incident_io/models/alert_grouping_preferences_show_result_v3.rb +164 -0
  13. data/lib/incident_io/models/alert_grouping_preferences_update_payload_v3.rb +198 -0
  14. data/lib/incident_io/models/alert_grouping_preferences_update_result_v3.rb +164 -0
  15. data/lib/incident_io/models/alert_grouping_settings_v3.rb +246 -0
  16. data/lib/incident_io/models/alert_rule_action_v3.rb +240 -0
  17. data/lib/incident_io/models/alert_rule_block_v3.rb +222 -0
  18. data/lib/incident_io/models/alert_rule_branch_v3.rb +254 -0
  19. data/lib/incident_io/models/alert_rule_create_incident_action_v3.rb +177 -0
  20. data/lib/incident_io/models/alert_rule_escalate_action_v3.rb +215 -0
  21. data/lib/incident_io/models/alert_rule_nested_branch_v3.rb +242 -0
  22. data/lib/incident_io/models/alert_rule_post_action_v3.rb +202 -0
  23. data/lib/incident_io/models/alert_rule_set_v3.rb +351 -0
  24. data/lib/incident_io/models/alert_rules_create_payload_v3.rb +225 -0
  25. data/lib/incident_io/models/alert_rules_create_result_v3.rb +164 -0
  26. data/lib/incident_io/models/alert_rules_list_result_v3.rb +192 -0
  27. data/lib/incident_io/models/alert_rules_show_result_v3.rb +164 -0
  28. data/lib/incident_io/models/alert_rules_update_payload_v3.rb +198 -0
  29. data/lib/incident_io/models/alert_rules_update_result_v3.rb +164 -0
  30. data/lib/incident_io/models/catalog_bulk_archive_entries_payload_v3.rb +212 -0
  31. data/lib/incident_io/models/team_grouping_preference_v3.rb +300 -0
  32. data/lib/incident_io/models/team_grouping_preferences_create_payload_v3.rb +191 -0
  33. data/lib/incident_io/models/team_grouping_preferences_create_result_v3.rb +164 -0
  34. data/lib/incident_io/models/team_grouping_preferences_list_result_v3.rb +192 -0
  35. data/lib/incident_io/models/team_grouping_preferences_show_result_v3.rb +164 -0
  36. data/lib/incident_io/models/team_grouping_preferences_update_payload_v3.rb +191 -0
  37. data/lib/incident_io/models/team_grouping_preferences_update_result_v3.rb +164 -0
  38. data/lib/incident_io/version.rb +1 -1
  39. data/lib/incident_io.rb +35 -0
  40. metadata +37 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fc5fb8c4f8e73534df5cfd8787aae38582bedf6e9470601bbc15e77bbdb11b4
4
- data.tar.gz: b90c14dc617536f1d292df41af393818ab89985127b3d7021be05292e343d355
3
+ metadata.gz: 5a39ce175b39db8e12600a0159dac23bb68ff3677109638ea13f63b1844870e1
4
+ data.tar.gz: 34200ffe6efa21e113bbc132baffe00fe227cffcd828d4b954dc123a8cf2fe51
5
5
  SHA512:
6
- metadata.gz: 30b5161a4d89bdf35f89a33841eb7a6e8847a3c8a5f51927754ad1d0efa277b7e6953e9466595e9a15b68862fc170b02ac7b9b5160277090194f7e2fbf8995b7
7
- data.tar.gz: bcc477089c65423659f99e68aba86379c98d1378f8b2470db2315d1a28f349e20ed7727386990b42a3098f8bb67c16e07c99fa1ae960413b49a729b0cd555762
6
+ metadata.gz: 9884d360bb7a557e3d02a3f90739ca153d3fe6a6b2bc5c783425d50ffcce3467747e06c1ea999fd9f5ae1139b5a0f63b950c1afa4edce016549b6e3599e0ea42
7
+ data.tar.gz: fc2f384d09767951ba677da0ddacce1c5c2b60f8518e5ad5b764856223fb1370bb4f40da2e12b4af146c6399cb94b398a3e4a8a8354bee8798fecb1d3e674c2e
@@ -0,0 +1,367 @@
1
+ =begin
2
+ #incident.io
3
+
4
+ #Ruby client for the incident.io API.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module IncidentIo
16
+ class AlertGroupingPreferencesV3Api
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Alert Grouping Preferences V3
23
+ # Create a team's grouping preference, or the organisation's default when it has none. A team can have only one preference. To manage an existing default, import it or update it by ID.
24
+ # @param alert_grouping_preferences_create_payload_v3 [AlertGroupingPreferencesCreatePayloadV3]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AlertGroupingPreferencesCreateResultV3]
27
+ def alert_grouping_preferences_v3_create(alert_grouping_preferences_create_payload_v3, opts = {})
28
+ data, _status_code, _headers = alert_grouping_preferences_v3_create_with_http_info(alert_grouping_preferences_create_payload_v3, opts)
29
+ data
30
+ end
31
+
32
+ # Create Alert Grouping Preferences V3
33
+ # Create a team's grouping preference, or the organisation's default when it has none. A team can have only one preference. To manage an existing default, import it or update it by ID.
34
+ # @param alert_grouping_preferences_create_payload_v3 [AlertGroupingPreferencesCreatePayloadV3]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AlertGroupingPreferencesCreateResultV3, Integer, Hash)>] AlertGroupingPreferencesCreateResultV3 data, response status code and response headers
37
+ def alert_grouping_preferences_v3_create_with_http_info(alert_grouping_preferences_create_payload_v3, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_create ...'
40
+ end
41
+ # verify the required parameter 'alert_grouping_preferences_create_payload_v3' is set
42
+ if @api_client.config.client_side_validation && alert_grouping_preferences_create_payload_v3.nil?
43
+ fail ArgumentError, "Missing the required parameter 'alert_grouping_preferences_create_payload_v3' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v3/alert_grouping_preferences'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(alert_grouping_preferences_create_payload_v3)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesCreateResultV3'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_create",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: AlertGroupingPreferencesV3Api#alert_grouping_preferences_v3_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete Alert Grouping Preferences V3
91
+ # Delete a team's grouping preference, so its alerts group by each route's own settings again. The organisation's default can't be removed: deleting it turns its grouping off and hands it back to the dashboard, where its earlier settings can be restored from its history.
92
+ # @param id [String] Unique identifier of the preference
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def alert_grouping_preferences_v3_delete(id, opts = {})
96
+ alert_grouping_preferences_v3_delete_with_http_info(id, opts)
97
+ nil
98
+ end
99
+
100
+ # Delete Alert Grouping Preferences V3
101
+ # Delete a team&#39;s grouping preference, so its alerts group by each route&#39;s own settings again. The organisation&#39;s default can&#39;t be removed: deleting it turns its grouping off and hands it back to the dashboard, where its earlier settings can be restored from its history.
102
+ # @param id [String] Unique identifier of the preference
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def alert_grouping_preferences_v3_delete_with_http_info(id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_delete ...'
108
+ end
109
+ # verify the required parameter 'id' is set
110
+ if @api_client.config.client_side_validation && id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_delete"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v3/alert_grouping_preferences/{id}'.sub('{id}', CGI.escape(id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type]
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_delete",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: AlertGroupingPreferencesV3Api#alert_grouping_preferences_v3_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # List Alert Grouping Preferences V3
154
+ # List the alert grouping preferences in your account.
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [Integer] :page_size Number of preferences to return per page (default to 25)
157
+ # @option opts [String] :after The ID of the last preference on the previous page
158
+ # @option opts [String] :kind Return only preferences of this kind
159
+ # @option opts [String] :team_id Return only this team&#39;s preference
160
+ # @return [AlertGroupingPreferencesListResultV3]
161
+ def alert_grouping_preferences_v3_list(opts = {})
162
+ data, _status_code, _headers = alert_grouping_preferences_v3_list_with_http_info(opts)
163
+ data
164
+ end
165
+
166
+ # List Alert Grouping Preferences V3
167
+ # List the alert grouping preferences in your account.
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [Integer] :page_size Number of preferences to return per page (default to 25)
170
+ # @option opts [String] :after The ID of the last preference on the previous page
171
+ # @option opts [String] :kind Return only preferences of this kind
172
+ # @option opts [String] :team_id Return only this team&#39;s preference
173
+ # @return [Array<(AlertGroupingPreferencesListResultV3, Integer, Hash)>] AlertGroupingPreferencesListResultV3 data, response status code and response headers
174
+ def alert_grouping_preferences_v3_list_with_http_info(opts = {})
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_list ...'
177
+ end
178
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250
179
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_list, must be smaller than or equal to 250.'
180
+ end
181
+
182
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
183
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_list, must be greater than or equal to 1.'
184
+ end
185
+
186
+ # resource path
187
+ local_var_path = '/v3/alert_grouping_preferences'
188
+
189
+ # query parameters
190
+ query_params = opts[:query_params] || {}
191
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
192
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
193
+ query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
194
+ query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil?
195
+
196
+ # header parameters
197
+ header_params = opts[:header_params] || {}
198
+ # HTTP header 'Accept' (if needed)
199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
200
+
201
+ # form parameters
202
+ form_params = opts[:form_params] || {}
203
+
204
+ # http body (model)
205
+ post_body = opts[:debug_body]
206
+
207
+ # return_type
208
+ return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesListResultV3'
209
+
210
+ # auth_names
211
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
212
+
213
+ new_options = opts.merge(
214
+ :operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_list",
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => return_type
221
+ )
222
+
223
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: AlertGroupingPreferencesV3Api#alert_grouping_preferences_v3_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # Show Alert Grouping Preferences V3
231
+ # Load one alert grouping preference in your account.
232
+ # @param id [String] Unique identifier of the preference
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [AlertGroupingPreferencesShowResultV3]
235
+ def alert_grouping_preferences_v3_show(id, opts = {})
236
+ data, _status_code, _headers = alert_grouping_preferences_v3_show_with_http_info(id, opts)
237
+ data
238
+ end
239
+
240
+ # Show Alert Grouping Preferences V3
241
+ # Load one alert grouping preference in your account.
242
+ # @param id [String] Unique identifier of the preference
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Array<(AlertGroupingPreferencesShowResultV3, Integer, Hash)>] AlertGroupingPreferencesShowResultV3 data, response status code and response headers
245
+ def alert_grouping_preferences_v3_show_with_http_info(id, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_show ...'
248
+ end
249
+ # verify the required parameter 'id' is set
250
+ if @api_client.config.client_side_validation && id.nil?
251
+ fail ArgumentError, "Missing the required parameter 'id' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_show"
252
+ end
253
+ # resource path
254
+ local_var_path = '/v3/alert_grouping_preferences/{id}'.sub('{id}', CGI.escape(id.to_s))
255
+
256
+ # query parameters
257
+ query_params = opts[:query_params] || {}
258
+
259
+ # header parameters
260
+ header_params = opts[:header_params] || {}
261
+ # HTTP header 'Accept' (if needed)
262
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
263
+
264
+ # form parameters
265
+ form_params = opts[:form_params] || {}
266
+
267
+ # http body (model)
268
+ post_body = opts[:debug_body]
269
+
270
+ # return_type
271
+ return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesShowResultV3'
272
+
273
+ # auth_names
274
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
275
+
276
+ new_options = opts.merge(
277
+ :operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_show",
278
+ :header_params => header_params,
279
+ :query_params => query_params,
280
+ :form_params => form_params,
281
+ :body => post_body,
282
+ :auth_names => auth_names,
283
+ :return_type => return_type
284
+ )
285
+
286
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: AlertGroupingPreferencesV3Api#alert_grouping_preferences_v3_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
293
+ # Update Alert Grouping Preferences V3
294
+ # Update an alert grouping preference and write its next version. Its kind and team cannot change: to move a team's preference, delete it and create another.
295
+ # @param id [String] Unique identifier of the preference
296
+ # @param alert_grouping_preferences_update_payload_v3 [AlertGroupingPreferencesUpdatePayloadV3]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [AlertGroupingPreferencesUpdateResultV3]
299
+ def alert_grouping_preferences_v3_update(id, alert_grouping_preferences_update_payload_v3, opts = {})
300
+ data, _status_code, _headers = alert_grouping_preferences_v3_update_with_http_info(id, alert_grouping_preferences_update_payload_v3, opts)
301
+ data
302
+ end
303
+
304
+ # Update Alert Grouping Preferences V3
305
+ # Update an alert grouping preference and write its next version. Its kind and team cannot change: to move a team&#39;s preference, delete it and create another.
306
+ # @param id [String] Unique identifier of the preference
307
+ # @param alert_grouping_preferences_update_payload_v3 [AlertGroupingPreferencesUpdatePayloadV3]
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(AlertGroupingPreferencesUpdateResultV3, Integer, Hash)>] AlertGroupingPreferencesUpdateResultV3 data, response status code and response headers
310
+ def alert_grouping_preferences_v3_update_with_http_info(id, alert_grouping_preferences_update_payload_v3, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update ...'
313
+ end
314
+ # verify the required parameter 'id' is set
315
+ if @api_client.config.client_side_validation && id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'id' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update"
317
+ end
318
+ # verify the required parameter 'alert_grouping_preferences_update_payload_v3' is set
319
+ if @api_client.config.client_side_validation && alert_grouping_preferences_update_payload_v3.nil?
320
+ fail ArgumentError, "Missing the required parameter 'alert_grouping_preferences_update_payload_v3' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update"
321
+ end
322
+ # resource path
323
+ local_var_path = '/v3/alert_grouping_preferences/{id}'.sub('{id}', CGI.escape(id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
332
+ # HTTP header 'Content-Type'
333
+ content_type = @api_client.select_header_content_type(['application/json'])
334
+ if !content_type.nil?
335
+ header_params['Content-Type'] = content_type
336
+ end
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(alert_grouping_preferences_update_payload_v3)
343
+
344
+ # return_type
345
+ return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesUpdateResultV3'
346
+
347
+ # auth_names
348
+ auth_names = opts[:debug_auth_names] || ['BearerAuth']
349
+
350
+ new_options = opts.merge(
351
+ :operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update",
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => return_type
358
+ )
359
+
360
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "API called: AlertGroupingPreferencesV3Api#alert_grouping_preferences_v3_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
+ end
364
+ return data, status_code, headers
365
+ end
366
+ end
367
+ end