incident_io_api 2.1.0 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e7a91e1f3d5eaf63c351ce67902096216d151d5979a86a655f3abac5c78159e
4
- data.tar.gz: e1cce06d29e94ff99d12e21c06ae9bb9d89500cd633a2417a68ef1fb7e514345
3
+ metadata.gz: bbcc5e4de61ae28dc7d613447ba0929af006fb965b13894890dc453290613a0a
4
+ data.tar.gz: bd3b7cc7abe1768fb4ca20d72da9e3696f0e905238f8d68cce7ed183c644b5b3
5
5
  SHA512:
6
- metadata.gz: 6e00237b007db00f61cbca80606093577b79cd5a7b62c295505284ec20128738fdf69605f17333e5eca442e11cb38b812bc9d9a7c2d9572584dcaafa34aaf153
7
- data.tar.gz: a34c42ca564d0f7fcd46f5e4410a94b8f4415af7f030c3970c8a6b6dd654db07652ad063dbc64aa116f68c1d861a6ff7fb597d62bdaa1326e7bb20dc97c71408
6
+ metadata.gz: a5413e03b0843bb2d24ed4d5e02550575fb97effdb9cef8cb85a75884973dcba09d9cc626beeb5d79bce04314a7c12cadf51f5c49e0d419a8b9025789b4a509d
7
+ data.tar.gz: a222edd8171c69d6fede2f22151b4b54d9f3d6ad117ab2dfbe8a193a280afc4b8a7a34acaab29de08ebf7dc5c12a56dd4f2f62a0ffae11b6a13f1baca4bcb0f5
@@ -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
@@ -4,5 +4,5 @@ module IncidentIo
4
4
  # The release workflow sets this before building, so it tracks whatever we
5
5
  # last published. Listed in .openapi-generator-ignore so regeneration can't
6
6
  # reset it.
7
- VERSION = "2.1.0"
7
+ VERSION = "2.2.0"
8
8
  end
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.1.0
4
+ version: 2.2.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-09-30 00:00:00.000000000 Z
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