@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class APNSMessage extends Object implements Serializable, Cloneable, StructuredPojo
Constructor and Description |
---|
APNSMessage() |
Modifier and Type | Method and Description |
---|---|
APNSMessage |
addDataEntry(String key,
String value) |
APNSMessage |
addSubstitutionsEntry(String key,
List<String> value) |
APNSMessage |
clearDataEntries()
Removes all the entries added into Data.
|
APNSMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
APNSMessage |
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.
|
Integer |
getBadge()
Include this key when you want the system to modify the badge of your app icon.
|
String |
getBody()
The message body of the notification.
|
String |
getCategory()
Provide this key with a string value that represents the notification's type.
|
String |
getCollapseId()
An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push
notification instead of delivering each message individually.
|
Map<String,String> |
getData()
The data payload used for a silent push.
|
String |
getMediaUrl()
The URL that points to a video used in the push notification.
|
String |
getPreferredAuthenticationMethod()
The preferred authentication method, either "CERTIFICATE" or "TOKEN"
|
String |
getPriority()
The message priority.
|
String |
getRawContent()
The Raw JSON formatted string to be used as the payload.
|
Boolean |
getSilentPush()
Indicates if the message should display on the users device.
|
String |
getSound()
Include this key when you want the system to play a sound.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
String |
getThreadId()
Provide this key with a string value that represents the app-specific identifier for grouping notifications.
|
Integer |
getTimeToLive()
The length of time (in seconds) that APNs stores and attempts to deliver the message.
|
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 |
setBadge(Integer badge)
Include this key when you want the system to modify the badge of your app icon.
|
void |
setBody(String body)
The message body of the notification.
|
void |
setCategory(String category)
Provide this key with a string value that represents the notification's type.
|
void |
setCollapseId(String collapseId)
An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push
notification instead of delivering each message individually.
|
void |
setData(Map<String,String> data)
The data payload used for a silent push.
|
void |
setMediaUrl(String mediaUrl)
The URL that points to a video used in the push notification.
|
void |
setPreferredAuthenticationMethod(String preferredAuthenticationMethod)
The preferred authentication method, either "CERTIFICATE" or "TOKEN"
|
void |
setPriority(String priority)
The message priority.
|
void |
setRawContent(String rawContent)
The Raw JSON formatted string to be used as the payload.
|
void |
setSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
void |
setSound(String sound)
Include this key when you want the system to play a sound.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
void |
setThreadId(String threadId)
Provide this key with a string value that represents the app-specific identifier for grouping notifications.
|
void |
setTimeToLive(Integer timeToLive)
The length of time (in seconds) that APNs stores and attempts to deliver the message.
|
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.
|
APNSMessage |
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.
|
APNSMessage |
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.
|
APNSMessage |
withBadge(Integer badge)
Include this key when you want the system to modify the badge of your app icon.
|
APNSMessage |
withBody(String body)
The message body of the notification.
|
APNSMessage |
withCategory(String category)
Provide this key with a string value that represents the notification's type.
|
APNSMessage |
withCollapseId(String collapseId)
An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push
notification instead of delivering each message individually.
|
APNSMessage |
withData(Map<String,String> data)
The data payload used for a silent push.
|
APNSMessage |
withMediaUrl(String mediaUrl)
The URL that points to a video used in the push notification.
|
APNSMessage |
withPreferredAuthenticationMethod(String preferredAuthenticationMethod)
The preferred authentication method, either "CERTIFICATE" or "TOKEN"
|
APNSMessage |
withPriority(String priority)
The message priority.
|
APNSMessage |
withRawContent(String rawContent)
The Raw JSON formatted string to be used as the payload.
|
APNSMessage |
withSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
APNSMessage |
withSound(String sound)
Include this key when you want the system to play a sound.
|
APNSMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
APNSMessage |
withThreadId(String threadId)
Provide this key with a string value that represents the app-specific identifier for grouping notifications.
|
APNSMessage |
withTimeToLive(Integer timeToLive)
The length of time (in seconds) that APNs stores and attempts to deliver the message.
|
APNSMessage |
withTitle(String title)
The message title that displays above the message on the user's device.
|
APNSMessage |
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 APNSMessage 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 APNSMessage 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 setBadge(Integer badge)
badge
- Include this key when you want the system to modify the badge of your app icon. If this key is not
included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.public Integer getBadge()
public APNSMessage withBadge(Integer badge)
badge
- Include this key when you want the system to modify the badge of your app icon. If this key is not
included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.public void setBody(String body)
body
- The message body of the notification.public String getBody()
public APNSMessage withBody(String body)
body
- The message body of the notification.public void setCategory(String category)
category
- Provide this key with a string value that represents the notification's type. This value corresponds to
the value in the identifier property of one of your app's registered categories.public String getCategory()
public APNSMessage withCategory(String category)
category
- Provide this key with a string value that represents the notification's type. This value corresponds to
the value in the identifier property of one of your app's registered categories.public void setCollapseId(String collapseId)
collapseId
- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push
notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon
Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.public String getCollapseId()
public APNSMessage withCollapseId(String collapseId)
collapseId
- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push
notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon
Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.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 APNSMessage 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 APNSMessage addDataEntry(String key, String value)
public APNSMessage clearDataEntries()
public void setMediaUrl(String mediaUrl)
mediaUrl
- The URL that points to a video used in the push notification.public String getMediaUrl()
public APNSMessage withMediaUrl(String mediaUrl)
mediaUrl
- The URL that points to a video used in the push notification.public void setPreferredAuthenticationMethod(String preferredAuthenticationMethod)
preferredAuthenticationMethod
- The preferred authentication method, either "CERTIFICATE" or "TOKEN"public String getPreferredAuthenticationMethod()
public APNSMessage withPreferredAuthenticationMethod(String preferredAuthenticationMethod)
preferredAuthenticationMethod
- The preferred authentication method, either "CERTIFICATE" or "TOKEN"public void setPriority(String priority)
priority
- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it
sends the message to APNs. Accepts the following values:
"5" - Low priority. Messages might be delayed, delivered in groups, and throttled.
"10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or
badge on the receiving device.
The default value is "10".
The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these
values for APNs messages and converts them.
For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and
Remote Notification Programming Guide.public String getPriority()
public APNSMessage withPriority(String priority)
priority
- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it
sends the message to APNs. Accepts the following values:
"5" - Low priority. Messages might be delayed, delivered in groups, and throttled.
"10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or
badge on the receiving device.
The default value is "10".
The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these
values for APNs messages and converts them.
For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and
Remote Notification Programming Guide.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 APNSMessage withRawContent(String rawContent)
rawContent
- The Raw JSON formatted string to be used as the payload. This value overrides 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 APNSMessage 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 setSound(String sound)
sound
- Include this key when you want the system to play a sound. The value of this key is the name of a sound
file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound
file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.public String getSound()
public APNSMessage withSound(String sound)
sound
- Include this key when you want the system to play a sound. The value of this key is the name of a sound
file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound
file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.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 APNSMessage withSubstitutions(Map<String,List<String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by individual address substitutions.public APNSMessage addSubstitutionsEntry(String key, List<String> value)
public APNSMessage clearSubstitutionsEntries()
public void setThreadId(String threadId)
threadId
- Provide this key with a string value that represents the app-specific identifier for grouping
notifications. If you provide a Notification Content app extension, you can use this value to group your
notifications together.public String getThreadId()
public APNSMessage withThreadId(String threadId)
threadId
- Provide this key with a string value that represents the app-specific identifier for grouping
notifications. If you provide a Notification Content app extension, you can use this value to group your
notifications together.public void setTimeToLive(Integer timeToLive)
timeToLive
- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0,
APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value
to set the apns-expiration request header when it sends the message to APNs.public Integer getTimeToLive()
public APNSMessage withTimeToLive(Integer timeToLive)
timeToLive
- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0,
APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value
to set the apns-expiration request header when it sends the message to APNs.public void setTitle(String title)
title
- The message title that displays above the message on the user's device.public String getTitle()
public APNSMessage 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 APNSMessage 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 APNSMessage 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.