class Google::Apis::FcmV1::AndroidConfig

Android specific options for messages sent through [FCM connection server]( goo.gl/4GLdUl).

Attributes

collapse_key[RW]

An identifier of a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed. A maximum of 4 different collapse keys is allowed at any given time. Corresponds to the JSON property `collapseKey` @return [String]

data[RW]

Arbitrary key/value payload. If present, it will override google.firebase.fcm. v1.Message.data. Corresponds to the JSON property `data` @return [Hash<String,String>]

direct_boot_ok[RW]

If set to true, messages will be allowed to be delivered to the app while the device is in direct boot mode. See [Support Direct Boot mode](https:// developer.android.com/training/articles/direct-boot). Corresponds to the JSON property `directBootOk` @return [Boolean]

direct_boot_ok?[RW]

If set to true, messages will be allowed to be delivered to the app while the device is in direct boot mode. See [Support Direct Boot mode](https:// developer.android.com/training/articles/direct-boot). Corresponds to the JSON property `directBootOk` @return [Boolean]

fcm_options[RW]

Options for features provided by the FCM SDK for Android. Corresponds to the JSON property `fcmOptions` @return [Google::Apis::FcmV1::AndroidFcmOptions]

notification[RW]

Notification to send to android devices. Corresponds to the JSON property `notification` @return [Google::Apis::FcmV1::AndroidNotification]

priority[RW]

Message priority. Can take “normal” and “high” values. For more information, see [Setting the priority of a message](goo.gl/GjONJv). Corresponds to the JSON property `priority` @return [String]

restricted_package_name[RW]

Package name of the application where the registration token must match in order to receive the message. Corresponds to the JSON property `restrictedPackageName` @return [String]

ttl[RW]

How long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks if not set. Set it to 0 if want to send the message immediately. In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix “s” (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as “3s”, while 3 seconds and 1 nanosecond should be expressed in JSON format as “3.000000001s”. The ttl will be rounded down to the nearest second. Corresponds to the JSON property `ttl` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/fcm_v1/classes.rb, line 87
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/fcm_v1/classes.rb, line 92
def update!(**args)
  @collapse_key = args[:collapse_key] if args.key?(:collapse_key)
  @data = args[:data] if args.key?(:data)
  @direct_boot_ok = args[:direct_boot_ok] if args.key?(:direct_boot_ok)
  @fcm_options = args[:fcm_options] if args.key?(:fcm_options)
  @notification = args[:notification] if args.key?(:notification)
  @priority = args[:priority] if args.key?(:priority)
  @restricted_package_name = args[:restricted_package_name] if args.key?(:restricted_package_name)
  @ttl = args[:ttl] if args.key?(:ttl)
end