incident_io_api 4.4.0 → 4.6.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/on_call_notification_rule_public_v2.rb +29 -2
- data/lib/incident_io/models/policies_create_payload_v2.rb +1 -1
- data/lib/incident_io/models/policies_update_payload_v2.rb +1 -1
- data/lib/incident_io/models/policy_finding_on_call_readiness_v2.rb +61 -3
- data/lib/incident_io/models/policy_on_call_readiness_payload_v2.rb +197 -0
- data/lib/incident_io/models/policy_on_call_readiness_v2.rb +61 -1
- 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: bf8f6d326e216c384457b64d803d383e6801fac19b0b9a6488a9c2de0ce18a51
|
|
4
|
+
data.tar.gz: ec210425b85a08c420682f18e33bfdca0218a72882c71140378243424af4e299
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55523009d94b5a1193f4474c344ce70f3c5389639dcaba7b46d38e96a1a726f789bb04d1bd664d82328bdb3ef3d8fa58be91b99dae2c81da859996aa40beac49
|
|
7
|
+
data.tar.gz: 4b712ca32b54fe1a2de4403a40ae13e16e0d9b278acc4d6caecd1dbf4b0ffce7a9b45794a52d1e78b07339ccdfcfc56a4cbfa9aacd9da82ef5bfd44f8a7ddc57
|
|
@@ -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
|
|
@@ -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
|
|
@@ -83,7 +83,7 @@ module IncidentIo
|
|
|
83
83
|
:'expressions' => :'Array<ExpressionPayloadV2>',
|
|
84
84
|
:'follow_up' => :'PolicyFollowUpPayloadV2',
|
|
85
85
|
:'name' => :'String',
|
|
86
|
-
:'on_call_readiness' => :'
|
|
86
|
+
:'on_call_readiness' => :'PolicyOnCallReadinessPayloadV2',
|
|
87
87
|
:'policy_type' => :'String',
|
|
88
88
|
:'post_mortem' => :'PolicyPostMortemPayloadV2',
|
|
89
89
|
:'schedule' => :'PolicyScheduleV2',
|
|
@@ -83,7 +83,7 @@ module IncidentIo
|
|
|
83
83
|
:'expressions' => :'Array<ExpressionPayloadV2>',
|
|
84
84
|
:'follow_up' => :'PolicyFollowUpPayloadV2',
|
|
85
85
|
:'name' => :'String',
|
|
86
|
-
:'on_call_readiness' => :'
|
|
86
|
+
:'on_call_readiness' => :'PolicyOnCallReadinessPayloadV2',
|
|
87
87
|
:'policy_type' => :'String',
|
|
88
88
|
:'post_mortem' => :'PolicyPostMortemPayloadV2',
|
|
89
89
|
:'schedule' => :'PolicyScheduleV2',
|
|
@@ -16,10 +16,16 @@ require 'time'
|
|
|
16
16
|
module IncidentIo
|
|
17
17
|
# Set when policy_type is on_call_readiness. The user is always the one the finding is about.
|
|
18
18
|
class PolicyFindingOnCallReadinessV2 < ApiModelBase
|
|
19
|
-
# The high
|
|
19
|
+
# The high interruption level rules the policy requires, and whether each was met.
|
|
20
|
+
attr_accessor :high_interruption_level
|
|
21
|
+
|
|
22
|
+
# Deprecated: use high_interruption_level, which always has the same value.
|
|
20
23
|
attr_accessor :high_urgency
|
|
21
24
|
|
|
22
|
-
# The low
|
|
25
|
+
# The low interruption level rules the policy requires, and whether each was met.
|
|
26
|
+
attr_accessor :low_interruption_level
|
|
27
|
+
|
|
28
|
+
# Deprecated: use low_interruption_level, which always has the same value.
|
|
23
29
|
attr_accessor :low_urgency
|
|
24
30
|
|
|
25
31
|
# The user whose notification rules fell short
|
|
@@ -28,7 +34,9 @@ module IncidentIo
|
|
|
28
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
35
|
def self.attribute_map
|
|
30
36
|
{
|
|
37
|
+
:'high_interruption_level' => :'high_interruption_level',
|
|
31
38
|
:'high_urgency' => :'high_urgency',
|
|
39
|
+
:'low_interruption_level' => :'low_interruption_level',
|
|
32
40
|
:'low_urgency' => :'low_urgency',
|
|
33
41
|
:'user_id' => :'user_id'
|
|
34
42
|
}
|
|
@@ -47,7 +55,9 @@ module IncidentIo
|
|
|
47
55
|
# Attribute type mapping.
|
|
48
56
|
def self.openapi_types
|
|
49
57
|
{
|
|
58
|
+
:'high_interruption_level' => :'Array<PolicyFindingReadinessRuleV2>',
|
|
50
59
|
:'high_urgency' => :'Array<PolicyFindingReadinessRuleV2>',
|
|
60
|
+
:'low_interruption_level' => :'Array<PolicyFindingReadinessRuleV2>',
|
|
51
61
|
:'low_urgency' => :'Array<PolicyFindingReadinessRuleV2>',
|
|
52
62
|
:'user_id' => :'String'
|
|
53
63
|
}
|
|
@@ -75,6 +85,14 @@ module IncidentIo
|
|
|
75
85
|
h[k.to_sym] = v
|
|
76
86
|
}
|
|
77
87
|
|
|
88
|
+
if attributes.key?(:'high_interruption_level')
|
|
89
|
+
if (value = attributes[:'high_interruption_level']).is_a?(Array)
|
|
90
|
+
self.high_interruption_level = value
|
|
91
|
+
end
|
|
92
|
+
else
|
|
93
|
+
self.high_interruption_level = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
78
96
|
if attributes.key?(:'high_urgency')
|
|
79
97
|
if (value = attributes[:'high_urgency']).is_a?(Array)
|
|
80
98
|
self.high_urgency = value
|
|
@@ -83,6 +101,14 @@ module IncidentIo
|
|
|
83
101
|
self.high_urgency = nil
|
|
84
102
|
end
|
|
85
103
|
|
|
104
|
+
if attributes.key?(:'low_interruption_level')
|
|
105
|
+
if (value = attributes[:'low_interruption_level']).is_a?(Array)
|
|
106
|
+
self.low_interruption_level = value
|
|
107
|
+
end
|
|
108
|
+
else
|
|
109
|
+
self.low_interruption_level = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
86
112
|
if attributes.key?(:'low_urgency')
|
|
87
113
|
if (value = attributes[:'low_urgency']).is_a?(Array)
|
|
88
114
|
self.low_urgency = value
|
|
@@ -103,10 +129,18 @@ module IncidentIo
|
|
|
103
129
|
def list_invalid_properties
|
|
104
130
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
131
|
invalid_properties = Array.new
|
|
132
|
+
if @high_interruption_level.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "high_interruption_level", high_interruption_level cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
106
136
|
if @high_urgency.nil?
|
|
107
137
|
invalid_properties.push('invalid value for "high_urgency", high_urgency cannot be nil.')
|
|
108
138
|
end
|
|
109
139
|
|
|
140
|
+
if @low_interruption_level.nil?
|
|
141
|
+
invalid_properties.push('invalid value for "low_interruption_level", low_interruption_level cannot be nil.')
|
|
142
|
+
end
|
|
143
|
+
|
|
110
144
|
if @low_urgency.nil?
|
|
111
145
|
invalid_properties.push('invalid value for "low_urgency", low_urgency cannot be nil.')
|
|
112
146
|
end
|
|
@@ -122,12 +156,24 @@ module IncidentIo
|
|
|
122
156
|
# @return true if the model is valid
|
|
123
157
|
def valid?
|
|
124
158
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
159
|
+
return false if @high_interruption_level.nil?
|
|
125
160
|
return false if @high_urgency.nil?
|
|
161
|
+
return false if @low_interruption_level.nil?
|
|
126
162
|
return false if @low_urgency.nil?
|
|
127
163
|
return false if @user_id.nil?
|
|
128
164
|
true
|
|
129
165
|
end
|
|
130
166
|
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] high_interruption_level Value to be assigned
|
|
169
|
+
def high_interruption_level=(high_interruption_level)
|
|
170
|
+
if high_interruption_level.nil?
|
|
171
|
+
fail ArgumentError, 'high_interruption_level cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@high_interruption_level = high_interruption_level
|
|
175
|
+
end
|
|
176
|
+
|
|
131
177
|
# Custom attribute writer method with validation
|
|
132
178
|
# @param [Object] high_urgency Value to be assigned
|
|
133
179
|
def high_urgency=(high_urgency)
|
|
@@ -138,6 +184,16 @@ module IncidentIo
|
|
|
138
184
|
@high_urgency = high_urgency
|
|
139
185
|
end
|
|
140
186
|
|
|
187
|
+
# Custom attribute writer method with validation
|
|
188
|
+
# @param [Object] low_interruption_level Value to be assigned
|
|
189
|
+
def low_interruption_level=(low_interruption_level)
|
|
190
|
+
if low_interruption_level.nil?
|
|
191
|
+
fail ArgumentError, 'low_interruption_level cannot be nil'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
@low_interruption_level = low_interruption_level
|
|
195
|
+
end
|
|
196
|
+
|
|
141
197
|
# Custom attribute writer method with validation
|
|
142
198
|
# @param [Object] low_urgency Value to be assigned
|
|
143
199
|
def low_urgency=(low_urgency)
|
|
@@ -163,7 +219,9 @@ module IncidentIo
|
|
|
163
219
|
def ==(o)
|
|
164
220
|
return true if self.equal?(o)
|
|
165
221
|
self.class == o.class &&
|
|
222
|
+
high_interruption_level == o.high_interruption_level &&
|
|
166
223
|
high_urgency == o.high_urgency &&
|
|
224
|
+
low_interruption_level == o.low_interruption_level &&
|
|
167
225
|
low_urgency == o.low_urgency &&
|
|
168
226
|
user_id == o.user_id
|
|
169
227
|
end
|
|
@@ -177,7 +235,7 @@ module IncidentIo
|
|
|
177
235
|
# Calculates hash code according to all attributes.
|
|
178
236
|
# @return [Integer] Hash code
|
|
179
237
|
def hash
|
|
180
|
-
[high_urgency, low_urgency, user_id].hash
|
|
238
|
+
[high_interruption_level, high_urgency, low_interruption_level, low_urgency, user_id].hash
|
|
181
239
|
end
|
|
182
240
|
|
|
183
241
|
# Builds the object from hash
|
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
# Set when policy_type is on_call_readiness. The assignee is always the user the finding is about and cannot be configured.
|
|
18
|
+
class PolicyOnCallReadinessPayloadV2 < ApiModelBase
|
|
19
|
+
# advisory reports only; blocking also prevents users saving non-compliant notification rules. Defaults to advisory. Known values: `advisory`, `blocking`
|
|
20
|
+
attr_accessor :enforcement
|
|
21
|
+
|
|
22
|
+
# The high interruption level rules the policy requires.
|
|
23
|
+
attr_accessor :high_interruption_level
|
|
24
|
+
|
|
25
|
+
# Deprecated: use high_interruption_level, which always has the same value.
|
|
26
|
+
attr_accessor :high_urgency
|
|
27
|
+
|
|
28
|
+
# The low interruption level rules the policy requires.
|
|
29
|
+
attr_accessor :low_interruption_level
|
|
30
|
+
|
|
31
|
+
# Deprecated: use low_interruption_level, which always has the same value.
|
|
32
|
+
attr_accessor :low_urgency
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'enforcement' => :'enforcement',
|
|
38
|
+
:'high_interruption_level' => :'high_interruption_level',
|
|
39
|
+
:'high_urgency' => :'high_urgency',
|
|
40
|
+
:'low_interruption_level' => :'low_interruption_level',
|
|
41
|
+
:'low_urgency' => :'low_urgency'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'enforcement' => :'String',
|
|
59
|
+
:'high_interruption_level' => :'Array<PolicyReadinessRuleV2>',
|
|
60
|
+
:'high_urgency' => :'Array<PolicyReadinessRuleV2>',
|
|
61
|
+
:'low_interruption_level' => :'Array<PolicyReadinessRuleV2>',
|
|
62
|
+
:'low_urgency' => :'Array<PolicyReadinessRuleV2>'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::PolicyOnCallReadinessPayloadV2` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::PolicyOnCallReadinessPayloadV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'enforcement')
|
|
89
|
+
self.enforcement = attributes[:'enforcement']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'high_interruption_level')
|
|
93
|
+
if (value = attributes[:'high_interruption_level']).is_a?(Array)
|
|
94
|
+
self.high_interruption_level = value
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'high_urgency')
|
|
99
|
+
if (value = attributes[:'high_urgency']).is_a?(Array)
|
|
100
|
+
self.high_urgency = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'low_interruption_level')
|
|
105
|
+
if (value = attributes[:'low_interruption_level']).is_a?(Array)
|
|
106
|
+
self.low_interruption_level = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'low_urgency')
|
|
111
|
+
if (value = attributes[:'low_urgency']).is_a?(Array)
|
|
112
|
+
self.low_urgency = value
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
118
|
+
# @return Array for valid properties with the reasons
|
|
119
|
+
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
121
|
+
invalid_properties = Array.new
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks equality by comparing each attribute.
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def ==(o)
|
|
135
|
+
return true if self.equal?(o)
|
|
136
|
+
self.class == o.class &&
|
|
137
|
+
enforcement == o.enforcement &&
|
|
138
|
+
high_interruption_level == o.high_interruption_level &&
|
|
139
|
+
high_urgency == o.high_urgency &&
|
|
140
|
+
low_interruption_level == o.low_interruption_level &&
|
|
141
|
+
low_urgency == o.low_urgency
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# @see the `==` method
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def eql?(o)
|
|
147
|
+
self == o
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Calculates hash code according to all attributes.
|
|
151
|
+
# @return [Integer] Hash code
|
|
152
|
+
def hash
|
|
153
|
+
[enforcement, high_interruption_level, high_urgency, low_interruption_level, low_urgency].hash
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Builds the object from hash
|
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
+
# @return [Object] Returns the model itself
|
|
159
|
+
def self.build_from_hash(attributes)
|
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
+
transformed_hash = {}
|
|
163
|
+
openapi_types.each_pair do |key, type|
|
|
164
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = nil
|
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
167
|
+
# check to ensure the input is an array given that the attribute
|
|
168
|
+
# is documented as an array but the input is not
|
|
169
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
170
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
171
|
+
end
|
|
172
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
new(transformed_hash)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Returns the object in the form of hash
|
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
|
181
|
+
def to_hash
|
|
182
|
+
hash = {}
|
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
184
|
+
value = self.send(attr)
|
|
185
|
+
if value.nil?
|
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
hash[param] = _to_hash(value)
|
|
191
|
+
end
|
|
192
|
+
hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
end
|
|
@@ -19,15 +19,25 @@ module IncidentIo
|
|
|
19
19
|
# advisory reports only; blocking also prevents users saving non-compliant notification rules. Defaults to advisory. Known values: `advisory`, `blocking`
|
|
20
20
|
attr_accessor :enforcement
|
|
21
21
|
|
|
22
|
+
# The high interruption level rules the policy requires.
|
|
23
|
+
attr_accessor :high_interruption_level
|
|
24
|
+
|
|
25
|
+
# Deprecated: use high_interruption_level, which always has the same value.
|
|
22
26
|
attr_accessor :high_urgency
|
|
23
27
|
|
|
28
|
+
# The low interruption level rules the policy requires.
|
|
29
|
+
attr_accessor :low_interruption_level
|
|
30
|
+
|
|
31
|
+
# Deprecated: use low_interruption_level, which always has the same value.
|
|
24
32
|
attr_accessor :low_urgency
|
|
25
33
|
|
|
26
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
35
|
def self.attribute_map
|
|
28
36
|
{
|
|
29
37
|
:'enforcement' => :'enforcement',
|
|
38
|
+
:'high_interruption_level' => :'high_interruption_level',
|
|
30
39
|
:'high_urgency' => :'high_urgency',
|
|
40
|
+
:'low_interruption_level' => :'low_interruption_level',
|
|
31
41
|
:'low_urgency' => :'low_urgency'
|
|
32
42
|
}
|
|
33
43
|
end
|
|
@@ -46,7 +56,9 @@ module IncidentIo
|
|
|
46
56
|
def self.openapi_types
|
|
47
57
|
{
|
|
48
58
|
:'enforcement' => :'String',
|
|
59
|
+
:'high_interruption_level' => :'Array<PolicyReadinessRuleV2>',
|
|
49
60
|
:'high_urgency' => :'Array<PolicyReadinessRuleV2>',
|
|
61
|
+
:'low_interruption_level' => :'Array<PolicyReadinessRuleV2>',
|
|
50
62
|
:'low_urgency' => :'Array<PolicyReadinessRuleV2>'
|
|
51
63
|
}
|
|
52
64
|
end
|
|
@@ -77,12 +89,28 @@ module IncidentIo
|
|
|
77
89
|
self.enforcement = attributes[:'enforcement']
|
|
78
90
|
end
|
|
79
91
|
|
|
92
|
+
if attributes.key?(:'high_interruption_level')
|
|
93
|
+
if (value = attributes[:'high_interruption_level']).is_a?(Array)
|
|
94
|
+
self.high_interruption_level = value
|
|
95
|
+
end
|
|
96
|
+
else
|
|
97
|
+
self.high_interruption_level = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
80
100
|
if attributes.key?(:'high_urgency')
|
|
81
101
|
if (value = attributes[:'high_urgency']).is_a?(Array)
|
|
82
102
|
self.high_urgency = value
|
|
83
103
|
end
|
|
84
104
|
end
|
|
85
105
|
|
|
106
|
+
if attributes.key?(:'low_interruption_level')
|
|
107
|
+
if (value = attributes[:'low_interruption_level']).is_a?(Array)
|
|
108
|
+
self.low_interruption_level = value
|
|
109
|
+
end
|
|
110
|
+
else
|
|
111
|
+
self.low_interruption_level = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
86
114
|
if attributes.key?(:'low_urgency')
|
|
87
115
|
if (value = attributes[:'low_urgency']).is_a?(Array)
|
|
88
116
|
self.low_urgency = value
|
|
@@ -95,6 +123,14 @@ module IncidentIo
|
|
|
95
123
|
def list_invalid_properties
|
|
96
124
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
125
|
invalid_properties = Array.new
|
|
126
|
+
if @high_interruption_level.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "high_interruption_level", high_interruption_level cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @low_interruption_level.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "low_interruption_level", low_interruption_level cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
98
134
|
invalid_properties
|
|
99
135
|
end
|
|
100
136
|
|
|
@@ -102,16 +138,40 @@ module IncidentIo
|
|
|
102
138
|
# @return true if the model is valid
|
|
103
139
|
def valid?
|
|
104
140
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
|
+
return false if @high_interruption_level.nil?
|
|
142
|
+
return false if @low_interruption_level.nil?
|
|
105
143
|
true
|
|
106
144
|
end
|
|
107
145
|
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] high_interruption_level Value to be assigned
|
|
148
|
+
def high_interruption_level=(high_interruption_level)
|
|
149
|
+
if high_interruption_level.nil?
|
|
150
|
+
fail ArgumentError, 'high_interruption_level cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@high_interruption_level = high_interruption_level
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] low_interruption_level Value to be assigned
|
|
158
|
+
def low_interruption_level=(low_interruption_level)
|
|
159
|
+
if low_interruption_level.nil?
|
|
160
|
+
fail ArgumentError, 'low_interruption_level cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@low_interruption_level = low_interruption_level
|
|
164
|
+
end
|
|
165
|
+
|
|
108
166
|
# Checks equality by comparing each attribute.
|
|
109
167
|
# @param [Object] Object to be compared
|
|
110
168
|
def ==(o)
|
|
111
169
|
return true if self.equal?(o)
|
|
112
170
|
self.class == o.class &&
|
|
113
171
|
enforcement == o.enforcement &&
|
|
172
|
+
high_interruption_level == o.high_interruption_level &&
|
|
114
173
|
high_urgency == o.high_urgency &&
|
|
174
|
+
low_interruption_level == o.low_interruption_level &&
|
|
115
175
|
low_urgency == o.low_urgency
|
|
116
176
|
end
|
|
117
177
|
|
|
@@ -124,7 +184,7 @@ module IncidentIo
|
|
|
124
184
|
# Calculates hash code according to all attributes.
|
|
125
185
|
# @return [Integer] Hash code
|
|
126
186
|
def hash
|
|
127
|
-
[enforcement, high_urgency, low_urgency].hash
|
|
187
|
+
[enforcement, high_interruption_level, high_urgency, low_interruption_level, low_urgency].hash
|
|
128
188
|
end
|
|
129
189
|
|
|
130
190
|
# Builds the object from hash
|
data/lib/incident_io/version.rb
CHANGED
data/lib/incident_io.rb
CHANGED
|
@@ -1308,6 +1308,7 @@ IncidentIo.autoload :PolicyFindingsRestoreResultV2, 'incident_io/models/policy_f
|
|
|
1308
1308
|
IncidentIo.autoload :PolicyFindingsShowResultV2, 'incident_io/models/policy_findings_show_result_v2'
|
|
1309
1309
|
IncidentIo.autoload :PolicyFollowUpPayloadV2, 'incident_io/models/policy_follow_up_payload_v2'
|
|
1310
1310
|
IncidentIo.autoload :PolicyFollowUpV2, 'incident_io/models/policy_follow_up_v2'
|
|
1311
|
+
IncidentIo.autoload :PolicyOnCallReadinessPayloadV2, 'incident_io/models/policy_on_call_readiness_payload_v2'
|
|
1311
1312
|
IncidentIo.autoload :PolicyOnCallReadinessV2, 'incident_io/models/policy_on_call_readiness_v2'
|
|
1312
1313
|
IncidentIo.autoload :PolicyPostMortemPayloadV2, 'incident_io/models/policy_post_mortem_payload_v2'
|
|
1313
1314
|
IncidentIo.autoload :PolicyPostMortemV2, 'incident_io/models/policy_post_mortem_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.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- incident.io
|
|
@@ -1440,6 +1440,7 @@ files:
|
|
|
1440
1440
|
- lib/incident_io/models/policy_findings_show_result_v2.rb
|
|
1441
1441
|
- lib/incident_io/models/policy_follow_up_payload_v2.rb
|
|
1442
1442
|
- lib/incident_io/models/policy_follow_up_v2.rb
|
|
1443
|
+
- lib/incident_io/models/policy_on_call_readiness_payload_v2.rb
|
|
1443
1444
|
- lib/incident_io/models/policy_on_call_readiness_v2.rb
|
|
1444
1445
|
- lib/incident_io/models/policy_post_mortem_payload_v2.rb
|
|
1445
1446
|
- lib/incident_io/models/policy_post_mortem_v2.rb
|