@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Message extends Object implements Serializable, Cloneable, StructuredPojo
Specifies the content and settings for a push notification that's sent to recipients of a campaign.
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
Message |
clone() |
boolean |
equals(Object obj) |
String |
getAction()
The action to occur if a recipient taps the push notification.
|
String |
getBody()
The body of the notification message.
|
String |
getImageIconUrl()
The URL of the image to display as the push-notification icon, such as the icon for the app.
|
String |
getImageSmallIconUrl()
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the
app.
|
String |
getImageUrl()
The URL of an image to display in the push notification.
|
String |
getJsonBody()
The JSON payload to use for a silent push notification.
|
String |
getMediaUrl()
The URL of the image or video to display in the push notification.
|
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.
|
Integer |
getTimeToLive()
The number of seconds that the push-notification service should keep the message, if the service is unable to
deliver the notification the first time.
|
String |
getTitle()
The title to display above the notification message on a recipient's device.
|
String |
getUrl()
The URL to open in a 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(Action action)
The action to occur if a recipient taps the push notification.
|
void |
setAction(String action)
The action to occur if a recipient taps the push notification.
|
void |
setBody(String body)
The body of the notification message.
|
void |
setImageIconUrl(String imageIconUrl)
The URL of the image to display as the push-notification icon, such as the icon for the app.
|
void |
setImageSmallIconUrl(String imageSmallIconUrl)
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the
app.
|
void |
setImageUrl(String imageUrl)
The URL of an image to display in the push notification.
|
void |
setJsonBody(String jsonBody)
The JSON payload to use for a silent push notification.
|
void |
setMediaUrl(String mediaUrl)
The URL of the image or video to display in the push notification.
|
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 |
setTimeToLive(Integer timeToLive)
The number of seconds that the push-notification service should keep the message, if the service is unable to
deliver the notification the first time.
|
void |
setTitle(String title)
The title to display above the notification message on a recipient's device.
|
void |
setUrl(String url)
The URL to open in a 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.
|
Message |
withAction(Action action)
The action to occur if a recipient taps the push notification.
|
Message |
withAction(String action)
The action to occur if a recipient taps the push notification.
|
Message |
withBody(String body)
The body of the notification message.
|
Message |
withImageIconUrl(String imageIconUrl)
The URL of the image to display as the push-notification icon, such as the icon for the app.
|
Message |
withImageSmallIconUrl(String imageSmallIconUrl)
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the
app.
|
Message |
withImageUrl(String imageUrl)
The URL of an image to display in the push notification.
|
Message |
withJsonBody(String jsonBody)
The JSON payload to use for a silent push notification.
|
Message |
withMediaUrl(String mediaUrl)
The URL of the image or video to display in the push notification.
|
Message |
withRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message.
|
Message |
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.
|
Message |
withTimeToLive(Integer timeToLive)
The number of seconds that the push-notification service should keep the message, if the service is unable to
deliver the notification the first time.
|
Message |
withTitle(String title)
The title to display above the notification message on a recipient's device.
|
Message |
withUrl(String url)
The URL to open in a 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 a 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 setting uses the deep-linking features of iOS and Android.
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 a 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 setting uses the deep-linking features of iOS and Android.
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 a 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 setting uses the deep-linking features of iOS and Android.
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 setting uses the deep-linking features of iOS and Android.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public Message withAction(String action)
The action to occur if a 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 setting uses the deep-linking features of iOS and Android.
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 a 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 setting uses the deep-linking features of iOS and Android.
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 setAction(Action action)
The action to occur if a 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 setting uses the deep-linking features of iOS and Android.
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 a 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 setting uses the deep-linking features of iOS and Android.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
Action
public Message withAction(Action action)
The action to occur if a 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 setting uses the deep-linking features of iOS and Android.
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 a 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 setting uses the deep-linking features of iOS and Android.
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. The maximum number of characters is 200.
body
- The body of the notification message. The maximum number of characters is 200.public String getBody()
The body of the notification message. The maximum number of characters is 200.
public Message withBody(String body)
The body of the notification message. The maximum number of characters is 200.
body
- The body of the notification message. The maximum number of characters is 200.public void setImageIconUrl(String imageIconUrl)
The URL of the image to display as the push-notification icon, such as the icon for the app.
imageIconUrl
- The URL of the image to display as the push-notification icon, such as the icon for the app.public String getImageIconUrl()
The URL of the image to display as the push-notification icon, such as the icon for the app.
public Message withImageIconUrl(String imageIconUrl)
The URL of the image to display as the push-notification icon, such as the icon for the app.
imageIconUrl
- The URL of the image to display as the push-notification icon, such as the icon for the app.public void setImageSmallIconUrl(String imageSmallIconUrl)
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.
imageSmallIconUrl
- The URL of the image to display as the small, push-notification icon, such as a small version of the icon
for the app.public String getImageSmallIconUrl()
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.
public Message withImageSmallIconUrl(String imageSmallIconUrl)
The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.
imageSmallIconUrl
- The URL of the image to display as the small, push-notification icon, such as a small version of the icon
for the app.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 Message 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 setJsonBody(String jsonBody)
The JSON payload to use for a silent push notification.
jsonBody
- The JSON payload to use for a silent push notification.public String getJsonBody()
The JSON payload to use for a silent push notification.
public Message withJsonBody(String jsonBody)
The JSON payload to use for a silent push notification.
jsonBody
- The JSON payload to use for a silent push notification.public void setMediaUrl(String mediaUrl)
The URL of the image or video to display in the push notification.
mediaUrl
- The URL of the image or video to display in the push notification.public String getMediaUrl()
The URL of the image or video to display in the push notification.
public Message withMediaUrl(String mediaUrl)
The URL of the image or video to display in the push notification.
mediaUrl
- The URL of the image or video to display in the push notification.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 Message 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, displaying messages in an in-app message center, 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, displaying messages in an in-app message center, 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, displaying messages in an in-app message center, or supporting phone home functionality.
public Message 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, displaying messages in an in-app message center, 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, displaying messages in an in-app message center, 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, displaying messages in an in-app message center, or supporting phone home functionality.
public void setTimeToLive(Integer timeToLive)
The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
timeToLive
- The number of seconds that the push-notification service should keep the message, if the service is unable
to deliver the notification the first time. This value is converted to an expiration value when it's sent
to a push-notification service. If this value is 0, the service treats the notification as if it expires
immediately and the service doesn't store or try to deliver the notification again.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
public Integer getTimeToLive()
The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
public Message withTimeToLive(Integer timeToLive)
The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
timeToLive
- The number of seconds that the push-notification service should keep the message, if the service is unable
to deliver the notification the first time. This value is converted to an expiration value when it's sent
to a push-notification service. If this value is 0, the service treats the notification as if it expires
immediately and the service doesn't store or try to deliver the notification again.
This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.
public void setTitle(String title)
The title to display above the notification message on a recipient's device.
title
- The title to display above the notification message on a recipient's device.public String getTitle()
The title to display above the notification message on a recipient's device.
public Message withTitle(String title)
The title to display above the notification message on a recipient's device.
title
- The title to display above the notification message on a recipient's device.public void setUrl(String url)
The URL to open in a 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 a 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 a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
public Message withUrl(String url)
The URL to open in a 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 a 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 void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.