genesys-statistics-client-js
Version:
Statistics Service API
128 lines (106 loc) • 3.59 kB
JavaScript
/**
* Statistics Service
* Statistics Service
*
* OpenAPI spec version: 9.0.000.37.638
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.5
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.StatisticsService) {
root.StatisticsService = {};
}
root.StatisticsService.StatisticValue = factory(root.StatisticsService.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The StatisticValue model module.
* @module model/StatisticValue
* @version 9.0.000.37.638
*/
/**
* Constructs a new <code>StatisticValue</code>.
* @alias module:model/StatisticValue
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>StatisticValue</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/StatisticValue} obj Optional instance to populate.
* @return {module:model/StatisticValue} The populated <code>StatisticValue</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('objectId')) {
obj['objectId'] = ApiClient.convertToType(data['objectId'], 'String');
}
if (data.hasOwnProperty('objectType')) {
obj['objectType'] = ApiClient.convertToType(data['objectType'], 'String');
}
if (data.hasOwnProperty('statisticId')) {
obj['statisticId'] = ApiClient.convertToType(data['statisticId'], 'String');
}
if (data.hasOwnProperty('timestamp')) {
obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'Number');
}
if (data.hasOwnProperty('value')) {
obj['value'] = ApiClient.convertToType(data['value'], Object);
}
}
return obj;
}
/**
* The name of the statistic used during the subscribe procedure.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* The ID of the object (in Stat Server's terms).
* @member {String} objectId
*/
exports.prototype['objectId'] = undefined;
/**
* The type of object.
* @member {String} objectType
*/
exports.prototype['objectType'] = undefined;
/**
* The ID of the statistic. This ID is unique inside the subscription.
* @member {String} statisticId
*/
exports.prototype['statisticId'] = undefined;
/**
* The timestamp when the statistic value was generated (provided by Stat Server).
* @member {Number} timestamp
*/
exports.prototype['timestamp'] = undefined;
/**
* The value of the statistic. Its structure reflects the structure of the Stat Server message.
* @member {Object} value
*/
exports.prototype['value'] = undefined;
return exports;
}));