incident_io_api 2.1.0 → 2.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.
- checksums.yaml +4 -4
- data/lib/incident_io/models/grouping_settings_v3.rb +11 -1
- data/lib/incident_io/models/policy_finding_shift_conflict_shift_v2.rb +239 -0
- data/lib/incident_io/models/policy_finding_shift_conflict_v2.rb +249 -0
- data/lib/incident_io/models/policy_finding_v2.rb +10 -1
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f691ff6e0620300032fb0df3529db5e5dc5d5873a05084b97bd751953cbed684
|
|
4
|
+
data.tar.gz: 3c9b591eea0b994d0b543af852ea8fcf34633b784ec1fa4a9a6dae669c8f4894
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a5a57ab0dd3f7e0477e9f2bb40459bd74cb712a8a40390192a44fda2b1ac5d2510f2a51582de9a375a67f5d3e37f8b5211eeb4b9698814b8fe7ceb661a4ec4fd
|
|
7
|
+
data.tar.gz: 51695b740bb9abd863207da4deeffc07a889728e4487e0aa4dff18e1456c45ad51bf76cc1296f71a6496b89095ebccd7694f4cf8d9ae2955e02a221189ca10f3
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module IncidentIo
|
|
17
17
|
class GroupingSettingsV3 < ApiModelBase
|
|
18
|
+
# Use AI to group similar looking alerts. AI alert grouping can only group alerts that are attributed to the same team, so grouping keys must only contain the team alert attribute. Private alerts are grouped by key alone unless AI incident access allows private incidents and alerts. Omit it on an update to keep the current value.
|
|
19
|
+
attr_accessor :ai_enabled
|
|
20
|
+
|
|
18
21
|
# Whether grouping is enabled
|
|
19
22
|
attr_accessor :enabled
|
|
20
23
|
|
|
@@ -30,6 +33,7 @@ module IncidentIo
|
|
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
34
|
def self.attribute_map
|
|
32
35
|
{
|
|
36
|
+
:'ai_enabled' => :'ai_enabled',
|
|
33
37
|
:'enabled' => :'enabled',
|
|
34
38
|
:'grouping_keys' => :'grouping_keys',
|
|
35
39
|
:'window_seconds' => :'window_seconds',
|
|
@@ -50,6 +54,7 @@ module IncidentIo
|
|
|
50
54
|
# Attribute type mapping.
|
|
51
55
|
def self.openapi_types
|
|
52
56
|
{
|
|
57
|
+
:'ai_enabled' => :'Boolean',
|
|
53
58
|
:'enabled' => :'Boolean',
|
|
54
59
|
:'grouping_keys' => :'Array<GroupingKeyV3>',
|
|
55
60
|
:'window_seconds' => :'Integer',
|
|
@@ -79,6 +84,10 @@ module IncidentIo
|
|
|
79
84
|
h[k.to_sym] = v
|
|
80
85
|
}
|
|
81
86
|
|
|
87
|
+
if attributes.key?(:'ai_enabled')
|
|
88
|
+
self.ai_enabled = attributes[:'ai_enabled']
|
|
89
|
+
end
|
|
90
|
+
|
|
82
91
|
if attributes.key?(:'enabled')
|
|
83
92
|
self.enabled = attributes[:'enabled']
|
|
84
93
|
else
|
|
@@ -163,6 +172,7 @@ module IncidentIo
|
|
|
163
172
|
def ==(o)
|
|
164
173
|
return true if self.equal?(o)
|
|
165
174
|
self.class == o.class &&
|
|
175
|
+
ai_enabled == o.ai_enabled &&
|
|
166
176
|
enabled == o.enabled &&
|
|
167
177
|
grouping_keys == o.grouping_keys &&
|
|
168
178
|
window_seconds == o.window_seconds &&
|
|
@@ -178,7 +188,7 @@ module IncidentIo
|
|
|
178
188
|
# Calculates hash code according to all attributes.
|
|
179
189
|
# @return [Integer] Hash code
|
|
180
190
|
def hash
|
|
181
|
-
[enabled, grouping_keys, window_seconds, window_type].hash
|
|
191
|
+
[ai_enabled, enabled, grouping_keys, window_seconds, window_type].hash
|
|
182
192
|
end
|
|
183
193
|
|
|
184
194
|
# Builds the object from hash
|
|
@@ -0,0 +1,239 @@
|
|
|
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 PolicyFindingShiftConflictShiftV2 < ApiModelBase
|
|
18
|
+
# When this shift ends, which can be after the conflict does
|
|
19
|
+
attr_accessor :end_at
|
|
20
|
+
|
|
21
|
+
# The layer this shift belongs to
|
|
22
|
+
attr_accessor :layer_id
|
|
23
|
+
|
|
24
|
+
# The rotation this shift belongs to
|
|
25
|
+
attr_accessor :rotation_id
|
|
26
|
+
|
|
27
|
+
# The schedule this shift belongs to
|
|
28
|
+
attr_accessor :schedule_id
|
|
29
|
+
|
|
30
|
+
# When this shift starts, which can be before the conflict does
|
|
31
|
+
attr_accessor :start_at
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'end_at' => :'end_at',
|
|
37
|
+
:'layer_id' => :'layer_id',
|
|
38
|
+
:'rotation_id' => :'rotation_id',
|
|
39
|
+
:'schedule_id' => :'schedule_id',
|
|
40
|
+
:'start_at' => :'start_at'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'end_at' => :'Time',
|
|
58
|
+
:'layer_id' => :'String',
|
|
59
|
+
:'rotation_id' => :'String',
|
|
60
|
+
:'schedule_id' => :'String',
|
|
61
|
+
:'start_at' => :'Time'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::PolicyFindingShiftConflictShiftV2` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::PolicyFindingShiftConflictShiftV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'end_at')
|
|
88
|
+
self.end_at = attributes[:'end_at']
|
|
89
|
+
else
|
|
90
|
+
self.end_at = nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'layer_id')
|
|
94
|
+
self.layer_id = attributes[:'layer_id']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'rotation_id')
|
|
98
|
+
self.rotation_id = attributes[:'rotation_id']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'schedule_id')
|
|
102
|
+
self.schedule_id = attributes[:'schedule_id']
|
|
103
|
+
else
|
|
104
|
+
self.schedule_id = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'start_at')
|
|
108
|
+
self.start_at = attributes[:'start_at']
|
|
109
|
+
else
|
|
110
|
+
self.start_at = nil
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
+
# @return Array for valid properties with the reasons
|
|
116
|
+
def list_invalid_properties
|
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
118
|
+
invalid_properties = Array.new
|
|
119
|
+
if @end_at.nil?
|
|
120
|
+
invalid_properties.push('invalid value for "end_at", end_at cannot be nil.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @schedule_id.nil?
|
|
124
|
+
invalid_properties.push('invalid value for "schedule_id", schedule_id cannot be nil.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @start_at.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "start_at", start_at cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
invalid_properties
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Check to see if the all the properties in the model are valid
|
|
135
|
+
# @return true if the model is valid
|
|
136
|
+
def valid?
|
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
|
+
return false if @end_at.nil?
|
|
139
|
+
return false if @schedule_id.nil?
|
|
140
|
+
return false if @start_at.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] end_at Value to be assigned
|
|
146
|
+
def end_at=(end_at)
|
|
147
|
+
if end_at.nil?
|
|
148
|
+
fail ArgumentError, 'end_at cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@end_at = end_at
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] schedule_id Value to be assigned
|
|
156
|
+
def schedule_id=(schedule_id)
|
|
157
|
+
if schedule_id.nil?
|
|
158
|
+
fail ArgumentError, 'schedule_id cannot be nil'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@schedule_id = schedule_id
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Custom attribute writer method with validation
|
|
165
|
+
# @param [Object] start_at Value to be assigned
|
|
166
|
+
def start_at=(start_at)
|
|
167
|
+
if start_at.nil?
|
|
168
|
+
fail ArgumentError, 'start_at cannot be nil'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
@start_at = start_at
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Checks equality by comparing each attribute.
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def ==(o)
|
|
177
|
+
return true if self.equal?(o)
|
|
178
|
+
self.class == o.class &&
|
|
179
|
+
end_at == o.end_at &&
|
|
180
|
+
layer_id == o.layer_id &&
|
|
181
|
+
rotation_id == o.rotation_id &&
|
|
182
|
+
schedule_id == o.schedule_id &&
|
|
183
|
+
start_at == o.start_at
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# @see the `==` method
|
|
187
|
+
# @param [Object] Object to be compared
|
|
188
|
+
def eql?(o)
|
|
189
|
+
self == o
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Calculates hash code according to all attributes.
|
|
193
|
+
# @return [Integer] Hash code
|
|
194
|
+
def hash
|
|
195
|
+
[end_at, layer_id, rotation_id, schedule_id, start_at].hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Builds the object from hash
|
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
200
|
+
# @return [Object] Returns the model itself
|
|
201
|
+
def self.build_from_hash(attributes)
|
|
202
|
+
return nil unless attributes.is_a?(Hash)
|
|
203
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
204
|
+
transformed_hash = {}
|
|
205
|
+
openapi_types.each_pair do |key, type|
|
|
206
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
207
|
+
transformed_hash["#{key}"] = nil
|
|
208
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
209
|
+
# check to ensure the input is an array given that the attribute
|
|
210
|
+
# is documented as an array but the input is not
|
|
211
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
212
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
213
|
+
end
|
|
214
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
215
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
new(transformed_hash)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_hash
|
|
224
|
+
hash = {}
|
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|
|
@@ -0,0 +1,249 @@
|
|
|
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 shift_conflict. Someone is on call in two or more places at once.
|
|
18
|
+
class PolicyFindingShiftConflictV2 < ApiModelBase
|
|
19
|
+
# When the conflict ends
|
|
20
|
+
attr_accessor :end_at
|
|
21
|
+
|
|
22
|
+
# Every shift that overlaps the conflict
|
|
23
|
+
attr_accessor :shifts
|
|
24
|
+
|
|
25
|
+
# When the conflict starts
|
|
26
|
+
attr_accessor :start_at
|
|
27
|
+
|
|
28
|
+
# The user with overlapping shifts
|
|
29
|
+
attr_accessor :user_id
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'end_at' => :'end_at',
|
|
35
|
+
:'shifts' => :'shifts',
|
|
36
|
+
:'start_at' => :'start_at',
|
|
37
|
+
:'user_id' => :'user_id'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'end_at' => :'Time',
|
|
55
|
+
:'shifts' => :'Array<PolicyFindingShiftConflictShiftV2>',
|
|
56
|
+
:'start_at' => :'Time',
|
|
57
|
+
:'user_id' => :'String'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::PolicyFindingShiftConflictV2` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::PolicyFindingShiftConflictV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'end_at')
|
|
84
|
+
self.end_at = attributes[:'end_at']
|
|
85
|
+
else
|
|
86
|
+
self.end_at = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'shifts')
|
|
90
|
+
if (value = attributes[:'shifts']).is_a?(Array)
|
|
91
|
+
self.shifts = value
|
|
92
|
+
end
|
|
93
|
+
else
|
|
94
|
+
self.shifts = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'start_at')
|
|
98
|
+
self.start_at = attributes[:'start_at']
|
|
99
|
+
else
|
|
100
|
+
self.start_at = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'user_id')
|
|
104
|
+
self.user_id = attributes[:'user_id']
|
|
105
|
+
else
|
|
106
|
+
self.user_id = nil
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
111
|
+
# @return Array for valid properties with the reasons
|
|
112
|
+
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
if @end_at.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "end_at", end_at cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if @shifts.nil?
|
|
120
|
+
invalid_properties.push('invalid value for "shifts", shifts cannot be nil.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @start_at.nil?
|
|
124
|
+
invalid_properties.push('invalid value for "start_at", start_at cannot be nil.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @user_id.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
invalid_properties
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Check to see if the all the properties in the model are valid
|
|
135
|
+
# @return true if the model is valid
|
|
136
|
+
def valid?
|
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
|
+
return false if @end_at.nil?
|
|
139
|
+
return false if @shifts.nil?
|
|
140
|
+
return false if @start_at.nil?
|
|
141
|
+
return false if @user_id.nil?
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] end_at Value to be assigned
|
|
147
|
+
def end_at=(end_at)
|
|
148
|
+
if end_at.nil?
|
|
149
|
+
fail ArgumentError, 'end_at cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@end_at = end_at
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] shifts Value to be assigned
|
|
157
|
+
def shifts=(shifts)
|
|
158
|
+
if shifts.nil?
|
|
159
|
+
fail ArgumentError, 'shifts cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@shifts = shifts
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] start_at Value to be assigned
|
|
167
|
+
def start_at=(start_at)
|
|
168
|
+
if start_at.nil?
|
|
169
|
+
fail ArgumentError, 'start_at cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@start_at = start_at
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] user_id Value to be assigned
|
|
177
|
+
def user_id=(user_id)
|
|
178
|
+
if user_id.nil?
|
|
179
|
+
fail ArgumentError, 'user_id cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@user_id = user_id
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Checks equality by comparing each attribute.
|
|
186
|
+
# @param [Object] Object to be compared
|
|
187
|
+
def ==(o)
|
|
188
|
+
return true if self.equal?(o)
|
|
189
|
+
self.class == o.class &&
|
|
190
|
+
end_at == o.end_at &&
|
|
191
|
+
shifts == o.shifts &&
|
|
192
|
+
start_at == o.start_at &&
|
|
193
|
+
user_id == o.user_id
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @see the `==` method
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def eql?(o)
|
|
199
|
+
self == o
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Calculates hash code according to all attributes.
|
|
203
|
+
# @return [Integer] Hash code
|
|
204
|
+
def hash
|
|
205
|
+
[end_at, shifts, start_at, user_id].hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Builds the object from hash
|
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
210
|
+
# @return [Object] Returns the model itself
|
|
211
|
+
def self.build_from_hash(attributes)
|
|
212
|
+
return nil unless attributes.is_a?(Hash)
|
|
213
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
214
|
+
transformed_hash = {}
|
|
215
|
+
openapi_types.each_pair do |key, type|
|
|
216
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
217
|
+
transformed_hash["#{key}"] = nil
|
|
218
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
219
|
+
# check to ensure the input is an array given that the attribute
|
|
220
|
+
# is documented as an array but the input is not
|
|
221
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
222
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
223
|
+
end
|
|
224
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
225
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
new(transformed_hash)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns the object in the form of hash
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_hash
|
|
234
|
+
hash = {}
|
|
235
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
236
|
+
value = self.send(attr)
|
|
237
|
+
if value.nil?
|
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
hash[param] = _to_hash(value)
|
|
243
|
+
end
|
|
244
|
+
hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
@@ -50,6 +50,8 @@ module IncidentIo
|
|
|
50
50
|
|
|
51
51
|
attr_accessor :schedule
|
|
52
52
|
|
|
53
|
+
attr_accessor :shift_conflict
|
|
54
|
+
|
|
53
55
|
# Where this finding is in its lifecycle Known values: `pending`, `active`, `resolved`, `cancelled`, `dismissed`
|
|
54
56
|
attr_accessor :state
|
|
55
57
|
|
|
@@ -74,6 +76,7 @@ module IncidentIo
|
|
|
74
76
|
:'post_mortem' => :'post_mortem',
|
|
75
77
|
:'responsible_users' => :'responsible_users',
|
|
76
78
|
:'schedule' => :'schedule',
|
|
79
|
+
:'shift_conflict' => :'shift_conflict',
|
|
77
80
|
:'state' => :'state',
|
|
78
81
|
:'updated_at' => :'updated_at',
|
|
79
82
|
:'vacation_conflict' => :'vacation_conflict'
|
|
@@ -107,6 +110,7 @@ module IncidentIo
|
|
|
107
110
|
:'post_mortem' => :'PolicyFindingPostMortemV2',
|
|
108
111
|
:'responsible_users' => :'Array<UserV2>',
|
|
109
112
|
:'schedule' => :'PolicyFindingScheduleV2',
|
|
113
|
+
:'shift_conflict' => :'PolicyFindingShiftConflictV2',
|
|
110
114
|
:'state' => :'String',
|
|
111
115
|
:'updated_at' => :'Time',
|
|
112
116
|
:'vacation_conflict' => :'PolicyFindingVacationConflictV2'
|
|
@@ -205,6 +209,10 @@ module IncidentIo
|
|
|
205
209
|
self.schedule = attributes[:'schedule']
|
|
206
210
|
end
|
|
207
211
|
|
|
212
|
+
if attributes.key?(:'shift_conflict')
|
|
213
|
+
self.shift_conflict = attributes[:'shift_conflict']
|
|
214
|
+
end
|
|
215
|
+
|
|
208
216
|
if attributes.key?(:'state')
|
|
209
217
|
self.state = attributes[:'state']
|
|
210
218
|
else
|
|
@@ -376,6 +384,7 @@ module IncidentIo
|
|
|
376
384
|
post_mortem == o.post_mortem &&
|
|
377
385
|
responsible_users == o.responsible_users &&
|
|
378
386
|
schedule == o.schedule &&
|
|
387
|
+
shift_conflict == o.shift_conflict &&
|
|
379
388
|
state == o.state &&
|
|
380
389
|
updated_at == o.updated_at &&
|
|
381
390
|
vacation_conflict == o.vacation_conflict
|
|
@@ -390,7 +399,7 @@ module IncidentIo
|
|
|
390
399
|
# Calculates hash code according to all attributes.
|
|
391
400
|
# @return [Integer] Hash code
|
|
392
401
|
def hash
|
|
393
|
-
[created_at, days, debrief, dismissal, due_at, follow_up, id, last_checked_at, on_call_readiness, policy_id, policy_type, post_mortem, responsible_users, schedule, state, updated_at, vacation_conflict].hash
|
|
402
|
+
[created_at, days, debrief, dismissal, due_at, follow_up, id, last_checked_at, on_call_readiness, policy_id, policy_type, post_mortem, responsible_users, schedule, shift_conflict, state, updated_at, vacation_conflict].hash
|
|
394
403
|
end
|
|
395
404
|
|
|
396
405
|
# Builds the object from hash
|
data/lib/incident_io/version.rb
CHANGED
data/lib/incident_io.rb
CHANGED
|
@@ -956,6 +956,8 @@ IncidentIo.autoload :PolicyFindingPostMortemV2, 'incident_io/models/policy_findi
|
|
|
956
956
|
IncidentIo.autoload :PolicyFindingReadinessRuleV2, 'incident_io/models/policy_finding_readiness_rule_v2'
|
|
957
957
|
IncidentIo.autoload :PolicyFindingScheduleImpactedUserV2, 'incident_io/models/policy_finding_schedule_impacted_user_v2'
|
|
958
958
|
IncidentIo.autoload :PolicyFindingScheduleV2, 'incident_io/models/policy_finding_schedule_v2'
|
|
959
|
+
IncidentIo.autoload :PolicyFindingShiftConflictShiftV2, 'incident_io/models/policy_finding_shift_conflict_shift_v2'
|
|
960
|
+
IncidentIo.autoload :PolicyFindingShiftConflictV2, 'incident_io/models/policy_finding_shift_conflict_v2'
|
|
959
961
|
IncidentIo.autoload :PolicyFindingV2, 'incident_io/models/policy_finding_v2'
|
|
960
962
|
IncidentIo.autoload :PolicyFindingVacationConflictV2, 'incident_io/models/policy_finding_vacation_conflict_v2'
|
|
961
963
|
IncidentIo.autoload :PolicyFindingsDismissPayloadV2, 'incident_io/models/policy_findings_dismiss_payload_v2'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: incident_io_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- incident.io
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -1078,6 +1078,8 @@ files:
|
|
|
1078
1078
|
- lib/incident_io/models/policy_finding_readiness_rule_v2.rb
|
|
1079
1079
|
- lib/incident_io/models/policy_finding_schedule_impacted_user_v2.rb
|
|
1080
1080
|
- lib/incident_io/models/policy_finding_schedule_v2.rb
|
|
1081
|
+
- lib/incident_io/models/policy_finding_shift_conflict_shift_v2.rb
|
|
1082
|
+
- lib/incident_io/models/policy_finding_shift_conflict_v2.rb
|
|
1081
1083
|
- lib/incident_io/models/policy_finding_v2.rb
|
|
1082
1084
|
- lib/incident_io/models/policy_finding_vacation_conflict_v2.rb
|
|
1083
1085
|
- lib/incident_io/models/policy_findings_dismiss_payload_v2.rb
|