public abstract static class BasePayload.Builder<P extends BasePayload,B extends BasePayload.Builder>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
B |
anonymousId(java.lang.String anonymousId)
The Anonymous ID is a pseudo-unique substitute for a User ID, for cases when you don’t have
an absolutely unique identifier.
|
P |
build()
Create a
BasePayload instance. |
B |
context(java.util.Map<java.lang.String,?> context)
Set a map of information about the state of the device.
|
B |
integration(java.lang.String key,
boolean enable)
Set whether this message is sent to the specified integration or not.
|
B |
integration(java.lang.String key,
java.util.Map<java.lang.String,java.lang.Object> options)
Pass in some options that will only be used by the target integration.
|
B |
integrations(java.util.Map<java.lang.String,?> integrations)
Specify a dictionary of options for integrations.
|
B |
messageId(java.lang.String messageId)
The Message ID is a unique identifier for each message.
|
B |
timestamp(java.util.Date timestamp)
Set a timestamp for the event.
|
B |
userId(java.lang.String userId)
The User ID is a persistent unique identifier for a user (such as a database ID).
|
public B messageId(java.lang.String messageId)
public B timestamp(java.util.Date timestamp)
This library will automatically create and attach a timestamp to all events.
public B context(java.util.Map<java.lang.String,?> context)
Some keys in the context dictionary have semantic meaning and will be collected for you automatically, depending on the library you send data from. Some keys, such as location and speed need to be manually entered.
public B integration(java.lang.String key, boolean enable)
public B integration(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> options)
public B integrations(java.util.Map<java.lang.String,?> integrations)
public B anonymousId(java.lang.String anonymousId)
public B userId(java.lang.String userId)
public P build()
BasePayload
instance.