public class Event
extends java.lang.Object
implements java.io.Serializable
Represents a single event that happened on a client device. Attributes and metrics are optional.
| Constructor and Description |
|---|
Event() |
| Modifier and Type | Method and Description |
|---|---|
Event |
addAttributesEntry(java.lang.String key,
java.lang.String value)
Sets the value of the Attributes property for this object.
|
Event |
addMetricsEntry(java.lang.String key,
java.lang.Double value)
Sets the value of the Metrics property for this object.
|
Event |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
Event |
clearMetricsEntries()
Removes all the entries added into Metrics.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns the value of the Attributes property for this object.
|
java.lang.String |
getEventType()
Returns the value of the EventType property for this object.
|
java.util.Map<java.lang.String,java.lang.Double> |
getMetrics()
Returns the value of the Metrics property for this object.
|
Session |
getSession()
Returns the value of the Session property for this object.
|
java.lang.String |
getTimestamp()
Returns the value of the Timestamp property for this object.
|
java.lang.String |
getVersion()
Returns the value of the Version property for this object.
|
int |
hashCode() |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the value of the Attributes property for this object.
|
void |
setEventType(java.lang.String eventType)
Sets the value of the EventType property for this object.
|
void |
setMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
Sets the value of the Metrics property for this object.
|
void |
setSession(Session session)
Sets the value of the Session property for this object.
|
void |
setTimestamp(java.lang.String timestamp)
Sets the value of the Timestamp property for this object.
|
void |
setVersion(java.lang.String version)
Sets the value of the Version property for this object.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Event |
withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the value of the Attributes property for this object.
|
Event |
withEventType(java.lang.String eventType)
Sets the value of the EventType property for this object.
|
Event |
withMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
Sets the value of the Metrics property for this object.
|
Event |
withSession(Session session)
Sets the value of the Session property for this object.
|
Event |
withTimestamp(java.lang.String timestamp)
Sets the value of the Timestamp property for this object.
|
Event |
withVersion(java.lang.String version)
Sets the value of the Version property for this object.
|
public java.lang.String getEventType()
Constraints:
Length: 1 - 50
public void setEventType(java.lang.String eventType)
Constraints:
Length: 1 - 50
eventType - The new value for the EventType property for this object.public Event withEventType(java.lang.String eventType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 50
eventType - The new value for the EventType property for this object.public java.lang.String getTimestamp()
public void setTimestamp(java.lang.String timestamp)
timestamp - The new value for the Timestamp property for this object.public Event withTimestamp(java.lang.String timestamp)
Returns a reference to this object so that method calls can be chained together.
timestamp - The new value for the Timestamp property for this object.public Session getSession()
public void setSession(Session session)
session - The new value for the Session property for this object.public Event withSession(Session session)
Returns a reference to this object so that method calls can be chained together.
session - The new value for the Session property for this object.public java.lang.String getVersion()
Constraints:
Length: 1 - 10
public void setVersion(java.lang.String version)
Constraints:
Length: 1 - 10
version - The new value for the Version property for this object.public Event withVersion(java.lang.String version)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 10
version - The new value for the Version property for this object.public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Constraints:
Length: 0 - 50
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Constraints:
Length: 0 - 50
attributes - The new value for the Attributes property for this object.public Event withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 50
attributes - The new value for the Attributes property for this object.public Event addAttributesEntry(java.lang.String key, java.lang.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.
Constraints:
Length: 0 - 50
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 java.util.Map<java.lang.String,java.lang.Double> getMetrics()
Constraints:
Length: 0 - 50
public void setMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
Constraints:
Length: 0 - 50
metrics - The new value for the Metrics property for this object.public Event withMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 50
metrics - The new value for the Metrics property for this object.public Event addMetricsEntry(java.lang.String key, java.lang.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.
Constraints:
Length: 0 - 50
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 java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object