@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GCMMessage extends Object implements Serializable, Cloneable, StructuredPojo
Constructor and Description |
---|
GCMMessage() |
Modifier and Type | Method and Description |
---|---|
GCMMessage |
addDataEntry(String key,
String value) |
GCMMessage |
addSubstitutionsEntry(String key,
List<String> value) |
GCMMessage |
clearDataEntries()
Removes all the entries added into Data.
|
GCMMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
GCMMessage |
clone() |
boolean |
equals(Object obj) |
String |
getAction()
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.
|
String |
getBody()
The message body of the notification, the email body or the text message.
|
String |
getCollapseKey()
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.
|
Map<String,String> |
getData()
The data payload used for a silent push.
|
String |
getIconReference()
The icon image name of the asset saved in your application.
|
String |
getImageIconUrl()
The URL that points to an image used as the large icon to the notification content view.
|
String |
getImageUrl()
The URL that points to an image used in the push notification.
|
String |
getPriority()
Is this a transaction priority message or lower priority.
|
String |
getRawContent()
The Raw JSON formatted string to be used as the payload.
|
String |
getRestrictedPackageName()
This parameter specifies the package name of the application where the registration tokens must match in order to
receive the message.
|
Boolean |
getSilentPush()
Indicates if the message should display on the users device.
|
String |
getSmallImageIconUrl()
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
|
String |
getSound()
Indicates a sound to play when the device receives the notification.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
Integer |
getTimeToLive()
This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is
offline.
|
String |
getTitle()
The message title that displays above the message on the user's device.
|
String |
getUrl()
The URL to open in the user's mobile browser.
|
int |
hashCode() |
Boolean |
isSilentPush()
Indicates if the message should display on the users device.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAction(Action action)
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.
|
void |
setAction(String action)
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.
|
void |
setBody(String body)
The message body of the notification, the email body or the text message.
|
void |
setCollapseKey(String collapseKey)
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.
|
void |
setData(Map<String,String> data)
The data payload used for a silent push.
|
void |
setIconReference(String iconReference)
The icon image name of the asset saved in your application.
|
void |
setImageIconUrl(String imageIconUrl)
The URL that points to an image used as the large icon to the notification content view.
|
void |
setImageUrl(String imageUrl)
The URL that points to an image used in the push notification.
|
void |
setPriority(String priority)
Is this a transaction priority message or lower priority.
|
void |
setRawContent(String rawContent)
The Raw JSON formatted string to be used as the payload.
|
void |
setRestrictedPackageName(String restrictedPackageName)
This parameter specifies the package name of the application where the registration tokens must match in order to
receive the message.
|
void |
setSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
void |
setSmallImageIconUrl(String smallImageIconUrl)
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
|
void |
setSound(String sound)
Indicates a sound to play when the device receives the notification.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
void |
setTimeToLive(Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is
offline.
|
void |
setTitle(String title)
The message title that displays above the message on the user's device.
|
void |
setUrl(String url)
The URL to open in the user's mobile browser.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
GCMMessage |
withAction(Action action)
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.
|
GCMMessage |
withAction(String action)
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.
|
GCMMessage |
withBody(String body)
The message body of the notification, the email body or the text message.
|
GCMMessage |
withCollapseKey(String collapseKey)
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.
|
GCMMessage |
withData(Map<String,String> data)
The data payload used for a silent push.
|
GCMMessage |
withIconReference(String iconReference)
The icon image name of the asset saved in your application.
|
GCMMessage |
withImageIconUrl(String imageIconUrl)
The URL that points to an image used as the large icon to the notification content view.
|
GCMMessage |
withImageUrl(String imageUrl)
The URL that points to an image used in the push notification.
|
GCMMessage |
withPriority(String priority)
Is this a transaction priority message or lower priority.
|
GCMMessage |
withRawContent(String rawContent)
The Raw JSON formatted string to be used as the payload.
|
GCMMessage |
withRestrictedPackageName(String restrictedPackageName)
This parameter specifies the package name of the application where the registration tokens must match in order to
receive the message.
|
GCMMessage |
withSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
GCMMessage |
withSmallImageIconUrl(String smallImageIconUrl)
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
|
GCMMessage |
withSound(String sound)
Indicates a sound to play when the device receives the notification.
|
GCMMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
GCMMessage |
withTimeToLive(Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is
offline.
|
GCMMessage |
withTitle(String title)
The message title that displays above the message on the user's device.
|
GCMMessage |
withUrl(String url)
The URL to open in the user's mobile browser.
|
public void setAction(String action)
action
- 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 | URLAction
public String getAction()
Action
public GCMMessage withAction(String action)
action
- 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 | URLAction
public void setAction(Action action)
action
- 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 | URLAction
public GCMMessage withAction(Action action)
action
- 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 | URLAction
public void setBody(String body)
body
- The message body of the notification, the email body or the text message.public String getBody()
public GCMMessage withBody(String body)
body
- The message body of the notification, the email body or the text message.public void setCollapseKey(String collapseKey)
collapseKey
- 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.public String getCollapseKey()
public GCMMessage withCollapseKey(String collapseKey)
collapseKey
- 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.public Map<String,String> getData()
public void setData(Map<String,String> data)
data
- The data payload used for a silent push. This payload is added to the notifications'
data.pinpoint.jsonBody' objectpublic GCMMessage withData(Map<String,String> data)
data
- The data payload used for a silent push. This payload is added to the notifications'
data.pinpoint.jsonBody' objectpublic GCMMessage addDataEntry(String key, String value)
public GCMMessage clearDataEntries()
public void setIconReference(String iconReference)
iconReference
- The icon image name of the asset saved in your application.public String getIconReference()
public GCMMessage withIconReference(String iconReference)
iconReference
- The icon image name of the asset saved in your application.public void setImageIconUrl(String imageIconUrl)
imageIconUrl
- The URL that points to an image used as the large icon to the notification content view.public String getImageIconUrl()
public GCMMessage withImageIconUrl(String imageIconUrl)
imageIconUrl
- The URL that points to an image used as the large icon to the notification content view.public void setImageUrl(String imageUrl)
imageUrl
- The URL that points to an image used in the push notification.public String getImageUrl()
public GCMMessage withImageUrl(String imageUrl)
imageUrl
- The URL that points to an image used in the push notification.public void setPriority(String priority)
priority
- Is this a transaction priority message or lower priority.public String getPriority()
public GCMMessage withPriority(String priority)
priority
- Is this a transaction priority message or lower priority.public void setRawContent(String rawContent)
rawContent
- The Raw JSON formatted string to be used as the payload. This value overrides the message.public String getRawContent()
public GCMMessage withRawContent(String rawContent)
rawContent
- The Raw JSON formatted string to be used as the payload. This value overrides the message.public void setRestrictedPackageName(String restrictedPackageName)
restrictedPackageName
- This parameter specifies the package name of the application where the registration tokens must match in
order to receive the message.public String getRestrictedPackageName()
public GCMMessage withRestrictedPackageName(String restrictedPackageName)
restrictedPackageName
- This parameter specifies the package name of the application where the registration tokens must match in
order to receive the message.public void setSilentPush(Boolean silentPush)
silentPush
- Indicates if the message should display on the users device. Silent pushes can be used for Remote
Configuration and Phone Home use cases.public Boolean getSilentPush()
public GCMMessage withSilentPush(Boolean silentPush)
silentPush
- Indicates if the message should display on the users device. Silent pushes can be used for Remote
Configuration and Phone Home use cases.public Boolean isSilentPush()
public void setSmallImageIconUrl(String smallImageIconUrl)
smallImageIconUrl
- 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 viewpublic String getSmallImageIconUrl()
public GCMMessage withSmallImageIconUrl(String smallImageIconUrl)
smallImageIconUrl
- 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 viewpublic void setSound(String sound)
sound
- 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/public String getSound()
public GCMMessage withSound(String sound)
sound
- 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/public Map<String,List<String>> getSubstitutions()
public void setSubstitutions(Map<String,List<String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by individual address substitutions.public GCMMessage withSubstitutions(Map<String,List<String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by individual address substitutions.public GCMMessage addSubstitutionsEntry(String key, List<String> value)
public GCMMessage clearSubstitutionsEntries()
public void setTimeToLive(Integer timeToLive)
timeToLive
- 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.public Integer getTimeToLive()
public GCMMessage withTimeToLive(Integer timeToLive)
timeToLive
- 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.public void setTitle(String title)
title
- The message title that displays above the message on the user's device.public String getTitle()
public GCMMessage withTitle(String title)
title
- The message title that displays above the message on the user's device.public void setUrl(String url)
url
- The URL to open in the user's mobile browser. Used if the value for Action is URL.public String getUrl()
public GCMMessage withUrl(String url)
url
- The URL to open in the user's mobile browser. Used if the value for Action is URL.public String toString()
toString
in class Object
Object.toString()
public GCMMessage clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.