Interface IDataMessage
interface IDataMessage
Extends com.amazon.apmf.IStandard
Interface used by client applications to process the data message. Data messages are defined
by custom key-value pairs. Client applications configure the data message on cloud and handle
it on the device.
Methods
getKeys()
string[] getKeys()
Get an array of all the keys in this data message. All keys are strings.
Returns
string[]
An array of keys.
getValue()
Get the value for the given key. All values are strings.stringgetValue(stringkey)
Parameters
key
string — Required
The key to get.
Returns
string
The value for the given key
Throws
InvalidArgumentError— if the given key doesn’t have any value associated with it in data message.
hasKey()
Check if this data message contains the given key.boolhasKey(stringkey)
Parameters
key
string — Required
The key to look for.
Returns
bool
True if the key is present, false if not.

