activitysmith 1.9.0 → 1.11.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/README.md +243 -225
- data/generated/activitysmith_openapi/api/app_icon_badges_api.rb +4 -4
- data/generated/activitysmith_openapi/api/live_activities_api.rb +10 -10
- data/generated/activitysmith_openapi/api/push_notifications_api.rb +2 -2
- data/generated/activitysmith_openapi/configuration.rb +7 -0
- data/generated/activitysmith_openapi/models/app_icon_badge_count_update_error.rb +386 -0
- data/generated/activitysmith_openapi/models/app_icon_badge_count_update_request.rb +0 -1
- data/generated/activitysmith_openapi/models/app_icon_badge_count_update_response.rb +33 -11
- data/generated/activitysmith_openapi/models/live_activity_action.rb +1 -1
- data/generated/activitysmith_openapi/models/live_activity_end_request.rb +64 -2
- data/generated/activitysmith_openapi/models/live_activity_limit_error.rb +25 -5
- data/generated/activitysmith_openapi/models/live_activity_start_request.rb +48 -5
- data/generated/activitysmith_openapi/models/live_activity_start_response.rb +13 -1
- data/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb +45 -2
- data/generated/activitysmith_openapi/models/live_activity_stream_put_response.rb +13 -1
- data/generated/activitysmith_openapi/models/live_activity_stream_request.rb +48 -5
- data/generated/activitysmith_openapi/models/live_activity_update_request.rb +64 -2
- data/generated/activitysmith_openapi/models/metadata_value.rb +106 -0
- data/generated/activitysmith_openapi/models/push_notification_action.rb +1 -1
- data/generated/activitysmith_openapi/models/push_notification_request.rb +60 -8
- data/generated/activitysmith_openapi/models/push_notification_response.rb +13 -1
- data/generated/activitysmith_openapi/models/update_app_icon_badge_count422_response.rb +105 -0
- data/generated/activitysmith_openapi/version.rb +1 -1
- data/generated/activitysmith_openapi.rb +3 -0
- data/generated/openapi-source.json +6 -0
- data/lib/activitysmith/live_activities.rb +36 -14
- data/lib/activitysmith/notifications.rb +19 -4
- data/lib/activitysmith/version.rb +1 -1
- metadata +6 -2
|
@@ -16,19 +16,27 @@ require 'time'
|
|
|
16
16
|
module OpenapiClient
|
|
17
17
|
# End an existing Live Activity by activity_id.
|
|
18
18
|
class LiveActivityEndRequest
|
|
19
|
+
# Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
19
22
|
attr_accessor :activity_id
|
|
20
23
|
|
|
24
|
+
# Tags for notification history. Omit to keep existing Tags, supply an array to replace them, or send an empty array to clear them.
|
|
25
|
+
attr_accessor :tags
|
|
26
|
+
|
|
21
27
|
attr_accessor :content_state
|
|
22
28
|
|
|
23
29
|
attr_accessor :action
|
|
24
30
|
|
|
25
|
-
# Optional secondary action button. Supported
|
|
31
|
+
# 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
32
|
attr_accessor :secondary_action
|
|
27
33
|
|
|
28
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
35
|
def self.attribute_map
|
|
30
36
|
{
|
|
37
|
+
:'metadata' => :'metadata',
|
|
31
38
|
:'activity_id' => :'activity_id',
|
|
39
|
+
:'tags' => :'tags',
|
|
32
40
|
:'content_state' => :'content_state',
|
|
33
41
|
:'action' => :'action',
|
|
34
42
|
:'secondary_action' => :'secondary_action'
|
|
@@ -43,7 +51,9 @@ module OpenapiClient
|
|
|
43
51
|
# Attribute type mapping.
|
|
44
52
|
def self.openapi_types
|
|
45
53
|
{
|
|
54
|
+
:'metadata' => :'Hash<String, MetadataValue>',
|
|
46
55
|
:'activity_id' => :'String',
|
|
56
|
+
:'tags' => :'Array<String>',
|
|
47
57
|
:'content_state' => :'ContentStateEnd',
|
|
48
58
|
:'action' => :'LiveActivityAction',
|
|
49
59
|
:'secondary_action' => :'LiveActivityAction'
|
|
@@ -71,12 +81,24 @@ module OpenapiClient
|
|
|
71
81
|
h[k.to_sym] = v
|
|
72
82
|
}
|
|
73
83
|
|
|
84
|
+
if attributes.key?(:'metadata')
|
|
85
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
86
|
+
self.metadata = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
74
90
|
if attributes.key?(:'activity_id')
|
|
75
91
|
self.activity_id = attributes[:'activity_id']
|
|
76
92
|
else
|
|
77
93
|
self.activity_id = nil
|
|
78
94
|
end
|
|
79
95
|
|
|
96
|
+
if attributes.key?(:'tags')
|
|
97
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
98
|
+
self.tags = value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
80
102
|
if attributes.key?(:'content_state')
|
|
81
103
|
self.content_state = attributes[:'content_state']
|
|
82
104
|
else
|
|
@@ -97,10 +119,18 @@ module OpenapiClient
|
|
|
97
119
|
def list_invalid_properties
|
|
98
120
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
121
|
invalid_properties = Array.new
|
|
122
|
+
if !@metadata.nil? && @metadata.length > 50
|
|
123
|
+
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
|
|
124
|
+
end
|
|
125
|
+
|
|
100
126
|
if @activity_id.nil?
|
|
101
127
|
invalid_properties.push('invalid value for "activity_id", activity_id cannot be nil.')
|
|
102
128
|
end
|
|
103
129
|
|
|
130
|
+
if !@tags.nil? && @tags.length > 20
|
|
131
|
+
invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 20.')
|
|
132
|
+
end
|
|
133
|
+
|
|
104
134
|
if @content_state.nil?
|
|
105
135
|
invalid_properties.push('invalid value for "content_state", content_state cannot be nil.')
|
|
106
136
|
end
|
|
@@ -112,17 +142,49 @@ module OpenapiClient
|
|
|
112
142
|
# @return true if the model is valid
|
|
113
143
|
def valid?
|
|
114
144
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
|
+
return false if !@metadata.nil? && @metadata.length > 50
|
|
115
146
|
return false if @activity_id.nil?
|
|
147
|
+
return false if !@tags.nil? && @tags.length > 20
|
|
116
148
|
return false if @content_state.nil?
|
|
117
149
|
true
|
|
118
150
|
end
|
|
119
151
|
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] metadata Value to be assigned
|
|
154
|
+
def metadata=(metadata)
|
|
155
|
+
if metadata.nil?
|
|
156
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if metadata.length > 50
|
|
160
|
+
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@metadata = metadata
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] tags Value to be assigned
|
|
168
|
+
def tags=(tags)
|
|
169
|
+
if tags.nil?
|
|
170
|
+
fail ArgumentError, 'tags cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if tags.length > 20
|
|
174
|
+
fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 20.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@tags = tags
|
|
178
|
+
end
|
|
179
|
+
|
|
120
180
|
# Checks equality by comparing each attribute.
|
|
121
181
|
# @param [Object] Object to be compared
|
|
122
182
|
def ==(o)
|
|
123
183
|
return true if self.equal?(o)
|
|
124
184
|
self.class == o.class &&
|
|
185
|
+
metadata == o.metadata &&
|
|
125
186
|
activity_id == o.activity_id &&
|
|
187
|
+
tags == o.tags &&
|
|
126
188
|
content_state == o.content_state &&
|
|
127
189
|
action == o.action &&
|
|
128
190
|
secondary_action == o.secondary_action
|
|
@@ -137,7 +199,7 @@ module OpenapiClient
|
|
|
137
199
|
# Calculates hash code according to all attributes.
|
|
138
200
|
# @return [Integer] Hash code
|
|
139
201
|
def hash
|
|
140
|
-
[activity_id, content_state, action, secondary_action].hash
|
|
202
|
+
[metadata, activity_id, tags, content_state, action, secondary_action].hash
|
|
141
203
|
end
|
|
142
204
|
|
|
143
205
|
# Builds the object from hash
|
|
@@ -21,16 +21,24 @@ module OpenapiClient
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :limit
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Highest number of active Live Activities among the targeted devices.
|
|
25
25
|
attr_accessor :active
|
|
26
26
|
|
|
27
|
+
# Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity.
|
|
28
|
+
attr_accessor :blocked_devices
|
|
29
|
+
|
|
30
|
+
# Total number of targeted devices. Included only when targeted devices have mixed capacity.
|
|
31
|
+
attr_accessor :targeted_devices
|
|
32
|
+
|
|
27
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
34
|
def self.attribute_map
|
|
29
35
|
{
|
|
30
36
|
:'error' => :'error',
|
|
31
37
|
:'message' => :'message',
|
|
32
38
|
:'limit' => :'limit',
|
|
33
|
-
:'active' => :'active'
|
|
39
|
+
:'active' => :'active',
|
|
40
|
+
:'blocked_devices' => :'blocked_devices',
|
|
41
|
+
:'targeted_devices' => :'targeted_devices'
|
|
34
42
|
}
|
|
35
43
|
end
|
|
36
44
|
|
|
@@ -45,7 +53,9 @@ module OpenapiClient
|
|
|
45
53
|
:'error' => :'String',
|
|
46
54
|
:'message' => :'String',
|
|
47
55
|
:'limit' => :'Integer',
|
|
48
|
-
:'active' => :'Integer'
|
|
56
|
+
:'active' => :'Integer',
|
|
57
|
+
:'blocked_devices' => :'Integer',
|
|
58
|
+
:'targeted_devices' => :'Integer'
|
|
49
59
|
}
|
|
50
60
|
end
|
|
51
61
|
|
|
@@ -93,6 +103,14 @@ module OpenapiClient
|
|
|
93
103
|
else
|
|
94
104
|
self.active = nil
|
|
95
105
|
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'blocked_devices')
|
|
108
|
+
self.blocked_devices = attributes[:'blocked_devices']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'targeted_devices')
|
|
112
|
+
self.targeted_devices = attributes[:'targeted_devices']
|
|
113
|
+
end
|
|
96
114
|
end
|
|
97
115
|
|
|
98
116
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -138,7 +156,9 @@ module OpenapiClient
|
|
|
138
156
|
error == o.error &&
|
|
139
157
|
message == o.message &&
|
|
140
158
|
limit == o.limit &&
|
|
141
|
-
active == o.active
|
|
159
|
+
active == o.active &&
|
|
160
|
+
blocked_devices == o.blocked_devices &&
|
|
161
|
+
targeted_devices == o.targeted_devices
|
|
142
162
|
end
|
|
143
163
|
|
|
144
164
|
# @see the `==` method
|
|
@@ -150,7 +170,7 @@ module OpenapiClient
|
|
|
150
170
|
# Calculates hash code according to all attributes.
|
|
151
171
|
# @return [Integer] Hash code
|
|
152
172
|
def hash
|
|
153
|
-
[error, message, limit, active].hash
|
|
173
|
+
[error, message, limit, active, blocked_devices, targeted_devices].hash
|
|
154
174
|
end
|
|
155
175
|
|
|
156
176
|
# Builds the object from hash
|
|
@@ -16,25 +16,33 @@ require 'time'
|
|
|
16
16
|
module OpenapiClient
|
|
17
17
|
# Start a new Live Activity. The response includes activity_id for later update and end calls.
|
|
18
18
|
class LiveActivityStartRequest
|
|
19
|
+
# Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
19
22
|
attr_accessor :content_state
|
|
20
23
|
|
|
21
24
|
attr_accessor :action
|
|
22
25
|
|
|
23
|
-
# Optional secondary action button. Supported
|
|
26
|
+
# 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
27
|
attr_accessor :secondary_action
|
|
25
28
|
|
|
26
29
|
attr_accessor :alert
|
|
27
30
|
|
|
28
31
|
attr_accessor :target
|
|
29
32
|
|
|
33
|
+
# Optional tags to organize and filter notification history.
|
|
34
|
+
attr_accessor :tags
|
|
35
|
+
|
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
37
|
def self.attribute_map
|
|
32
38
|
{
|
|
39
|
+
:'metadata' => :'metadata',
|
|
33
40
|
:'content_state' => :'content_state',
|
|
34
41
|
:'action' => :'action',
|
|
35
42
|
:'secondary_action' => :'secondary_action',
|
|
36
43
|
:'alert' => :'alert',
|
|
37
|
-
:'target' => :'target'
|
|
44
|
+
:'target' => :'target',
|
|
45
|
+
:'tags' => :'tags'
|
|
38
46
|
}
|
|
39
47
|
end
|
|
40
48
|
|
|
@@ -46,11 +54,13 @@ module OpenapiClient
|
|
|
46
54
|
# Attribute type mapping.
|
|
47
55
|
def self.openapi_types
|
|
48
56
|
{
|
|
57
|
+
:'metadata' => :'Hash<String, MetadataValue>',
|
|
49
58
|
:'content_state' => :'ContentStateStart',
|
|
50
59
|
:'action' => :'LiveActivityAction',
|
|
51
60
|
:'secondary_action' => :'LiveActivityAction',
|
|
52
61
|
:'alert' => :'AlertPayload',
|
|
53
|
-
:'target' => :'ChannelTarget'
|
|
62
|
+
:'target' => :'ChannelTarget',
|
|
63
|
+
:'tags' => :'Array<String>'
|
|
54
64
|
}
|
|
55
65
|
end
|
|
56
66
|
|
|
@@ -75,6 +85,12 @@ module OpenapiClient
|
|
|
75
85
|
h[k.to_sym] = v
|
|
76
86
|
}
|
|
77
87
|
|
|
88
|
+
if attributes.key?(:'metadata')
|
|
89
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
90
|
+
self.metadata = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
78
94
|
if attributes.key?(:'content_state')
|
|
79
95
|
self.content_state = attributes[:'content_state']
|
|
80
96
|
else
|
|
@@ -96,6 +112,12 @@ module OpenapiClient
|
|
|
96
112
|
if attributes.key?(:'target')
|
|
97
113
|
self.target = attributes[:'target']
|
|
98
114
|
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'tags')
|
|
117
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
118
|
+
self.tags = value
|
|
119
|
+
end
|
|
120
|
+
end
|
|
99
121
|
end
|
|
100
122
|
|
|
101
123
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,6 +125,10 @@ module OpenapiClient
|
|
|
103
125
|
def list_invalid_properties
|
|
104
126
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
127
|
invalid_properties = Array.new
|
|
128
|
+
if !@metadata.nil? && @metadata.length > 50
|
|
129
|
+
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
|
|
130
|
+
end
|
|
131
|
+
|
|
106
132
|
if @content_state.nil?
|
|
107
133
|
invalid_properties.push('invalid value for "content_state", content_state cannot be nil.')
|
|
108
134
|
end
|
|
@@ -114,20 +140,37 @@ module OpenapiClient
|
|
|
114
140
|
# @return true if the model is valid
|
|
115
141
|
def valid?
|
|
116
142
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
143
|
+
return false if !@metadata.nil? && @metadata.length > 50
|
|
117
144
|
return false if @content_state.nil?
|
|
118
145
|
true
|
|
119
146
|
end
|
|
120
147
|
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] metadata Value to be assigned
|
|
150
|
+
def metadata=(metadata)
|
|
151
|
+
if metadata.nil?
|
|
152
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if metadata.length > 50
|
|
156
|
+
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@metadata = metadata
|
|
160
|
+
end
|
|
161
|
+
|
|
121
162
|
# Checks equality by comparing each attribute.
|
|
122
163
|
# @param [Object] Object to be compared
|
|
123
164
|
def ==(o)
|
|
124
165
|
return true if self.equal?(o)
|
|
125
166
|
self.class == o.class &&
|
|
167
|
+
metadata == o.metadata &&
|
|
126
168
|
content_state == o.content_state &&
|
|
127
169
|
action == o.action &&
|
|
128
170
|
secondary_action == o.secondary_action &&
|
|
129
171
|
alert == o.alert &&
|
|
130
|
-
target == o.target
|
|
172
|
+
target == o.target &&
|
|
173
|
+
tags == o.tags
|
|
131
174
|
end
|
|
132
175
|
|
|
133
176
|
# @see the `==` method
|
|
@@ -139,7 +182,7 @@ module OpenapiClient
|
|
|
139
182
|
# Calculates hash code according to all attributes.
|
|
140
183
|
# @return [Integer] Hash code
|
|
141
184
|
def hash
|
|
142
|
-
[content_state, action, secondary_action, alert, target].hash
|
|
185
|
+
[metadata, content_state, action, secondary_action, alert, target, tags].hash
|
|
143
186
|
end
|
|
144
187
|
|
|
145
188
|
# 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
|
|
@@ -16,11 +16,17 @@ require 'time'
|
|
|
16
16
|
module OpenapiClient
|
|
17
17
|
# Optional payload for ending a managed stream. When omitted, ActivitySmith ends the stream using the latest known state when possible.
|
|
18
18
|
class LiveActivityStreamDeleteRequest
|
|
19
|
+
# Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
22
|
+
# Optional tags to organize and filter notification history.
|
|
23
|
+
attr_accessor :tags
|
|
24
|
+
|
|
19
25
|
attr_accessor :content_state
|
|
20
26
|
|
|
21
27
|
attr_accessor :action
|
|
22
28
|
|
|
23
|
-
# Optional secondary action button. Supported
|
|
29
|
+
# 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
30
|
attr_accessor :secondary_action
|
|
25
31
|
|
|
26
32
|
attr_accessor :alert
|
|
@@ -28,6 +34,8 @@ module OpenapiClient
|
|
|
28
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
35
|
def self.attribute_map
|
|
30
36
|
{
|
|
37
|
+
:'metadata' => :'metadata',
|
|
38
|
+
:'tags' => :'tags',
|
|
31
39
|
:'content_state' => :'content_state',
|
|
32
40
|
:'action' => :'action',
|
|
33
41
|
:'secondary_action' => :'secondary_action',
|
|
@@ -43,6 +51,8 @@ module OpenapiClient
|
|
|
43
51
|
# Attribute type mapping.
|
|
44
52
|
def self.openapi_types
|
|
45
53
|
{
|
|
54
|
+
:'metadata' => :'Hash<String, MetadataValue>',
|
|
55
|
+
:'tags' => :'Array<String>',
|
|
46
56
|
:'content_state' => :'StreamContentState',
|
|
47
57
|
:'action' => :'LiveActivityAction',
|
|
48
58
|
:'secondary_action' => :'LiveActivityAction',
|
|
@@ -71,6 +81,18 @@ module OpenapiClient
|
|
|
71
81
|
h[k.to_sym] = v
|
|
72
82
|
}
|
|
73
83
|
|
|
84
|
+
if attributes.key?(:'metadata')
|
|
85
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
86
|
+
self.metadata = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'tags')
|
|
91
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
|
92
|
+
self.tags = value
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
74
96
|
if attributes.key?(:'content_state')
|
|
75
97
|
self.content_state = attributes[:'content_state']
|
|
76
98
|
end
|
|
@@ -93,6 +115,10 @@ module OpenapiClient
|
|
|
93
115
|
def list_invalid_properties
|
|
94
116
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
95
117
|
invalid_properties = Array.new
|
|
118
|
+
if !@metadata.nil? && @metadata.length > 50
|
|
119
|
+
invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
|
|
120
|
+
end
|
|
121
|
+
|
|
96
122
|
invalid_properties
|
|
97
123
|
end
|
|
98
124
|
|
|
@@ -100,14 +126,31 @@ module OpenapiClient
|
|
|
100
126
|
# @return true if the model is valid
|
|
101
127
|
def valid?
|
|
102
128
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if !@metadata.nil? && @metadata.length > 50
|
|
103
130
|
true
|
|
104
131
|
end
|
|
105
132
|
|
|
133
|
+
# Custom attribute writer method with validation
|
|
134
|
+
# @param [Object] metadata Value to be assigned
|
|
135
|
+
def metadata=(metadata)
|
|
136
|
+
if metadata.nil?
|
|
137
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if metadata.length > 50
|
|
141
|
+
fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@metadata = metadata
|
|
145
|
+
end
|
|
146
|
+
|
|
106
147
|
# Checks equality by comparing each attribute.
|
|
107
148
|
# @param [Object] Object to be compared
|
|
108
149
|
def ==(o)
|
|
109
150
|
return true if self.equal?(o)
|
|
110
151
|
self.class == o.class &&
|
|
152
|
+
metadata == o.metadata &&
|
|
153
|
+
tags == o.tags &&
|
|
111
154
|
content_state == o.content_state &&
|
|
112
155
|
action == o.action &&
|
|
113
156
|
secondary_action == o.secondary_action &&
|
|
@@ -123,7 +166,7 @@ module OpenapiClient
|
|
|
123
166
|
# Calculates hash code according to all attributes.
|
|
124
167
|
# @return [Integer] Hash code
|
|
125
168
|
def hash
|
|
126
|
-
[content_state, action, secondary_action, alert].hash
|
|
169
|
+
[metadata, tags, content_state, action, secondary_action, alert].hash
|
|
127
170
|
end
|
|
128
171
|
|
|
129
172
|
# Builds the object from hash
|
|
@@ -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
|