Class: Aws::Pinpoint::Types::GCMMessage
- Inherits:
-
Struct
- Object
- Struct
- Aws::Pinpoint::Types::GCMMessage
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-pinpoint/types.rb
Overview
When making an API call, you may pass GCMMessage data as a hash:
{
action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
body: "__string",
collapse_key: "__string",
data: {
"__string" => "__string",
},
icon_reference: "__string",
image_icon_url: "__string",
image_url: "__string",
priority: "__string",
raw_content: "__string",
restricted_package_name: "__string",
silent_push: false,
small_image_icon_url: "__string",
sound: "__string",
substitutions: {
"__string" => ["__string"],
},
time_to_live: 1,
title: "__string",
url: "__string",
}
GCM Message.
Instance Attribute Summary collapse
-
#action ⇒ String
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background.
-
#body ⇒ String
The message body of the notification.
-
#collapse_key ⇒ String
This parameter identifies a group of messages (e.g., with collapse_key: “Updates Available”) that can be collapsed, so that only the last message gets sent when delivery can be resumed.
-
#data ⇒ Hash<String,String>
The data payload used for a silent push.
-
#icon_reference ⇒ String
The icon image name of the asset saved in your application.
-
#image_icon_url ⇒ String
The URL that points to an image used as the large icon to the notification content view.
-
#image_url ⇒ String
The URL that points to an image used in the push notification.
-
#priority ⇒ String
The message priority.
-
#raw_content ⇒ String
The Raw JSON formatted string to be used as the payload.
-
#restricted_package_name ⇒ String
This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
-
#silent_push ⇒ Boolean
Indicates if the message should display on the users device.
-
#small_image_icon_url ⇒ String
The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view.
-
#sound ⇒ String
Indicates a sound to play when the device receives the notification.
-
#substitutions ⇒ Hash<String,Array<String>>
Default message substitutions.
-
#time_to_live ⇒ Integer
The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message.
-
#title ⇒ String
The message title that displays above the message on the user’s device.
-
#url ⇒ String
The URL to open in the user’s mobile browser.
Instance Attribute Details
#action ⇒ String
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user’s device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#body ⇒ String
The message body of the notification.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#collapse_key ⇒ String
This parameter identifies a group of messages (e.g., with collapse_key: “Updates Available”) that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#data ⇒ Hash<String,String>
The data payload used for a silent push. This payload is added to the notifications’ data.pinpoint.jsonBody’ object
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#icon_reference ⇒ String
The icon image name of the asset saved in your application.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#image_icon_url ⇒ String
The URL that points to an image used as the large icon to the notification content view.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#image_url ⇒ String
The URL that points to an image used in the push notification.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#priority ⇒ String
The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: “Normal” - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. “High” - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are “5” and “10”. Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#raw_content ⇒ String
The Raw JSON formatted string to be used as the payload. This value overrides the message.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#restricted_package_name ⇒ String
This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#silent_push ⇒ Boolean
Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#small_image_icon_url ⇒ String
The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#sound ⇒ String
Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#substitutions ⇒ Hash<String,Array<String>>
Default message substitutions. Can be overridden by individual address substitutions.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#time_to_live ⇒ Integer
The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#title ⇒ String
The message title that displays above the message on the user’s device.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |
#url ⇒ String
The URL to open in the user’s mobile browser. Used if the value for Action is URL.
4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 |
# File 'lib/aws-sdk-pinpoint/types.rb', line 4939 class GCMMessage < Struct.new( :action, :body, :collapse_key, :data, :icon_reference, :image_icon_url, :image_url, :priority, :raw_content, :restricted_package_name, :silent_push, :small_image_icon_url, :sound, :substitutions, :time_to_live, :title, :url) include Aws::Structure end |