gcloud-sdk 0.30.0

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
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;

/// Message : Message to send by Firebase Cloud Messaging Service.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Message {
    #[serde(rename = "android", skip_serializing_if = "Option::is_none")]
    pub android: Option<Box<models::AndroidConfig>>,
    #[serde(rename = "apns", skip_serializing_if = "Option::is_none")]
    pub apns: Option<Box<models::ApnsConfig>>,
    /// Condition to send a message to, e.g. \"'foo' in topics && 'bar' in topics\".
    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
    pub condition: Option<String>,
    /// Input only. Arbitrary key/value payload, which must be UTF-8 encoded. The key should not be a reserved word (\"from\", \"message_type\", or any word starting with \"google\" or \"gcm\"). When sending payloads containing only data fields to iOS devices, only normal priority (`\"apns-priority\": \"5\"`) is allowed in [`ApnsConfig`](/docs/reference/fcm/rest/v1/projects.messages#apnsconfig).
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "fcmOptions", skip_serializing_if = "Option::is_none")]
    pub fcm_options: Option<Box<models::FcmOptions>>,
    /// Output Only. The identifier of the message sent, in the format of `projects/_*_/messages/{message_id}`.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "notification", skip_serializing_if = "Option::is_none")]
    pub notification: Option<Box<models::Notification>>,
    /// Registration token to send a message to.
    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,
    /// Topic name to send a message to, e.g. \"weather\". Note: \"/topics/\" prefix should not be provided.
    #[serde(rename = "topic", skip_serializing_if = "Option::is_none")]
    pub topic: Option<String>,
    #[serde(rename = "webpush", skip_serializing_if = "Option::is_none")]
    pub webpush: Option<Box<models::WebpushConfig>>,
}

impl Message {
    /// Message to send by Firebase Cloud Messaging Service.
    pub fn new() -> Message {
        Message {
            android: None,
            apns: None,
            condition: None,
            data: None,
            fcm_options: None,
            name: None,
            notification: None,
            token: None,
            topic: None,
            webpush: None,
        }
    }
}