Class: Google::Apis::FcmV1::AndroidConfig
- Inherits:
-
Object
- Object
- Google::Apis::FcmV1::AndroidConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/fcm_v1/classes.rb,
lib/google/apis/fcm_v1/representations.rb,
lib/google/apis/fcm_v1/representations.rb
Overview
Android specific options for messages sent through FCM connection server.
Instance Attribute Summary collapse
-
#bandwidth_constrained_ok ⇒ Boolean
(also: #bandwidth_constrained_ok?)
Optional.
-
#collapse_key ⇒ String
An identifier of a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed.
-
#data ⇒ Hash<String,String>
Arbitrary key/value payload.
-
#direct_boot_ok ⇒ Boolean
(also: #direct_boot_ok?)
Optional.
-
#fcm_options ⇒ Google::Apis::FcmV1::AndroidFcmOptions
Options for features provided by the FCM SDK for Android.
-
#notification ⇒ Google::Apis::FcmV1::AndroidNotification
Notification to send to android devices.
-
#priority ⇒ String
Message priority.
-
#restricted_package_name ⇒ String
Package name of the application where the registration token must match in order to receive the message.
-
#restricted_satellite_ok ⇒ Boolean
(also: #restricted_satellite_ok?)
Optional.
-
#ttl ⇒ String
How long (in seconds) the message should be kept in FCM storage if the device is offline.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AndroidConfig
constructor
A new instance of AndroidConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AndroidConfig
Returns a new instance of AndroidConfig.
108 109 110 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 108 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bandwidth_constrained_ok ⇒ Boolean Also known as: bandwidth_constrained_ok?
Optional. If set to true, messages will be allowed to be delivered to the app
while the device is in bandwidth constrained mode. This should only be enabled
when the app has been tested to properly handle messages in bandwidth
constrained mode.
Corresponds to the JSON property bandwidthConstrainedOk
36 37 38 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 36 def bandwidth_constrained_ok @bandwidth_constrained_ok end |
#collapse_key ⇒ String
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
44 45 46 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 44 def collapse_key @collapse_key end |
#data ⇒ Hash<String,String>
Arbitrary key/value payload. If present, it will override google.firebase.fcm.
v1.Message.data.
Corresponds to the JSON property data
50 51 52 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 50 def data @data end |
#direct_boot_ok ⇒ Boolean Also known as: direct_boot_ok?
Optional. 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.
Corresponds to the JSON property directBootOk
57 58 59 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 57 def direct_boot_ok @direct_boot_ok end |
#fcm_options ⇒ Google::Apis::FcmV1::AndroidFcmOptions
Options for features provided by the FCM SDK for Android.
Corresponds to the JSON property fcmOptions
63 64 65 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 63 def @fcm_options end |
#notification ⇒ Google::Apis::FcmV1::AndroidNotification
Notification to send to android devices.
Corresponds to the JSON property notification
68 69 70 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 68 def notification @notification end |
#priority ⇒ String
Message priority. Can take "normal" and "high" values. For more information,
see Setting the priority of a message.
Corresponds to the JSON property priority
75 76 77 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 75 def priority @priority end |
#restricted_package_name ⇒ String
Package name of the application where the registration token must match in
order to receive the message.
Corresponds to the JSON property restrictedPackageName
81 82 83 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 81 def restricted_package_name @restricted_package_name end |
#restricted_satellite_ok ⇒ Boolean Also known as: restricted_satellite_ok?
Optional. If set to true, messages will be allowed to be delivered to the app
while the device is connected over a restricted satellite network. This should
only be enabled for messages that can be handled over a restricted satellite
network and only for apps that are enabled to work over a restricted satellite
network. Note that the ability of the app to connect to a restricted satellite
network is dependent on the carrier's settings and the device model.
Corresponds to the JSON property restrictedSatelliteOk
91 92 93 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 91 def restricted_satellite_ok @restricted_satellite_ok end |
#ttl ⇒ String
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
106 107 108 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 106 def ttl @ttl end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/google/apis/fcm_v1/classes.rb', line 113 def update!(**args) @bandwidth_constrained_ok = args[:bandwidth_constrained_ok] if args.key?(:bandwidth_constrained_ok) @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) @restricted_satellite_ok = args[:restricted_satellite_ok] if args.key?(:restricted_satellite_ok) @ttl = args[:ttl] if args.key?(:ttl) end |