onesignal_rust_api/models/create_notification_success_response.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.6.0
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 CreateNotificationSuccessResponse {
16 /// Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200).
17 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18 pub id: Option<String>,
19 /// Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`).
20 #[serde(rename = "external_id", skip_serializing_if = "Option::is_none")]
21 pub external_id: Option<String>,
22 /// Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize.
23 #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
24 pub errors: Option<serde_json::Value>,
25}
26
27impl CreateNotificationSuccessResponse {
28 pub fn new() -> CreateNotificationSuccessResponse {
29 CreateNotificationSuccessResponse {
30 id: None,
31 external_id: None,
32 errors: None,
33 }
34 }
35}
36
37