onesignal 1.0.0.beta1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/LICENSE +24 -0
  4. data/README.md +75 -45
  5. data/RELEASE_INSTRUCTIONS.md +11 -0
  6. data/docs/DefaultApi.md +86 -86
  7. data/docs/InlineResponse200.md +1 -1
  8. data/docs/InlineResponse2001.md +1 -1
  9. data/docs/InlineResponse2002.md +1 -1
  10. data/docs/InlineResponse2005.md +4 -2
  11. data/docs/{InlineResponse2003.md → InlineResponse2007.md} +3 -3
  12. data/docs/InlineResponse2008.md +18 -0
  13. data/docs/InlineResponse4002.md +4 -2
  14. data/docs/InlineResponse4003.md +18 -0
  15. data/docs/InvalidIdentifierError.md +20 -0
  16. data/docs/Notification.md +12 -12
  17. data/docs/Notification200Errors.md +49 -0
  18. data/docs/NotificationAllOf.md +11 -11
  19. data/docs/NotificationSlice.md +1 -1
  20. data/docs/NotificationTarget.md +1 -1
  21. data/docs/NotificationWithMeta.md +260 -0
  22. data/docs/NotificationWithMetaAllOf.md +38 -0
  23. data/docs/OutcomesData.md +18 -0
  24. data/docs/Player.md +2 -2
  25. data/docs/PlayerNotificationTarget.md +1 -1
  26. data/docs/StringMap.md +1 -1
  27. data/lib/onesignal/api/default_api.rb +82 -55
  28. data/lib/onesignal/api_client.rb +9 -7
  29. data/lib/onesignal/api_error.rb +2 -2
  30. data/lib/onesignal/configuration.rb +6 -3
  31. data/lib/onesignal/models/app.rb +3 -2
  32. data/lib/onesignal/models/button.rb +3 -2
  33. data/lib/onesignal/models/delivery_data.rb +8 -2
  34. data/lib/onesignal/models/export_players_request_body.rb +3 -2
  35. data/lib/onesignal/models/filter.rb +3 -2
  36. data/lib/onesignal/models/filter_expressions.rb +3 -2
  37. data/lib/onesignal/models/filter_notification_target.rb +3 -2
  38. data/lib/onesignal/models/get_notification_request_body.rb +3 -2
  39. data/lib/onesignal/models/inline_response200.rb +4 -3
  40. data/lib/onesignal/models/inline_response2001.rb +4 -3
  41. data/lib/onesignal/models/inline_response2002.rb +4 -3
  42. data/lib/onesignal/models/inline_response2005.rb +19 -9
  43. data/lib/onesignal/models/{inline_response2003.rb → inline_response2007.rb} +7 -6
  44. data/lib/onesignal/models/{inline_response2004.rb → inline_response2008.rb} +13 -21
  45. data/lib/onesignal/models/inline_response201.rb +3 -2
  46. data/lib/onesignal/models/inline_response400.rb +3 -2
  47. data/lib/onesignal/models/inline_response4001.rb +3 -2
  48. data/lib/onesignal/models/inline_response4002.rb +20 -10
  49. data/lib/onesignal/models/{inline_response409.rb → inline_response4003.rb} +14 -22
  50. data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
  51. data/lib/onesignal/models/notification.rb +39 -19
  52. data/lib/onesignal/models/notification200_errors.rb +105 -0
  53. data/lib/onesignal/models/notification_all_of.rb +38 -18
  54. data/lib/onesignal/models/notification_all_of_android_background_layout.rb +3 -2
  55. data/lib/onesignal/models/notification_slice.rb +4 -3
  56. data/lib/onesignal/models/notification_target.rb +4 -3
  57. data/lib/onesignal/models/notification_with_meta.rb +1526 -0
  58. data/lib/onesignal/models/notification_with_meta_all_of.rb +322 -0
  59. data/lib/onesignal/models/operator.rb +3 -2
  60. data/lib/onesignal/models/outcome_data.rb +3 -2
  61. data/lib/onesignal/models/outcomes_data.rb +221 -0
  62. data/lib/onesignal/models/platform_delivery_data.rb +3 -2
  63. data/lib/onesignal/models/player.rb +6 -8
  64. data/lib/onesignal/models/player_notification_target.rb +4 -3
  65. data/lib/onesignal/models/player_slice.rb +3 -2
  66. data/lib/onesignal/models/purchase.rb +3 -2
  67. data/lib/onesignal/models/segment.rb +3 -2
  68. data/lib/onesignal/models/segment_notification_target.rb +3 -2
  69. data/lib/onesignal/models/string_map.rb +3 -7
  70. data/lib/onesignal/models/update_player_tags_request_body.rb +3 -2
  71. data/lib/onesignal/version.rb +3 -3
  72. data/lib/{OneSignal.rb → onesignal.rb} +10 -5
  73. data/onesignal.gemspec +5 -4
  74. data/spec/api/default_api_spec.rb +20 -20
  75. data/spec/api_client_spec.rb +4 -4
  76. data/spec/configuration_spec.rb +2 -2
  77. data/spec/models/app_spec.rb +2 -2
  78. data/spec/models/button_spec.rb +2 -2
  79. data/spec/models/delivery_data_spec.rb +2 -2
  80. data/spec/models/export_players_request_body_spec.rb +2 -2
  81. data/spec/models/filter_expressions_spec.rb +2 -2
  82. data/spec/models/filter_notification_target_spec.rb +2 -2
  83. data/spec/models/filter_spec.rb +2 -2
  84. data/spec/models/get_notification_request_body_spec.rb +2 -2
  85. data/spec/models/inline_response2001_spec.rb +2 -2
  86. data/spec/models/inline_response2002_spec.rb +2 -2
  87. data/spec/models/inline_response2005_spec.rb +9 -3
  88. data/spec/models/{inline_response2003_spec.rb → inline_response2007_spec.rb} +8 -8
  89. data/spec/models/{inline_response409_spec.rb → inline_response2008_spec.rb} +9 -15
  90. data/spec/models/inline_response200_spec.rb +2 -2
  91. data/spec/models/inline_response201_spec.rb +2 -2
  92. data/spec/models/inline_response4001_spec.rb +2 -2
  93. data/spec/models/inline_response4002_spec.rb +9 -3
  94. data/spec/models/inline_response4003_spec.rb +34 -0
  95. data/spec/models/inline_response400_spec.rb +2 -2
  96. data/spec/models/{inline_response2004_spec.rb → invalid_identifier_error_spec.rb} +10 -10
  97. data/spec/models/notification200_errors_spec.rb +31 -0
  98. data/spec/models/notification_all_of_android_background_layout_spec.rb +2 -2
  99. data/spec/models/notification_all_of_spec.rb +3 -3
  100. data/spec/models/notification_slice_spec.rb +2 -2
  101. data/spec/models/notification_spec.rb +3 -3
  102. data/spec/models/notification_target_spec.rb +2 -2
  103. data/spec/models/notification_with_meta_all_of_spec.rb +94 -0
  104. data/spec/models/notification_with_meta_spec.rb +764 -0
  105. data/spec/models/operator_spec.rb +2 -2
  106. data/spec/models/outcome_data_spec.rb +2 -2
  107. data/spec/models/outcomes_data_spec.rb +34 -0
  108. data/spec/models/platform_delivery_data_spec.rb +2 -2
  109. data/spec/models/player_notification_target_spec.rb +2 -2
  110. data/spec/models/player_slice_spec.rb +2 -2
  111. data/spec/models/player_spec.rb +2 -2
  112. data/spec/models/purchase_spec.rb +2 -2
  113. data/spec/models/segment_notification_target_spec.rb +2 -2
  114. data/spec/models/segment_spec.rb +2 -2
  115. data/spec/models/string_map_spec.rb +2 -2
  116. data/spec/models/update_player_tags_request_body_spec.rb +2 -2
  117. data/spec/spec_helper.rb +2 -2
  118. metadata +51 -29
  119. data/docs/InlineResponse2004.md +0 -20
  120. data/docs/InlineResponse409.md +0 -20
  121. data/git_push.sh +0 -58
@@ -0,0 +1,1526 @@
1
+ =begin
2
+ #OneSignal
3
+
4
+ #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: devrel@onesignal.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OneSignal
17
+ class NotificationWithMeta
18
+ # The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"]
19
+ attr_accessor :included_segments
20
+
21
+ # Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"]
22
+ attr_accessor :excluded_segments
23
+
24
+ # relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\"
25
+ attr_accessor :last_session
26
+
27
+ # relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\"
28
+ attr_accessor :first_session
29
+
30
+ # relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\"
31
+ attr_accessor :session_count
32
+
33
+ # relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\"
34
+ attr_accessor :session_time
35
+
36
+ # relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\"
37
+ attr_accessor :amount_spent
38
+
39
+ # relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\"
40
+ attr_accessor :bought_sku
41
+
42
+ # relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters
43
+ attr_accessor :tag
44
+
45
+ # relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization.
46
+ attr_accessor :language
47
+
48
+ # relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\"
49
+ attr_accessor :app_version
50
+
51
+ # radius = in meters lat = latitude long = longitude
52
+ attr_accessor :location
53
+
54
+ # value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter
55
+ attr_accessor :email
56
+
57
+ # relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\"
58
+ attr_accessor :country
59
+
60
+ # Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
61
+ attr_accessor :include_player_ids
62
+
63
+ # Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms.
64
+ attr_accessor :include_external_user_ids
65
+
66
+ # Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call
67
+ attr_accessor :include_email_tokens
68
+
69
+ # Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call
70
+ attr_accessor :include_phone_numbers
71
+
72
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call
73
+ attr_accessor :include_ios_tokens
74
+
75
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call
76
+ attr_accessor :include_wp_wns_uris
77
+
78
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call
79
+ attr_accessor :include_amazon_reg_ids
80
+
81
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
82
+ attr_accessor :include_chrome_reg_ids
83
+
84
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
85
+ attr_accessor :include_chrome_web_reg_ids
86
+
87
+ # Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
88
+ attr_accessor :include_android_reg_ids
89
+
90
+ attr_accessor :id
91
+
92
+ attr_accessor :value
93
+
94
+ attr_accessor :aggregation
95
+
96
+ # Indicates whether to send to all devices registered under your app's Apple iOS platform.
97
+ attr_accessor :is_ios
98
+
99
+ # Indicates whether to send to all devices registered under your app's Google Android platform.
100
+ attr_accessor :is_android
101
+
102
+ # Indicates whether to send to all devices registered under your app's Huawei Android platform.
103
+ attr_accessor :is_huawei
104
+
105
+ # Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one.
106
+ attr_accessor :is_any_web
107
+
108
+ # Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform.
109
+ attr_accessor :is_chrome_web
110
+
111
+ # Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform.
112
+ attr_accessor :is_firefox
113
+
114
+ # Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari
115
+ attr_accessor :is_safari
116
+
117
+ # Indicates whether to send to all devices registered under your app's Windows platform.
118
+ attr_accessor :is_wp_wns
119
+
120
+ # Indicates whether to send to all devices registered under your app's Amazon Fire platform.
121
+ attr_accessor :is_adm
122
+
123
+ # This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform.
124
+ attr_accessor :is_chrome
125
+
126
+ # Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS.
127
+ attr_accessor :channel_for_external_user_ids
128
+
129
+ # Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434.
130
+ attr_accessor :app_id
131
+
132
+ # Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true
133
+ attr_accessor :external_id
134
+
135
+ attr_accessor :contents
136
+
137
+ attr_accessor :headings
138
+
139
+ attr_accessor :subtitle
140
+
141
+ # Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1}
142
+ attr_accessor :data
143
+
144
+ # Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications.
145
+ attr_accessor :huawei_msg_type
146
+
147
+ # Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com
148
+ attr_accessor :url
149
+
150
+ # Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including Chrome, Firefox, Safari, Opera, etc. Example: https://onesignal.com
151
+ attr_accessor :web_url
152
+
153
+ # Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including iOS, Android, macOS, Windows, ChromeApps, etc. Example: https://onesignal.com
154
+ attr_accessor :app_url
155
+
156
+ # Channel: Push Notifications Platform: iOS 10+ Adds media attachments to notifications. Set as JSON object, key as a media id of your choice and the value as a valid local filename or URL. User must press and hold on the notification to view. Do not set mutable_content to download attachments. The OneSignal SDK does this automatically Example: {\"id1\": \"https://domain.com/image.jpg\"}
157
+ attr_accessor :ios_attachments
158
+
159
+ # Channel: Push Notifications Platform: All Use a template you setup on our dashboard. The template_id is the UUID found in the URL when viewing a template on our dashboard. Example: be4a8044-bbd6-11e4-a581-000c2940e62c
160
+ attr_accessor :template_id
161
+
162
+ # Channel: Push Notifications Platform: iOS Sending true wakes your app from background to run custom native code (Apple interprets this as content-available=1). Note: Not applicable if the app is in the \"force-quit\" state (i.e app was swiped away). Omit the contents field to prevent displaying a visible notification.
163
+ attr_accessor :content_available
164
+
165
+ # Channel: Push Notifications Platform: iOS 10+ Always defaults to true and cannot be turned off. Allows tracking of notification receives and changing of the notification content in your app before it is displayed. Triggers didReceive(_:withContentHandler:) on your UNNotificationServiceExtension.
166
+ attr_accessor :mutable_content
167
+
168
+ # Channel: Push Notifications Platform: iOS 13+ Use to target a specific experience in your App Clip, or to target your notification to a specific window in a multi-scene App.
169
+ attr_accessor :target_content_identifier
170
+
171
+ # Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL.
172
+ attr_accessor :big_picture
173
+
174
+ # Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL.
175
+ attr_accessor :huawei_big_picture
176
+
177
+ # Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL.
178
+ attr_accessor :adm_big_picture
179
+
180
+ # Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL.
181
+ attr_accessor :chrome_big_picture
182
+
183
+ # Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons.
184
+ attr_accessor :chrome_web_image
185
+
186
+ # Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}]
187
+ attr_accessor :buttons
188
+
189
+ # Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}]
190
+ attr_accessor :web_buttons
191
+
192
+ # Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category.
193
+ attr_accessor :ios_category
194
+
195
+ # Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id.
196
+ attr_accessor :android_channel_id
197
+
198
+ # Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id.
199
+ attr_accessor :huawei_channel_id
200
+
201
+ # Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code.
202
+ attr_accessor :existing_android_channel_id
203
+
204
+ # Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code.
205
+ attr_accessor :huawei_existing_channel_id
206
+
207
+ attr_accessor :android_background_layout
208
+
209
+ # Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons
210
+ attr_accessor :small_icon
211
+
212
+ # Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set.
213
+ attr_accessor :huawei_small_icon
214
+
215
+ # Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons
216
+ attr_accessor :large_icon
217
+
218
+ # Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons
219
+ attr_accessor :huawei_large_icon
220
+
221
+ # Channel: Push Notifications Platform: Amazon If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons
222
+ attr_accessor :adm_small_icon
223
+
224
+ # Channel: Push Notifications Platform: Amazon If blank the small_icon is used. Can be a drawable resource name or a URL. See: How to create large icons
225
+ attr_accessor :adm_large_icon
226
+
227
+ # Channel: Push Notifications Platform: Chrome Sets the web push notification's icon. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. Firefox will also use this icon, unless you specify firefox_icon.
228
+ attr_accessor :chrome_web_icon
229
+
230
+ # Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge.
231
+ attr_accessor :chrome_web_badge
232
+
233
+ # Channel: Push Notifications Platform: Firefox Not recommended Few people need to set Firefox-specific icons. We recommend setting chrome_web_icon instead, which Firefox will also use. Sets the web push notification's icon for Firefox. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices.
234
+ attr_accessor :firefox_icon
235
+
236
+ # Channel: Push Notifications Platform: ChromeApp This flag is not used for web push For web push, please see chrome_web_icon instead. The local URL to an icon to use. If blank, the app icon will be used.
237
+ attr_accessor :chrome_icon
238
+
239
+ # Channel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: \"notification.wav\"
240
+ attr_accessor :ios_sound
241
+
242
+ # Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\"
243
+ attr_accessor :android_sound
244
+
245
+ # Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: \"/res/raw/notification\"
246
+ attr_accessor :huawei_sound
247
+
248
+ # Channel: Push Notifications Platform: Amazon &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\"
249
+ attr_accessor :adm_sound
250
+
251
+ # Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\"
252
+ attr_accessor :wp_wns_sound
253
+
254
+ # Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): \"FF0000FF\"
255
+ attr_accessor :android_led_color
256
+
257
+ # Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): \"0000FF\"
258
+ attr_accessor :huawei_led_color
259
+
260
+ # Channel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): \"FFFF0000\"
261
+ attr_accessor :android_accent_color
262
+
263
+ # Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device's theme color if not set.
264
+ attr_accessor :huawei_accent_color
265
+
266
+ # Channel: Push Notifications Platform: Android 5.0_ &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
267
+ attr_accessor :android_visibility
268
+
269
+ # Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
270
+ attr_accessor :huawei_visibility
271
+
272
+ # Channel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app's iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. `None` leaves the count unaffected. `SetTo` directly sets the badge count to the number specified in ios_badgeCount. `Increase` adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count.
273
+ attr_accessor :ios_badge_type
274
+
275
+ # Channel: Push Notifications Platform: iOS Used with ios_badgeType, describes the value to set or amount to increase/decrease your app's iOS badge count by. You can use a negative number to decrease the badge count when used with an ios_badgeType of Increase.
276
+ attr_accessor :ios_badge_count
277
+
278
+ # Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters.
279
+ attr_accessor :collapse_id
280
+
281
+ # Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics.
282
+ attr_accessor :web_push_topic
283
+
284
+ # Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more.
285
+ attr_accessor :apns_alert
286
+
287
+ # Unix timestamp indicating when notification delivery should begin.
288
+ attr_accessor :send_after
289
+
290
+ # Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed.
291
+ attr_accessor :delayed_option
292
+
293
+ # Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\"
294
+ attr_accessor :delivery_time_of_day
295
+
296
+ # Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days).
297
+ attr_accessor :ttl
298
+
299
+ # Channel: Push Notifications Platform: Android, Chrome, ChromeWeb Delivery priority through the push server (example GCM/FCM). Pass 10 for high priority or any other integer for normal priority. Defaults to normal priority for Android and high for iOS. For Android 6.0+ devices setting priority to high will wake the device out of doze mode.
300
+ attr_accessor :priority
301
+
302
+ # Channel: Push Notifications Platform: iOS valid values: voip Set the value to voip for sending VoIP Notifications This field maps to the APNS header apns-push-type. Note: alert and background are automatically set by OneSignal
303
+ attr_accessor :apns_push_type_override
304
+
305
+ # number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the notification, and for free accounts, null is returned. Refer to Throttling for more details.
306
+ attr_accessor :throttle_rate_per_minute
307
+
308
+ # Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature.
309
+ attr_accessor :android_group
310
+
311
+ # Channel: Push Notifications Platform: Android Note: This only works for Android 6 and older. Android 7+ allows full expansion of all message. Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. Languages - The value of each key is the message that will be sent to users for that language. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. Read more: supported languages. Example: {\"en\": \"You have $[notif_count] new messages\"}
312
+ attr_accessor :android_group_message
313
+
314
+ # Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature.
315
+ attr_accessor :adm_group
316
+
317
+ # Channel: Push Notifications Platform: Amazon Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. The value of each key is the message that will be sent to users for that language. Example: {\"en\": \"You have $[notif_count] new messages\"}
318
+ attr_accessor :adm_group_message
319
+
320
+ # Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group.
321
+ attr_accessor :thread_id
322
+
323
+ # Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\"
324
+ attr_accessor :summary_arg
325
+
326
+ # Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\"
327
+ attr_accessor :summary_arg_count
328
+
329
+ # Channel: Email Required. The subject of the email.
330
+ attr_accessor :email_subject
331
+
332
+ # Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid.
333
+ attr_accessor :email_body
334
+
335
+ # Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings.
336
+ attr_accessor :email_from_name
337
+
338
+ # Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings.
339
+ attr_accessor :email_from_address
340
+
341
+ # Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
342
+ attr_accessor :sms_from
343
+
344
+ # Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs.
345
+ attr_accessor :sms_media_urls
346
+
347
+ # Number of notifications that were successfully delivered.
348
+ attr_accessor :successful
349
+
350
+ # Number of notifications that could not be delivered due to those devices being unsubscribed.
351
+ attr_accessor :failed
352
+
353
+ # Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard.
354
+ attr_accessor :errored
355
+
356
+ # Number of users who have clicked / tapped on your notification.
357
+ attr_accessor :converted
358
+
359
+ # Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0.
360
+ attr_accessor :received
361
+
362
+ attr_accessor :outcomes
363
+
364
+ # Number of notifications that have not been sent out yet. This can mean either our system is still processing the notification or you have delayed options set.
365
+ attr_accessor :remaining
366
+
367
+ # Unix timestamp indicating when the notification was created.
368
+ attr_accessor :queued_at
369
+
370
+ # Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after.
371
+ attr_accessor :completed_at
372
+
373
+ attr_accessor :platform_delivery_stats
374
+
375
+ class EnumAttributeValidator
376
+ attr_reader :datatype
377
+ attr_reader :allowable_values
378
+
379
+ def initialize(datatype, allowable_values)
380
+ @allowable_values = allowable_values.map do |value|
381
+ case datatype.to_s
382
+ when /Integer/i
383
+ value.to_i
384
+ when /Float/i
385
+ value.to_f
386
+ else
387
+ value
388
+ end
389
+ end
390
+ end
391
+
392
+ def valid?(value)
393
+ !value || allowable_values.include?(value)
394
+ end
395
+ end
396
+
397
+ # Attribute mapping from ruby-style variable name to JSON key.
398
+ def self.attribute_map
399
+ {
400
+ :'included_segments' => :'included_segments',
401
+ :'excluded_segments' => :'excluded_segments',
402
+ :'last_session' => :'last_session',
403
+ :'first_session' => :'first_session',
404
+ :'session_count' => :'session_count',
405
+ :'session_time' => :'session_time',
406
+ :'amount_spent' => :'amount_spent',
407
+ :'bought_sku' => :'bought_sku',
408
+ :'tag' => :'tag',
409
+ :'language' => :'language',
410
+ :'app_version' => :'app_version',
411
+ :'location' => :'location',
412
+ :'email' => :'email',
413
+ :'country' => :'country',
414
+ :'include_player_ids' => :'include_player_ids',
415
+ :'include_external_user_ids' => :'include_external_user_ids',
416
+ :'include_email_tokens' => :'include_email_tokens',
417
+ :'include_phone_numbers' => :'include_phone_numbers',
418
+ :'include_ios_tokens' => :'include_ios_tokens',
419
+ :'include_wp_wns_uris' => :'include_wp_wns_uris',
420
+ :'include_amazon_reg_ids' => :'include_amazon_reg_ids',
421
+ :'include_chrome_reg_ids' => :'include_chrome_reg_ids',
422
+ :'include_chrome_web_reg_ids' => :'include_chrome_web_reg_ids',
423
+ :'include_android_reg_ids' => :'include_android_reg_ids',
424
+ :'id' => :'id',
425
+ :'value' => :'value',
426
+ :'aggregation' => :'aggregation',
427
+ :'is_ios' => :'isIos',
428
+ :'is_android' => :'isAndroid',
429
+ :'is_huawei' => :'isHuawei',
430
+ :'is_any_web' => :'isAnyWeb',
431
+ :'is_chrome_web' => :'isChromeWeb',
432
+ :'is_firefox' => :'isFirefox',
433
+ :'is_safari' => :'isSafari',
434
+ :'is_wp_wns' => :'isWP_WNS',
435
+ :'is_adm' => :'isAdm',
436
+ :'is_chrome' => :'isChrome',
437
+ :'channel_for_external_user_ids' => :'channel_for_external_user_ids',
438
+ :'app_id' => :'app_id',
439
+ :'external_id' => :'external_id',
440
+ :'contents' => :'contents',
441
+ :'headings' => :'headings',
442
+ :'subtitle' => :'subtitle',
443
+ :'data' => :'data',
444
+ :'huawei_msg_type' => :'huawei_msg_type',
445
+ :'url' => :'url',
446
+ :'web_url' => :'web_url',
447
+ :'app_url' => :'app_url',
448
+ :'ios_attachments' => :'ios_attachments',
449
+ :'template_id' => :'template_id',
450
+ :'content_available' => :'content_available',
451
+ :'mutable_content' => :'mutable_content',
452
+ :'target_content_identifier' => :'target_content_identifier',
453
+ :'big_picture' => :'big_picture',
454
+ :'huawei_big_picture' => :'huawei_big_picture',
455
+ :'adm_big_picture' => :'adm_big_picture',
456
+ :'chrome_big_picture' => :'chrome_big_picture',
457
+ :'chrome_web_image' => :'chrome_web_image',
458
+ :'buttons' => :'buttons',
459
+ :'web_buttons' => :'web_buttons',
460
+ :'ios_category' => :'ios_category',
461
+ :'android_channel_id' => :'android_channel_id',
462
+ :'huawei_channel_id' => :'huawei_channel_id',
463
+ :'existing_android_channel_id' => :'existing_android_channel_id',
464
+ :'huawei_existing_channel_id' => :'huawei_existing_channel_id',
465
+ :'android_background_layout' => :'android_background_layout',
466
+ :'small_icon' => :'small_icon',
467
+ :'huawei_small_icon' => :'huawei_small_icon',
468
+ :'large_icon' => :'large_icon',
469
+ :'huawei_large_icon' => :'huawei_large_icon',
470
+ :'adm_small_icon' => :'adm_small_icon',
471
+ :'adm_large_icon' => :'adm_large_icon',
472
+ :'chrome_web_icon' => :'chrome_web_icon',
473
+ :'chrome_web_badge' => :'chrome_web_badge',
474
+ :'firefox_icon' => :'firefox_icon',
475
+ :'chrome_icon' => :'chrome_icon',
476
+ :'ios_sound' => :'ios_sound',
477
+ :'android_sound' => :'android_sound',
478
+ :'huawei_sound' => :'huawei_sound',
479
+ :'adm_sound' => :'adm_sound',
480
+ :'wp_wns_sound' => :'wp_wns_sound',
481
+ :'android_led_color' => :'android_led_color',
482
+ :'huawei_led_color' => :'huawei_led_color',
483
+ :'android_accent_color' => :'android_accent_color',
484
+ :'huawei_accent_color' => :'huawei_accent_color',
485
+ :'android_visibility' => :'android_visibility',
486
+ :'huawei_visibility' => :'huawei_visibility',
487
+ :'ios_badge_type' => :'ios_badgeType',
488
+ :'ios_badge_count' => :'ios_badgeCount',
489
+ :'collapse_id' => :'collapse_id',
490
+ :'web_push_topic' => :'web_push_topic',
491
+ :'apns_alert' => :'apns_alert',
492
+ :'send_after' => :'send_after',
493
+ :'delayed_option' => :'delayed_option',
494
+ :'delivery_time_of_day' => :'delivery_time_of_day',
495
+ :'ttl' => :'ttl',
496
+ :'priority' => :'priority',
497
+ :'apns_push_type_override' => :'apns_push_type_override',
498
+ :'throttle_rate_per_minute' => :'throttle_rate_per_minute',
499
+ :'android_group' => :'android_group',
500
+ :'android_group_message' => :'android_group_message',
501
+ :'adm_group' => :'adm_group',
502
+ :'adm_group_message' => :'adm_group_message',
503
+ :'thread_id' => :'thread_id',
504
+ :'summary_arg' => :'summary_arg',
505
+ :'summary_arg_count' => :'summary_arg_count',
506
+ :'email_subject' => :'email_subject',
507
+ :'email_body' => :'email_body',
508
+ :'email_from_name' => :'email_from_name',
509
+ :'email_from_address' => :'email_from_address',
510
+ :'sms_from' => :'sms_from',
511
+ :'sms_media_urls' => :'sms_media_urls',
512
+ :'successful' => :'successful',
513
+ :'failed' => :'failed',
514
+ :'errored' => :'errored',
515
+ :'converted' => :'converted',
516
+ :'received' => :'received',
517
+ :'outcomes' => :'outcomes',
518
+ :'remaining' => :'remaining',
519
+ :'queued_at' => :'queued_at',
520
+ :'completed_at' => :'completed_at',
521
+ :'platform_delivery_stats' => :'platform_delivery_stats'
522
+ }
523
+ end
524
+
525
+ # Returns all the JSON keys this model knows about
526
+ def self.acceptable_attributes
527
+ attribute_map.values
528
+ end
529
+
530
+ # Attribute type mapping.
531
+ def self.openapi_types
532
+ {
533
+ :'included_segments' => :'Array<String>',
534
+ :'excluded_segments' => :'Array<String>',
535
+ :'last_session' => :'String',
536
+ :'first_session' => :'String',
537
+ :'session_count' => :'String',
538
+ :'session_time' => :'String',
539
+ :'amount_spent' => :'String',
540
+ :'bought_sku' => :'String',
541
+ :'tag' => :'String',
542
+ :'language' => :'String',
543
+ :'app_version' => :'String',
544
+ :'location' => :'String',
545
+ :'email' => :'String',
546
+ :'country' => :'String',
547
+ :'include_player_ids' => :'Array<String>',
548
+ :'include_external_user_ids' => :'Array<String>',
549
+ :'include_email_tokens' => :'Array<String>',
550
+ :'include_phone_numbers' => :'Array<String>',
551
+ :'include_ios_tokens' => :'Array<String>',
552
+ :'include_wp_wns_uris' => :'Array<String>',
553
+ :'include_amazon_reg_ids' => :'Array<String>',
554
+ :'include_chrome_reg_ids' => :'Array<String>',
555
+ :'include_chrome_web_reg_ids' => :'Array<String>',
556
+ :'include_android_reg_ids' => :'Array<String>',
557
+ :'id' => :'String',
558
+ :'value' => :'Integer',
559
+ :'aggregation' => :'String',
560
+ :'is_ios' => :'Boolean',
561
+ :'is_android' => :'Boolean',
562
+ :'is_huawei' => :'Boolean',
563
+ :'is_any_web' => :'Boolean',
564
+ :'is_chrome_web' => :'Boolean',
565
+ :'is_firefox' => :'Boolean',
566
+ :'is_safari' => :'Boolean',
567
+ :'is_wp_wns' => :'Boolean',
568
+ :'is_adm' => :'Boolean',
569
+ :'is_chrome' => :'Boolean',
570
+ :'channel_for_external_user_ids' => :'String',
571
+ :'app_id' => :'String',
572
+ :'external_id' => :'String',
573
+ :'contents' => :'StringMap',
574
+ :'headings' => :'StringMap',
575
+ :'subtitle' => :'StringMap',
576
+ :'data' => :'Object',
577
+ :'huawei_msg_type' => :'String',
578
+ :'url' => :'String',
579
+ :'web_url' => :'String',
580
+ :'app_url' => :'String',
581
+ :'ios_attachments' => :'Object',
582
+ :'template_id' => :'String',
583
+ :'content_available' => :'Boolean',
584
+ :'mutable_content' => :'Boolean',
585
+ :'target_content_identifier' => :'String',
586
+ :'big_picture' => :'String',
587
+ :'huawei_big_picture' => :'String',
588
+ :'adm_big_picture' => :'String',
589
+ :'chrome_big_picture' => :'String',
590
+ :'chrome_web_image' => :'String',
591
+ :'buttons' => :'Array<Button>',
592
+ :'web_buttons' => :'Array<Button>',
593
+ :'ios_category' => :'String',
594
+ :'android_channel_id' => :'String',
595
+ :'huawei_channel_id' => :'String',
596
+ :'existing_android_channel_id' => :'String',
597
+ :'huawei_existing_channel_id' => :'String',
598
+ :'android_background_layout' => :'NotificationAllOfAndroidBackgroundLayout',
599
+ :'small_icon' => :'String',
600
+ :'huawei_small_icon' => :'String',
601
+ :'large_icon' => :'String',
602
+ :'huawei_large_icon' => :'String',
603
+ :'adm_small_icon' => :'String',
604
+ :'adm_large_icon' => :'String',
605
+ :'chrome_web_icon' => :'String',
606
+ :'chrome_web_badge' => :'String',
607
+ :'firefox_icon' => :'String',
608
+ :'chrome_icon' => :'String',
609
+ :'ios_sound' => :'String',
610
+ :'android_sound' => :'String',
611
+ :'huawei_sound' => :'String',
612
+ :'adm_sound' => :'String',
613
+ :'wp_wns_sound' => :'String',
614
+ :'android_led_color' => :'String',
615
+ :'huawei_led_color' => :'String',
616
+ :'android_accent_color' => :'String',
617
+ :'huawei_accent_color' => :'String',
618
+ :'android_visibility' => :'Integer',
619
+ :'huawei_visibility' => :'Integer',
620
+ :'ios_badge_type' => :'String',
621
+ :'ios_badge_count' => :'Integer',
622
+ :'collapse_id' => :'String',
623
+ :'web_push_topic' => :'String',
624
+ :'apns_alert' => :'Object',
625
+ :'send_after' => :'Integer',
626
+ :'delayed_option' => :'String',
627
+ :'delivery_time_of_day' => :'String',
628
+ :'ttl' => :'Integer',
629
+ :'priority' => :'Integer',
630
+ :'apns_push_type_override' => :'String',
631
+ :'throttle_rate_per_minute' => :'Integer',
632
+ :'android_group' => :'String',
633
+ :'android_group_message' => :'String',
634
+ :'adm_group' => :'String',
635
+ :'adm_group_message' => :'Object',
636
+ :'thread_id' => :'String',
637
+ :'summary_arg' => :'String',
638
+ :'summary_arg_count' => :'Integer',
639
+ :'email_subject' => :'String',
640
+ :'email_body' => :'String',
641
+ :'email_from_name' => :'String',
642
+ :'email_from_address' => :'String',
643
+ :'sms_from' => :'String',
644
+ :'sms_media_urls' => :'Array<String>',
645
+ :'successful' => :'Integer',
646
+ :'failed' => :'Integer',
647
+ :'errored' => :'Integer',
648
+ :'converted' => :'Integer',
649
+ :'received' => :'Integer',
650
+ :'outcomes' => :'Array<OutcomeData>',
651
+ :'remaining' => :'Integer',
652
+ :'queued_at' => :'Integer',
653
+ :'completed_at' => :'Integer',
654
+ :'platform_delivery_stats' => :'PlatformDeliveryData'
655
+ }
656
+ end
657
+
658
+ # List of attributes with nullable: true
659
+ def self.openapi_nullable
660
+ Set.new([
661
+ :'is_ios',
662
+ :'is_android',
663
+ :'is_huawei',
664
+ :'is_any_web',
665
+ :'is_chrome_web',
666
+ :'is_firefox',
667
+ :'is_safari',
668
+ :'is_wp_wns',
669
+ :'is_adm',
670
+ :'is_chrome',
671
+ :'contents',
672
+ :'headings',
673
+ :'subtitle',
674
+ :'content_available',
675
+ :'android_visibility',
676
+ :'huawei_visibility',
677
+ :'ios_badge_count',
678
+ :'ttl',
679
+ :'priority',
680
+ :'throttle_rate_per_minute',
681
+ :'received',
682
+ :'completed_at',
683
+ ])
684
+ end
685
+
686
+ # List of class defined in allOf (OpenAPI v3)
687
+ def self.openapi_all_of
688
+ [
689
+ :'DeliveryData',
690
+ :'Notification',
691
+ :'NotificationWithMetaAllOf',
692
+ :'OutcomesData'
693
+ ]
694
+ end
695
+
696
+ # Initializes the object
697
+ # @param [Hash] attributes Model attributes in the form of hash
698
+ def initialize(attributes = {})
699
+ if (!attributes.is_a?(Hash))
700
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::NotificationWithMeta` initialize method"
701
+ end
702
+
703
+ # check to see if the attribute exists and convert string to symbol for hash key
704
+ attributes = attributes.each_with_object({}) { |(k, v), h|
705
+ if (!self.class.attribute_map.key?(k.to_sym))
706
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::NotificationWithMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
707
+ end
708
+ h[k.to_sym] = v
709
+ }
710
+
711
+ if attributes.key?(:'included_segments')
712
+ if (value = attributes[:'included_segments']).is_a?(Array)
713
+ self.included_segments = value
714
+ end
715
+ end
716
+
717
+ if attributes.key?(:'excluded_segments')
718
+ if (value = attributes[:'excluded_segments']).is_a?(Array)
719
+ self.excluded_segments = value
720
+ end
721
+ end
722
+
723
+ if attributes.key?(:'last_session')
724
+ self.last_session = attributes[:'last_session']
725
+ end
726
+
727
+ if attributes.key?(:'first_session')
728
+ self.first_session = attributes[:'first_session']
729
+ end
730
+
731
+ if attributes.key?(:'session_count')
732
+ self.session_count = attributes[:'session_count']
733
+ end
734
+
735
+ if attributes.key?(:'session_time')
736
+ self.session_time = attributes[:'session_time']
737
+ end
738
+
739
+ if attributes.key?(:'amount_spent')
740
+ self.amount_spent = attributes[:'amount_spent']
741
+ end
742
+
743
+ if attributes.key?(:'bought_sku')
744
+ self.bought_sku = attributes[:'bought_sku']
745
+ end
746
+
747
+ if attributes.key?(:'tag')
748
+ self.tag = attributes[:'tag']
749
+ end
750
+
751
+ if attributes.key?(:'language')
752
+ self.language = attributes[:'language']
753
+ end
754
+
755
+ if attributes.key?(:'app_version')
756
+ self.app_version = attributes[:'app_version']
757
+ end
758
+
759
+ if attributes.key?(:'location')
760
+ self.location = attributes[:'location']
761
+ end
762
+
763
+ if attributes.key?(:'email')
764
+ self.email = attributes[:'email']
765
+ end
766
+
767
+ if attributes.key?(:'country')
768
+ self.country = attributes[:'country']
769
+ end
770
+
771
+ if attributes.key?(:'include_player_ids')
772
+ if (value = attributes[:'include_player_ids']).is_a?(Array)
773
+ self.include_player_ids = value
774
+ end
775
+ end
776
+
777
+ if attributes.key?(:'include_external_user_ids')
778
+ if (value = attributes[:'include_external_user_ids']).is_a?(Array)
779
+ self.include_external_user_ids = value
780
+ end
781
+ end
782
+
783
+ if attributes.key?(:'include_email_tokens')
784
+ if (value = attributes[:'include_email_tokens']).is_a?(Array)
785
+ self.include_email_tokens = value
786
+ end
787
+ end
788
+
789
+ if attributes.key?(:'include_phone_numbers')
790
+ if (value = attributes[:'include_phone_numbers']).is_a?(Array)
791
+ self.include_phone_numbers = value
792
+ end
793
+ end
794
+
795
+ if attributes.key?(:'include_ios_tokens')
796
+ if (value = attributes[:'include_ios_tokens']).is_a?(Array)
797
+ self.include_ios_tokens = value
798
+ end
799
+ end
800
+
801
+ if attributes.key?(:'include_wp_wns_uris')
802
+ if (value = attributes[:'include_wp_wns_uris']).is_a?(Array)
803
+ self.include_wp_wns_uris = value
804
+ end
805
+ end
806
+
807
+ if attributes.key?(:'include_amazon_reg_ids')
808
+ if (value = attributes[:'include_amazon_reg_ids']).is_a?(Array)
809
+ self.include_amazon_reg_ids = value
810
+ end
811
+ end
812
+
813
+ if attributes.key?(:'include_chrome_reg_ids')
814
+ if (value = attributes[:'include_chrome_reg_ids']).is_a?(Array)
815
+ self.include_chrome_reg_ids = value
816
+ end
817
+ end
818
+
819
+ if attributes.key?(:'include_chrome_web_reg_ids')
820
+ if (value = attributes[:'include_chrome_web_reg_ids']).is_a?(Array)
821
+ self.include_chrome_web_reg_ids = value
822
+ end
823
+ end
824
+
825
+ if attributes.key?(:'include_android_reg_ids')
826
+ if (value = attributes[:'include_android_reg_ids']).is_a?(Array)
827
+ self.include_android_reg_ids = value
828
+ end
829
+ end
830
+
831
+ if attributes.key?(:'id')
832
+ self.id = attributes[:'id']
833
+ end
834
+
835
+ if attributes.key?(:'value')
836
+ self.value = attributes[:'value']
837
+ end
838
+
839
+ if attributes.key?(:'aggregation')
840
+ self.aggregation = attributes[:'aggregation']
841
+ end
842
+
843
+ if attributes.key?(:'is_ios')
844
+ self.is_ios = attributes[:'is_ios']
845
+ else
846
+ self.is_ios = true
847
+ end
848
+
849
+ if attributes.key?(:'is_android')
850
+ self.is_android = attributes[:'is_android']
851
+ end
852
+
853
+ if attributes.key?(:'is_huawei')
854
+ self.is_huawei = attributes[:'is_huawei']
855
+ end
856
+
857
+ if attributes.key?(:'is_any_web')
858
+ self.is_any_web = attributes[:'is_any_web']
859
+ end
860
+
861
+ if attributes.key?(:'is_chrome_web')
862
+ self.is_chrome_web = attributes[:'is_chrome_web']
863
+ end
864
+
865
+ if attributes.key?(:'is_firefox')
866
+ self.is_firefox = attributes[:'is_firefox']
867
+ end
868
+
869
+ if attributes.key?(:'is_safari')
870
+ self.is_safari = attributes[:'is_safari']
871
+ end
872
+
873
+ if attributes.key?(:'is_wp_wns')
874
+ self.is_wp_wns = attributes[:'is_wp_wns']
875
+ end
876
+
877
+ if attributes.key?(:'is_adm')
878
+ self.is_adm = attributes[:'is_adm']
879
+ end
880
+
881
+ if attributes.key?(:'is_chrome')
882
+ self.is_chrome = attributes[:'is_chrome']
883
+ end
884
+
885
+ if attributes.key?(:'channel_for_external_user_ids')
886
+ self.channel_for_external_user_ids = attributes[:'channel_for_external_user_ids']
887
+ end
888
+
889
+ if attributes.key?(:'app_id')
890
+ self.app_id = attributes[:'app_id']
891
+ end
892
+
893
+ if attributes.key?(:'external_id')
894
+ self.external_id = attributes[:'external_id']
895
+ end
896
+
897
+ if attributes.key?(:'contents')
898
+ self.contents = attributes[:'contents']
899
+ end
900
+
901
+ if attributes.key?(:'headings')
902
+ self.headings = attributes[:'headings']
903
+ end
904
+
905
+ if attributes.key?(:'subtitle')
906
+ self.subtitle = attributes[:'subtitle']
907
+ end
908
+
909
+ if attributes.key?(:'data')
910
+ self.data = attributes[:'data']
911
+ end
912
+
913
+ if attributes.key?(:'huawei_msg_type')
914
+ self.huawei_msg_type = attributes[:'huawei_msg_type']
915
+ end
916
+
917
+ if attributes.key?(:'url')
918
+ self.url = attributes[:'url']
919
+ end
920
+
921
+ if attributes.key?(:'web_url')
922
+ self.web_url = attributes[:'web_url']
923
+ end
924
+
925
+ if attributes.key?(:'app_url')
926
+ self.app_url = attributes[:'app_url']
927
+ end
928
+
929
+ if attributes.key?(:'ios_attachments')
930
+ self.ios_attachments = attributes[:'ios_attachments']
931
+ end
932
+
933
+ if attributes.key?(:'template_id')
934
+ self.template_id = attributes[:'template_id']
935
+ end
936
+
937
+ if attributes.key?(:'content_available')
938
+ self.content_available = attributes[:'content_available']
939
+ end
940
+
941
+ if attributes.key?(:'mutable_content')
942
+ self.mutable_content = attributes[:'mutable_content']
943
+ end
944
+
945
+ if attributes.key?(:'target_content_identifier')
946
+ self.target_content_identifier = attributes[:'target_content_identifier']
947
+ end
948
+
949
+ if attributes.key?(:'big_picture')
950
+ self.big_picture = attributes[:'big_picture']
951
+ end
952
+
953
+ if attributes.key?(:'huawei_big_picture')
954
+ self.huawei_big_picture = attributes[:'huawei_big_picture']
955
+ end
956
+
957
+ if attributes.key?(:'adm_big_picture')
958
+ self.adm_big_picture = attributes[:'adm_big_picture']
959
+ end
960
+
961
+ if attributes.key?(:'chrome_big_picture')
962
+ self.chrome_big_picture = attributes[:'chrome_big_picture']
963
+ end
964
+
965
+ if attributes.key?(:'chrome_web_image')
966
+ self.chrome_web_image = attributes[:'chrome_web_image']
967
+ end
968
+
969
+ if attributes.key?(:'buttons')
970
+ if (value = attributes[:'buttons']).is_a?(Array)
971
+ self.buttons = value
972
+ end
973
+ end
974
+
975
+ if attributes.key?(:'web_buttons')
976
+ if (value = attributes[:'web_buttons']).is_a?(Array)
977
+ self.web_buttons = value
978
+ end
979
+ end
980
+
981
+ if attributes.key?(:'ios_category')
982
+ self.ios_category = attributes[:'ios_category']
983
+ end
984
+
985
+ if attributes.key?(:'android_channel_id')
986
+ self.android_channel_id = attributes[:'android_channel_id']
987
+ end
988
+
989
+ if attributes.key?(:'huawei_channel_id')
990
+ self.huawei_channel_id = attributes[:'huawei_channel_id']
991
+ end
992
+
993
+ if attributes.key?(:'existing_android_channel_id')
994
+ self.existing_android_channel_id = attributes[:'existing_android_channel_id']
995
+ end
996
+
997
+ if attributes.key?(:'huawei_existing_channel_id')
998
+ self.huawei_existing_channel_id = attributes[:'huawei_existing_channel_id']
999
+ end
1000
+
1001
+ if attributes.key?(:'android_background_layout')
1002
+ self.android_background_layout = attributes[:'android_background_layout']
1003
+ end
1004
+
1005
+ if attributes.key?(:'small_icon')
1006
+ self.small_icon = attributes[:'small_icon']
1007
+ end
1008
+
1009
+ if attributes.key?(:'huawei_small_icon')
1010
+ self.huawei_small_icon = attributes[:'huawei_small_icon']
1011
+ end
1012
+
1013
+ if attributes.key?(:'large_icon')
1014
+ self.large_icon = attributes[:'large_icon']
1015
+ end
1016
+
1017
+ if attributes.key?(:'huawei_large_icon')
1018
+ self.huawei_large_icon = attributes[:'huawei_large_icon']
1019
+ end
1020
+
1021
+ if attributes.key?(:'adm_small_icon')
1022
+ self.adm_small_icon = attributes[:'adm_small_icon']
1023
+ end
1024
+
1025
+ if attributes.key?(:'adm_large_icon')
1026
+ self.adm_large_icon = attributes[:'adm_large_icon']
1027
+ end
1028
+
1029
+ if attributes.key?(:'chrome_web_icon')
1030
+ self.chrome_web_icon = attributes[:'chrome_web_icon']
1031
+ end
1032
+
1033
+ if attributes.key?(:'chrome_web_badge')
1034
+ self.chrome_web_badge = attributes[:'chrome_web_badge']
1035
+ end
1036
+
1037
+ if attributes.key?(:'firefox_icon')
1038
+ self.firefox_icon = attributes[:'firefox_icon']
1039
+ end
1040
+
1041
+ if attributes.key?(:'chrome_icon')
1042
+ self.chrome_icon = attributes[:'chrome_icon']
1043
+ end
1044
+
1045
+ if attributes.key?(:'ios_sound')
1046
+ self.ios_sound = attributes[:'ios_sound']
1047
+ end
1048
+
1049
+ if attributes.key?(:'android_sound')
1050
+ self.android_sound = attributes[:'android_sound']
1051
+ end
1052
+
1053
+ if attributes.key?(:'huawei_sound')
1054
+ self.huawei_sound = attributes[:'huawei_sound']
1055
+ end
1056
+
1057
+ if attributes.key?(:'adm_sound')
1058
+ self.adm_sound = attributes[:'adm_sound']
1059
+ end
1060
+
1061
+ if attributes.key?(:'wp_wns_sound')
1062
+ self.wp_wns_sound = attributes[:'wp_wns_sound']
1063
+ end
1064
+
1065
+ if attributes.key?(:'android_led_color')
1066
+ self.android_led_color = attributes[:'android_led_color']
1067
+ end
1068
+
1069
+ if attributes.key?(:'huawei_led_color')
1070
+ self.huawei_led_color = attributes[:'huawei_led_color']
1071
+ end
1072
+
1073
+ if attributes.key?(:'android_accent_color')
1074
+ self.android_accent_color = attributes[:'android_accent_color']
1075
+ end
1076
+
1077
+ if attributes.key?(:'huawei_accent_color')
1078
+ self.huawei_accent_color = attributes[:'huawei_accent_color']
1079
+ end
1080
+
1081
+ if attributes.key?(:'android_visibility')
1082
+ self.android_visibility = attributes[:'android_visibility']
1083
+ end
1084
+
1085
+ if attributes.key?(:'huawei_visibility')
1086
+ self.huawei_visibility = attributes[:'huawei_visibility']
1087
+ end
1088
+
1089
+ if attributes.key?(:'ios_badge_type')
1090
+ self.ios_badge_type = attributes[:'ios_badge_type']
1091
+ end
1092
+
1093
+ if attributes.key?(:'ios_badge_count')
1094
+ self.ios_badge_count = attributes[:'ios_badge_count']
1095
+ end
1096
+
1097
+ if attributes.key?(:'collapse_id')
1098
+ self.collapse_id = attributes[:'collapse_id']
1099
+ end
1100
+
1101
+ if attributes.key?(:'web_push_topic')
1102
+ self.web_push_topic = attributes[:'web_push_topic']
1103
+ end
1104
+
1105
+ if attributes.key?(:'apns_alert')
1106
+ self.apns_alert = attributes[:'apns_alert']
1107
+ end
1108
+
1109
+ if attributes.key?(:'send_after')
1110
+ self.send_after = attributes[:'send_after']
1111
+ end
1112
+
1113
+ if attributes.key?(:'delayed_option')
1114
+ self.delayed_option = attributes[:'delayed_option']
1115
+ end
1116
+
1117
+ if attributes.key?(:'delivery_time_of_day')
1118
+ self.delivery_time_of_day = attributes[:'delivery_time_of_day']
1119
+ end
1120
+
1121
+ if attributes.key?(:'ttl')
1122
+ self.ttl = attributes[:'ttl']
1123
+ end
1124
+
1125
+ if attributes.key?(:'priority')
1126
+ self.priority = attributes[:'priority']
1127
+ end
1128
+
1129
+ if attributes.key?(:'apns_push_type_override')
1130
+ self.apns_push_type_override = attributes[:'apns_push_type_override']
1131
+ end
1132
+
1133
+ if attributes.key?(:'throttle_rate_per_minute')
1134
+ self.throttle_rate_per_minute = attributes[:'throttle_rate_per_minute']
1135
+ end
1136
+
1137
+ if attributes.key?(:'android_group')
1138
+ self.android_group = attributes[:'android_group']
1139
+ end
1140
+
1141
+ if attributes.key?(:'android_group_message')
1142
+ self.android_group_message = attributes[:'android_group_message']
1143
+ end
1144
+
1145
+ if attributes.key?(:'adm_group')
1146
+ self.adm_group = attributes[:'adm_group']
1147
+ end
1148
+
1149
+ if attributes.key?(:'adm_group_message')
1150
+ self.adm_group_message = attributes[:'adm_group_message']
1151
+ end
1152
+
1153
+ if attributes.key?(:'thread_id')
1154
+ self.thread_id = attributes[:'thread_id']
1155
+ end
1156
+
1157
+ if attributes.key?(:'summary_arg')
1158
+ self.summary_arg = attributes[:'summary_arg']
1159
+ end
1160
+
1161
+ if attributes.key?(:'summary_arg_count')
1162
+ self.summary_arg_count = attributes[:'summary_arg_count']
1163
+ end
1164
+
1165
+ if attributes.key?(:'email_subject')
1166
+ self.email_subject = attributes[:'email_subject']
1167
+ end
1168
+
1169
+ if attributes.key?(:'email_body')
1170
+ self.email_body = attributes[:'email_body']
1171
+ end
1172
+
1173
+ if attributes.key?(:'email_from_name')
1174
+ self.email_from_name = attributes[:'email_from_name']
1175
+ end
1176
+
1177
+ if attributes.key?(:'email_from_address')
1178
+ self.email_from_address = attributes[:'email_from_address']
1179
+ end
1180
+
1181
+ if attributes.key?(:'sms_from')
1182
+ self.sms_from = attributes[:'sms_from']
1183
+ end
1184
+
1185
+ if attributes.key?(:'sms_media_urls')
1186
+ if (value = attributes[:'sms_media_urls']).is_a?(Array)
1187
+ self.sms_media_urls = value
1188
+ end
1189
+ end
1190
+
1191
+ if attributes.key?(:'successful')
1192
+ self.successful = attributes[:'successful']
1193
+ end
1194
+
1195
+ if attributes.key?(:'failed')
1196
+ self.failed = attributes[:'failed']
1197
+ end
1198
+
1199
+ if attributes.key?(:'errored')
1200
+ self.errored = attributes[:'errored']
1201
+ end
1202
+
1203
+ if attributes.key?(:'converted')
1204
+ self.converted = attributes[:'converted']
1205
+ end
1206
+
1207
+ if attributes.key?(:'received')
1208
+ self.received = attributes[:'received']
1209
+ end
1210
+
1211
+ if attributes.key?(:'outcomes')
1212
+ if (value = attributes[:'outcomes']).is_a?(Array)
1213
+ self.outcomes = value
1214
+ end
1215
+ end
1216
+
1217
+ if attributes.key?(:'remaining')
1218
+ self.remaining = attributes[:'remaining']
1219
+ end
1220
+
1221
+ if attributes.key?(:'queued_at')
1222
+ self.queued_at = attributes[:'queued_at']
1223
+ end
1224
+
1225
+ if attributes.key?(:'completed_at')
1226
+ self.completed_at = attributes[:'completed_at']
1227
+ end
1228
+
1229
+ if attributes.key?(:'platform_delivery_stats')
1230
+ self.platform_delivery_stats = attributes[:'platform_delivery_stats']
1231
+ end
1232
+ end
1233
+
1234
+ # Show invalid properties with the reasons. Usually used together with valid?
1235
+ # @return Array for valid properties with the reasons
1236
+ def list_invalid_properties
1237
+ invalid_properties = Array.new
1238
+ if @app_id.nil?
1239
+ invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
1240
+ end
1241
+
1242
+ invalid_properties
1243
+ end
1244
+
1245
+ # Check to see if the all the properties in the model are valid
1246
+ # @return true if the model is valid
1247
+ def valid?
1248
+ aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"])
1249
+ return false unless aggregation_validator.valid?(@aggregation)
1250
+ return false if @app_id.nil?
1251
+ true
1252
+ end
1253
+
1254
+ # Custom attribute writer method checking allowed values (enum).
1255
+ # @param [Object] aggregation Object to be assigned
1256
+ def aggregation=(aggregation)
1257
+ validator = EnumAttributeValidator.new('String', ["sum", "count"])
1258
+ unless validator.valid?(aggregation)
1259
+ fail ArgumentError, "invalid value for \"aggregation\", must be one of #{validator.allowable_values}."
1260
+ end
1261
+ @aggregation = aggregation
1262
+ end
1263
+
1264
+ # Checks equality by comparing each attribute.
1265
+ # @param [Object] Object to be compared
1266
+ def ==(o)
1267
+ return true if self.equal?(o)
1268
+ self.class == o.class &&
1269
+ included_segments == o.included_segments &&
1270
+ excluded_segments == o.excluded_segments &&
1271
+ last_session == o.last_session &&
1272
+ first_session == o.first_session &&
1273
+ session_count == o.session_count &&
1274
+ session_time == o.session_time &&
1275
+ amount_spent == o.amount_spent &&
1276
+ bought_sku == o.bought_sku &&
1277
+ tag == o.tag &&
1278
+ language == o.language &&
1279
+ app_version == o.app_version &&
1280
+ location == o.location &&
1281
+ email == o.email &&
1282
+ country == o.country &&
1283
+ include_player_ids == o.include_player_ids &&
1284
+ include_external_user_ids == o.include_external_user_ids &&
1285
+ include_email_tokens == o.include_email_tokens &&
1286
+ include_phone_numbers == o.include_phone_numbers &&
1287
+ include_ios_tokens == o.include_ios_tokens &&
1288
+ include_wp_wns_uris == o.include_wp_wns_uris &&
1289
+ include_amazon_reg_ids == o.include_amazon_reg_ids &&
1290
+ include_chrome_reg_ids == o.include_chrome_reg_ids &&
1291
+ include_chrome_web_reg_ids == o.include_chrome_web_reg_ids &&
1292
+ include_android_reg_ids == o.include_android_reg_ids &&
1293
+ id == o.id &&
1294
+ value == o.value &&
1295
+ aggregation == o.aggregation &&
1296
+ is_ios == o.is_ios &&
1297
+ is_android == o.is_android &&
1298
+ is_huawei == o.is_huawei &&
1299
+ is_any_web == o.is_any_web &&
1300
+ is_chrome_web == o.is_chrome_web &&
1301
+ is_firefox == o.is_firefox &&
1302
+ is_safari == o.is_safari &&
1303
+ is_wp_wns == o.is_wp_wns &&
1304
+ is_adm == o.is_adm &&
1305
+ is_chrome == o.is_chrome &&
1306
+ channel_for_external_user_ids == o.channel_for_external_user_ids &&
1307
+ app_id == o.app_id &&
1308
+ external_id == o.external_id &&
1309
+ contents == o.contents &&
1310
+ headings == o.headings &&
1311
+ subtitle == o.subtitle &&
1312
+ data == o.data &&
1313
+ huawei_msg_type == o.huawei_msg_type &&
1314
+ url == o.url &&
1315
+ web_url == o.web_url &&
1316
+ app_url == o.app_url &&
1317
+ ios_attachments == o.ios_attachments &&
1318
+ template_id == o.template_id &&
1319
+ content_available == o.content_available &&
1320
+ mutable_content == o.mutable_content &&
1321
+ target_content_identifier == o.target_content_identifier &&
1322
+ big_picture == o.big_picture &&
1323
+ huawei_big_picture == o.huawei_big_picture &&
1324
+ adm_big_picture == o.adm_big_picture &&
1325
+ chrome_big_picture == o.chrome_big_picture &&
1326
+ chrome_web_image == o.chrome_web_image &&
1327
+ buttons == o.buttons &&
1328
+ web_buttons == o.web_buttons &&
1329
+ ios_category == o.ios_category &&
1330
+ android_channel_id == o.android_channel_id &&
1331
+ huawei_channel_id == o.huawei_channel_id &&
1332
+ existing_android_channel_id == o.existing_android_channel_id &&
1333
+ huawei_existing_channel_id == o.huawei_existing_channel_id &&
1334
+ android_background_layout == o.android_background_layout &&
1335
+ small_icon == o.small_icon &&
1336
+ huawei_small_icon == o.huawei_small_icon &&
1337
+ large_icon == o.large_icon &&
1338
+ huawei_large_icon == o.huawei_large_icon &&
1339
+ adm_small_icon == o.adm_small_icon &&
1340
+ adm_large_icon == o.adm_large_icon &&
1341
+ chrome_web_icon == o.chrome_web_icon &&
1342
+ chrome_web_badge == o.chrome_web_badge &&
1343
+ firefox_icon == o.firefox_icon &&
1344
+ chrome_icon == o.chrome_icon &&
1345
+ ios_sound == o.ios_sound &&
1346
+ android_sound == o.android_sound &&
1347
+ huawei_sound == o.huawei_sound &&
1348
+ adm_sound == o.adm_sound &&
1349
+ wp_wns_sound == o.wp_wns_sound &&
1350
+ android_led_color == o.android_led_color &&
1351
+ huawei_led_color == o.huawei_led_color &&
1352
+ android_accent_color == o.android_accent_color &&
1353
+ huawei_accent_color == o.huawei_accent_color &&
1354
+ android_visibility == o.android_visibility &&
1355
+ huawei_visibility == o.huawei_visibility &&
1356
+ ios_badge_type == o.ios_badge_type &&
1357
+ ios_badge_count == o.ios_badge_count &&
1358
+ collapse_id == o.collapse_id &&
1359
+ web_push_topic == o.web_push_topic &&
1360
+ apns_alert == o.apns_alert &&
1361
+ send_after == o.send_after &&
1362
+ delayed_option == o.delayed_option &&
1363
+ delivery_time_of_day == o.delivery_time_of_day &&
1364
+ ttl == o.ttl &&
1365
+ priority == o.priority &&
1366
+ apns_push_type_override == o.apns_push_type_override &&
1367
+ throttle_rate_per_minute == o.throttle_rate_per_minute &&
1368
+ android_group == o.android_group &&
1369
+ android_group_message == o.android_group_message &&
1370
+ adm_group == o.adm_group &&
1371
+ adm_group_message == o.adm_group_message &&
1372
+ thread_id == o.thread_id &&
1373
+ summary_arg == o.summary_arg &&
1374
+ summary_arg_count == o.summary_arg_count &&
1375
+ email_subject == o.email_subject &&
1376
+ email_body == o.email_body &&
1377
+ email_from_name == o.email_from_name &&
1378
+ email_from_address == o.email_from_address &&
1379
+ sms_from == o.sms_from &&
1380
+ sms_media_urls == o.sms_media_urls &&
1381
+ successful == o.successful &&
1382
+ failed == o.failed &&
1383
+ errored == o.errored &&
1384
+ converted == o.converted &&
1385
+ received == o.received &&
1386
+ outcomes == o.outcomes &&
1387
+ remaining == o.remaining &&
1388
+ queued_at == o.queued_at &&
1389
+ completed_at == o.completed_at &&
1390
+ platform_delivery_stats == o.platform_delivery_stats
1391
+ end
1392
+
1393
+ # @see the `==` method
1394
+ # @param [Object] Object to be compared
1395
+ def eql?(o)
1396
+ self == o
1397
+ end
1398
+
1399
+ # Calculates hash code according to all attributes.
1400
+ # @return [Integer] Hash code
1401
+ def hash
1402
+ [included_segments, excluded_segments, last_session, first_session, session_count, session_time, amount_spent, bought_sku, tag, language, app_version, location, email, country, include_player_ids, include_external_user_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, id, value, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, channel_for_external_user_ids, app_id, external_id, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, send_after, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, email_subject, email_body, email_from_name, email_from_address, sms_from, sms_media_urls, successful, failed, errored, converted, received, outcomes, remaining, queued_at, completed_at, platform_delivery_stats].hash
1403
+ end
1404
+
1405
+ # Builds the object from hash
1406
+ # @param [Hash] attributes Model attributes in the form of hash
1407
+ # @return [Object] Returns the model itself
1408
+ def self.build_from_hash(attributes)
1409
+ new.build_from_hash(attributes)
1410
+ end
1411
+
1412
+ # Builds the object from hash
1413
+ # @param [Hash] attributes Model attributes in the form of hash
1414
+ # @return [Object] Returns the model itself
1415
+ def build_from_hash(attributes)
1416
+ return nil unless attributes.is_a?(Hash)
1417
+ attributes = attributes.transform_keys(&:to_sym)
1418
+ self.class.openapi_types.each_pair do |key, type|
1419
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
1420
+ self.send("#{key}=", nil)
1421
+ elsif type =~ /\AArray<(.*)>/i
1422
+ # check to ensure the input is an array given that the attribute
1423
+ # is documented as an array but the input is not
1424
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
1425
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
1426
+ end
1427
+ elsif !attributes[self.class.attribute_map[key]].nil?
1428
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1429
+ end
1430
+ end
1431
+
1432
+ self
1433
+ end
1434
+
1435
+ # Deserializes the data based on type
1436
+ # @param string type Data type
1437
+ # @param string value Value to be deserialized
1438
+ # @return [Object] Deserialized data
1439
+ def _deserialize(type, value)
1440
+ case type.to_sym
1441
+ when :Time
1442
+ Time.parse(value)
1443
+ when :Date
1444
+ Date.parse(value)
1445
+ when :String
1446
+ value.to_s
1447
+ when :Integer
1448
+ value.to_i
1449
+ when :Float
1450
+ value.to_f
1451
+ when :Boolean
1452
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1453
+ true
1454
+ else
1455
+ false
1456
+ end
1457
+ when :Object
1458
+ # generic object (usually a Hash), return directly
1459
+ value
1460
+ when /\AArray<(?<inner_type>.+)>\z/
1461
+ inner_type = Regexp.last_match[:inner_type]
1462
+ value.map { |v| _deserialize(inner_type, v) }
1463
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1464
+ k_type = Regexp.last_match[:k_type]
1465
+ v_type = Regexp.last_match[:v_type]
1466
+ {}.tap do |hash|
1467
+ value.each do |k, v|
1468
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1469
+ end
1470
+ end
1471
+ else # model
1472
+ # models (e.g. Pet) or oneOf
1473
+ klass = OneSignal.const_get(type)
1474
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1475
+ end
1476
+ end
1477
+
1478
+ # Returns the string representation of the object
1479
+ # @return [String] String presentation of the object
1480
+ def to_s
1481
+ to_hash.to_s
1482
+ end
1483
+
1484
+ # to_body is an alias to to_hash (backward compatibility)
1485
+ # @return [Hash] Returns the object in the form of hash
1486
+ def to_body
1487
+ to_hash
1488
+ end
1489
+
1490
+ # Returns the object in the form of hash
1491
+ # @return [Hash] Returns the object in the form of hash
1492
+ def to_hash
1493
+ hash = {}
1494
+ self.class.attribute_map.each_pair do |attr, param|
1495
+ value = self.send(attr)
1496
+ if value.nil?
1497
+ is_nullable = self.class.openapi_nullable.include?(attr)
1498
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1499
+ end
1500
+
1501
+ hash[param] = _to_hash(value)
1502
+ end
1503
+ hash
1504
+ end
1505
+
1506
+ # Outputs non-array value in the form of hash
1507
+ # For object, use to_hash. Otherwise, just return the value
1508
+ # @param [Object] value Any valid value
1509
+ # @return [Hash] Returns the value in the form of hash
1510
+ def _to_hash(value)
1511
+ if value.is_a?(Array)
1512
+ value.compact.map { |v| _to_hash(v) }
1513
+ elsif value.is_a?(Hash)
1514
+ {}.tap do |hash|
1515
+ value.each { |k, v| hash[k] = _to_hash(v) }
1516
+ end
1517
+ elsif value.respond_to? :to_hash
1518
+ value.to_hash
1519
+ else
1520
+ value
1521
+ end
1522
+ end
1523
+
1524
+ end
1525
+
1526
+ end