@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class BaiduMessage extends Object implements Serializable, Cloneable, StructuredPojo
Specifies the settings for a one-time message that's sent directly to an endpoint through the Baidu (Baidu Cloud Push) channel.
Constructor and Description |
---|
BaiduMessage() |
Modifier and Type | Method and Description |
---|---|
BaiduMessage |
addDataEntry(String key,
String value)
Add a single Data entry
|
BaiduMessage |
addSubstitutionsEntry(String key,
List<String> value)
Add a single Substitutions entry
|
BaiduMessage |
clearDataEntries()
Removes all the entries added into Data.
|
BaiduMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
BaiduMessage |
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.
|
Map<String,String> |
getData()
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
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 |
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.
|
Integer |
getTimeToLive()
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's
device is offline.
|
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 |
setData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
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 |
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 |
setTimeToLive(Integer timeToLive)
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's
device is offline.
|
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.
|
BaiduMessage |
withAction(Action action)
The action to occur if the recipient taps the push notification.
|
BaiduMessage |
withAction(String action)
The action to occur if the recipient taps the push notification.
|
BaiduMessage |
withBody(String body)
The body of the notification message.
|
BaiduMessage |
withData(Map<String,String> data)
The JSON data payload to use for the push notification, if the notification is a silent push notification.
|
BaiduMessage |
withIconReference(String iconReference)
The icon image name of the asset saved in your app.
|
BaiduMessage |
withImageIconUrl(String imageIconUrl)
The URL of the large icon image to display in the content view of the push notification.
|
BaiduMessage |
withImageUrl(String imageUrl)
The URL of an image to display in the push notification.
|
BaiduMessage |
withRawContent(String rawContent)
The raw, JSON-formatted string to use as the payload for the notification message.
|
BaiduMessage |
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.
|
BaiduMessage |
withSmallImageIconUrl(String smallImageIconUrl)
The URL of the small icon image to display in the status bar and the content view of the push notification.
|
BaiduMessage |
withSound(String sound)
The sound to play when the recipient receives the push notification.
|
BaiduMessage |
withSubstitutions(Map<String,List<String>> substitutions)
The default message variables to use in the notification message.
|
BaiduMessage |
withTimeToLive(Integer timeToLive)
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's
device is offline.
|
BaiduMessage |
withTitle(String title)
The title to display above the notification message on the recipient's device.
|
BaiduMessage |
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 BaiduMessage 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 BaiduMessage 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 BaiduMessage withBody(String body)
The body of the notification message.
body
- The body of the notification 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 BaiduMessage 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 BaiduMessage addDataEntry(String key, String value)
public BaiduMessage clearDataEntries()
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 BaiduMessage 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 BaiduMessage 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 BaiduMessage 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 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 BaiduMessage 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 BaiduMessage 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 BaiduMessage 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 BaiduMessage 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 BaiduMessage 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 BaiduMessage addSubstitutionsEntry(String key, List<String> value)
public BaiduMessage clearSubstitutionsEntries()
public void setTimeToLive(Integer timeToLive)
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).
timeToLive
- The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the
recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).public Integer getTimeToLive()
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).
public BaiduMessage withTimeToLive(Integer timeToLive)
The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).
timeToLive
- The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the
recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).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 BaiduMessage 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 BaiduMessage 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 BaiduMessage clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.