/**
* Copyright© 2016, Oracle and/or its affiliates. All rights reserved.
*/
/**
* Class that holds an analytics event.
* @constructor
* @global
*/
function AnalyticsEvent(name) {
// type and sessionID will be added dynamically if required, so that if they are not required they won't get serialized
// on the wire in JSON.
/**
* The name of the event.
* @type(String)
*/
this.name = name;
/**
* The timestamp of the event. The system will populate with the current time by default.
* @type(String)
*/
this.timestamp = new Date().toISOString();
/**
* The ID of the current session.
* @type {String}
*/
this.sessionID = null;
delete this.sessionID; // Just so that we can document!
/**
* Custom caller specifiable properties as key/value strings.
* @type {Object}
*/
this.properties = {};
}