onesignal_rust_api/models/basic_notification_all_of.rs
1/*
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: 5.2.1
7 * Contact: devrel@onesignal.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct BasicNotificationAllOf {
16 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17 pub id: Option<String>,
18 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
19 pub value: Option<i32>,
20 /// Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.
21 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22 pub name: Option<String>,
23 #[serde(rename = "aggregation", skip_serializing_if = "Option::is_none")]
24 pub aggregation: Option<AggregationType>,
25 /// Indicates whether to send to all devices registered under your app's Apple iOS platform.
26 #[serde(rename = "isIos", skip_serializing_if = "Option::is_none")]
27 pub is_ios: Option<bool>,
28 /// Indicates whether to send to all devices registered under your app's Google Android platform.
29 #[serde(rename = "isAndroid", skip_serializing_if = "Option::is_none")]
30 pub is_android: Option<bool>,
31 /// Indicates whether to send to all devices registered under your app's Huawei Android platform.
32 #[serde(rename = "isHuawei", skip_serializing_if = "Option::is_none")]
33 pub is_huawei: Option<bool>,
34 /// 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.
35 #[serde(rename = "isAnyWeb", skip_serializing_if = "Option::is_none")]
36 pub is_any_web: Option<bool>,
37 /// Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform.
38 #[serde(rename = "isChromeWeb", skip_serializing_if = "Option::is_none")]
39 pub is_chrome_web: Option<bool>,
40 /// Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform.
41 #[serde(rename = "isFirefox", skip_serializing_if = "Option::is_none")]
42 pub is_firefox: Option<bool>,
43 /// 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
44 #[serde(rename = "isSafari", skip_serializing_if = "Option::is_none")]
45 pub is_safari: Option<bool>,
46 /// Indicates whether to send to all devices registered under your app's Windows platform.
47 #[serde(rename = "isWP_WNS", skip_serializing_if = "Option::is_none")]
48 pub is_wp_wns: Option<bool>,
49 /// Indicates whether to send to all devices registered under your app's Amazon Fire platform.
50 #[serde(rename = "isAdm", skip_serializing_if = "Option::is_none")]
51 pub is_adm: Option<bool>,
52 /// 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.
53 #[serde(rename = "isChrome", skip_serializing_if = "Option::is_none")]
54 pub is_chrome: Option<bool>,
55 /// 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.
56 #[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
57 pub app_id: Option<String>,
58 /// [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
59 #[serde(rename = "external_id", skip_serializing_if = "Option::is_none")]
60 pub external_id: Option<String>,
61 /// 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
62 #[serde(rename = "idempotency_key", skip_serializing_if = "Option::is_none")]
63 pub idempotency_key: Option<String>,
64 #[serde(rename = "contents", skip_serializing_if = "Option::is_none")]
65 pub contents: Option<Box<crate::models::LanguageStringMap>>,
66 #[serde(rename = "headings", skip_serializing_if = "Option::is_none")]
67 pub headings: Option<Box<crate::models::LanguageStringMap>>,
68 #[serde(rename = "subtitle", skip_serializing_if = "Option::is_none")]
69 pub subtitle: Option<Box<crate::models::LanguageStringMap>>,
70 /// 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}
71 #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
72 pub data: Option<serde_json::Value>,
73 /// Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications.
74 #[serde(rename = "huawei_msg_type", skip_serializing_if = "Option::is_none")]
75 pub huawei_msg_type: Option<String>,
76 /// 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
77 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
78 pub url: Option<String>,
79 /// 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
80 #[serde(rename = "web_url", skip_serializing_if = "Option::is_none")]
81 pub web_url: Option<String>,
82 /// 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
83 #[serde(rename = "app_url", skip_serializing_if = "Option::is_none")]
84 pub app_url: Option<String>,
85 /// 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\"}
86 #[serde(rename = "ios_attachments", skip_serializing_if = "Option::is_none")]
87 pub ios_attachments: Option<serde_json::Value>,
88 /// 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
89 #[serde(rename = "template_id", skip_serializing_if = "Option::is_none")]
90 pub template_id: Option<String>,
91 /// 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.
92 #[serde(rename = "content_available", skip_serializing_if = "Option::is_none")]
93 pub content_available: Option<bool>,
94 /// 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.
95 #[serde(rename = "mutable_content", skip_serializing_if = "Option::is_none")]
96 pub mutable_content: Option<bool>,
97 /// 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.
98 #[serde(rename = "target_content_identifier", skip_serializing_if = "Option::is_none")]
99 pub target_content_identifier: Option<String>,
100 /// Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL.
101 #[serde(rename = "big_picture", skip_serializing_if = "Option::is_none")]
102 pub big_picture: Option<String>,
103 /// Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL.
104 #[serde(rename = "huawei_big_picture", skip_serializing_if = "Option::is_none")]
105 pub huawei_big_picture: Option<String>,
106 /// Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL.
107 #[serde(rename = "adm_big_picture", skip_serializing_if = "Option::is_none")]
108 pub adm_big_picture: Option<String>,
109 /// Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL.
110 #[serde(rename = "chrome_big_picture", skip_serializing_if = "Option::is_none")]
111 pub chrome_big_picture: Option<String>,
112 /// 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.
113 #[serde(rename = "chrome_web_image", skip_serializing_if = "Option::is_none")]
114 pub chrome_web_image: Option<String>,
115 /// 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\"}]
116 #[serde(rename = "buttons", skip_serializing_if = "Option::is_none")]
117 pub buttons: Option<Vec<crate::models::Button>>,
118 /// 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\"}]
119 #[serde(rename = "web_buttons", skip_serializing_if = "Option::is_none")]
120 pub web_buttons: Option<Vec<crate::models::WebButton>>,
121 /// 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.
122 #[serde(rename = "ios_category", skip_serializing_if = "Option::is_none")]
123 pub ios_category: Option<String>,
124 /// 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.
125 #[serde(rename = "android_channel_id", skip_serializing_if = "Option::is_none")]
126 pub android_channel_id: Option<String>,
127 /// 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.
128 #[serde(rename = "huawei_channel_id", skip_serializing_if = "Option::is_none")]
129 pub huawei_channel_id: Option<String>,
130 /// Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code.
131 #[serde(rename = "existing_android_channel_id", skip_serializing_if = "Option::is_none")]
132 pub existing_android_channel_id: Option<String>,
133 /// Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code.
134 #[serde(rename = "huawei_existing_channel_id", skip_serializing_if = "Option::is_none")]
135 pub huawei_existing_channel_id: Option<String>,
136 #[serde(rename = "android_background_layout", skip_serializing_if = "Option::is_none")]
137 pub android_background_layout: Option<Box<crate::models::BasicNotificationAllOfAndroidBackgroundLayout>>,
138 /// 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
139 #[serde(rename = "small_icon", skip_serializing_if = "Option::is_none")]
140 pub small_icon: Option<String>,
141 /// 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.
142 #[serde(rename = "huawei_small_icon", skip_serializing_if = "Option::is_none")]
143 pub huawei_small_icon: Option<String>,
144 /// Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons
145 #[serde(rename = "large_icon", skip_serializing_if = "Option::is_none")]
146 pub large_icon: Option<String>,
147 /// Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons
148 #[serde(rename = "huawei_large_icon", skip_serializing_if = "Option::is_none")]
149 pub huawei_large_icon: Option<String>,
150 /// 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
151 #[serde(rename = "adm_small_icon", skip_serializing_if = "Option::is_none")]
152 pub adm_small_icon: Option<String>,
153 /// 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
154 #[serde(rename = "adm_large_icon", skip_serializing_if = "Option::is_none")]
155 pub adm_large_icon: Option<String>,
156 /// 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.
157 #[serde(rename = "chrome_web_icon", skip_serializing_if = "Option::is_none")]
158 pub chrome_web_icon: Option<String>,
159 /// Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge.
160 #[serde(rename = "chrome_web_badge", skip_serializing_if = "Option::is_none")]
161 pub chrome_web_badge: Option<String>,
162 /// 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.
163 #[serde(rename = "firefox_icon", skip_serializing_if = "Option::is_none")]
164 pub firefox_icon: Option<String>,
165 /// 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.
166 #[serde(rename = "chrome_icon", skip_serializing_if = "Option::is_none")]
167 pub chrome_icon: Option<String>,
168 /// 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\"
169 #[serde(rename = "ios_sound", skip_serializing_if = "Option::is_none")]
170 pub ios_sound: Option<String>,
171 /// 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\"
172 #[serde(rename = "android_sound", skip_serializing_if = "Option::is_none")]
173 pub android_sound: Option<String>,
174 /// 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\"
175 #[serde(rename = "huawei_sound", skip_serializing_if = "Option::is_none")]
176 pub huawei_sound: Option<String>,
177 /// 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\"
178 #[serde(rename = "adm_sound", skip_serializing_if = "Option::is_none")]
179 pub adm_sound: Option<String>,
180 /// 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\"
181 #[serde(rename = "wp_wns_sound", skip_serializing_if = "Option::is_none")]
182 pub wp_wns_sound: Option<String>,
183 /// 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\"
184 #[serde(rename = "android_led_color", skip_serializing_if = "Option::is_none")]
185 pub android_led_color: Option<String>,
186 /// 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\"
187 #[serde(rename = "huawei_led_color", skip_serializing_if = "Option::is_none")]
188 pub huawei_led_color: Option<String>,
189 /// 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\"
190 #[serde(rename = "android_accent_color", skip_serializing_if = "Option::is_none")]
191 pub android_accent_color: Option<String>,
192 /// 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.
193 #[serde(rename = "huawei_accent_color", skip_serializing_if = "Option::is_none")]
194 pub huawei_accent_color: Option<String>,
195 /// 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)
196 #[serde(rename = "android_visibility", skip_serializing_if = "Option::is_none")]
197 pub android_visibility: Option<i32>,
198 /// 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)
199 #[serde(rename = "huawei_visibility", skip_serializing_if = "Option::is_none")]
200 pub huawei_visibility: Option<i32>,
201 /// 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.
202 #[serde(rename = "ios_badgeType", skip_serializing_if = "Option::is_none")]
203 pub ios_badge_type: Option<String>,
204 /// 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.
205 #[serde(rename = "ios_badgeCount", skip_serializing_if = "Option::is_none")]
206 pub ios_badge_count: Option<i32>,
207 /// 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.
208 #[serde(rename = "collapse_id", skip_serializing_if = "Option::is_none")]
209 pub collapse_id: Option<String>,
210 /// Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics.
211 #[serde(rename = "web_push_topic", skip_serializing_if = "Option::is_none")]
212 pub web_push_topic: Option<String>,
213 /// 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.
214 #[serde(rename = "apns_alert", skip_serializing_if = "Option::is_none")]
215 pub apns_alert: Option<serde_json::Value>,
216 /// 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.
217 #[serde(rename = "delayed_option", skip_serializing_if = "Option::is_none")]
218 pub delayed_option: Option<String>,
219 /// Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\"
220 #[serde(rename = "delivery_time_of_day", skip_serializing_if = "Option::is_none")]
221 pub delivery_time_of_day: Option<String>,
222 /// 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).
223 #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
224 pub ttl: Option<i32>,
225 /// 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.
226 #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
227 pub priority: Option<i32>,
228 /// 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
229 #[serde(rename = "apns_push_type_override", skip_serializing_if = "Option::is_none")]
230 pub apns_push_type_override: Option<String>,
231 /// 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.
232 #[serde(rename = "throttle_rate_per_minute", skip_serializing_if = "Option::is_none")]
233 pub throttle_rate_per_minute: Option<String>,
234 /// Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature.
235 #[serde(rename = "android_group", skip_serializing_if = "Option::is_none")]
236 pub android_group: Option<String>,
237 /// 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\"}
238 #[serde(rename = "android_group_message", skip_serializing_if = "Option::is_none")]
239 pub android_group_message: Option<String>,
240 /// Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature.
241 #[serde(rename = "adm_group", skip_serializing_if = "Option::is_none")]
242 pub adm_group: Option<String>,
243 /// 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\"}
244 #[serde(rename = "adm_group_message", skip_serializing_if = "Option::is_none")]
245 pub adm_group_message: Option<serde_json::Value>,
246 /// 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.
247 #[serde(rename = "thread_id", skip_serializing_if = "Option::is_none")]
248 pub thread_id: Option<String>,
249 /// 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\"
250 #[serde(rename = "summary_arg", skip_serializing_if = "Option::is_none")]
251 pub summary_arg: Option<String>,
252 /// 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\"
253 #[serde(rename = "summary_arg_count", skip_serializing_if = "Option::is_none")]
254 pub summary_arg_count: Option<i32>,
255 /// 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.
256 #[serde(rename = "ios_relevance_score", skip_serializing_if = "Option::is_none")]
257 pub ios_relevance_score: Option<f32>,
258 /// 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.
259 #[serde(rename = "ios_interruption_level", skip_serializing_if = "Option::is_none")]
260 pub ios_interruption_level: Option<String>,
261 /// Channel: Email Required. The subject of the email.
262 #[serde(rename = "email_subject", skip_serializing_if = "Option::is_none")]
263 pub email_subject: Option<String>,
264 /// 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.
265 #[serde(rename = "email_body", skip_serializing_if = "Option::is_none")]
266 pub email_body: Option<String>,
267 /// Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings.
268 #[serde(rename = "email_from_name", skip_serializing_if = "Option::is_none")]
269 pub email_from_name: Option<String>,
270 /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings.
271 #[serde(rename = "email_from_address", skip_serializing_if = "Option::is_none")]
272 pub email_from_address: Option<String>,
273 /// 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.
274 #[serde(rename = "email_preheader", skip_serializing_if = "Option::is_none")]
275 pub email_preheader: Option<String>,
276 /// 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.
277 #[serde(rename = "disable_email_click_tracking", skip_serializing_if = "Option::is_none")]
278 pub disable_email_click_tracking: Option<bool>,
279 /// 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.
280 #[serde(rename = "include_unsubscribed", skip_serializing_if = "Option::is_none")]
281 pub include_unsubscribed: Option<bool>,
282 /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
283 #[serde(rename = "sms_from", skip_serializing_if = "Option::is_none")]
284 pub sms_from: Option<String>,
285 /// 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.
286 #[serde(rename = "sms_media_urls", skip_serializing_if = "Option::is_none")]
287 pub sms_media_urls: Option<Vec<String>>,
288 #[serde(rename = "filters", skip_serializing_if = "Option::is_none")]
289 pub filters: Option<Vec<crate::models::FilterExpression>>,
290 /// 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}
291 #[serde(rename = "custom_data", skip_serializing_if = "Option::is_none")]
292 pub custom_data: Option<serde_json::Value>,
293}
294
295impl BasicNotificationAllOf {
296 pub fn new() -> BasicNotificationAllOf {
297 BasicNotificationAllOf {
298 id: None,
299 value: None,
300 name: None,
301 aggregation: None,
302 is_ios: None,
303 is_android: None,
304 is_huawei: None,
305 is_any_web: None,
306 is_chrome_web: None,
307 is_firefox: None,
308 is_safari: None,
309 is_wp_wns: None,
310 is_adm: None,
311 is_chrome: None,
312 app_id: None,
313 external_id: None,
314 idempotency_key: None,
315 contents: None,
316 headings: None,
317 subtitle: None,
318 data: None,
319 huawei_msg_type: None,
320 url: None,
321 web_url: None,
322 app_url: None,
323 ios_attachments: None,
324 template_id: None,
325 content_available: None,
326 mutable_content: None,
327 target_content_identifier: None,
328 big_picture: None,
329 huawei_big_picture: None,
330 adm_big_picture: None,
331 chrome_big_picture: None,
332 chrome_web_image: None,
333 buttons: None,
334 web_buttons: None,
335 ios_category: None,
336 android_channel_id: None,
337 huawei_channel_id: None,
338 existing_android_channel_id: None,
339 huawei_existing_channel_id: None,
340 android_background_layout: None,
341 small_icon: None,
342 huawei_small_icon: None,
343 large_icon: None,
344 huawei_large_icon: None,
345 adm_small_icon: None,
346 adm_large_icon: None,
347 chrome_web_icon: None,
348 chrome_web_badge: None,
349 firefox_icon: None,
350 chrome_icon: None,
351 ios_sound: None,
352 android_sound: None,
353 huawei_sound: None,
354 adm_sound: None,
355 wp_wns_sound: None,
356 android_led_color: None,
357 huawei_led_color: None,
358 android_accent_color: None,
359 huawei_accent_color: None,
360 android_visibility: None,
361 huawei_visibility: None,
362 ios_badge_type: None,
363 ios_badge_count: None,
364 collapse_id: None,
365 web_push_topic: None,
366 apns_alert: None,
367 delayed_option: None,
368 delivery_time_of_day: None,
369 ttl: None,
370 priority: None,
371 apns_push_type_override: None,
372 throttle_rate_per_minute: None,
373 android_group: None,
374 android_group_message: None,
375 adm_group: None,
376 adm_group_message: None,
377 thread_id: None,
378 summary_arg: None,
379 summary_arg_count: None,
380 ios_relevance_score: None,
381 ios_interruption_level: None,
382 email_subject: None,
383 email_body: None,
384 email_from_name: None,
385 email_from_address: None,
386 email_preheader: None,
387 disable_email_click_tracking: None,
388 include_unsubscribed: None,
389 sms_from: None,
390 sms_media_urls: None,
391 filters: None,
392 custom_data: None,
393 }
394 }
395}
396
397///
398#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
399pub enum AggregationType {
400 #[serde(rename = "sum")]
401 Sum,
402 #[serde(rename = "count")]
403 Count,
404}
405
406impl Default for AggregationType {
407 fn default() -> AggregationType {
408 Self::Sum
409 }
410}
411