activitysmith 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -9
  3. data/generated/activitysmith_openapi/api/app_icon_badges_api.rb +4 -4
  4. data/generated/activitysmith_openapi/api/devices_api.rb +100 -0
  5. data/generated/activitysmith_openapi/api/live_activities_api.rb +2 -2
  6. data/generated/activitysmith_openapi/api/metrics_api.rb +87 -4
  7. data/generated/activitysmith_openapi/api/push_notifications_api.rb +147 -2
  8. data/generated/activitysmith_openapi/models/account_device.rb +367 -0
  9. data/generated/activitysmith_openapi/models/account_device_list_response.rb +239 -0
  10. data/generated/activitysmith_openapi/models/account_device_list_response_meta.rb +299 -0
  11. data/generated/activitysmith_openapi/models/app_icon_badge_count_update_response.rb +35 -5
  12. data/generated/activitysmith_openapi/models/live_activity_end_response.rb +64 -4
  13. data/generated/activitysmith_openapi/models/live_activity_start_response.rb +35 -4
  14. data/generated/activitysmith_openapi/models/live_activity_stream_delete_response.rb +64 -4
  15. data/generated/activitysmith_openapi/models/live_activity_stream_put_response.rb +54 -4
  16. data/generated/activitysmith_openapi/models/live_activity_update_response.rb +76 -4
  17. data/generated/activitysmith_openapi/models/metric.rb +411 -0
  18. data/generated/activitysmith_openapi/models/metric_response.rb +221 -0
  19. data/generated/activitysmith_openapi/models/metric_upsert_request.rb +370 -0
  20. data/generated/activitysmith_openapi/models/metric_value_update_response.rb +14 -4
  21. data/generated/activitysmith_openapi/models/no_recipients_error.rb +21 -1
  22. data/generated/activitysmith_openapi/models/push_notification_dismiss_response.rb +257 -0
  23. data/generated/activitysmith_openapi/models/push_notification_replace_request.rb +434 -0
  24. data/generated/activitysmith_openapi/models/push_notification_replace_response.rb +298 -0
  25. data/generated/activitysmith_openapi/models/push_notification_response.rb +63 -4
  26. data/generated/activitysmith_openapi/version.rb +1 -1
  27. data/generated/activitysmith_openapi.rb +10 -0
  28. data/generated/openapi-source.json +2 -2
  29. data/lib/activitysmith/client.rb +3 -1
  30. data/lib/activitysmith/devices.rb +30 -0
  31. data/lib/activitysmith/metrics.rb +15 -1
  32. data/lib/activitysmith/notifications.rb +23 -0
  33. data/lib/activitysmith/version.rb +1 -1
  34. data/lib/activitysmith.rb +1 -0
  35. metadata +13 -2
@@ -0,0 +1,299 @@
1
+ =begin
2
+ #ActivitySmith API
3
+
4
+ #Send push notifications and Live Activities to your own devices via a single API key.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class AccountDeviceListResponseMeta
18
+ # Devices matching the filter.
19
+ attr_accessor :total
20
+
21
+ attr_accessor :limit
22
+
23
+ attr_accessor :offset
24
+
25
+ attr_accessor :has_more
26
+
27
+ # Offset for the next page, or null on the last page.
28
+ attr_accessor :next_offset
29
+
30
+ attr_accessor :include_inactive
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'total' => :'total',
36
+ :'limit' => :'limit',
37
+ :'offset' => :'offset',
38
+ :'has_more' => :'has_more',
39
+ :'next_offset' => :'next_offset',
40
+ :'include_inactive' => :'include_inactive'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'total' => :'Integer',
53
+ :'limit' => :'Integer',
54
+ :'offset' => :'Integer',
55
+ :'has_more' => :'Boolean',
56
+ :'next_offset' => :'Integer',
57
+ :'include_inactive' => :'Boolean'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'next_offset',
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AccountDeviceListResponseMeta` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AccountDeviceListResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'total')
84
+ self.total = attributes[:'total']
85
+ else
86
+ self.total = nil
87
+ end
88
+
89
+ if attributes.key?(:'limit')
90
+ self.limit = attributes[:'limit']
91
+ else
92
+ self.limit = nil
93
+ end
94
+
95
+ if attributes.key?(:'offset')
96
+ self.offset = attributes[:'offset']
97
+ else
98
+ self.offset = nil
99
+ end
100
+
101
+ if attributes.key?(:'has_more')
102
+ self.has_more = attributes[:'has_more']
103
+ else
104
+ self.has_more = nil
105
+ end
106
+
107
+ if attributes.key?(:'next_offset')
108
+ self.next_offset = attributes[:'next_offset']
109
+ else
110
+ self.next_offset = nil
111
+ end
112
+
113
+ if attributes.key?(:'include_inactive')
114
+ self.include_inactive = attributes[:'include_inactive']
115
+ else
116
+ self.include_inactive = nil
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ if @total.nil?
126
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
127
+ end
128
+
129
+ if @limit.nil?
130
+ invalid_properties.push('invalid value for "limit", limit cannot be nil.')
131
+ end
132
+
133
+ if @offset.nil?
134
+ invalid_properties.push('invalid value for "offset", offset cannot be nil.')
135
+ end
136
+
137
+ if @has_more.nil?
138
+ invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
139
+ end
140
+
141
+ if @include_inactive.nil?
142
+ invalid_properties.push('invalid value for "include_inactive", include_inactive cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @total.nil?
153
+ return false if @limit.nil?
154
+ return false if @offset.nil?
155
+ return false if @has_more.nil?
156
+ return false if @include_inactive.nil?
157
+ true
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ total == o.total &&
166
+ limit == o.limit &&
167
+ offset == o.offset &&
168
+ has_more == o.has_more &&
169
+ next_offset == o.next_offset &&
170
+ include_inactive == o.include_inactive
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [total, limit, offset, has_more, next_offset, include_inactive].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ transformed_hash = {}
192
+ openapi_types.each_pair do |key, type|
193
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = nil
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[attribute_map[key]].is_a?(Array)
199
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
+ end
201
+ elsif !attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
+ end
204
+ end
205
+ new(transformed_hash)
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def self._deserialize(type, value)
213
+ case type.to_sym
214
+ when :Time
215
+ Time.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :Boolean
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ # models (e.g. Pet) or oneOf
246
+ klass = OpenapiClient.const_get(type)
247
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ end
249
+ end
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # to_body is an alias to to_hash (backward compatibility)
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_body
260
+ to_hash
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+
299
+ end
@@ -19,7 +19,7 @@ module OpenapiClient
19
19
 
20
20
  attr_accessor :badge
21
21
 
22
- # Number of devices whose App Icon Badge Count was updated.
22
+ # Number of devices whose App Icon Badge was updated.
23
23
  attr_accessor :devices_updated
24
24
 
25
25
  # Number of account users with at least one updated device.
@@ -35,6 +35,15 @@ module OpenapiClient
35
35
 
36
36
  attr_accessor :timestamp
37
37
 
38
+ # Number of device tokens targeted.
39
+ attr_accessor :devices_targeted
40
+
41
+ # Number of device tokens deactivated because APNs reported them unregistered.
42
+ attr_accessor :devices_deactivated
43
+
44
+ # Number of targeted device tokens APNs reported as unregistered.
45
+ attr_accessor :devices_unregistered
46
+
38
47
  # Attribute mapping from ruby-style variable name to JSON key.
39
48
  def self.attribute_map
40
49
  {
@@ -45,7 +54,10 @@ module OpenapiClient
45
54
  :'devices_notified' => :'devices_notified',
46
55
  :'users_notified' => :'users_notified',
47
56
  :'effective_channel_slugs' => :'effective_channel_slugs',
48
- :'timestamp' => :'timestamp'
57
+ :'timestamp' => :'timestamp',
58
+ :'devices_targeted' => :'devices_targeted',
59
+ :'devices_deactivated' => :'devices_deactivated',
60
+ :'devices_unregistered' => :'devices_unregistered'
49
61
  }
50
62
  end
51
63
 
@@ -64,7 +76,10 @@ module OpenapiClient
64
76
  :'devices_notified' => :'Integer',
65
77
  :'users_notified' => :'Integer',
66
78
  :'effective_channel_slugs' => :'Array<String>',
67
- :'timestamp' => :'Time'
79
+ :'timestamp' => :'Time',
80
+ :'devices_targeted' => :'Integer',
81
+ :'devices_deactivated' => :'Integer',
82
+ :'devices_unregistered' => :'Integer'
68
83
  }
69
84
  end
70
85
 
@@ -134,6 +149,18 @@ module OpenapiClient
134
149
  else
135
150
  self.timestamp = nil
136
151
  end
152
+
153
+ if attributes.key?(:'devices_targeted')
154
+ self.devices_targeted = attributes[:'devices_targeted']
155
+ end
156
+
157
+ if attributes.key?(:'devices_deactivated')
158
+ self.devices_deactivated = attributes[:'devices_deactivated']
159
+ end
160
+
161
+ if attributes.key?(:'devices_unregistered')
162
+ self.devices_unregistered = attributes[:'devices_unregistered']
163
+ end
137
164
  end
138
165
 
139
166
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -221,7 +248,10 @@ module OpenapiClient
221
248
  devices_notified == o.devices_notified &&
222
249
  users_notified == o.users_notified &&
223
250
  effective_channel_slugs == o.effective_channel_slugs &&
224
- timestamp == o.timestamp
251
+ timestamp == o.timestamp &&
252
+ devices_targeted == o.devices_targeted &&
253
+ devices_deactivated == o.devices_deactivated &&
254
+ devices_unregistered == o.devices_unregistered
225
255
  end
226
256
 
227
257
  # @see the `==` method
@@ -233,7 +263,7 @@ module OpenapiClient
233
263
  # Calculates hash code according to all attributes.
234
264
  # @return [Integer] Hash code
235
265
  def hash
236
- [success, badge, devices_updated, users_updated, devices_notified, users_notified, effective_channel_slugs, timestamp].hash
266
+ [success, badge, devices_updated, users_updated, devices_notified, users_notified, effective_channel_slugs, timestamp, devices_targeted, devices_deactivated, devices_unregistered].hash
237
267
  end
238
268
 
239
269
  # Builds the object from hash
@@ -26,6 +26,21 @@ module OpenapiClient
26
26
 
27
27
  attr_accessor :timestamp
28
28
 
29
+ # True when the Live Activity had already ended and the request had no effect.
30
+ attr_accessor :ignored
31
+
32
+ attr_accessor :message
33
+
34
+ attr_accessor :end_reason
35
+
36
+ # True when the Live Activity was marked complete without a confirmed APNs end delivery.
37
+ attr_accessor :forced_completion
38
+
39
+ attr_accessor :warning
40
+
41
+ # Per-device delivery errors when some devices could not be reached.
42
+ attr_accessor :errors
43
+
29
44
  # Attribute mapping from ruby-style variable name to JSON key.
30
45
  def self.attribute_map
31
46
  {
@@ -33,7 +48,13 @@ module OpenapiClient
33
48
  :'activity_id' => :'activity_id',
34
49
  :'devices_queued' => :'devices_queued',
35
50
  :'devices_notified' => :'devices_notified',
36
- :'timestamp' => :'timestamp'
51
+ :'timestamp' => :'timestamp',
52
+ :'ignored' => :'ignored',
53
+ :'message' => :'message',
54
+ :'end_reason' => :'end_reason',
55
+ :'forced_completion' => :'forced_completion',
56
+ :'warning' => :'warning',
57
+ :'errors' => :'errors'
37
58
  }
38
59
  end
39
60
 
@@ -49,13 +70,20 @@ module OpenapiClient
49
70
  :'activity_id' => :'String',
50
71
  :'devices_queued' => :'Integer',
51
72
  :'devices_notified' => :'Integer',
52
- :'timestamp' => :'Time'
73
+ :'timestamp' => :'Time',
74
+ :'ignored' => :'Boolean',
75
+ :'message' => :'String',
76
+ :'end_reason' => :'String',
77
+ :'forced_completion' => :'Boolean',
78
+ :'warning' => :'String',
79
+ :'errors' => :'Array<String>'
53
80
  }
54
81
  end
55
82
 
56
83
  # List of attributes with nullable: true
57
84
  def self.openapi_nullable
58
85
  Set.new([
86
+ :'end_reason',
59
87
  ])
60
88
  end
61
89
 
@@ -99,6 +127,32 @@ module OpenapiClient
99
127
  else
100
128
  self.timestamp = nil
101
129
  end
130
+
131
+ if attributes.key?(:'ignored')
132
+ self.ignored = attributes[:'ignored']
133
+ end
134
+
135
+ if attributes.key?(:'message')
136
+ self.message = attributes[:'message']
137
+ end
138
+
139
+ if attributes.key?(:'end_reason')
140
+ self.end_reason = attributes[:'end_reason']
141
+ end
142
+
143
+ if attributes.key?(:'forced_completion')
144
+ self.forced_completion = attributes[:'forced_completion']
145
+ end
146
+
147
+ if attributes.key?(:'warning')
148
+ self.warning = attributes[:'warning']
149
+ end
150
+
151
+ if attributes.key?(:'errors')
152
+ if (value = attributes[:'errors']).is_a?(Array)
153
+ self.errors = value
154
+ end
155
+ end
102
156
  end
103
157
 
104
158
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -140,7 +194,13 @@ module OpenapiClient
140
194
  activity_id == o.activity_id &&
141
195
  devices_queued == o.devices_queued &&
142
196
  devices_notified == o.devices_notified &&
143
- timestamp == o.timestamp
197
+ timestamp == o.timestamp &&
198
+ ignored == o.ignored &&
199
+ message == o.message &&
200
+ end_reason == o.end_reason &&
201
+ forced_completion == o.forced_completion &&
202
+ warning == o.warning &&
203
+ errors == o.errors
144
204
  end
145
205
 
146
206
  # @see the `==` method
@@ -152,7 +212,7 @@ module OpenapiClient
152
212
  # Calculates hash code according to all attributes.
153
213
  # @return [Integer] Hash code
154
214
  def hash
155
- [success, activity_id, devices_queued, devices_notified, timestamp].hash
215
+ [success, activity_id, devices_queued, devices_notified, timestamp, ignored, message, end_reason, forced_completion, warning, errors].hash
156
216
  end
157
217
 
158
218
  # Builds the object from hash
@@ -31,6 +31,14 @@ module OpenapiClient
31
31
 
32
32
  attr_accessor :timestamp
33
33
 
34
+ # Present when starting this Live Activity ended an older one to stay within the device limit.
35
+ attr_accessor :ended_activity_id
36
+
37
+ attr_accessor :message
38
+
39
+ # Per-device delivery errors when some devices could not be reached.
40
+ attr_accessor :errors
41
+
34
42
  # Attribute mapping from ruby-style variable name to JSON key.
35
43
  def self.attribute_map
36
44
  {
@@ -40,7 +48,10 @@ module OpenapiClient
40
48
  :'activity_id' => :'activity_id',
41
49
  :'effective_channel_slugs' => :'effective_channel_slugs',
42
50
  :'tags' => :'tags',
43
- :'timestamp' => :'timestamp'
51
+ :'timestamp' => :'timestamp',
52
+ :'ended_activity_id' => :'ended_activity_id',
53
+ :'message' => :'message',
54
+ :'errors' => :'errors'
44
55
  }
45
56
  end
46
57
 
@@ -58,7 +69,10 @@ module OpenapiClient
58
69
  :'activity_id' => :'String',
59
70
  :'effective_channel_slugs' => :'Array<String>',
60
71
  :'tags' => :'Array<String>',
61
- :'timestamp' => :'Time'
72
+ :'timestamp' => :'Time',
73
+ :'ended_activity_id' => :'String',
74
+ :'message' => :'String',
75
+ :'errors' => :'Array<String>'
62
76
  }
63
77
  end
64
78
 
@@ -120,6 +134,20 @@ module OpenapiClient
120
134
  else
121
135
  self.timestamp = nil
122
136
  end
137
+
138
+ if attributes.key?(:'ended_activity_id')
139
+ self.ended_activity_id = attributes[:'ended_activity_id']
140
+ end
141
+
142
+ if attributes.key?(:'message')
143
+ self.message = attributes[:'message']
144
+ end
145
+
146
+ if attributes.key?(:'errors')
147
+ if (value = attributes[:'errors']).is_a?(Array)
148
+ self.errors = value
149
+ end
150
+ end
123
151
  end
124
152
 
125
153
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -163,7 +191,10 @@ module OpenapiClient
163
191
  activity_id == o.activity_id &&
164
192
  effective_channel_slugs == o.effective_channel_slugs &&
165
193
  tags == o.tags &&
166
- timestamp == o.timestamp
194
+ timestamp == o.timestamp &&
195
+ ended_activity_id == o.ended_activity_id &&
196
+ message == o.message &&
197
+ errors == o.errors
167
198
  end
168
199
 
169
200
  # @see the `==` method
@@ -175,7 +206,7 @@ module OpenapiClient
175
206
  # Calculates hash code according to all attributes.
176
207
  # @return [Integer] Hash code
177
208
  def hash
178
- [success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp].hash
209
+ [success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp, ended_activity_id, message, errors].hash
179
210
  end
180
211
 
181
212
  # Builds the object from hash
@@ -30,6 +30,22 @@ module OpenapiClient
30
30
 
31
31
  attr_accessor :timestamp
32
32
 
33
+ # True when the stream was already ended and the request had no effect.
34
+ attr_accessor :ignored
35
+
36
+ attr_accessor :message
37
+
38
+ attr_accessor :forced_completion
39
+
40
+ # Present when the stream had a current Live Activity. True when the end was sent to at least one device, or queued for a device that has not registered yet. False when no device received it, so the Live Activity may stay on the Lock Screen until iOS removes it or someone dismisses it.
41
+ attr_accessor :delivered
42
+
43
+ # Explains why the end may not have removed the Live Activity, for example because iOS had already ended a Live Activity that started more than 8 hours ago.
44
+ attr_accessor :warning
45
+
46
+ # Per-device delivery errors when some devices could not be reached.
47
+ attr_accessor :errors
48
+
33
49
  class EnumAttributeValidator
34
50
  attr_reader :datatype
35
51
  attr_reader :allowable_values
@@ -61,7 +77,13 @@ module OpenapiClient
61
77
  :'activity_id' => :'activity_id',
62
78
  :'devices_queued' => :'devices_queued',
63
79
  :'devices_notified' => :'devices_notified',
64
- :'timestamp' => :'timestamp'
80
+ :'timestamp' => :'timestamp',
81
+ :'ignored' => :'ignored',
82
+ :'message' => :'message',
83
+ :'forced_completion' => :'forced_completion',
84
+ :'delivered' => :'delivered',
85
+ :'warning' => :'warning',
86
+ :'errors' => :'errors'
65
87
  }
66
88
  end
67
89
 
@@ -79,7 +101,13 @@ module OpenapiClient
79
101
  :'activity_id' => :'String',
80
102
  :'devices_queued' => :'Integer',
81
103
  :'devices_notified' => :'Integer',
82
- :'timestamp' => :'Time'
104
+ :'timestamp' => :'Time',
105
+ :'ignored' => :'Boolean',
106
+ :'message' => :'String',
107
+ :'forced_completion' => :'Boolean',
108
+ :'delivered' => :'Boolean',
109
+ :'warning' => :'String',
110
+ :'errors' => :'Array<String>'
83
111
  }
84
112
  end
85
113
 
@@ -140,6 +168,32 @@ module OpenapiClient
140
168
  else
141
169
  self.timestamp = nil
142
170
  end
171
+
172
+ if attributes.key?(:'ignored')
173
+ self.ignored = attributes[:'ignored']
174
+ end
175
+
176
+ if attributes.key?(:'message')
177
+ self.message = attributes[:'message']
178
+ end
179
+
180
+ if attributes.key?(:'forced_completion')
181
+ self.forced_completion = attributes[:'forced_completion']
182
+ end
183
+
184
+ if attributes.key?(:'delivered')
185
+ self.delivered = attributes[:'delivered']
186
+ end
187
+
188
+ if attributes.key?(:'warning')
189
+ self.warning = attributes[:'warning']
190
+ end
191
+
192
+ if attributes.key?(:'errors')
193
+ if (value = attributes[:'errors']).is_a?(Array)
194
+ self.errors = value
195
+ end
196
+ end
143
197
  end
144
198
 
145
199
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -200,7 +254,13 @@ module OpenapiClient
200
254
  activity_id == o.activity_id &&
201
255
  devices_queued == o.devices_queued &&
202
256
  devices_notified == o.devices_notified &&
203
- timestamp == o.timestamp
257
+ timestamp == o.timestamp &&
258
+ ignored == o.ignored &&
259
+ message == o.message &&
260
+ forced_completion == o.forced_completion &&
261
+ delivered == o.delivered &&
262
+ warning == o.warning &&
263
+ errors == o.errors
204
264
  end
205
265
 
206
266
  # @see the `==` method
@@ -212,7 +272,7 @@ module OpenapiClient
212
272
  # Calculates hash code according to all attributes.
213
273
  # @return [Integer] Hash code
214
274
  def hash
215
- [success, operation, stream_key, activity_id, devices_queued, devices_notified, timestamp].hash
275
+ [success, operation, stream_key, activity_id, devices_queued, devices_notified, timestamp, ignored, message, forced_completion, delivered, warning, errors].hash
216
276
  end
217
277
 
218
278
  # Builds the object from hash