class Google::Apis::FcmV1::Message
Message
to send by Firebase Cloud Messaging Service.
Attributes
Android specific options for messages sent through [FCM connection server]( goo.gl/4GLdUl). Corresponds to the JSON property `android` @return [Google::Apis::FcmV1::AndroidConfig]
[Apple Push Notification
Service](goo.gl/MXRTPa) specific options. Corresponds to the JSON property `apns` @return [Google::Apis::FcmV1::ApnsConfig]
Condition to send a message to, e.g. “'foo' in topics && 'bar' in topics”. Corresponds to the JSON property `condition` @return [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). Corresponds to the JSON property `data` @return [Hash<String,String>]
Platform independent options for features provided by the FCM SDKs. Corresponds to the JSON property `fcmOptions` @return [Google::Apis::FcmV1::FcmOptions]
Output Only. The identifier of the message sent, in the format of `projects/*/ messages/`message_id“. Corresponds to the JSON property `name` @return [String]
Basic notification template to use across all platforms. Corresponds to the JSON property `notification` @return [Google::Apis::FcmV1::Notification]
Registration token to send a message to. Corresponds to the JSON property `token` @return [String]
Topic name to send a message to, e.g. “weather”. Note: “/topics/” prefix should not be provided. Corresponds to the JSON property `topic` @return [String]
[Webpush protocol](tools.ietf.org/html/rfc8030) options. Corresponds to the JSON property `webpush` @return [Google::Apis::FcmV1::WebpushConfig]
Public Class Methods
# File lib/google/apis/fcm_v1/classes.rb, line 678 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/fcm_v1/classes.rb, line 683 def update!(**args) @android = args[:android] if args.key?(:android) @apns = args[:apns] if args.key?(:apns) @condition = args[:condition] if args.key?(:condition) @data = args[:data] if args.key?(:data) @fcm_options = args[:fcm_options] if args.key?(:fcm_options) @name = args[:name] if args.key?(:name) @notification = args[:notification] if args.key?(:notification) @token = args[:token] if args.key?(:token) @topic = args[:topic] if args.key?(:topic) @webpush = args[:webpush] if args.key?(:webpush) end