activitysmith 1.8.0 → 1.10.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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +75 -15
  3. data/generated/activitysmith_openapi/api/app_icon_badges_api.rb +90 -0
  4. data/generated/activitysmith_openapi/api/live_activities_api.rb +10 -10
  5. data/generated/activitysmith_openapi/api/push_notifications_api.rb +2 -2
  6. data/generated/activitysmith_openapi/models/app_icon_badge_count_update_request.rb +259 -0
  7. data/generated/activitysmith_openapi/models/app_icon_badge_count_update_response.rb +331 -0
  8. data/generated/activitysmith_openapi/models/live_activity_action.rb +3 -5
  9. data/generated/activitysmith_openapi/models/live_activity_end_request.rb +1 -1
  10. data/generated/activitysmith_openapi/models/live_activity_start_request.rb +17 -5
  11. data/generated/activitysmith_openapi/models/live_activity_start_response.rb +13 -1
  12. data/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb +1 -1
  13. data/generated/activitysmith_openapi/models/live_activity_stream_put_response.rb +13 -1
  14. data/generated/activitysmith_openapi/models/live_activity_stream_request.rb +17 -5
  15. data/generated/activitysmith_openapi/models/live_activity_update_request.rb +1 -1
  16. data/generated/activitysmith_openapi/models/push_notification_action.rb +3 -5
  17. data/generated/activitysmith_openapi/models/push_notification_request.rb +22 -12
  18. data/generated/activitysmith_openapi/models/push_notification_response.rb +13 -1
  19. data/generated/activitysmith_openapi/version.rb +1 -1
  20. data/generated/activitysmith_openapi.rb +3 -0
  21. data/lib/activitysmith/client.rb +15 -1
  22. data/lib/activitysmith/live_activities.rb +30 -8
  23. data/lib/activitysmith/notifications.rb +19 -4
  24. data/lib/activitysmith/version.rb +1 -1
  25. metadata +5 -2
@@ -0,0 +1,331 @@
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 AppIconBadgeCountUpdateResponse
18
+ attr_accessor :success
19
+
20
+ attr_accessor :badge
21
+
22
+ attr_accessor :devices_notified
23
+
24
+ attr_accessor :users_notified
25
+
26
+ attr_accessor :effective_channel_slugs
27
+
28
+ attr_accessor :timestamp
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'success' => :'success',
34
+ :'badge' => :'badge',
35
+ :'devices_notified' => :'devices_notified',
36
+ :'users_notified' => :'users_notified',
37
+ :'effective_channel_slugs' => :'effective_channel_slugs',
38
+ :'timestamp' => :'timestamp'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'success' => :'Boolean',
51
+ :'badge' => :'Integer',
52
+ :'devices_notified' => :'Integer',
53
+ :'users_notified' => :'Integer',
54
+ :'effective_channel_slugs' => :'Array<String>',
55
+ :'timestamp' => :'Time'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::AppIconBadgeCountUpdateResponse` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::AppIconBadgeCountUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'success')
81
+ self.success = attributes[:'success']
82
+ else
83
+ self.success = nil
84
+ end
85
+
86
+ if attributes.key?(:'badge')
87
+ self.badge = attributes[:'badge']
88
+ else
89
+ self.badge = nil
90
+ end
91
+
92
+ if attributes.key?(:'devices_notified')
93
+ self.devices_notified = attributes[:'devices_notified']
94
+ else
95
+ self.devices_notified = nil
96
+ end
97
+
98
+ if attributes.key?(:'users_notified')
99
+ self.users_notified = attributes[:'users_notified']
100
+ else
101
+ self.users_notified = nil
102
+ end
103
+
104
+ if attributes.key?(:'effective_channel_slugs')
105
+ if (value = attributes[:'effective_channel_slugs']).is_a?(Array)
106
+ self.effective_channel_slugs = value
107
+ end
108
+ else
109
+ self.effective_channel_slugs = nil
110
+ end
111
+
112
+ if attributes.key?(:'timestamp')
113
+ self.timestamp = attributes[:'timestamp']
114
+ else
115
+ self.timestamp = nil
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ if @success.nil?
125
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
126
+ end
127
+
128
+ if @badge.nil?
129
+ invalid_properties.push('invalid value for "badge", badge cannot be nil.')
130
+ end
131
+
132
+ if @badge > 2147483647
133
+ invalid_properties.push('invalid value for "badge", must be smaller than or equal to 2147483647.')
134
+ end
135
+
136
+ if @badge < 0
137
+ invalid_properties.push('invalid value for "badge", must be greater than or equal to 0.')
138
+ end
139
+
140
+ if @devices_notified.nil?
141
+ invalid_properties.push('invalid value for "devices_notified", devices_notified cannot be nil.')
142
+ end
143
+
144
+ if @users_notified.nil?
145
+ invalid_properties.push('invalid value for "users_notified", users_notified cannot be nil.')
146
+ end
147
+
148
+ if @effective_channel_slugs.nil?
149
+ invalid_properties.push('invalid value for "effective_channel_slugs", effective_channel_slugs cannot be nil.')
150
+ end
151
+
152
+ if @timestamp.nil?
153
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
154
+ end
155
+
156
+ invalid_properties
157
+ end
158
+
159
+ # Check to see if the all the properties in the model are valid
160
+ # @return true if the model is valid
161
+ def valid?
162
+ warn '[DEPRECATED] the `valid?` method is obsolete'
163
+ return false if @success.nil?
164
+ return false if @badge.nil?
165
+ return false if @badge > 2147483647
166
+ return false if @badge < 0
167
+ return false if @devices_notified.nil?
168
+ return false if @users_notified.nil?
169
+ return false if @effective_channel_slugs.nil?
170
+ return false if @timestamp.nil?
171
+ true
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] badge Value to be assigned
176
+ def badge=(badge)
177
+ if badge.nil?
178
+ fail ArgumentError, 'badge cannot be nil'
179
+ end
180
+
181
+ if badge > 2147483647
182
+ fail ArgumentError, 'invalid value for "badge", must be smaller than or equal to 2147483647.'
183
+ end
184
+
185
+ if badge < 0
186
+ fail ArgumentError, 'invalid value for "badge", must be greater than or equal to 0.'
187
+ end
188
+
189
+ @badge = badge
190
+ end
191
+
192
+ # Checks equality by comparing each attribute.
193
+ # @param [Object] Object to be compared
194
+ def ==(o)
195
+ return true if self.equal?(o)
196
+ self.class == o.class &&
197
+ success == o.success &&
198
+ badge == o.badge &&
199
+ devices_notified == o.devices_notified &&
200
+ users_notified == o.users_notified &&
201
+ effective_channel_slugs == o.effective_channel_slugs &&
202
+ timestamp == o.timestamp
203
+ end
204
+
205
+ # @see the `==` method
206
+ # @param [Object] Object to be compared
207
+ def eql?(o)
208
+ self == o
209
+ end
210
+
211
+ # Calculates hash code according to all attributes.
212
+ # @return [Integer] Hash code
213
+ def hash
214
+ [success, badge, devices_notified, users_notified, effective_channel_slugs, timestamp].hash
215
+ end
216
+
217
+ # Builds the object from hash
218
+ # @param [Hash] attributes Model attributes in the form of hash
219
+ # @return [Object] Returns the model itself
220
+ def self.build_from_hash(attributes)
221
+ return nil unless attributes.is_a?(Hash)
222
+ attributes = attributes.transform_keys(&:to_sym)
223
+ transformed_hash = {}
224
+ openapi_types.each_pair do |key, type|
225
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
226
+ transformed_hash["#{key}"] = nil
227
+ elsif type =~ /\AArray<(.*)>/i
228
+ # check to ensure the input is an array given that the attribute
229
+ # is documented as an array but the input is not
230
+ if attributes[attribute_map[key]].is_a?(Array)
231
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
232
+ end
233
+ elsif !attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
235
+ end
236
+ end
237
+ new(transformed_hash)
238
+ end
239
+
240
+ # Deserializes the data based on type
241
+ # @param string type Data type
242
+ # @param string value Value to be deserialized
243
+ # @return [Object] Deserialized data
244
+ def self._deserialize(type, value)
245
+ case type.to_sym
246
+ when :Time
247
+ Time.parse(value)
248
+ when :Date
249
+ Date.parse(value)
250
+ when :String
251
+ value.to_s
252
+ when :Integer
253
+ value.to_i
254
+ when :Float
255
+ value.to_f
256
+ when :Boolean
257
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
258
+ true
259
+ else
260
+ false
261
+ end
262
+ when :Object
263
+ # generic object (usually a Hash), return directly
264
+ value
265
+ when /\AArray<(?<inner_type>.+)>\z/
266
+ inner_type = Regexp.last_match[:inner_type]
267
+ value.map { |v| _deserialize(inner_type, v) }
268
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
269
+ k_type = Regexp.last_match[:k_type]
270
+ v_type = Regexp.last_match[:v_type]
271
+ {}.tap do |hash|
272
+ value.each do |k, v|
273
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
274
+ end
275
+ end
276
+ else # model
277
+ # models (e.g. Pet) or oneOf
278
+ klass = OpenapiClient.const_get(type)
279
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+
329
+ end
330
+
331
+ end
@@ -21,7 +21,7 @@ module OpenapiClient
21
21
 
22
22
  attr_accessor :type
23
23
 
24
- # Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
24
+ # Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
25
25
  attr_accessor :url
26
26
 
27
27
  # Webhook HTTP method. Used only when type=webhook.
@@ -53,7 +53,7 @@ module OpenapiClient
53
53
  :'type' => :'LiveActivityActionType',
54
54
  :'url' => :'String',
55
55
  :'method' => :'LiveActivityWebhookMethod',
56
- :'body' => :'Hash<String, Object>'
56
+ :'body' => :'Object'
57
57
  }
58
58
  end
59
59
 
@@ -103,9 +103,7 @@ module OpenapiClient
103
103
  end
104
104
 
105
105
  if attributes.key?(:'body')
106
- if (value = attributes[:'body']).is_a?(Hash)
107
- self.body = value
108
- end
106
+ self.body = attributes[:'body']
109
107
  end
110
108
  end
111
109
 
@@ -22,7 +22,7 @@ module OpenapiClient
22
22
 
23
23
  attr_accessor :action
24
24
 
25
- # Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
25
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
26
26
  attr_accessor :secondary_action
27
27
 
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -20,13 +20,16 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
27
27
 
28
28
  attr_accessor :target
29
29
 
30
+ # Optional tags to organize and filter notification history.
31
+ attr_accessor :tags
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
@@ -34,7 +37,8 @@ module OpenapiClient
34
37
  :'action' => :'action',
35
38
  :'secondary_action' => :'secondary_action',
36
39
  :'alert' => :'alert',
37
- :'target' => :'target'
40
+ :'target' => :'target',
41
+ :'tags' => :'tags'
38
42
  }
39
43
  end
40
44
 
@@ -50,7 +54,8 @@ module OpenapiClient
50
54
  :'action' => :'LiveActivityAction',
51
55
  :'secondary_action' => :'LiveActivityAction',
52
56
  :'alert' => :'AlertPayload',
53
- :'target' => :'ChannelTarget'
57
+ :'target' => :'ChannelTarget',
58
+ :'tags' => :'Array<String>'
54
59
  }
55
60
  end
56
61
 
@@ -96,6 +101,12 @@ module OpenapiClient
96
101
  if attributes.key?(:'target')
97
102
  self.target = attributes[:'target']
98
103
  end
104
+
105
+ if attributes.key?(:'tags')
106
+ if (value = attributes[:'tags']).is_a?(Array)
107
+ self.tags = value
108
+ end
109
+ end
99
110
  end
100
111
 
101
112
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,7 +138,8 @@ module OpenapiClient
127
138
  action == o.action &&
128
139
  secondary_action == o.secondary_action &&
129
140
  alert == o.alert &&
130
- target == o.target
141
+ target == o.target &&
142
+ tags == o.tags
131
143
  end
132
144
 
133
145
  # @see the `==` method
@@ -139,7 +151,7 @@ module OpenapiClient
139
151
  # Calculates hash code according to all attributes.
140
152
  # @return [Integer] Hash code
141
153
  def hash
142
- [content_state, action, secondary_action, alert, target].hash
154
+ [content_state, action, secondary_action, alert, target, tags].hash
143
155
  end
144
156
 
145
157
  # Builds the object from hash
@@ -26,6 +26,9 @@ module OpenapiClient
26
26
 
27
27
  attr_accessor :effective_channel_slugs
28
28
 
29
+ # Optional tags to organize and filter notification history.
30
+ attr_accessor :tags
31
+
29
32
  attr_accessor :timestamp
30
33
 
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +39,7 @@ module OpenapiClient
36
39
  :'users_notified' => :'users_notified',
37
40
  :'activity_id' => :'activity_id',
38
41
  :'effective_channel_slugs' => :'effective_channel_slugs',
42
+ :'tags' => :'tags',
39
43
  :'timestamp' => :'timestamp'
40
44
  }
41
45
  end
@@ -53,6 +57,7 @@ module OpenapiClient
53
57
  :'users_notified' => :'Integer',
54
58
  :'activity_id' => :'String',
55
59
  :'effective_channel_slugs' => :'Array<String>',
60
+ :'tags' => :'Array<String>',
56
61
  :'timestamp' => :'Time'
57
62
  }
58
63
  end
@@ -104,6 +109,12 @@ module OpenapiClient
104
109
  end
105
110
  end
106
111
 
112
+ if attributes.key?(:'tags')
113
+ if (value = attributes[:'tags']).is_a?(Array)
114
+ self.tags = value
115
+ end
116
+ end
117
+
107
118
  if attributes.key?(:'timestamp')
108
119
  self.timestamp = attributes[:'timestamp']
109
120
  else
@@ -151,6 +162,7 @@ module OpenapiClient
151
162
  users_notified == o.users_notified &&
152
163
  activity_id == o.activity_id &&
153
164
  effective_channel_slugs == o.effective_channel_slugs &&
165
+ tags == o.tags &&
154
166
  timestamp == o.timestamp
155
167
  end
156
168
 
@@ -163,7 +175,7 @@ module OpenapiClient
163
175
  # Calculates hash code according to all attributes.
164
176
  # @return [Integer] Hash code
165
177
  def hash
166
- [success, devices_notified, users_notified, activity_id, effective_channel_slugs, timestamp].hash
178
+ [success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp].hash
167
179
  end
168
180
 
169
181
  # Builds the object from hash
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
@@ -34,6 +34,9 @@ module OpenapiClient
34
34
 
35
35
  attr_accessor :effective_channel_slugs
36
36
 
37
+ # Optional tags to organize and filter notification history.
38
+ attr_accessor :tags
39
+
37
40
  attr_accessor :timestamp
38
41
 
39
42
  class EnumAttributeValidator
@@ -70,6 +73,7 @@ module OpenapiClient
70
73
  :'devices_queued' => :'devices_queued',
71
74
  :'users_notified' => :'users_notified',
72
75
  :'effective_channel_slugs' => :'effective_channel_slugs',
76
+ :'tags' => :'tags',
73
77
  :'timestamp' => :'timestamp'
74
78
  }
75
79
  end
@@ -91,6 +95,7 @@ module OpenapiClient
91
95
  :'devices_queued' => :'Integer',
92
96
  :'users_notified' => :'Integer',
93
97
  :'effective_channel_slugs' => :'Array<String>',
98
+ :'tags' => :'Array<String>',
94
99
  :'timestamp' => :'Time'
95
100
  }
96
101
  end
@@ -161,6 +166,12 @@ module OpenapiClient
161
166
  end
162
167
  end
163
168
 
169
+ if attributes.key?(:'tags')
170
+ if (value = attributes[:'tags']).is_a?(Array)
171
+ self.tags = value
172
+ end
173
+ end
174
+
164
175
  if attributes.key?(:'timestamp')
165
176
  self.timestamp = attributes[:'timestamp']
166
177
  else
@@ -229,6 +240,7 @@ module OpenapiClient
229
240
  devices_queued == o.devices_queued &&
230
241
  users_notified == o.users_notified &&
231
242
  effective_channel_slugs == o.effective_channel_slugs &&
243
+ tags == o.tags &&
232
244
  timestamp == o.timestamp
233
245
  end
234
246
 
@@ -241,7 +253,7 @@ module OpenapiClient
241
253
  # Calculates hash code according to all attributes.
242
254
  # @return [Integer] Hash code
243
255
  def hash
244
- [success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, timestamp].hash
256
+ [success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, tags, timestamp].hash
245
257
  end
246
258
 
247
259
  # Builds the object from hash
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
@@ -30,6 +30,9 @@ module OpenapiClient
30
30
 
31
31
  attr_accessor :target
32
32
 
33
+ # Optional tags to organize and filter notification history.
34
+ attr_accessor :tags
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -38,7 +41,8 @@ module OpenapiClient
38
41
  :'secondary_action' => :'secondary_action',
39
42
  :'alert' => :'alert',
40
43
  :'channels' => :'channels',
41
- :'target' => :'target'
44
+ :'target' => :'target',
45
+ :'tags' => :'tags'
42
46
  }
43
47
  end
44
48
 
@@ -55,7 +59,8 @@ module OpenapiClient
55
59
  :'secondary_action' => :'LiveActivityAction',
56
60
  :'alert' => :'AlertPayload',
57
61
  :'channels' => :'Array<String>',
58
- :'target' => :'ChannelTarget'
62
+ :'target' => :'ChannelTarget',
63
+ :'tags' => :'Array<String>'
59
64
  }
60
65
  end
61
66
 
@@ -107,6 +112,12 @@ module OpenapiClient
107
112
  if attributes.key?(:'target')
108
113
  self.target = attributes[:'target']
109
114
  end
115
+
116
+ if attributes.key?(:'tags')
117
+ if (value = attributes[:'tags']).is_a?(Array)
118
+ self.tags = value
119
+ end
120
+ end
110
121
  end
111
122
 
112
123
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -158,7 +169,8 @@ module OpenapiClient
158
169
  secondary_action == o.secondary_action &&
159
170
  alert == o.alert &&
160
171
  channels == o.channels &&
161
- target == o.target
172
+ target == o.target &&
173
+ tags == o.tags
162
174
  end
163
175
 
164
176
  # @see the `==` method
@@ -170,7 +182,7 @@ module OpenapiClient
170
182
  # Calculates hash code according to all attributes.
171
183
  # @return [Integer] Hash code
172
184
  def hash
173
- [content_state, action, secondary_action, alert, channels, target].hash
185
+ [content_state, action, secondary_action, alert, channels, target, tags].hash
174
186
  end
175
187
 
176
188
  # Builds the object from hash
@@ -22,7 +22,7 @@ module OpenapiClient
22
22
 
23
23
  attr_accessor :action
24
24
 
25
- # Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
25
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
26
26
  attr_accessor :secondary_action
27
27
 
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :type
22
22
 
23
- # Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
23
+ # Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
24
24
  attr_accessor :url
25
25
 
26
26
  # Webhook HTTP method. Used only when type=webhook.
@@ -52,7 +52,7 @@ module OpenapiClient
52
52
  :'type' => :'PushNotificationActionType',
53
53
  :'url' => :'String',
54
54
  :'method' => :'PushNotificationWebhookMethod',
55
- :'body' => :'Hash<String, Object>'
55
+ :'body' => :'Object'
56
56
  }
57
57
  end
58
58
 
@@ -102,9 +102,7 @@ module OpenapiClient
102
102
  end
103
103
 
104
104
  if attributes.key?(:'body')
105
- if (value = attributes[:'body']).is_a?(Hash)
106
- self.body = value
107
- end
105
+ self.body = attributes[:'body']
108
106
  end
109
107
  end
110
108