UNPKG

genesys-statistics-client-js

Version:
100 lines (83 loc) 2.94 kB
/** * 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', 'model/StatisticValue'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./StatisticValue')); } else { // Browser globals (root is window) if (!root.StatisticsService) { root.StatisticsService = {}; } root.StatisticsService.StatisticData = factory(root.StatisticsService.ApiClient, root.StatisticsService.StatisticValue); } }(this, function(ApiClient, StatisticValue) { 'use strict'; /** * The StatisticData model module. * @module model/StatisticData * @version 9.0.000.37.638 */ /** * Constructs a new <code>StatisticData</code>. * @alias module:model/StatisticData * @class * @param statistics {Array.<module:model/StatisticValue>} * @param subscriptionId {String} */ var exports = function(statistics, subscriptionId) { var _this = this; _this['statistics'] = statistics; _this['subscriptionId'] = subscriptionId; }; /** * Constructs a <code>StatisticData</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/StatisticData} obj Optional instance to populate. * @return {module:model/StatisticData} The populated <code>StatisticData</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('operationId')) { obj['operationId'] = ApiClient.convertToType(data['operationId'], 'String'); } if (data.hasOwnProperty('statistics')) { obj['statistics'] = ApiClient.convertToType(data['statistics'], [StatisticValue]); } if (data.hasOwnProperty('subscriptionId')) { obj['subscriptionId'] = ApiClient.convertToType(data['subscriptionId'], 'String'); } } return obj; } /** * @member {String} operationId */ exports.prototype['operationId'] = undefined; /** * @member {Array.<module:model/StatisticValue>} statistics */ exports.prototype['statistics'] = undefined; /** * @member {String} subscriptionId */ exports.prototype['subscriptionId'] = undefined; return exports; }));