public class Event extends Object implements Serializable
| Constructor and Description |
|---|
Event() |
| Modifier and Type | Method and Description |
|---|---|
Event |
addAttributesEntry(String key,
String value)
Custom attributes that are associated with the event you're adding or
updating.
|
Event |
addMetricsEntry(String key,
Double value)
Event metrics
|
Event |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
Event |
clearMetricsEntries()
Removes all the entries added into Metrics.
|
boolean |
equals(Object obj) |
Map<String,String> |
getAttributes()
Custom attributes that are associated with the event you're adding or
updating.
|
String |
getClientSdkVersion()
The version of the SDK that's running on the client device.
|
String |
getEventType()
The name of the custom event that you're recording.
|
Map<String,Double> |
getMetrics()
Event metrics
|
Session |
getSession()
The session
|
String |
getTimestamp()
The date and time when the event occurred, in ISO 8601 format.
|
int |
hashCode() |
void |
setAttributes(Map<String,String> attributes)
Custom attributes that are associated with the event you're adding or
updating.
|
void |
setClientSdkVersion(String clientSdkVersion)
The version of the SDK that's running on the client device.
|
void |
setEventType(String eventType)
The name of the custom event that you're recording.
|
void |
setMetrics(Map<String,Double> metrics)
Event metrics
|
void |
setSession(Session session)
The session
|
void |
setTimestamp(String timestamp)
The date and time when the event occurred, in ISO 8601 format.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Event |
withAttributes(Map<String,String> attributes)
Custom attributes that are associated with the event you're adding or
updating.
|
Event |
withClientSdkVersion(String clientSdkVersion)
The version of the SDK that's running on the client device.
|
Event |
withEventType(String eventType)
The name of the custom event that you're recording.
|
Event |
withMetrics(Map<String,Double> metrics)
Event metrics
|
Event |
withSession(Session session)
The session
|
Event |
withTimestamp(String timestamp)
The date and time when the event occurred, in ISO 8601 format.
|
public Map<String,String> getAttributes()
public void setAttributes(Map<String,String> attributes)
attributes - Custom attributes that are associated with the event
you're adding or updating.public Event withAttributes(Map<String,String> attributes)
Returns a reference to this object so that method calls can be chained together.
attributes - Custom attributes that are associated with the event
you're adding or updating.public Event addAttributesEntry(String key, String value)
The method adds a new key-value pair into Attributes 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 Attributes.value - The corresponding value of the entry to be added into
Attributes.public Event clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public String getClientSdkVersion()
public void setClientSdkVersion(String clientSdkVersion)
clientSdkVersion - The version of the SDK that's running on the
client device.public Event withClientSdkVersion(String clientSdkVersion)
Returns a reference to this object so that method calls can be chained together.
clientSdkVersion - The version of the SDK that's running on the
client device.public String getEventType()
public void setEventType(String eventType)
eventType - The name of the custom event that you're recording.public Event withEventType(String eventType)
Returns a reference to this object so that method calls can be chained together.
eventType - The name of the custom event that you're recording.public void setMetrics(Map<String,Double> metrics)
metrics - Event metricspublic Event withMetrics(Map<String,Double> metrics)
Returns a reference to this object so that method calls can be chained together.
metrics - Event metricspublic Event addMetricsEntry(String key, Double value)
The method adds a new key-value pair into Metrics 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 Metrics.value - The corresponding value of the entry to be added into
Metrics.public Event clearMetricsEntries()
Returns a reference to this object so that method calls can be chained together.
public Session getSession()
public void setSession(Session session)
session - The sessionpublic Event withSession(Session session)
Returns a reference to this object so that method calls can be chained together.
session - The sessionpublic String getTimestamp()
public void setTimestamp(String timestamp)
timestamp - The date and time when the event occurred, in ISO 8601
format.public Event withTimestamp(String timestamp)
Returns a reference to this object so that method calls can be chained together.
timestamp - The date and time when the event occurred, in ISO 8601
format.public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.