public class Message
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description | 
|---|
Message()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(java.lang.Object obj)  | 
java.lang.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. 
 | 
java.lang.String | 
getBody()
The message body. 
 | 
java.lang.String | 
getImageIconUrl()
The URL that points to the icon image for the push notification icon, for
 example, the app icon. 
 | 
java.lang.String | 
getImageSmallIconUrl()
The URL that points to the small icon image for the push notification
 icon, for example, the app icon. 
 | 
java.lang.String | 
getImageUrl()
The URL that points to an image used in the push notification. 
 | 
java.lang.String | 
getJsonBody()
The JSON payload used for a silent push. 
 | 
java.lang.String | 
getMediaUrl()
A URL that refers to the location of an image or video that you want to
 display in the push notification. 
 | 
java.lang.String | 
getRawContent()
The Raw JSON formatted string to be used as the payload. 
 | 
java.lang.Boolean | 
getSilentPush()
Indicates if the message should display on the users device. 
 | 
java.lang.Integer | 
getTimeToLive()
This parameter specifies how long (in seconds) the message should be kept
 if the service is unable to deliver the notification the first time. 
 | 
java.lang.String | 
getTitle()
The message title that displays above the message on the user's device. 
 | 
java.lang.String | 
getUrl()
The URL to open in the user's mobile browser. 
 | 
int | 
hashCode()  | 
java.lang.Boolean | 
isSilentPush()
Indicates if the message should display on the users device. 
 | 
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(java.lang.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(java.lang.String body)
The message body. 
 | 
void | 
setImageIconUrl(java.lang.String imageIconUrl)
The URL that points to the icon image for the push notification icon, for
 example, the app icon. 
 | 
void | 
setImageSmallIconUrl(java.lang.String imageSmallIconUrl)
The URL that points to the small icon image for the push notification
 icon, for example, the app icon. 
 | 
void | 
setImageUrl(java.lang.String imageUrl)
The URL that points to an image used in the push notification. 
 | 
void | 
setJsonBody(java.lang.String jsonBody)
The JSON payload used for a silent push. 
 | 
void | 
setMediaUrl(java.lang.String mediaUrl)
A URL that refers to the location of an image or video that you want to
 display in the push notification. 
 | 
void | 
setRawContent(java.lang.String rawContent)
The Raw JSON formatted string to be used as the payload. 
 | 
void | 
setSilentPush(java.lang.Boolean silentPush)
Indicates if the message should display on the users device. 
 | 
void | 
setTimeToLive(java.lang.Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept
 if the service is unable to deliver the notification the first time. 
 | 
void | 
setTitle(java.lang.String title)
The message title that displays above the message on the user's device. 
 | 
void | 
setUrl(java.lang.String url)
The URL to open in the user's mobile browser. 
 | 
java.lang.String | 
toString()
Returns a string representation of this object; useful for testing and
 debugging. 
 | 
Message | 
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. 
 | 
Message | 
withAction(java.lang.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. 
 | 
Message | 
withBody(java.lang.String body)
The message body. 
 | 
Message | 
withImageIconUrl(java.lang.String imageIconUrl)
The URL that points to the icon image for the push notification icon, for
 example, the app icon. 
 | 
Message | 
withImageSmallIconUrl(java.lang.String imageSmallIconUrl)
The URL that points to the small icon image for the push notification
 icon, for example, the app icon. 
 | 
Message | 
withImageUrl(java.lang.String imageUrl)
The URL that points to an image used in the push notification. 
 | 
Message | 
withJsonBody(java.lang.String jsonBody)
The JSON payload used for a silent push. 
 | 
Message | 
withMediaUrl(java.lang.String mediaUrl)
A URL that refers to the location of an image or video that you want to
 display in the push notification. 
 | 
Message | 
withRawContent(java.lang.String rawContent)
The Raw JSON formatted string to be used as the payload. 
 | 
Message | 
withSilentPush(java.lang.Boolean silentPush)
Indicates if the message should display on the users device. 
 | 
Message | 
withTimeToLive(java.lang.Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept
 if the service is unable to deliver the notification the first time. 
 | 
Message | 
withTitle(java.lang.String title)
The message title that displays above the message on the user's device. 
 | 
Message | 
withUrl(java.lang.String url)
The URL to open in the user's mobile browser. 
 | 
public java.lang.String getAction()
 Constraints:
 Allowed Values: OPEN_APP, DEEP_LINK, URL
Actionpublic void setAction(java.lang.String action)
 Constraints:
 Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic Message withAction(java.lang.String action)
Returns a reference to this object so that method calls can be chained together.
 Constraints:
 Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic void setAction(Action action)
 Constraints:
 Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic Message withAction(Action action)
Returns a reference to this object so that method calls can be chained together.
 Constraints:
 Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic java.lang.String getBody()
public void setBody(java.lang.String body)
body - The message body. Can include up to 140 characters.public Message withBody(java.lang.String body)
Returns a reference to this object so that method calls can be chained together.
body - The message body. Can include up to 140 characters.public java.lang.String getImageIconUrl()
public void setImageIconUrl(java.lang.String imageIconUrl)
imageIconUrl - The URL that points to the icon image for the push
            notification icon, for example, the app icon.public Message withImageIconUrl(java.lang.String imageIconUrl)
Returns a reference to this object so that method calls can be chained together.
imageIconUrl - The URL that points to the icon image for the push
            notification icon, for example, the app icon.public java.lang.String getImageSmallIconUrl()
public void setImageSmallIconUrl(java.lang.String imageSmallIconUrl)
imageSmallIconUrl - The URL that points to the small icon image for
            the push notification icon, for example, the app icon.public Message withImageSmallIconUrl(java.lang.String imageSmallIconUrl)
Returns a reference to this object so that method calls can be chained together.
imageSmallIconUrl - The URL that points to the small icon image for
            the push notification icon, for example, the app icon.public java.lang.String getImageUrl()
public void setImageUrl(java.lang.String imageUrl)
imageUrl - The URL that points to an image used in the push
            notification.public Message withImageUrl(java.lang.String imageUrl)
Returns a reference to this object so that method calls can be chained together.
imageUrl - The URL that points to an image used in the push
            notification.public java.lang.String getJsonBody()
public void setJsonBody(java.lang.String jsonBody)
jsonBody - The JSON payload used for a silent push.public Message withJsonBody(java.lang.String jsonBody)
Returns a reference to this object so that method calls can be chained together.
jsonBody - The JSON payload used for a silent push.public java.lang.String getMediaUrl()
public void setMediaUrl(java.lang.String mediaUrl)
mediaUrl - A URL that refers to the location of an image or video
            that you want to display in the push notification.public Message withMediaUrl(java.lang.String mediaUrl)
Returns a reference to this object so that method calls can be chained together.
mediaUrl - A URL that refers to the location of an image or video
            that you want to display in the push notification.public java.lang.String getRawContent()
public void setRawContent(java.lang.String rawContent)
rawContent - The Raw JSON formatted string to be used as the
            payload. This value overrides the message.public Message withRawContent(java.lang.String rawContent)
Returns a reference to this object so that method calls can be chained together.
rawContent - The Raw JSON formatted string to be used as the
            payload. This value overrides the message.public java.lang.Boolean isSilentPush()
public java.lang.Boolean getSilentPush()
public void setSilentPush(java.lang.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 Message withSilentPush(java.lang.Boolean silentPush)
Returns a reference to this object so that method calls can be chained together.
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 java.lang.Integer getTimeToLive()
public void setTimeToLive(java.lang.Integer timeToLive)
timeToLive - This parameter specifies how long (in seconds) the
            message should be kept if the service is unable to deliver the
            notification the first time. If the value is 0, it 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 the service. It
            only applies to APNs and GCMpublic Message withTimeToLive(java.lang.Integer timeToLive)
Returns a reference to this object so that method calls can be chained together.
timeToLive - This parameter specifies how long (in seconds) the
            message should be kept if the service is unable to deliver the
            notification the first time. If the value is 0, it 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 the service. It
            only applies to APNs and GCMpublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - The message title that displays above the message on the
            user's device.public Message withTitle(java.lang.String title)
Returns a reference to this object so that method calls can be chained together.
title - The message title that displays above the message on the
            user's device.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - The URL to open in the user's mobile browser. Used if the
            value for Action is URL.public Message withUrl(java.lang.String url)
Returns a reference to this object so that method calls can be chained together.
url - The URL to open in the user's mobile browser. Used if the
            value for Action is URL.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.