-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbasic_notification_all_of.rb
More file actions
1355 lines (1122 loc) · 63.2 KB
/
basic_notification_all_of.rb
File metadata and controls
1355 lines (1122 loc) · 63.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=begin
#OneSignal
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
The version of the OpenAPI document: 5.3.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.0.0-SNAPSHOT
=end
require 'date'
require 'time'
module OneSignal
class BasicNotificationAllOf
attr_accessor :id
attr_accessor :value
# Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.
attr_accessor :name
attr_accessor :aggregation
# Indicates whether to send to all devices registered under your app's Apple iOS platform.
attr_accessor :is_ios
# Indicates whether to send to all devices registered under your app's Google Android platform.
attr_accessor :is_android
# Indicates whether to send to all devices registered under your app's Huawei Android platform.
attr_accessor :is_huawei
# 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.
attr_accessor :is_any_web
# Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform.
attr_accessor :is_chrome_web
# Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform.
attr_accessor :is_firefox
# 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
attr_accessor :is_safari
# Indicates whether to send to all devices registered under your app's Windows platform.
attr_accessor :is_wp_wns
# Indicates whether to send to all devices registered under your app's Amazon Fire platform.
attr_accessor :is_adm
# 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.
attr_accessor :is_chrome
# 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.
attr_accessor :app_id
# [DEPRECATED] 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
attr_accessor :external_id
# Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true
attr_accessor :idempotency_key
attr_accessor :contents
attr_accessor :headings
attr_accessor :subtitle
# 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}
attr_accessor :data
# Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications.
attr_accessor :huawei_msg_type
# 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
attr_accessor :url
# 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
attr_accessor :web_url
# 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
attr_accessor :app_url
# 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\"}
attr_accessor :ios_attachments
# 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
attr_accessor :template_id
# 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.
attr_accessor :content_available
# 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.
attr_accessor :mutable_content
# 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.
attr_accessor :target_content_identifier
# Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL.
attr_accessor :big_picture
# Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL.
attr_accessor :huawei_big_picture
# Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL.
attr_accessor :adm_big_picture
# Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL.
attr_accessor :chrome_big_picture
# 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.
attr_accessor :chrome_web_image
# 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\"}]
attr_accessor :buttons
# 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\"}]
attr_accessor :web_buttons
# 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.
attr_accessor :ios_category
# 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.
attr_accessor :android_channel_id
# 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.
attr_accessor :huawei_channel_id
# Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code.
attr_accessor :existing_android_channel_id
# Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code.
attr_accessor :huawei_existing_channel_id
attr_accessor :android_background_layout
# 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
attr_accessor :small_icon
# 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.
attr_accessor :huawei_small_icon
# Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons
attr_accessor :large_icon
# Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons
attr_accessor :huawei_large_icon
# 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
attr_accessor :adm_small_icon
# 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
attr_accessor :adm_large_icon
# 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.
attr_accessor :chrome_web_icon
# Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge.
attr_accessor :chrome_web_badge
# 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.
attr_accessor :firefox_icon
# 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.
attr_accessor :chrome_icon
# 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\"
attr_accessor :ios_sound
# Channel: Push Notifications Platform: Android ⚠️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\"
attr_accessor :android_sound
# Channel: Push Notifications Platform: Huawei ⚠️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\"
attr_accessor :huawei_sound
# Channel: Push Notifications Platform: Amazon ⚠️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\"
attr_accessor :adm_sound
# 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\"
attr_accessor :wp_wns_sound
# Channel: Push Notifications Platform: Android ⚠️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\"
attr_accessor :android_led_color
# Channel: Push Notifications Platform: Huawei ⚠️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\"
attr_accessor :huawei_led_color
# 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\"
attr_accessor :android_accent_color
# 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.
attr_accessor :huawei_accent_color
# Channel: Push Notifications Platform: Android 5.0_ ⚠️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)
attr_accessor :android_visibility
# Channel: Push Notifications Platform: Huawei ⚠️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)
attr_accessor :huawei_visibility
# 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.
attr_accessor :ios_badge_type
# 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.
attr_accessor :ios_badge_count
# 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.
attr_accessor :collapse_id
# Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics.
attr_accessor :web_push_topic
# 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.
attr_accessor :apns_alert
# 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.
attr_accessor :delayed_option
# Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\"
attr_accessor :delivery_time_of_day
# 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).
attr_accessor :ttl
# 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.
attr_accessor :priority
# 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
attr_accessor :apns_push_type_override
# Channel: All Apps with throttling enabled: - the parameter value will be used to override the default application throttling value set from the dashboard settings. - parameter value 0 indicates not to apply throttling to the notification. - if the parameter is not passed then the default app throttling value will be applied to the notification. Apps with throttling disabled: - this parameter can be used to throttle delivery for the notification even though throttling is not enabled at the application level. Refer to throttling for more details.
attr_accessor :throttle_rate_per_minute
# Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature.
attr_accessor :android_group
# 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\"}
attr_accessor :android_group_message
# Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature.
attr_accessor :adm_group
# 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\"}
attr_accessor :adm_group_message
# 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.
attr_accessor :thread_id
# 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\"
attr_accessor :summary_arg
# 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\"
attr_accessor :summary_arg_count
# Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1.
attr_accessor :ios_relevance_score
# Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active.
attr_accessor :ios_interruption_level
# Channel: Email Required. The subject of the email.
attr_accessor :email_subject
# 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.
attr_accessor :email_body
# Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings.
attr_accessor :email_from_name
# Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings.
attr_accessor :email_from_address
# Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address.
attr_accessor :email_reply_to_address
# Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null.
attr_accessor :email_preheader
# Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked.
attr_accessor :disable_email_click_tracking
# Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.
attr_accessor :include_unsubscribed
# Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
attr_accessor :sms_from
# 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.
attr_accessor :sms_media_urls
attr_accessor :filters
# Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25}
attr_accessor :custom_data
# Channel: Push Notifications Platform: Huawei Full path of the app entry activity class
attr_accessor :huawei_badge_class
# Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99
attr_accessor :huawei_badge_add_num
# Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99
attr_accessor :huawei_badge_set_num
# Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.
attr_accessor :huawei_category
# Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.
attr_accessor :huawei_bi_tag
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end
def valid?(value)
!value || allowable_values.include?(value)
end
end
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'id' => :'id',
:'value' => :'value',
:'name' => :'name',
:'aggregation' => :'aggregation',
:'is_ios' => :'isIos',
:'is_android' => :'isAndroid',
:'is_huawei' => :'isHuawei',
:'is_any_web' => :'isAnyWeb',
:'is_chrome_web' => :'isChromeWeb',
:'is_firefox' => :'isFirefox',
:'is_safari' => :'isSafari',
:'is_wp_wns' => :'isWP_WNS',
:'is_adm' => :'isAdm',
:'is_chrome' => :'isChrome',
:'app_id' => :'app_id',
:'external_id' => :'external_id',
:'idempotency_key' => :'idempotency_key',
:'contents' => :'contents',
:'headings' => :'headings',
:'subtitle' => :'subtitle',
:'data' => :'data',
:'huawei_msg_type' => :'huawei_msg_type',
:'url' => :'url',
:'web_url' => :'web_url',
:'app_url' => :'app_url',
:'ios_attachments' => :'ios_attachments',
:'template_id' => :'template_id',
:'content_available' => :'content_available',
:'mutable_content' => :'mutable_content',
:'target_content_identifier' => :'target_content_identifier',
:'big_picture' => :'big_picture',
:'huawei_big_picture' => :'huawei_big_picture',
:'adm_big_picture' => :'adm_big_picture',
:'chrome_big_picture' => :'chrome_big_picture',
:'chrome_web_image' => :'chrome_web_image',
:'buttons' => :'buttons',
:'web_buttons' => :'web_buttons',
:'ios_category' => :'ios_category',
:'android_channel_id' => :'android_channel_id',
:'huawei_channel_id' => :'huawei_channel_id',
:'existing_android_channel_id' => :'existing_android_channel_id',
:'huawei_existing_channel_id' => :'huawei_existing_channel_id',
:'android_background_layout' => :'android_background_layout',
:'small_icon' => :'small_icon',
:'huawei_small_icon' => :'huawei_small_icon',
:'large_icon' => :'large_icon',
:'huawei_large_icon' => :'huawei_large_icon',
:'adm_small_icon' => :'adm_small_icon',
:'adm_large_icon' => :'adm_large_icon',
:'chrome_web_icon' => :'chrome_web_icon',
:'chrome_web_badge' => :'chrome_web_badge',
:'firefox_icon' => :'firefox_icon',
:'chrome_icon' => :'chrome_icon',
:'ios_sound' => :'ios_sound',
:'android_sound' => :'android_sound',
:'huawei_sound' => :'huawei_sound',
:'adm_sound' => :'adm_sound',
:'wp_wns_sound' => :'wp_wns_sound',
:'android_led_color' => :'android_led_color',
:'huawei_led_color' => :'huawei_led_color',
:'android_accent_color' => :'android_accent_color',
:'huawei_accent_color' => :'huawei_accent_color',
:'android_visibility' => :'android_visibility',
:'huawei_visibility' => :'huawei_visibility',
:'ios_badge_type' => :'ios_badgeType',
:'ios_badge_count' => :'ios_badgeCount',
:'collapse_id' => :'collapse_id',
:'web_push_topic' => :'web_push_topic',
:'apns_alert' => :'apns_alert',
:'delayed_option' => :'delayed_option',
:'delivery_time_of_day' => :'delivery_time_of_day',
:'ttl' => :'ttl',
:'priority' => :'priority',
:'apns_push_type_override' => :'apns_push_type_override',
:'throttle_rate_per_minute' => :'throttle_rate_per_minute',
:'android_group' => :'android_group',
:'android_group_message' => :'android_group_message',
:'adm_group' => :'adm_group',
:'adm_group_message' => :'adm_group_message',
:'thread_id' => :'thread_id',
:'summary_arg' => :'summary_arg',
:'summary_arg_count' => :'summary_arg_count',
:'ios_relevance_score' => :'ios_relevance_score',
:'ios_interruption_level' => :'ios_interruption_level',
:'email_subject' => :'email_subject',
:'email_body' => :'email_body',
:'email_from_name' => :'email_from_name',
:'email_from_address' => :'email_from_address',
:'email_reply_to_address' => :'email_reply_to_address',
:'email_preheader' => :'email_preheader',
:'disable_email_click_tracking' => :'disable_email_click_tracking',
:'include_unsubscribed' => :'include_unsubscribed',
:'sms_from' => :'sms_from',
:'sms_media_urls' => :'sms_media_urls',
:'filters' => :'filters',
:'custom_data' => :'custom_data',
:'huawei_badge_class' => :'huawei_badge_class',
:'huawei_badge_add_num' => :'huawei_badge_add_num',
:'huawei_badge_set_num' => :'huawei_badge_set_num',
:'huawei_category' => :'huawei_category',
:'huawei_bi_tag' => :'huawei_bi_tag'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
end
# Attribute type mapping.
def self.openapi_types
{
:'id' => :'String',
:'value' => :'Integer',
:'name' => :'String',
:'aggregation' => :'String',
:'is_ios' => :'Boolean',
:'is_android' => :'Boolean',
:'is_huawei' => :'Boolean',
:'is_any_web' => :'Boolean',
:'is_chrome_web' => :'Boolean',
:'is_firefox' => :'Boolean',
:'is_safari' => :'Boolean',
:'is_wp_wns' => :'Boolean',
:'is_adm' => :'Boolean',
:'is_chrome' => :'Boolean',
:'app_id' => :'String',
:'external_id' => :'String',
:'idempotency_key' => :'String',
:'contents' => :'LanguageStringMap',
:'headings' => :'LanguageStringMap',
:'subtitle' => :'LanguageStringMap',
:'data' => :'Object',
:'huawei_msg_type' => :'String',
:'url' => :'String',
:'web_url' => :'String',
:'app_url' => :'String',
:'ios_attachments' => :'Object',
:'template_id' => :'String',
:'content_available' => :'Boolean',
:'mutable_content' => :'Boolean',
:'target_content_identifier' => :'String',
:'big_picture' => :'String',
:'huawei_big_picture' => :'String',
:'adm_big_picture' => :'String',
:'chrome_big_picture' => :'String',
:'chrome_web_image' => :'String',
:'buttons' => :'Array<Button>',
:'web_buttons' => :'Array<WebButton>',
:'ios_category' => :'String',
:'android_channel_id' => :'String',
:'huawei_channel_id' => :'String',
:'existing_android_channel_id' => :'String',
:'huawei_existing_channel_id' => :'String',
:'android_background_layout' => :'BasicNotificationAllOfAndroidBackgroundLayout',
:'small_icon' => :'String',
:'huawei_small_icon' => :'String',
:'large_icon' => :'String',
:'huawei_large_icon' => :'String',
:'adm_small_icon' => :'String',
:'adm_large_icon' => :'String',
:'chrome_web_icon' => :'String',
:'chrome_web_badge' => :'String',
:'firefox_icon' => :'String',
:'chrome_icon' => :'String',
:'ios_sound' => :'String',
:'android_sound' => :'String',
:'huawei_sound' => :'String',
:'adm_sound' => :'String',
:'wp_wns_sound' => :'String',
:'android_led_color' => :'String',
:'huawei_led_color' => :'String',
:'android_accent_color' => :'String',
:'huawei_accent_color' => :'String',
:'android_visibility' => :'Integer',
:'huawei_visibility' => :'Integer',
:'ios_badge_type' => :'String',
:'ios_badge_count' => :'Integer',
:'collapse_id' => :'String',
:'web_push_topic' => :'String',
:'apns_alert' => :'Object',
:'delayed_option' => :'String',
:'delivery_time_of_day' => :'String',
:'ttl' => :'Integer',
:'priority' => :'Integer',
:'apns_push_type_override' => :'String',
:'throttle_rate_per_minute' => :'String',
:'android_group' => :'String',
:'android_group_message' => :'String',
:'adm_group' => :'String',
:'adm_group_message' => :'Object',
:'thread_id' => :'String',
:'summary_arg' => :'String',
:'summary_arg_count' => :'Integer',
:'ios_relevance_score' => :'Float',
:'ios_interruption_level' => :'String',
:'email_subject' => :'String',
:'email_body' => :'String',
:'email_from_name' => :'String',
:'email_from_address' => :'String',
:'email_reply_to_address' => :'String',
:'email_preheader' => :'String',
:'disable_email_click_tracking' => :'Boolean',
:'include_unsubscribed' => :'Boolean',
:'sms_from' => :'String',
:'sms_media_urls' => :'Array<String>',
:'filters' => :'Array<FilterExpression>',
:'custom_data' => :'Object',
:'huawei_badge_class' => :'String',
:'huawei_badge_add_num' => :'Integer',
:'huawei_badge_set_num' => :'Integer',
:'huawei_category' => :'String',
:'huawei_bi_tag' => :'String'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'name',
:'is_ios',
:'is_android',
:'is_huawei',
:'is_any_web',
:'is_chrome_web',
:'is_firefox',
:'is_safari',
:'is_wp_wns',
:'is_adm',
:'is_chrome',
:'external_id',
:'idempotency_key',
:'contents',
:'headings',
:'subtitle',
:'data',
:'huawei_msg_type',
:'url',
:'web_url',
:'app_url',
:'ios_attachments',
:'template_id',
:'content_available',
:'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',
:'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',
:'web_push_topic',
:'apns_alert',
:'delayed_option',
:'delivery_time_of_day',
:'ttl',
:'priority',
:'throttle_rate_per_minute',
:'android_group',
:'android_group_message',
:'adm_group',
:'adm_group_message',
:'thread_id',
:'ios_relevance_score',
:'ios_interruption_level',
:'email_subject',
:'email_from_name',
:'email_from_address',
:'email_reply_to_address',
:'email_preheader',
:'disable_email_click_tracking',
:'sms_from',
:'sms_media_urls',
:'filters',
:'custom_data',
:'huawei_badge_class',
:'huawei_badge_add_num',
:'huawei_badge_set_num',
:'huawei_category',
:'huawei_bi_tag'
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::BasicNotificationAllOf` initialize method"
end
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::BasicNotificationAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
if attributes.key?(:'id')
self.id = attributes[:'id']
end
if attributes.key?(:'value')
self.value = attributes[:'value']
end
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.key?(:'aggregation')
self.aggregation = attributes[:'aggregation']
end
if attributes.key?(:'is_ios')
self.is_ios = attributes[:'is_ios']
end
if attributes.key?(:'is_android')
self.is_android = attributes[:'is_android']
end
if attributes.key?(:'is_huawei')
self.is_huawei = attributes[:'is_huawei']
end
if attributes.key?(:'is_any_web')
self.is_any_web = attributes[:'is_any_web']
end
if attributes.key?(:'is_chrome_web')
self.is_chrome_web = attributes[:'is_chrome_web']
end
if attributes.key?(:'is_firefox')
self.is_firefox = attributes[:'is_firefox']
end
if attributes.key?(:'is_safari')
self.is_safari = attributes[:'is_safari']
end
if attributes.key?(:'is_wp_wns')
self.is_wp_wns = attributes[:'is_wp_wns']
end
if attributes.key?(:'is_adm')
self.is_adm = attributes[:'is_adm']
end
if attributes.key?(:'is_chrome')
self.is_chrome = attributes[:'is_chrome']
end
if attributes.key?(:'app_id')
self.app_id = attributes[:'app_id']
end
if attributes.key?(:'external_id')
self.external_id = attributes[:'external_id']
end
if attributes.key?(:'idempotency_key')
self.idempotency_key = attributes[:'idempotency_key']
end
if attributes.key?(:'contents')
self.contents = attributes[:'contents']
end
if attributes.key?(:'headings')
self.headings = attributes[:'headings']
end
if attributes.key?(:'subtitle')
self.subtitle = attributes[:'subtitle']
end
if attributes.key?(:'data')
self.data = attributes[:'data']
end
if attributes.key?(:'huawei_msg_type')
self.huawei_msg_type = attributes[:'huawei_msg_type']
end
if attributes.key?(:'url')
self.url = attributes[:'url']
end
if attributes.key?(:'web_url')
self.web_url = attributes[:'web_url']
end
if attributes.key?(:'app_url')
self.app_url = attributes[:'app_url']
end
if attributes.key?(:'ios_attachments')
self.ios_attachments = attributes[:'ios_attachments']
end
if attributes.key?(:'template_id')
self.template_id = attributes[:'template_id']
end
if attributes.key?(:'content_available')
self.content_available = attributes[:'content_available']
end
if attributes.key?(:'mutable_content')
self.mutable_content = attributes[:'mutable_content']
end
if attributes.key?(:'target_content_identifier')
self.target_content_identifier = attributes[:'target_content_identifier']
end
if attributes.key?(:'big_picture')
self.big_picture = attributes[:'big_picture']
end
if attributes.key?(:'huawei_big_picture')
self.huawei_big_picture = attributes[:'huawei_big_picture']
end
if attributes.key?(:'adm_big_picture')
self.adm_big_picture = attributes[:'adm_big_picture']
end
if attributes.key?(:'chrome_big_picture')
self.chrome_big_picture = attributes[:'chrome_big_picture']
end
if attributes.key?(:'chrome_web_image')
self.chrome_web_image = attributes[:'chrome_web_image']
end
if attributes.key?(:'buttons')
if (value = attributes[:'buttons']).is_a?(Array)
self.buttons = value
end
end
if attributes.key?(:'web_buttons')
if (value = attributes[:'web_buttons']).is_a?(Array)
self.web_buttons = value
end
end
if attributes.key?(:'ios_category')
self.ios_category = attributes[:'ios_category']
end
if attributes.key?(:'android_channel_id')
self.android_channel_id = attributes[:'android_channel_id']
end
if attributes.key?(:'huawei_channel_id')
self.huawei_channel_id = attributes[:'huawei_channel_id']
end
if attributes.key?(:'existing_android_channel_id')
self.existing_android_channel_id = attributes[:'existing_android_channel_id']
end
if attributes.key?(:'huawei_existing_channel_id')
self.huawei_existing_channel_id = attributes[:'huawei_existing_channel_id']
end
if attributes.key?(:'android_background_layout')
self.android_background_layout = attributes[:'android_background_layout']
end
if attributes.key?(:'small_icon')
self.small_icon = attributes[:'small_icon']
end
if attributes.key?(:'huawei_small_icon')
self.huawei_small_icon = attributes[:'huawei_small_icon']
end
if attributes.key?(:'large_icon')
self.large_icon = attributes[:'large_icon']
end
if attributes.key?(:'huawei_large_icon')
self.huawei_large_icon = attributes[:'huawei_large_icon']
end
if attributes.key?(:'adm_small_icon')
self.adm_small_icon = attributes[:'adm_small_icon']
end
if attributes.key?(:'adm_large_icon')
self.adm_large_icon = attributes[:'adm_large_icon']
end
if attributes.key?(:'chrome_web_icon')
self.chrome_web_icon = attributes[:'chrome_web_icon']
end
if attributes.key?(:'chrome_web_badge')
self.chrome_web_badge = attributes[:'chrome_web_badge']
end
if attributes.key?(:'firefox_icon')
self.firefox_icon = attributes[:'firefox_icon']
end
if attributes.key?(:'chrome_icon')
self.chrome_icon = attributes[:'chrome_icon']
end
if attributes.key?(:'ios_sound')
self.ios_sound = attributes[:'ios_sound']
end
if attributes.key?(:'android_sound')
self.android_sound = attributes[:'android_sound']
end
if attributes.key?(:'huawei_sound')
self.huawei_sound = attributes[:'huawei_sound']
end
if attributes.key?(:'adm_sound')
self.adm_sound = attributes[:'adm_sound']
end
if attributes.key?(:'wp_wns_sound')
self.wp_wns_sound = attributes[:'wp_wns_sound']
end
if attributes.key?(:'android_led_color')
self.android_led_color = attributes[:'android_led_color']
end
if attributes.key?(:'huawei_led_color')
self.huawei_led_color = attributes[:'huawei_led_color']
end
if attributes.key?(:'android_accent_color')
self.android_accent_color = attributes[:'android_accent_color']
end
if attributes.key?(:'huawei_accent_color')
self.huawei_accent_color = attributes[:'huawei_accent_color']
end
if attributes.key?(:'android_visibility')
self.android_visibility = attributes[:'android_visibility']
end
if attributes.key?(:'huawei_visibility')
self.huawei_visibility = attributes[:'huawei_visibility']
end
if attributes.key?(:'ios_badge_type')
self.ios_badge_type = attributes[:'ios_badge_type']
end
if attributes.key?(:'ios_badge_count')
self.ios_badge_count = attributes[:'ios_badge_count']
end
if attributes.key?(:'collapse_id')
self.collapse_id = attributes[:'collapse_id']
end
if attributes.key?(:'web_push_topic')
self.web_push_topic = attributes[:'web_push_topic']
end
if attributes.key?(:'apns_alert')
self.apns_alert = attributes[:'apns_alert']
end
if attributes.key?(:'delayed_option')
self.delayed_option = attributes[:'delayed_option']
end
if attributes.key?(:'delivery_time_of_day')
self.delivery_time_of_day = attributes[:'delivery_time_of_day']
end
if attributes.key?(:'ttl')
self.ttl = attributes[:'ttl']
end
if attributes.key?(:'priority')
self.priority = attributes[:'priority']
end
if attributes.key?(:'apns_push_type_override')
self.apns_push_type_override = attributes[:'apns_push_type_override']
end
if attributes.key?(:'throttle_rate_per_minute')
self.throttle_rate_per_minute = attributes[:'throttle_rate_per_minute']
end
if attributes.key?(:'android_group')
self.android_group = attributes[:'android_group']
end
if attributes.key?(:'android_group_message')
self.android_group_message = attributes[:'android_group_message']
end
if attributes.key?(:'adm_group')
self.adm_group = attributes[:'adm_group']
end
if attributes.key?(:'adm_group_message')
self.adm_group_message = attributes[:'adm_group_message']
end
if attributes.key?(:'thread_id')
self.thread_id = attributes[:'thread_id']
end
if attributes.key?(:'summary_arg')
self.summary_arg = attributes[:'summary_arg']
end
if attributes.key?(:'summary_arg_count')
self.summary_arg_count = attributes[:'summary_arg_count']
end
if attributes.key?(:'ios_relevance_score')
self.ios_relevance_score = attributes[:'ios_relevance_score']
end
if attributes.key?(:'ios_interruption_level')