You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Pinpoint::Types::GCMMessage

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb

Overview

Note:

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

Instance Attribute Details

#actionString

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

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#bodyString

The message body of the notification, the email body or the text message.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_keyString

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.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#dataHash<String,String>

Returns:

  • (Hash<String,String>)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_referenceString

The icon image name of the asset saved in your application.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_urlString

The URL that points to an image used as the large icon to the notification content view.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_urlString

The URL that points to an image used in the push notification.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#priorityString

Is this a transaction priority message or lower priority.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_contentString

The Raw JSON formatted string to be used as the payload. This value overrides the message.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_nameString

This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_pushBoolean

Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

Returns:

  • (Boolean)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_urlString

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

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#soundString

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/

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#substitutionsHash<String,Array<String>>

Returns:

  • (Hash<String,Array<String>>)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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_liveInteger

This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks.

Returns:

  • (Integer)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#titleString

The message title that displays above the message on the user's device.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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

#urlString

The URL to open in the user's mobile browser. Used if the value for Action is URL.

Returns:

  • (String)


3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
# File 'gems/aws-sdk-pinpoint/lib/aws-sdk-pinpoint/types.rb', line 3635

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