@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, the email body or the text message.
|
String |
getCategory()
Provide this key with a string value that represents the notification's type.
|
String |
getCollapseId()
Multiple notifications with the same collapse identifier are displayed to the user as a single notification.
|
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()
Is this a transaction priority message or lower 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()
This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the
notification the first time.
|
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, the email body or the text message.
|
void |
setCategory(String category)
Provide this key with a string value that represents the notification's type.
|
void |
setCollapseId(String collapseId)
Multiple notifications with the same collapse identifier are displayed to the user as a single notification.
|
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)
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 |
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)
This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the
notification the first time.
|
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, the email body or the text message.
|
APNSMessage |
withCategory(String category)
Provide this key with a string value that represents the notification's type.
|
APNSMessage |
withCollapseId(String collapseId)
Multiple notifications with the same collapse identifier are displayed to the user as a single notification.
|
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)
Is this a transaction priority message or lower 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)
This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the
notification the first time.
|
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, the email body or the text message.public String getBody()
public APNSMessage withBody(String body)
body
- The message body of the notification, the email body or the text message.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
- Multiple notifications with the same collapse identifier are displayed to the user as a single
notification. The value of this key must not exceed 64 bytes.public String getCollapseId()
public APNSMessage withCollapseId(String collapseId)
collapseId
- Multiple notifications with the same collapse identifier are displayed to the user as a single
notification. The value of this key must not exceed 64 bytes.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
- Is this a transaction priority message or lower priority.public String getPriority()
public APNSMessage 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 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
- This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the
notification the first time. If the value is 0, APNS treats the notification as if it expires immediately
and does not store the notification or attempt to redeliver it. This value is converted to the expiration
field when sent to APNSpublic Integer getTimeToLive()
public APNSMessage withTimeToLive(Integer timeToLive)
timeToLive
- This parameter specifies how long (in seconds) the message should be kept if APNS is unable to deliver the
notification the first time. If the value is 0, APNS treats the notification as if it expires immediately
and does not store the notification or attempt to redeliver it. This value is converted to the expiration
field when sent to APNSpublic 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.