@blues-inc/notehub-js 1.0.37-beta.19 → 1.0.37-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +12 -11
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +1 -1
  4. package/dist/api/AuthorizationApi.js +1 -1
  5. package/dist/api/BillingAccountApi.js +1 -1
  6. package/dist/api/DeviceApi.js +1 -1
  7. package/dist/api/EventApi.js +1 -1
  8. package/dist/api/ExternalDevicesApi.js +1 -1
  9. package/dist/api/MonitorApi.js +1 -1
  10. package/dist/api/ProjectApi.js +1 -1
  11. package/dist/api/RouteApi.js +1 -1
  12. package/dist/api/UsageApi.js +285 -0
  13. package/dist/api/WebhookApi.js +1 -1
  14. package/dist/index.js +56 -70
  15. package/dist/model/Alert.js +1 -1
  16. package/dist/model/AlertDataInner.js +1 -1
  17. package/dist/model/AlertNotificationsInner.js +1 -1
  18. package/dist/model/Aws.js +1 -1
  19. package/dist/model/AwsFilter.js +1 -1
  20. package/dist/model/AwsTransform.js +1 -1
  21. package/dist/model/Azure.js +1 -1
  22. package/dist/model/BillingAccount.js +1 -1
  23. package/dist/model/Body.js +1 -1
  24. package/dist/model/CloneProjectRequest.js +1 -1
  25. package/dist/model/Contact.js +1 -1
  26. package/dist/model/CreateFleetRequest.js +1 -1
  27. package/dist/model/CreateMonitor.js +1 -1
  28. package/dist/model/CreateProductRequest.js +1 -1
  29. package/dist/model/CreateProjectRequest.js +1 -1
  30. package/dist/model/CreateUpdateRepository.js +1 -1
  31. package/dist/model/CurrentFirmware.js +1 -1
  32. package/dist/model/DFUEnv.js +1 -1
  33. package/dist/model/DFUState.js +1 -1
  34. package/dist/model/DataField.js +1 -1
  35. package/dist/model/DataSetField.js +1 -1
  36. package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
  37. package/dist/model/Device.js +7 -51
  38. package/dist/model/DeviceDfuHistory.js +1 -1
  39. package/dist/model/DeviceDfuHistoryCurrent.js +1 -1
  40. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  41. package/dist/model/DeviceDfuStateMachine.js +1 -1
  42. package/dist/model/DeviceDfuStateMachineNode.js +1 -1
  43. package/dist/model/DeviceDfuStatus.js +1 -1
  44. package/dist/model/DeviceDfuStatusPage.js +1 -1
  45. package/dist/model/DeviceSession.js +1 -1
  46. package/dist/model/DeviceTowerInfo.js +1 -1
  47. package/dist/model/DeviceUsage.js +1 -1
  48. package/dist/model/DfuActionRequest.js +1 -1
  49. package/dist/model/EmailNotification.js +1 -1
  50. package/dist/model/EnvTreeJsonNode.js +1 -1
  51. package/dist/model/EnvVar.js +1 -1
  52. package/dist/model/EnvironmentVariables.js +1 -1
  53. package/dist/model/Error.js +1 -1
  54. package/dist/model/Event.js +1 -1
  55. package/dist/model/Firmware.js +1 -1
  56. package/dist/model/FirmwareInfo.js +1 -1
  57. package/dist/model/Fleet.js +1 -1
  58. package/dist/model/GetAlerts200Response.js +1 -1
  59. package/dist/model/GetBillingAccounts200Response.js +1 -1
  60. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
  61. package/dist/model/GetDeviceFleets200Response.js +1 -1
  62. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  63. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
  64. package/dist/model/GetDeviceLatest200Response.js +1 -1
  65. package/dist/model/GetDevicePublicKey200Response.js +1 -1
  66. package/dist/model/GetDeviceSessions200Response.js +1 -1
  67. package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
  68. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
  69. package/dist/model/GetProjectDevices200Response.js +1 -1
  70. package/dist/model/GetProjectEvents200Response.js +1 -1
  71. package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
  72. package/dist/model/GetProjectMembers200Response.js +1 -1
  73. package/dist/model/GetProjectProducts200Response.js +1 -1
  74. package/dist/model/GetProjects200Response.js +1 -1
  75. package/dist/model/GetWebhooks200Response.js +1 -1
  76. package/dist/model/Google.js +1 -1
  77. package/dist/model/HandleNoteChanges200Response.js +1 -1
  78. package/dist/model/HandleNoteGet200Response.js +1 -1
  79. package/dist/model/HandleNoteSignal200Response.js +1 -1
  80. package/dist/model/HandleNotefileChanges200Response.js +1 -1
  81. package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
  82. package/dist/model/HandleNotefileDeleteRequest.js +1 -1
  83. package/dist/model/Http.js +1 -1
  84. package/dist/model/Location.js +1 -1
  85. package/dist/model/Login200Response.js +1 -1
  86. package/dist/model/LoginRequest.js +1 -1
  87. package/dist/model/Monitor.js +1 -1
  88. package/dist/model/MonitorAlertRoutesInner.js +1 -1
  89. package/dist/model/Mqtt.js +1 -1
  90. package/dist/model/Note.js +1 -1
  91. package/dist/model/NotefileSchema.js +1 -1
  92. package/dist/model/NotehubRoute.js +1 -1
  93. package/dist/model/NotehubRouteSchema.js +1 -1
  94. package/dist/model/OAuth2Error.js +1 -1
  95. package/dist/model/OAuth2TokenResponse.js +1 -1
  96. package/dist/model/PersonalAccessToken.js +1 -1
  97. package/dist/model/PersonalAccessTokenCreatedBy.js +1 -1
  98. package/dist/model/PersonalAccessTokenInfo.js +1 -1
  99. package/dist/model/PersonalAccessTokenSecret.js +1 -1
  100. package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
  101. package/dist/model/Product.js +1 -1
  102. package/dist/model/Project.js +1 -1
  103. package/dist/model/ProjectMember.js +1 -1
  104. package/dist/model/Proxy.js +1 -1
  105. package/dist/model/PutDeviceFleetsRequest.js +1 -1
  106. package/dist/model/Radresponder.js +1 -1
  107. package/dist/model/Repository.js +1 -1
  108. package/dist/model/RouteLog.js +1 -1
  109. package/dist/model/SchemaProperty.js +1 -1
  110. package/dist/model/SimUsage.js +1 -1
  111. package/dist/model/Slack.js +1 -1
  112. package/dist/model/SlackBearerNotification.js +1 -1
  113. package/dist/model/SlackTransform.js +1 -1
  114. package/dist/model/SlackWebHookNotification.js +1 -1
  115. package/dist/model/Snowflake.js +1 -1
  116. package/dist/model/Thingworx.js +1 -1
  117. package/dist/model/TowerLocation.js +1 -1
  118. package/dist/model/Twilio.js +1 -1
  119. package/dist/model/UpdateFleetRequest.js +1 -1
  120. package/dist/model/UploadMetadata.js +1 -1
  121. package/dist/model/{AnalyticsEventsData.js → UsageData.js} +39 -33
  122. package/dist/model/{CumulativeDataUsage.js → UsageEventsData.js} +52 -41
  123. package/dist/model/{AnalyticsEventsResponse.js → UsageEventsResponse.js} +25 -25
  124. package/dist/model/{AnalyticsRouteLogsData.js → UsageRouteLogsData.js} +38 -24
  125. package/dist/model/{AnalyticsSessionsResponse.js → UsageRouteLogsResponse.js} +25 -25
  126. package/dist/model/{AnalyticsSessionsData.js → UsageSessionsData.js} +37 -33
  127. package/dist/model/{AnalyticsRouteLogsResponse.js → UsageSessionsResponse.js} +25 -25
  128. package/dist/model/UserDbRoute.js +1 -1
  129. package/dist/model/UserDfuStateMachine.js +1 -1
  130. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  131. package/dist/model/UserFirmwareInfo.js +1 -1
  132. package/dist/model/WebhookSettings.js +1 -1
  133. package/package.json +1 -1
  134. package/dist/model/CellularPlan.js +0 -168
  135. package/dist/model/DeviceSatellitePlan.js +0 -196
  136. package/dist/model/SatellitePlan.js +0 -166
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SchemaProperty model module.
31
31
  * @module model/SchemaProperty
32
- * @version 1.0.37-beta.19
32
+ * @version 1.0.37-beta.20
33
33
  */
34
34
  var SchemaProperty = /*#__PURE__*/function () {
35
35
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The SimUsage model module.
28
28
  * @module model/SimUsage
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var SimUsage = /*#__PURE__*/function () {
32
32
  /**
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  /**
29
29
  * The Slack model module.
30
30
  * @module model/Slack
31
- * @version 1.0.37-beta.19
31
+ * @version 1.0.37-beta.20
32
32
  */
33
33
  var Slack = /*#__PURE__*/function () {
34
34
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The SlackBearerNotification model module.
28
28
  * @module model/SlackBearerNotification
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var SlackBearerNotification = /*#__PURE__*/function () {
32
32
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The SlackTransform model module.
28
28
  * @module model/SlackTransform
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var SlackTransform = /*#__PURE__*/function () {
32
32
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The SlackWebHookNotification model module.
28
28
  * @module model/SlackWebHookNotification
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var SlackWebHookNotification = /*#__PURE__*/function () {
32
32
  /**
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  /**
29
29
  * The Snowflake model module.
30
30
  * @module model/Snowflake
31
- * @version 1.0.37-beta.19
31
+ * @version 1.0.37-beta.20
32
32
  */
33
33
  var Snowflake = /*#__PURE__*/function () {
34
34
  /**
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  /**
29
29
  * The Thingworx model module.
30
30
  * @module model/Thingworx
31
- * @version 1.0.37-beta.19
31
+ * @version 1.0.37-beta.20
32
32
  */
33
33
  var Thingworx = /*#__PURE__*/function () {
34
34
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The TowerLocation model module.
28
28
  * @module model/TowerLocation
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var TowerLocation = /*#__PURE__*/function () {
32
32
  /**
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  /**
28
28
  * The Twilio model module.
29
29
  * @module model/Twilio
30
- * @version 1.0.37-beta.19
30
+ * @version 1.0.37-beta.20
31
31
  */
32
32
  var Twilio = /*#__PURE__*/function () {
33
33
  /**
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The UpdateFleetRequest model module.
28
28
  * @module model/UpdateFleetRequest
29
- * @version 1.0.37-beta.19
29
+ * @version 1.0.37-beta.20
30
30
  */
31
31
  var UpdateFleetRequest = /*#__PURE__*/function () {
32
32
  /**
@@ -27,7 +27,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  /**
28
28
  * The UploadMetadata model module.
29
29
  * @module model/UploadMetadata
30
- * @version 1.0.37-beta.19
30
+ * @version 1.0.37-beta.20
31
31
  */
32
32
  var UploadMetadata = /*#__PURE__*/function () {
33
33
  /**
@@ -27,21 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The AnalyticsEventsData model module.
31
- * @module model/AnalyticsEventsData
32
- * @version 1.0.37-beta.19
30
+ * The UsageData model module.
31
+ * @module model/UsageData
32
+ * @version 1.0.37-beta.20
33
33
  */
34
- var AnalyticsEventsData = /*#__PURE__*/function () {
34
+ var UsageData = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>AnalyticsEventsData</code>.
37
- * @alias module:model/AnalyticsEventsData
38
- * @param events {Number}
36
+ * Constructs a new <code>UsageData</code>.
37
+ * @alias module:model/UsageData
39
38
  * @param period {Date}
40
- * @param platformEvents {Number}
39
+ * @param totalBytes {Number}
41
40
  */
42
- function AnalyticsEventsData(events, period, platformEvents) {
43
- _classCallCheck(this, AnalyticsEventsData);
44
- AnalyticsEventsData.initialize(this, events, period, platformEvents);
41
+ function UsageData(period, totalBytes) {
42
+ _classCallCheck(this, UsageData);
43
+ UsageData.initialize(this, period, totalBytes);
45
44
  }
46
45
 
47
46
  /**
@@ -49,34 +48,36 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
49
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
49
  * Only for internal use.
51
50
  */
52
- return _createClass(AnalyticsEventsData, null, [{
51
+ return _createClass(UsageData, null, [{
53
52
  key: "initialize",
54
- value: function initialize(obj, events, period, platformEvents) {
55
- obj['events'] = events;
53
+ value: function initialize(obj, period, totalBytes) {
56
54
  obj['period'] = period;
57
- obj['platform_events'] = platformEvents;
55
+ obj['total_bytes'] = totalBytes;
58
56
  }
59
57
 
60
58
  /**
61
- * Constructs a <code>AnalyticsEventsData</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Constructs a <code>UsageData</code> from a plain JavaScript object, optionally creating a new instance.
62
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
61
  * @param {Object} data The plain JavaScript object bearing properties of interest.
64
- * @param {module:model/AnalyticsEventsData} obj Optional instance to populate.
65
- * @return {module:model/AnalyticsEventsData} The populated <code>AnalyticsEventsData</code> instance.
62
+ * @param {module:model/UsageData} obj Optional instance to populate.
63
+ * @return {module:model/UsageData} The populated <code>UsageData</code> instance.
66
64
  */
67
65
  }, {
68
66
  key: "constructFromObject",
69
67
  value: function constructFromObject(data, obj) {
70
68
  if (data) {
71
- obj = obj || new AnalyticsEventsData();
72
- if (data.hasOwnProperty('events')) {
73
- obj['events'] = _ApiClient["default"].convertToType(data['events'], 'Number');
69
+ obj = obj || new UsageData();
70
+ if (data.hasOwnProperty('bytes_received')) {
71
+ obj['bytes_received'] = _ApiClient["default"].convertToType(data['bytes_received'], 'Number');
72
+ }
73
+ if (data.hasOwnProperty('bytes_sent')) {
74
+ obj['bytes_sent'] = _ApiClient["default"].convertToType(data['bytes_sent'], 'Number');
74
75
  }
75
76
  if (data.hasOwnProperty('period')) {
76
77
  obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Date');
77
78
  }
78
- if (data.hasOwnProperty('platform_events')) {
79
- obj['platform_events'] = _ApiClient["default"].convertToType(data['platform_events'], 'Number');
79
+ if (data.hasOwnProperty('total_bytes')) {
80
+ obj['total_bytes'] = _ApiClient["default"].convertToType(data['total_bytes'], 'Number');
80
81
  }
81
82
  } else if (data === null) {
82
83
  return null;
@@ -85,15 +86,15 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
85
86
  }
86
87
 
87
88
  /**
88
- * Validates the JSON data with respect to <code>AnalyticsEventsData</code>.
89
+ * Validates the JSON data with respect to <code>UsageData</code>.
89
90
  * @param {Object} data The plain JavaScript object bearing properties of interest.
90
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsEventsData</code>.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageData</code>.
91
92
  */
92
93
  }, {
93
94
  key: "validateJSON",
94
95
  value: function validateJSON(data) {
95
96
  // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(AnalyticsEventsData.RequiredProperties),
97
+ var _iterator = _createForOfIteratorHelper(UsageData.RequiredProperties),
97
98
  _step;
98
99
  try {
99
100
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -111,20 +112,25 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
111
112
  }
112
113
  }]);
113
114
  }();
114
- AnalyticsEventsData.RequiredProperties = ["events", "period", "platform_events"];
115
+ UsageData.RequiredProperties = ["period", "total_bytes"];
116
+
117
+ /**
118
+ * @member {Number} bytes_received
119
+ */
120
+ UsageData.prototype['bytes_received'] = undefined;
115
121
 
116
122
  /**
117
- * @member {Number} events
123
+ * @member {Number} bytes_sent
118
124
  */
119
- AnalyticsEventsData.prototype['events'] = undefined;
125
+ UsageData.prototype['bytes_sent'] = undefined;
120
126
 
121
127
  /**
122
128
  * @member {Date} period
123
129
  */
124
- AnalyticsEventsData.prototype['period'] = undefined;
130
+ UsageData.prototype['period'] = undefined;
125
131
 
126
132
  /**
127
- * @member {Number} platform_events
133
+ * @member {Number} total_bytes
128
134
  */
129
- AnalyticsEventsData.prototype['platform_events'] = undefined;
130
- var _default = exports["default"] = AnalyticsEventsData;
135
+ UsageData.prototype['total_bytes'] = undefined;
136
+ var _default = exports["default"] = UsageData;
@@ -27,21 +27,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The CumulativeDataUsage model module.
31
- * @module model/CumulativeDataUsage
32
- * @version 1.0.37-beta.19
30
+ * The UsageEventsData model module.
31
+ * @module model/UsageEventsData
32
+ * @version 1.0.37-beta.20
33
33
  */
34
- var CumulativeDataUsage = /*#__PURE__*/function () {
34
+ var UsageEventsData = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>CumulativeDataUsage</code>.
37
- * @alias module:model/CumulativeDataUsage
38
- * @param kbRemaining {Number} Kilobytes remaining in the plan
39
- * @param kbTotal {Number} Total Kilobytes included in the plan
40
- * @param kbUsed {Number} Kilobytes used to date
36
+ * Constructs a new <code>UsageEventsData</code>.
37
+ * @alias module:model/UsageEventsData
38
+ * @param device {String}
39
+ * @param period {Date}
40
+ * @param platformEvents {Number}
41
+ * @param totalEvents {Number}
41
42
  */
42
- function CumulativeDataUsage(kbRemaining, kbTotal, kbUsed) {
43
- _classCallCheck(this, CumulativeDataUsage);
44
- CumulativeDataUsage.initialize(this, kbRemaining, kbTotal, kbUsed);
43
+ function UsageEventsData(device, period, platformEvents, totalEvents) {
44
+ _classCallCheck(this, UsageEventsData);
45
+ UsageEventsData.initialize(this, device, period, platformEvents, totalEvents);
45
46
  }
46
47
 
47
48
  /**
@@ -49,34 +50,38 @@ var CumulativeDataUsage = /*#__PURE__*/function () {
49
50
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
51
  * Only for internal use.
51
52
  */
52
- return _createClass(CumulativeDataUsage, null, [{
53
+ return _createClass(UsageEventsData, null, [{
53
54
  key: "initialize",
54
- value: function initialize(obj, kbRemaining, kbTotal, kbUsed) {
55
- obj['kb_remaining'] = kbRemaining;
56
- obj['kb_total'] = kbTotal;
57
- obj['kb_used'] = kbUsed;
55
+ value: function initialize(obj, device, period, platformEvents, totalEvents) {
56
+ obj['device'] = device;
57
+ obj['period'] = period;
58
+ obj['platform_events'] = platformEvents;
59
+ obj['total_events'] = totalEvents;
58
60
  }
59
61
 
60
62
  /**
61
- * Constructs a <code>CumulativeDataUsage</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Constructs a <code>UsageEventsData</code> from a plain JavaScript object, optionally creating a new instance.
62
64
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
65
  * @param {Object} data The plain JavaScript object bearing properties of interest.
64
- * @param {module:model/CumulativeDataUsage} obj Optional instance to populate.
65
- * @return {module:model/CumulativeDataUsage} The populated <code>CumulativeDataUsage</code> instance.
66
+ * @param {module:model/UsageEventsData} obj Optional instance to populate.
67
+ * @return {module:model/UsageEventsData} The populated <code>UsageEventsData</code> instance.
66
68
  */
67
69
  }, {
68
70
  key: "constructFromObject",
69
71
  value: function constructFromObject(data, obj) {
70
72
  if (data) {
71
- obj = obj || new CumulativeDataUsage();
72
- if (data.hasOwnProperty('kb_remaining')) {
73
- obj['kb_remaining'] = _ApiClient["default"].convertToType(data['kb_remaining'], 'Number');
73
+ obj = obj || new UsageEventsData();
74
+ if (data.hasOwnProperty('device')) {
75
+ obj['device'] = _ApiClient["default"].convertToType(data['device'], 'String');
74
76
  }
75
- if (data.hasOwnProperty('kb_total')) {
76
- obj['kb_total'] = _ApiClient["default"].convertToType(data['kb_total'], 'Number');
77
+ if (data.hasOwnProperty('period')) {
78
+ obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Date');
77
79
  }
78
- if (data.hasOwnProperty('kb_used')) {
79
- obj['kb_used'] = _ApiClient["default"].convertToType(data['kb_used'], 'Number');
80
+ if (data.hasOwnProperty('platform_events')) {
81
+ obj['platform_events'] = _ApiClient["default"].convertToType(data['platform_events'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('total_events')) {
84
+ obj['total_events'] = _ApiClient["default"].convertToType(data['total_events'], 'Number');
80
85
  }
81
86
  } else if (data === null) {
82
87
  return null;
@@ -85,15 +90,15 @@ var CumulativeDataUsage = /*#__PURE__*/function () {
85
90
  }
86
91
 
87
92
  /**
88
- * Validates the JSON data with respect to <code>CumulativeDataUsage</code>.
93
+ * Validates the JSON data with respect to <code>UsageEventsData</code>.
89
94
  * @param {Object} data The plain JavaScript object bearing properties of interest.
90
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CumulativeDataUsage</code>.
95
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageEventsData</code>.
91
96
  */
92
97
  }, {
93
98
  key: "validateJSON",
94
99
  value: function validateJSON(data) {
95
100
  // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(CumulativeDataUsage.RequiredProperties),
101
+ var _iterator = _createForOfIteratorHelper(UsageEventsData.RequiredProperties),
97
102
  _step;
98
103
  try {
99
104
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -102,32 +107,38 @@ var CumulativeDataUsage = /*#__PURE__*/function () {
102
107
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
108
  }
104
109
  }
110
+ // ensure the json data is a string
105
111
  } catch (err) {
106
112
  _iterator.e(err);
107
113
  } finally {
108
114
  _iterator.f();
109
115
  }
116
+ if (data['device'] && !(typeof data['device'] === 'string' || data['device'] instanceof String)) {
117
+ throw new Error("Expected the field `device` to be a primitive type in the JSON string but got " + data['device']);
118
+ }
110
119
  return true;
111
120
  }
112
121
  }]);
113
122
  }();
114
- CumulativeDataUsage.RequiredProperties = ["kb_remaining", "kb_total", "kb_used"];
123
+ UsageEventsData.RequiredProperties = ["device", "period", "platform_events", "total_events"];
124
+
125
+ /**
126
+ * @member {String} device
127
+ */
128
+ UsageEventsData.prototype['device'] = undefined;
115
129
 
116
130
  /**
117
- * Kilobytes remaining in the plan
118
- * @member {Number} kb_remaining
131
+ * @member {Date} period
119
132
  */
120
- CumulativeDataUsage.prototype['kb_remaining'] = undefined;
133
+ UsageEventsData.prototype['period'] = undefined;
121
134
 
122
135
  /**
123
- * Total Kilobytes included in the plan
124
- * @member {Number} kb_total
136
+ * @member {Number} platform_events
125
137
  */
126
- CumulativeDataUsage.prototype['kb_total'] = undefined;
138
+ UsageEventsData.prototype['platform_events'] = undefined;
127
139
 
128
140
  /**
129
- * Kilobytes used to date
130
- * @member {Number} kb_used
141
+ * @member {Number} total_events
131
142
  */
132
- CumulativeDataUsage.prototype['kb_used'] = undefined;
133
- var _default = exports["default"] = CumulativeDataUsage;
143
+ UsageEventsData.prototype['total_events'] = undefined;
144
+ var _default = exports["default"] = UsageEventsData;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _AnalyticsEventsData = _interopRequireDefault(require("./AnalyticsEventsData"));
8
+ var _UsageEventsData = _interopRequireDefault(require("./UsageEventsData"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
11
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -28,19 +28,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * The AnalyticsEventsResponse model module.
32
- * @module model/AnalyticsEventsResponse
33
- * @version 1.0.37-beta.19
31
+ * The UsageEventsResponse model module.
32
+ * @module model/UsageEventsResponse
33
+ * @version 1.0.37-beta.20
34
34
  */
35
- var AnalyticsEventsResponse = /*#__PURE__*/function () {
35
+ var UsageEventsResponse = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new <code>AnalyticsEventsResponse</code>.
38
- * @alias module:model/AnalyticsEventsResponse
39
- * @param data {Array.<module:model/AnalyticsEventsData>}
37
+ * Constructs a new <code>UsageEventsResponse</code>.
38
+ * @alias module:model/UsageEventsResponse
39
+ * @param data {Array.<module:model/UsageEventsData>}
40
40
  */
41
- function AnalyticsEventsResponse(data) {
42
- _classCallCheck(this, AnalyticsEventsResponse);
43
- AnalyticsEventsResponse.initialize(this, data);
41
+ function UsageEventsResponse(data) {
42
+ _classCallCheck(this, UsageEventsResponse);
43
+ UsageEventsResponse.initialize(this, data);
44
44
  }
45
45
 
46
46
  /**
@@ -48,26 +48,26 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
48
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
49
  * Only for internal use.
50
50
  */
51
- return _createClass(AnalyticsEventsResponse, null, [{
51
+ return _createClass(UsageEventsResponse, null, [{
52
52
  key: "initialize",
53
53
  value: function initialize(obj, data) {
54
54
  obj['data'] = data;
55
55
  }
56
56
 
57
57
  /**
58
- * Constructs a <code>AnalyticsEventsResponse</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Constructs a <code>UsageEventsResponse</code> from a plain JavaScript object, optionally creating a new instance.
59
59
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
60
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/AnalyticsEventsResponse} obj Optional instance to populate.
62
- * @return {module:model/AnalyticsEventsResponse} The populated <code>AnalyticsEventsResponse</code> instance.
61
+ * @param {module:model/UsageEventsResponse} obj Optional instance to populate.
62
+ * @return {module:model/UsageEventsResponse} The populated <code>UsageEventsResponse</code> instance.
63
63
  */
64
64
  }, {
65
65
  key: "constructFromObject",
66
66
  value: function constructFromObject(data, obj) {
67
67
  if (data) {
68
- obj = obj || new AnalyticsEventsResponse();
68
+ obj = obj || new UsageEventsResponse();
69
69
  if (data.hasOwnProperty('data')) {
70
- obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AnalyticsEventsData["default"]]);
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_UsageEventsData["default"]]);
71
71
  }
72
72
  } else if (data === null) {
73
73
  return null;
@@ -76,15 +76,15 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>AnalyticsEventsResponse</code>.
79
+ * Validates the JSON data with respect to <code>UsageEventsResponse</code>.
80
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
81
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsEventsResponse</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageEventsResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
85
85
  value: function validateJSON(data) {
86
86
  // check to make sure all required properties are present in the JSON string
87
- var _iterator = _createForOfIteratorHelper(AnalyticsEventsResponse.RequiredProperties),
87
+ var _iterator = _createForOfIteratorHelper(UsageEventsResponse.RequiredProperties),
88
88
  _step;
89
89
  try {
90
90
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -110,7 +110,7 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
110
110
  try {
111
111
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
112
112
  var item = _step2.value;
113
- _AnalyticsEventsData["default"].validateJsonObject(item);
113
+ _UsageEventsData["default"].validateJsonObject(item);
114
114
  }
115
115
  } catch (err) {
116
116
  _iterator2.e(err);
@@ -123,10 +123,10 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
123
123
  }
124
124
  }]);
125
125
  }();
126
- AnalyticsEventsResponse.RequiredProperties = ["data"];
126
+ UsageEventsResponse.RequiredProperties = ["data"];
127
127
 
128
128
  /**
129
- * @member {Array.<module:model/AnalyticsEventsData>} data
129
+ * @member {Array.<module:model/UsageEventsData>} data
130
130
  */
131
- AnalyticsEventsResponse.prototype['data'] = undefined;
132
- var _default = exports["default"] = AnalyticsEventsResponse;
131
+ UsageEventsResponse.prototype['data'] = undefined;
132
+ var _default = exports["default"] = UsageEventsResponse;