use serde::{Deserialize, Serialize}; /*
                                      * Firebase Cloud Messaging API
                                      *
                                      * FCM send API that provides a cross-platform messaging solution to reliably deliver messages at no cost.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::fcm_v1::models;

/// ApnsConfig : [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApnsConfig {
    #[serde(rename = "fcmOptions", skip_serializing_if = "Option::is_none")]
    pub fcm_options: Option<Box<models::ApnsFcmOptions>>,
    /// HTTP request headers defined in Apple Push Notification Service. Refer to [APNs request headers](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns) for supported headers such as `apns-expiration` and `apns-priority`. The backend sets a default value for `apns-expiration` of 30 days and a default value for `apns-priority` of 10 if not explicitly set.
    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
    pub headers: Option<std::collections::HashMap<String, String>>,
    /// APNs payload as a JSON object, including both `aps` dictionary and custom payload. See [Payload Key Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification). If present, it overrides google.firebase.fcm.v1.Notification.title and google.firebase.fcm.v1.Notification.body.
    #[serde(rename = "payload", skip_serializing_if = "Option::is_none")]
    pub payload: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl ApnsConfig {
    /// [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options.
    pub fn new() -> ApnsConfig {
        ApnsConfig {
            fcm_options: None,
            headers: None,
            payload: None,
        }
    }
}
