@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ADMMessage extends Object implements Serializable, Cloneable, StructuredPojo
Specifies the settings for a one-time message that's sent directly to an endpoint through the ADM (Amazon Device Messaging) channel.
Constructor and Description |
---|
ADMMessage() |
Modifier and Type | Method and Description |
---|---|
ADMMessage |
addDataEntry(String key,
String value)
Add a single Data entry
|
ADMMessage |
addSubstitutionsEntry(String key,
List<String> value)
Add a single Substitutions entry
|
ADMMessage |
clearDataEntries()
Removes all the entries added into Data.
|
ADMMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
ADMMessage |
clone() |
boolean |
equals(Object obj) |
String |
getAction()
The action to occur if the recipient taps the push notification.
|
String |
getBody()
The body of the notification message.
|
String |
getConsolidationKey()
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging
(ADM) can drop previously enqueued messages in favor of this message.
|
Map<String,String> |
getData()
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
String |
getExpiresAfter()
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline.
|
String |
getIconReference()
The icon image name of the asset saved in your app.
|
String |
getImageIconUrl()
The URL of the large icon image to display in the content view of the push notification.
|
String |
getImageUrl()
The URL of an image to display in the push notification.
|
String |
getMD5()
The base64-encoded, MD5 checksum of the value specified by the Data property.
|
String |
getRawContent()
The raw, JSON-formatted string to use as the payload for the notification message.
|
Boolean |
getSilentPush()
Specifies whether the notification is a silent push notification, which is a push notification that doesn't
display on a recipient's device.
|
String |
getSmallImageIconUrl()
The URL of the small icon image to display in the status bar and the content view of the push notification.
|
String |
getSound()
The sound to play when the recipient receives the push notification.
|
Map<String,List<String>> |
getSubstitutions()
The default message variables to use in the notification message.
|
String |
getTitle()
The title to display above the notification message on the recipient's device.
|
String |
getUrl()
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the
value of the Action property is URL.
|
int |
hashCode() |
Boolean |
isSilentPush()
Specifies whether the notification is a silent push notification, which is a push notification that doesn't
display on a recipient's device.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAction(String action)
The action to occur if the recipient taps the push notification.
|
void |
setBody(String body)
The body of the notification message.
|
void |
setConsolidationKey(String consolidationKey)
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging
(ADM) can drop previously enqueued messages in favor of this message.
|
void |
setData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
void |
setExpiresAfter(String expiresAfter)
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline.
|
void |
setIconReference(String iconReference)
The icon image name of the asset saved in your app.
|
void |
setImageIconUrl(String imageIconUrl)
The URL of the large icon image to display in the content view of the push notification.
|
void |
setImageUrl(String imageUrl)
The URL of an image to display in the push notification.
|
void |
setMD5(String mD5)
The base64-encoded, MD5 checksum of the value specified by the Data property.
|
void |
setRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message.
|
void |
setSilentPush(Boolean silentPush)
Specifies whether the notification is a silent push notification, which is a push notification that doesn't
display on a recipient's device.
|
void |
setSmallImageIconUrl(String smallImageIconUrl)
The URL of the small icon image to display in the status bar and the content view of the push notification.
|
void |
setSound(String sound)
The sound to play when the recipient receives the push notification.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
The default message variables to use in the notification message.
|
void |
setTitle(String title)
The title to display above the notification message on the recipient's device.
|
void |
setUrl(String url)
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the
value of the Action property is URL.
|
String |
toString()
Returns a string representation of this object.
|
ADMMessage |
withAction(Action action)
The action to occur if the recipient taps the push notification.
|
ADMMessage |
withAction(String action)
The action to occur if the recipient taps the push notification.
|
ADMMessage |
withBody(String body)
The body of the notification message.
|
ADMMessage |
withConsolidationKey(String consolidationKey)
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging
(ADM) can drop previously enqueued messages in favor of this message.
|
ADMMessage |
withData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
ADMMessage |
withExpiresAfter(String expiresAfter)
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline.
|
ADMMessage |
withIconReference(String iconReference)
The icon image name of the asset saved in your app.
|
ADMMessage |
withImageIconUrl(String imageIconUrl)
The URL of the large icon image to display in the content view of the push notification.
|
ADMMessage |
withImageUrl(String imageUrl)
The URL of an image to display in the push notification.
|
ADMMessage |
withMD5(String mD5)
The base64-encoded, MD5 checksum of the value specified by the Data property.
|
ADMMessage |
withRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message.
|
ADMMessage |
withSilentPush(Boolean silentPush)
Specifies whether the notification is a silent push notification, which is a push notification that doesn't
display on a recipient's device.
|
ADMMessage |
withSmallImageIconUrl(String smallImageIconUrl)
The URL of the small icon image to display in the status bar and the content view of the push notification.
|
ADMMessage |
withSound(String sound)
The sound to play when the recipient receives the push notification.
|
ADMMessage |
withSubstitutions(Map<String,List<String>> substitutions)
The default message variables to use in the notification message.
|
ADMMessage |
withTitle(String title)
The title to display above the notification message on the recipient's device.
|
ADMMessage |
withUrl(String url)
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the
value of the Action property is URL.
|
public void setAction(String action)
The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
action
- The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public String getAction()
The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public ADMMessage withAction(String action)
The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
action
- The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public ADMMessage withAction(Action action)
The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
action
- The action to occur if the recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public void setBody(String body)
The body of the notification message.
body
- The body of the notification message.public String getBody()
The body of the notification message.
public ADMMessage withBody(String body)
The body of the notification message.
body
- The body of the notification message.public void setConsolidationKey(String consolidationKey)
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.
consolidationKey
- An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device
Messaging (ADM) can drop previously enqueued messages in favor of this message.public String getConsolidationKey()
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.
public ADMMessage withConsolidationKey(String consolidationKey)
An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.
consolidationKey
- An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device
Messaging (ADM) can drop previously enqueued messages in favor of this message.public Map<String,String> getData()
The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
public void setData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
data
- The JSON data payload to use for the push notification, if the notification is a silent push notification.
This payload is added to the data.pinpoint.jsonBody object of the notification.public ADMMessage withData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
data
- The JSON data payload to use for the push notification, if the notification is a silent push notification.
This payload is added to the data.pinpoint.jsonBody object of the notification.public ADMMessage addDataEntry(String key, String value)
public ADMMessage clearDataEntries()
public void setExpiresAfter(String expiresAfter)
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.
expiresAfter
- The amount of time, in seconds, that ADM should store the message if the recipient's device is offline.
Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message
to ADM.public String getExpiresAfter()
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.
public ADMMessage withExpiresAfter(String expiresAfter)
The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.
expiresAfter
- The amount of time, in seconds, that ADM should store the message if the recipient's device is offline.
Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message
to ADM.public void setIconReference(String iconReference)
The icon image name of the asset saved in your app.
iconReference
- The icon image name of the asset saved in your app.public String getIconReference()
The icon image name of the asset saved in your app.
public ADMMessage withIconReference(String iconReference)
The icon image name of the asset saved in your app.
iconReference
- The icon image name of the asset saved in your app.public void setImageIconUrl(String imageIconUrl)
The URL of the large icon image to display in the content view of the push notification.
imageIconUrl
- The URL of the large icon image to display in the content view of the push notification.public String getImageIconUrl()
The URL of the large icon image to display in the content view of the push notification.
public ADMMessage withImageIconUrl(String imageIconUrl)
The URL of the large icon image to display in the content view of the push notification.
imageIconUrl
- The URL of the large icon image to display in the content view of the push notification.public void setImageUrl(String imageUrl)
The URL of an image to display in the push notification.
imageUrl
- The URL of an image to display in the push notification.public String getImageUrl()
The URL of an image to display in the push notification.
public ADMMessage withImageUrl(String imageUrl)
The URL of an image to display in the push notification.
imageUrl
- The URL of an image to display in the push notification.public void setMD5(String mD5)
The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.
mD5
- The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to
verify the integrity of the data.public String getMD5()
The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.
public ADMMessage withMD5(String mD5)
The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.
mD5
- The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to
verify the integrity of the data.public void setRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.
rawContent
- The raw, JSON-formatted string to use as the payload for the notification message. If specified, this
value overrides all other content for the message.public String getRawContent()
The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.
public ADMMessage withRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.
rawContent
- The raw, JSON-formatted string to use as the payload for the notification message. If specified, this
value overrides all other content for the message.public void setSilentPush(Boolean silentPush)
Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.
silentPush
- Specifies whether the notification is a silent push notification, which is a push notification that
doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating
an app's configuration or supporting phone home functionality.public Boolean getSilentPush()
Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.
public ADMMessage withSilentPush(Boolean silentPush)
Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.
silentPush
- Specifies whether the notification is a silent push notification, which is a push notification that
doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating
an app's configuration or supporting phone home functionality.public Boolean isSilentPush()
Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.
public void setSmallImageIconUrl(String smallImageIconUrl)
The URL of the small icon image to display in the status bar and the content view of the push notification.
smallImageIconUrl
- The URL of the small icon image to display in the status bar and the content view of the push
notification.public String getSmallImageIconUrl()
The URL of the small icon image to display in the status bar and the content view of the push notification.
public ADMMessage withSmallImageIconUrl(String smallImageIconUrl)
The URL of the small icon image to display in the status bar and the content view of the push notification.
smallImageIconUrl
- The URL of the small icon image to display in the status bar and the content view of the push
notification.public void setSound(String sound)
The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.
sound
- The sound to play when the recipient receives the push notification. You can use the default stream or
specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound
file must reside in /res/raw/.public String getSound()
The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.
public ADMMessage withSound(String sound)
The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.
sound
- The sound to play when the recipient receives the push notification. You can use the default stream or
specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound
file must reside in /res/raw/.public Map<String,List<String>> getSubstitutions()
The default message variables to use in the notification message. You can override the default variables with individual address variables.
public void setSubstitutions(Map<String,List<String>> substitutions)
The default message variables to use in the notification message. You can override the default variables with individual address variables.
substitutions
- The default message variables to use in the notification message. You can override the default variables
with individual address variables.public ADMMessage withSubstitutions(Map<String,List<String>> substitutions)
The default message variables to use in the notification message. You can override the default variables with individual address variables.
substitutions
- The default message variables to use in the notification message. You can override the default variables
with individual address variables.public ADMMessage addSubstitutionsEntry(String key, List<String> value)
public ADMMessage clearSubstitutionsEntries()
public void setTitle(String title)
The title to display above the notification message on the recipient's device.
title
- The title to display above the notification message on the recipient's device.public String getTitle()
The title to display above the notification message on the recipient's device.
public ADMMessage withTitle(String title)
The title to display above the notification message on the recipient's device.
title
- The title to display above the notification message on the recipient's device.public void setUrl(String url)
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
url
- The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and
the value of the Action property is URL.public String getUrl()
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
public ADMMessage withUrl(String url)
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
url
- The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and
the value of the Action property is URL.public String toString()
toString
in class Object
Object.toString()
public ADMMessage clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.