data class Event : JsonSerializable
Represents an event, non measurable activity triggered by or for a device
Formal definition is given in Cumulocity REST API Guide
class AnyEventValue : HashMap<String, Any>, JsonSerializable |
|
class JSonEventValue : HashMap<String, Any>, JsonSerializable |
|
data class Source : JsonSerializable |
Event(o: JSONObject)
Alternative constructor used internally to parse JSON response returned by Cumulocity Event(source: Event.Source, type: String, text: String)
Create a new Event to be posted to Cumulocity |
val properties: Map<String, Any>
Allows supplementary adhoc information to be included in event details |
|
val source: Event.Source
identifies associated device/object |
|
val text: String
arbritary text describing event |
|
val time: Date |
|
val type: String
label to allow events to be grouped/typed |
fun addPosition(position: Position): Unit
Includes GPS formatted position 'c8y_LocationUpdate' to be included in event details |
|
fun addValue(label: String, event: Any): Unit
Allows arbitrary values to be included in event details |
|
fun toJSONString(): String
Allows this object type to converted to a JSON String This method is used internally, you do not need to use it |