incident_io_api 4.3.0 → 4.5.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/lib/incident_io/api/users_v2_api.rb +2 -2
- data/lib/incident_io/models/alert_source_alertmanager_options_v2.rb +165 -0
- data/lib/incident_io/models/alert_source_v2.rb +10 -1
- data/lib/incident_io/models/alert_sources_create_payload_v2.rb +10 -1
- data/lib/incident_io/models/alert_sources_update_payload_v2.rb +10 -1
- data/lib/incident_io/models/on_call_notification_rule_public_v2.rb +29 -2
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 629a0e17e26a7976f8ed5b402371f3ae6b8f1ae0dcaf3276f5ce59dba36b5e43
|
|
4
|
+
data.tar.gz: 508c7b31b8c5fad2c2070904c8b9c1b6207df1537ddb9a3c6301fefa28bf7901
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19b6dd51af37ea0ded42aa1e1610cb8283e5ac8ba2abe85cb8c736382711213a0db02177ee2b07dbddb6fa00b54157bbffa49252f4d5096b9dfc85bfefac66a1
|
|
7
|
+
data.tar.gz: e24945e4834a7d3fccec0961b2c6426171265117a8d5c7674fbcfc945f3fad1111fcc26a02aece66845a55474a2f69f0dd8096b237409a3dc56e642d31117a4e
|
|
@@ -163,7 +163,7 @@ module IncidentIo
|
|
|
163
163
|
end
|
|
164
164
|
|
|
165
165
|
# ListNotificationRules Users V2
|
|
166
|
-
# List notification rules for a user. Rules define how and when a user is notified for on-call pages. Only includes
|
|
166
|
+
# List notification rules for a user. Rules define how and when a user is notified for on-call pages. Each rule applies to pages at one interruption level, high or low. Only includes rules for pages; shift_changes rules are not returned.
|
|
167
167
|
# @param user_id [String] The ID of the user whose notification rules you want to list.
|
|
168
168
|
# @param [Hash] opts the optional parameters
|
|
169
169
|
# @return [UsersListNotificationRulesResultV2]
|
|
@@ -173,7 +173,7 @@ module IncidentIo
|
|
|
173
173
|
end
|
|
174
174
|
|
|
175
175
|
# ListNotificationRules Users V2
|
|
176
|
-
# List notification rules for a user. Rules define how and when a user is notified for on-call pages. Only includes
|
|
176
|
+
# List notification rules for a user. Rules define how and when a user is notified for on-call pages. Each rule applies to pages at one interruption level, high or low. Only includes rules for pages; shift_changes rules are not returned.
|
|
177
177
|
# @param user_id [String] The ID of the user whose notification rules you want to list.
|
|
178
178
|
# @param [Hash] opts the optional parameters
|
|
179
179
|
# @return [Array<(UsersListNotificationRulesResultV2, Integer, Hash)>] UsersListNotificationRulesResultV2 data, response status code and response headers
|
|
@@ -0,0 +1,165 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module IncidentIo
|
|
17
|
+
class AlertSourceAlertmanagerOptionsV2 < ApiModelBase
|
|
18
|
+
# Whether to create one alert per evaluation group or one alert per series within a group
|
|
19
|
+
attr_accessor :one_alert_per_group
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'one_alert_per_group' => :'one_alert_per_group'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'one_alert_per_group' => :'Boolean'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::AlertSourceAlertmanagerOptionsV2` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::AlertSourceAlertmanagerOptionsV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'one_alert_per_group')
|
|
68
|
+
self.one_alert_per_group = attributes[:'one_alert_per_group']
|
|
69
|
+
else
|
|
70
|
+
self.one_alert_per_group = true
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @one_alert_per_group.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "one_alert_per_group", one_alert_per_group cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @one_alert_per_group.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] one_alert_per_group Value to be assigned
|
|
96
|
+
def one_alert_per_group=(one_alert_per_group)
|
|
97
|
+
if one_alert_per_group.nil?
|
|
98
|
+
fail ArgumentError, 'one_alert_per_group cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@one_alert_per_group = one_alert_per_group
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
one_alert_per_group == o.one_alert_per_group
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[one_alert_per_group].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -18,6 +18,8 @@ module IncidentIo
|
|
|
18
18
|
# URL that can be used to send alert events to this source. This is only set for sources that accept webhook/HTTP events; email sources use the email_address field, and integration-based sources (like Jira) receive events through their native integrations.
|
|
19
19
|
attr_accessor :alert_events_url
|
|
20
20
|
|
|
21
|
+
attr_accessor :alertmanager_options
|
|
22
|
+
|
|
21
23
|
# Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
|
|
22
24
|
attr_accessor :auto_resolve_incident_alerts
|
|
23
25
|
|
|
@@ -63,6 +65,7 @@ module IncidentIo
|
|
|
63
65
|
def self.attribute_map
|
|
64
66
|
{
|
|
65
67
|
:'alert_events_url' => :'alert_events_url',
|
|
68
|
+
:'alertmanager_options' => :'alertmanager_options',
|
|
66
69
|
:'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
|
|
67
70
|
:'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
|
|
68
71
|
:'azure_devops_options' => :'azure_devops_options',
|
|
@@ -96,6 +99,7 @@ module IncidentIo
|
|
|
96
99
|
def self.openapi_types
|
|
97
100
|
{
|
|
98
101
|
:'alert_events_url' => :'String',
|
|
102
|
+
:'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
|
|
99
103
|
:'auto_resolve_incident_alerts' => :'Boolean',
|
|
100
104
|
:'auto_resolve_timeout_minutes' => :'Integer',
|
|
101
105
|
:'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
|
|
@@ -141,6 +145,10 @@ module IncidentIo
|
|
|
141
145
|
self.alert_events_url = attributes[:'alert_events_url']
|
|
142
146
|
end
|
|
143
147
|
|
|
148
|
+
if attributes.key?(:'alertmanager_options')
|
|
149
|
+
self.alertmanager_options = attributes[:'alertmanager_options']
|
|
150
|
+
end
|
|
151
|
+
|
|
144
152
|
if attributes.key?(:'auto_resolve_incident_alerts')
|
|
145
153
|
self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
|
|
146
154
|
end
|
|
@@ -299,6 +307,7 @@ module IncidentIo
|
|
|
299
307
|
return true if self.equal?(o)
|
|
300
308
|
self.class == o.class &&
|
|
301
309
|
alert_events_url == o.alert_events_url &&
|
|
310
|
+
alertmanager_options == o.alertmanager_options &&
|
|
302
311
|
auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
|
|
303
312
|
auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
|
|
304
313
|
azure_devops_options == o.azure_devops_options &&
|
|
@@ -326,7 +335,7 @@ module IncidentIo
|
|
|
326
335
|
# Calculates hash code according to all attributes.
|
|
327
336
|
# @return [Integer] Hash code
|
|
328
337
|
def hash
|
|
329
|
-
[alert_events_url, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, id, jira_options, name, owning_team_ids, rate_limit_sharding, secret_token, source_type, template].hash
|
|
338
|
+
[alert_events_url, alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, id, jira_options, name, owning_team_ids, rate_limit_sharding, secret_token, source_type, template].hash
|
|
330
339
|
end
|
|
331
340
|
|
|
332
341
|
# Builds the object from hash
|
|
@@ -15,6 +15,8 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module IncidentIo
|
|
17
17
|
class AlertSourcesCreatePayloadV2 < ApiModelBase
|
|
18
|
+
attr_accessor :alertmanager_options
|
|
19
|
+
|
|
18
20
|
# Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
|
|
19
21
|
attr_accessor :auto_resolve_incident_alerts
|
|
20
22
|
|
|
@@ -53,6 +55,7 @@ module IncidentIo
|
|
|
53
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
56
|
def self.attribute_map
|
|
55
57
|
{
|
|
58
|
+
:'alertmanager_options' => :'alertmanager_options',
|
|
56
59
|
:'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
|
|
57
60
|
:'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
|
|
58
61
|
:'azure_devops_options' => :'azure_devops_options',
|
|
@@ -83,6 +86,7 @@ module IncidentIo
|
|
|
83
86
|
# Attribute type mapping.
|
|
84
87
|
def self.openapi_types
|
|
85
88
|
{
|
|
89
|
+
:'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
|
|
86
90
|
:'auto_resolve_incident_alerts' => :'Boolean',
|
|
87
91
|
:'auto_resolve_timeout_minutes' => :'Integer',
|
|
88
92
|
:'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
|
|
@@ -122,6 +126,10 @@ module IncidentIo
|
|
|
122
126
|
h[k.to_sym] = v
|
|
123
127
|
}
|
|
124
128
|
|
|
129
|
+
if attributes.key?(:'alertmanager_options')
|
|
130
|
+
self.alertmanager_options = attributes[:'alertmanager_options']
|
|
131
|
+
end
|
|
132
|
+
|
|
125
133
|
if attributes.key?(:'auto_resolve_incident_alerts')
|
|
126
134
|
self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
|
|
127
135
|
end
|
|
@@ -254,6 +262,7 @@ module IncidentIo
|
|
|
254
262
|
def ==(o)
|
|
255
263
|
return true if self.equal?(o)
|
|
256
264
|
self.class == o.class &&
|
|
265
|
+
alertmanager_options == o.alertmanager_options &&
|
|
257
266
|
auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
|
|
258
267
|
auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
|
|
259
268
|
azure_devops_options == o.azure_devops_options &&
|
|
@@ -279,7 +288,7 @@ module IncidentIo
|
|
|
279
288
|
# Calculates hash code according to all attributes.
|
|
280
289
|
# @return [Integer] Hash code
|
|
281
290
|
def hash
|
|
282
|
-
[auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, source_type, template].hash
|
|
291
|
+
[alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, source_type, template].hash
|
|
283
292
|
end
|
|
284
293
|
|
|
285
294
|
# Builds the object from hash
|
|
@@ -15,6 +15,8 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module IncidentIo
|
|
17
17
|
class AlertSourcesUpdatePayloadV2 < ApiModelBase
|
|
18
|
+
attr_accessor :alertmanager_options
|
|
19
|
+
|
|
18
20
|
# Whether alerts from this source keep counting down to auto-resolve while attached to an incident. Defaults to true. Has no effect without auto_resolve_timeout_minutes.
|
|
19
21
|
attr_accessor :auto_resolve_incident_alerts
|
|
20
22
|
|
|
@@ -53,6 +55,7 @@ module IncidentIo
|
|
|
53
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
56
|
def self.attribute_map
|
|
55
57
|
{
|
|
58
|
+
:'alertmanager_options' => :'alertmanager_options',
|
|
56
59
|
:'auto_resolve_incident_alerts' => :'auto_resolve_incident_alerts',
|
|
57
60
|
:'auto_resolve_timeout_minutes' => :'auto_resolve_timeout_minutes',
|
|
58
61
|
:'azure_devops_options' => :'azure_devops_options',
|
|
@@ -83,6 +86,7 @@ module IncidentIo
|
|
|
83
86
|
# Attribute type mapping.
|
|
84
87
|
def self.openapi_types
|
|
85
88
|
{
|
|
89
|
+
:'alertmanager_options' => :'AlertSourceAlertmanagerOptionsV2',
|
|
86
90
|
:'auto_resolve_incident_alerts' => :'Boolean',
|
|
87
91
|
:'auto_resolve_timeout_minutes' => :'Integer',
|
|
88
92
|
:'azure_devops_options' => :'AlertSourceAzureDevopsOptionsV2',
|
|
@@ -122,6 +126,10 @@ module IncidentIo
|
|
|
122
126
|
h[k.to_sym] = v
|
|
123
127
|
}
|
|
124
128
|
|
|
129
|
+
if attributes.key?(:'alertmanager_options')
|
|
130
|
+
self.alertmanager_options = attributes[:'alertmanager_options']
|
|
131
|
+
end
|
|
132
|
+
|
|
125
133
|
if attributes.key?(:'auto_resolve_incident_alerts')
|
|
126
134
|
self.auto_resolve_incident_alerts = attributes[:'auto_resolve_incident_alerts']
|
|
127
135
|
end
|
|
@@ -237,6 +245,7 @@ module IncidentIo
|
|
|
237
245
|
def ==(o)
|
|
238
246
|
return true if self.equal?(o)
|
|
239
247
|
self.class == o.class &&
|
|
248
|
+
alertmanager_options == o.alertmanager_options &&
|
|
240
249
|
auto_resolve_incident_alerts == o.auto_resolve_incident_alerts &&
|
|
241
250
|
auto_resolve_timeout_minutes == o.auto_resolve_timeout_minutes &&
|
|
242
251
|
azure_devops_options == o.azure_devops_options &&
|
|
@@ -262,7 +271,7 @@ module IncidentIo
|
|
|
262
271
|
# Calculates hash code according to all attributes.
|
|
263
272
|
# @return [Integer] Hash code
|
|
264
273
|
def hash
|
|
265
|
-
[auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, disabled, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, template].hash
|
|
274
|
+
[alertmanager_options, auto_resolve_incident_alerts, auto_resolve_timeout_minutes, azure_devops_options, disabled, email_options, filter_condition_groups, fixed_team_id, heartbeat_options, http_custom_options, jira_options, name, owning_team_ids, rate_limit_sharding, template].hash
|
|
266
275
|
end
|
|
267
276
|
|
|
268
277
|
# Builds the object from hash
|
|
@@ -23,6 +23,9 @@ module IncidentIo
|
|
|
23
23
|
# Unique identifier for this notification rule
|
|
24
24
|
attr_accessor :id
|
|
25
25
|
|
|
26
|
+
# The interruption level of the pages this rule applies to: high or low. Known values: `high`, `low`
|
|
27
|
+
attr_accessor :interruption_level
|
|
28
|
+
|
|
26
29
|
attr_accessor :method_target
|
|
27
30
|
|
|
28
31
|
# The high-level type of notification method. Phone rules include phone details that distinguish SMS from voice calls. Known values: `app`, `email`, `microsoft_teams`, `phone`, `slack`, `whatsapp_message`
|
|
@@ -30,7 +33,7 @@ module IncidentIo
|
|
|
30
33
|
|
|
31
34
|
attr_accessor :phone
|
|
32
35
|
|
|
33
|
-
#
|
|
36
|
+
# Deprecated: use interruption_level, which always has the same value. Known values: `high_urgency`, `low_urgency`
|
|
34
37
|
attr_accessor :rule_type
|
|
35
38
|
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -39,6 +42,7 @@ module IncidentIo
|
|
|
39
42
|
:'app' => :'app',
|
|
40
43
|
:'delay_seconds' => :'delay_seconds',
|
|
41
44
|
:'id' => :'id',
|
|
45
|
+
:'interruption_level' => :'interruption_level',
|
|
42
46
|
:'method_target' => :'method_target',
|
|
43
47
|
:'method_type' => :'method_type',
|
|
44
48
|
:'phone' => :'phone',
|
|
@@ -62,6 +66,7 @@ module IncidentIo
|
|
|
62
66
|
:'app' => :'OnCallNotificationRuleAppDetailsPublicV2',
|
|
63
67
|
:'delay_seconds' => :'Integer',
|
|
64
68
|
:'id' => :'String',
|
|
69
|
+
:'interruption_level' => :'String',
|
|
65
70
|
:'method_target' => :'OnCallNotificationRuleMethodTargetPublicV2',
|
|
66
71
|
:'method_type' => :'String',
|
|
67
72
|
:'phone' => :'OnCallNotificationRulePhoneDetailsPublicV2',
|
|
@@ -105,6 +110,12 @@ module IncidentIo
|
|
|
105
110
|
self.id = nil
|
|
106
111
|
end
|
|
107
112
|
|
|
113
|
+
if attributes.key?(:'interruption_level')
|
|
114
|
+
self.interruption_level = attributes[:'interruption_level']
|
|
115
|
+
else
|
|
116
|
+
self.interruption_level = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
108
119
|
if attributes.key?(:'method_target')
|
|
109
120
|
self.method_target = attributes[:'method_target']
|
|
110
121
|
else
|
|
@@ -145,6 +156,10 @@ module IncidentIo
|
|
|
145
156
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
146
157
|
end
|
|
147
158
|
|
|
159
|
+
if @interruption_level.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "interruption_level", interruption_level cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
148
163
|
if @method_target.nil?
|
|
149
164
|
invalid_properties.push('invalid value for "method_target", method_target cannot be nil.')
|
|
150
165
|
end
|
|
@@ -167,6 +182,7 @@ module IncidentIo
|
|
|
167
182
|
return false if !@delay_seconds.nil? && @delay_seconds > 1200
|
|
168
183
|
return false if !@delay_seconds.nil? && @delay_seconds < 0
|
|
169
184
|
return false if @id.nil?
|
|
185
|
+
return false if @interruption_level.nil?
|
|
170
186
|
return false if @method_target.nil?
|
|
171
187
|
return false if @method_type.nil?
|
|
172
188
|
return false if @rule_type.nil?
|
|
@@ -201,6 +217,16 @@ module IncidentIo
|
|
|
201
217
|
@id = id
|
|
202
218
|
end
|
|
203
219
|
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] interruption_level Value to be assigned
|
|
222
|
+
def interruption_level=(interruption_level)
|
|
223
|
+
if interruption_level.nil?
|
|
224
|
+
fail ArgumentError, 'interruption_level cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@interruption_level = interruption_level
|
|
228
|
+
end
|
|
229
|
+
|
|
204
230
|
# Custom attribute writer method with validation
|
|
205
231
|
# @param [Object] method_target Value to be assigned
|
|
206
232
|
def method_target=(method_target)
|
|
@@ -239,6 +265,7 @@ module IncidentIo
|
|
|
239
265
|
app == o.app &&
|
|
240
266
|
delay_seconds == o.delay_seconds &&
|
|
241
267
|
id == o.id &&
|
|
268
|
+
interruption_level == o.interruption_level &&
|
|
242
269
|
method_target == o.method_target &&
|
|
243
270
|
method_type == o.method_type &&
|
|
244
271
|
phone == o.phone &&
|
|
@@ -254,7 +281,7 @@ module IncidentIo
|
|
|
254
281
|
# Calculates hash code according to all attributes.
|
|
255
282
|
# @return [Integer] Hash code
|
|
256
283
|
def hash
|
|
257
|
-
[app, delay_seconds, id, method_target, method_type, phone, rule_type].hash
|
|
284
|
+
[app, delay_seconds, id, interruption_level, method_target, method_type, phone, rule_type].hash
|
|
258
285
|
end
|
|
259
286
|
|
|
260
287
|
# Builds the object from hash
|
data/lib/incident_io/version.rb
CHANGED
data/lib/incident_io.rb
CHANGED
|
@@ -187,6 +187,7 @@ IncidentIo.autoload :AlertRulesShowResultV3, 'incident_io/models/alert_rules_sho
|
|
|
187
187
|
IncidentIo.autoload :AlertRulesUpdatePayloadV3, 'incident_io/models/alert_rules_update_payload_v3'
|
|
188
188
|
IncidentIo.autoload :AlertRulesUpdateResultV3, 'incident_io/models/alert_rules_update_result_v3'
|
|
189
189
|
IncidentIo.autoload :AlertSlimV2, 'incident_io/models/alert_slim_v2'
|
|
190
|
+
IncidentIo.autoload :AlertSourceAlertmanagerOptionsV2, 'incident_io/models/alert_source_alertmanager_options_v2'
|
|
190
191
|
IncidentIo.autoload :AlertSourceAzureDevopsOptionsV2, 'incident_io/models/alert_source_azure_devops_options_v2'
|
|
191
192
|
IncidentIo.autoload :AlertSourceEmailOptionsPayloadV2, 'incident_io/models/alert_source_email_options_payload_v2'
|
|
192
193
|
IncidentIo.autoload :AlertSourceEmailOptionsV2, 'incident_io/models/alert_source_email_options_v2'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: incident_io_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- incident.io
|
|
@@ -306,6 +306,7 @@ files:
|
|
|
306
306
|
- lib/incident_io/models/alert_rules_update_payload_v3.rb
|
|
307
307
|
- lib/incident_io/models/alert_rules_update_result_v3.rb
|
|
308
308
|
- lib/incident_io/models/alert_slim_v2.rb
|
|
309
|
+
- lib/incident_io/models/alert_source_alertmanager_options_v2.rb
|
|
309
310
|
- lib/incident_io/models/alert_source_azure_devops_options_v2.rb
|
|
310
311
|
- lib/incident_io/models/alert_source_email_options_payload_v2.rb
|
|
311
312
|
- lib/incident_io/models/alert_source_email_options_v2.rb
|