public class Event
extends java.lang.Object
implements java.io.Serializable
A JSON object representing a batch of unique event occurrences in your app.
Constructor and Description |
---|
Event() |
Modifier and Type | Method and Description |
---|---|
Event |
addattributesEntry(java.lang.String key,
java.lang.String value)
A collection of key-value pairs that give additional context to the
event.
|
Event |
addmetricsEntry(java.lang.String key,
java.lang.Double value)
A collection of key-value pairs that gives additional, measurable context
to the event.
|
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()
A collection of key-value pairs that give additional context to the
event.
|
java.lang.String |
getEventType()
A name signifying an event that occurred in your app.
|
java.util.Map<java.lang.String,java.lang.Double> |
getMetrics()
A collection of key-value pairs that gives additional, measurable context
to the event.
|
Session |
getSession()
The session the event occured within.
|
java.lang.String |
getTimestamp()
The time the event occurred in ISO 8601 standard date time format.
|
java.lang.String |
getVersion()
The version of the event.
|
int |
hashCode() |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A collection of key-value pairs that give additional context to the
event.
|
void |
setEventType(java.lang.String eventType)
A name signifying an event that occurred in your app.
|
void |
setMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
A collection of key-value pairs that gives additional, measurable context
to the event.
|
void |
setSession(Session session)
The session the event occured within.
|
void |
setTimestamp(java.lang.String timestamp)
The time the event occurred in ISO 8601 standard date time format.
|
void |
setVersion(java.lang.String version)
The version of the event.
|
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)
A collection of key-value pairs that give additional context to the
event.
|
Event |
withEventType(java.lang.String eventType)
A name signifying an event that occurred in your app.
|
Event |
withMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
A collection of key-value pairs that gives additional, measurable context
to the event.
|
Event |
withSession(Session session)
The session the event occured within.
|
Event |
withTimestamp(java.lang.String timestamp)
The time the event occurred in ISO 8601 standard date time format.
|
Event |
withVersion(java.lang.String version)
The version of the event.
|
public java.lang.String getEventType()
A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
Constraints:
Length: 1 - 50
A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
public void setEventType(java.lang.String eventType)
A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
Constraints:
Length: 1 - 50
eventType
- A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
public Event withEventType(java.lang.String eventType)
A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 50
eventType
- A name signifying an event that occurred in your app. This is used for grouping and aggregating like events together for reporting purposes.
public java.lang.String getTimestamp()
The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
public void setTimestamp(java.lang.String timestamp)
The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
timestamp
- The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
public Event withTimestamp(java.lang.String timestamp)
The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
Returns a reference to this object so that method calls can be chained together.
timestamp
- The time the event occurred in ISO 8601 standard date time format. For example, 2014-06-30T19:07:47.885Z
public Session getSession()
The session the event occured within.
The session the event occured within.
public void setSession(Session session)
The session the event occured within.
session
- The session the event occured within.
public Event withSession(Session session)
The session the event occured within.
Returns a reference to this object so that method calls can be chained together.
session
- The session the event occured within.
public java.lang.String getVersion()
The version of the event.
Constraints:
Length: 1 - 10
The version of the event.
public void setVersion(java.lang.String version)
The version of the event.
Constraints:
Length: 1 - 10
version
- The version of the event.
public Event withVersion(java.lang.String version)
The version of the event.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 10
version
- The version of the event.
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
attributes
- A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public Event withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
Returns a reference to this object so that method calls can be chained together.
attributes
- A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public Event addattributesEntry(java.lang.String key, java.lang.String value)
A collection of key-value pairs that give additional context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
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 java.util.Map<java.lang.String,java.lang.Double> getMetrics()
A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public void setMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
metrics
- A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public Event withMetrics(java.util.Map<java.lang.String,java.lang.Double> metrics)
A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
Returns a reference to this object so that method calls can be chained together.
metrics
- A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
public Event addmetricsEntry(java.lang.String key, java.lang.Double value)
A collection of key-value pairs that gives additional, measurable context to the event. The key-value pairs are specified by the developer.
This collection can be empty or the attribute object can be omitted.
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 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.