public class BaiduMessage
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
BaiduMessage() |
Modifier and Type | Method and Description |
---|---|
BaiduMessage |
addDataEntry(java.lang.String key,
java.lang.String value)
The data payload used for a silent push.
|
BaiduMessage |
addSubstitutionsEntry(java.lang.String key,
java.util.List<java.lang.String> value)
Default message substitutions.
|
BaiduMessage |
clearDataEntries()
Removes all the entries added into Data.
|
BaiduMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
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 of the notification.
|
java.util.Map<java.lang.String,java.lang.String> |
getData()
The data payload used for a silent push.
|
java.lang.String |
getIconReference()
The icon image name of the asset saved in your application.
|
java.lang.String |
getImageIconUrl()
The URL that points to an image used as the large icon to the
notification content view.
|
java.lang.String |
getImageUrl()
The URL that points to an image used 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.String |
getSmallImageIconUrl()
The URL that points to an image used as the small icon for the
notification which will be used to represent the notification in the
status bar and content view
|
java.lang.String |
getSound()
Indicates a sound to play when the device receives the notification.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getSubstitutions()
Default message substitutions.
|
java.lang.Integer |
getTimeToLive()
This parameter specifies how long (in seconds) the message should be kept
in Baidu storage if the device is offline.
|
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 of the notification.
|
void |
setData(java.util.Map<java.lang.String,java.lang.String> data)
The data payload used for a silent push.
|
void |
setIconReference(java.lang.String iconReference)
The icon image name of the asset saved in your application.
|
void |
setImageIconUrl(java.lang.String imageIconUrl)
The URL that points to an image used as the large icon to the
notification content view.
|
void |
setImageUrl(java.lang.String imageUrl)
The URL that points to an image used 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 |
setSmallImageIconUrl(java.lang.String smallImageIconUrl)
The URL that points to an image used as the small icon for the
notification which will be used to represent the notification in the
status bar and content view
|
void |
setSound(java.lang.String sound)
Indicates a sound to play when the device receives the notification.
|
void |
setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
void |
setTimeToLive(java.lang.Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept
in Baidu storage if the device is offline.
|
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.
|
BaiduMessage |
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.
|
BaiduMessage |
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.
|
BaiduMessage |
withBody(java.lang.String body)
The message body of the notification.
|
BaiduMessage |
withData(java.util.Map<java.lang.String,java.lang.String> data)
The data payload used for a silent push.
|
BaiduMessage |
withIconReference(java.lang.String iconReference)
The icon image name of the asset saved in your application.
|
BaiduMessage |
withImageIconUrl(java.lang.String imageIconUrl)
The URL that points to an image used as the large icon to the
notification content view.
|
BaiduMessage |
withImageUrl(java.lang.String imageUrl)
The URL that points to an image used in the push notification.
|
BaiduMessage |
withRawContent(java.lang.String rawContent)
The Raw JSON formatted string to be used as the payload.
|
BaiduMessage |
withSilentPush(java.lang.Boolean silentPush)
Indicates if the message should display on the users device.
|
BaiduMessage |
withSmallImageIconUrl(java.lang.String smallImageIconUrl)
The URL that points to an image used as the small icon for the
notification which will be used to represent the notification in the
status bar and content view
|
BaiduMessage |
withSound(java.lang.String sound)
Indicates a sound to play when the device receives the notification.
|
BaiduMessage |
withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Default message substitutions.
|
BaiduMessage |
withTimeToLive(java.lang.Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept
in Baidu storage if the device is offline.
|
BaiduMessage |
withTitle(java.lang.String title)
The message title that displays above the message on the user's device.
|
BaiduMessage |
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
Action
public 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. Possible values include:
OPEN_APP | DEEP_LINK | URLAction
public BaiduMessage 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. Possible values include:
OPEN_APP | DEEP_LINK | URLAction
public 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. Possible values include:
OPEN_APP | DEEP_LINK | URLAction
public BaiduMessage 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. Possible values include:
OPEN_APP | DEEP_LINK | URLAction
public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- The message body of the notification.public BaiduMessage withBody(java.lang.String body)
Returns a reference to this object so that method calls can be chained together.
body
- The message body of the notification.public java.util.Map<java.lang.String,java.lang.String> getData()
public void setData(java.util.Map<java.lang.String,java.lang.String> data)
data
- The data payload used for a silent push. This payload is
added to the notifications' data.pinpoint.jsonBody' objectpublic BaiduMessage withData(java.util.Map<java.lang.String,java.lang.String> data)
Returns a reference to this object so that method calls can be chained together.
data
- The data payload used for a silent push. This payload is
added to the notifications' data.pinpoint.jsonBody' objectpublic BaiduMessage addDataEntry(java.lang.String key, java.lang.String value)
The method adds a new key-value pair into Data parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Data.value
- The corresponding value of the entry to be added into Data.public BaiduMessage clearDataEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String getIconReference()
public void setIconReference(java.lang.String iconReference)
iconReference
- The icon image name of the asset saved in your
application.public BaiduMessage withIconReference(java.lang.String iconReference)
Returns a reference to this object so that method calls can be chained together.
iconReference
- The icon image name of the asset saved in your
application.public java.lang.String getImageIconUrl()
public void setImageIconUrl(java.lang.String imageIconUrl)
imageIconUrl
- The URL that points to an image used as the large
icon to the notification content view.public BaiduMessage 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 an image used as the large
icon to the notification content view.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 BaiduMessage 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 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 BaiduMessage 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 BaiduMessage 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.String getSmallImageIconUrl()
public void setSmallImageIconUrl(java.lang.String smallImageIconUrl)
smallImageIconUrl
- The URL that points to an image used as the
small icon for the notification which will be used to
represent the notification in the status bar and content viewpublic BaiduMessage withSmallImageIconUrl(java.lang.String smallImageIconUrl)
Returns a reference to this object so that method calls can be chained together.
smallImageIconUrl
- The URL that points to an image used as the
small icon for the notification which will be used to
represent the notification in the status bar and content viewpublic java.lang.String getSound()
public void setSound(java.lang.String sound)
sound
- Indicates a sound to play when the device receives the
notification. Supports default, or the filename of a sound
resource bundled in the app. Android sound files must reside
in /res/raw/public BaiduMessage withSound(java.lang.String sound)
Returns a reference to this object so that method calls can be chained together.
sound
- Indicates a sound to play when the device receives the
notification. Supports default, or the filename of a sound
resource bundled in the app. Android sound files must reside
in /res/raw/public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSubstitutions()
public void setSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public BaiduMessage withSubstitutions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public BaiduMessage addSubstitutionsEntry(java.lang.String key, java.util.List<java.lang.String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Substitutions.value
- The corresponding value of the entry to be added into
Substitutions.public BaiduMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
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 in Baidu storage if the device is
offline. The and the default value and the maximum time to
live supported is 7 days (604800 seconds)public BaiduMessage 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 in Baidu storage if the device is
offline. The and the default value and the maximum time to
live supported is 7 days (604800 seconds)public 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 BaiduMessage 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 BaiduMessage 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.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.