@blues-inc/notehub-js 1.0.37-beta.11 → 1.0.37-beta.12

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 (135) hide show
  1. package/README.md +13 -13
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +1 -1
  4. package/dist/api/AuthorizationApi.js +3 -66
  5. package/dist/api/BillingAccountApi.js +1 -1
  6. package/dist/api/DeviceApi.js +8 -8
  7. package/dist/api/EventApi.js +1 -1
  8. package/dist/api/ExternalDevicesApi.js +1 -1
  9. package/dist/api/MonitorApi.js +10 -10
  10. package/dist/api/ProjectApi.js +14 -14
  11. package/dist/api/RouteApi.js +1 -1
  12. package/dist/api/UsageApi.js +105 -0
  13. package/dist/api/WebhookApi.js +1 -1
  14. package/dist/index.js +72 -65
  15. package/dist/model/Alert.js +91 -91
  16. package/dist/model/AlertDataInner.js +10 -10
  17. package/dist/model/AlertNotificationsInner.js +10 -10
  18. package/dist/model/AnalyticsEventsData.js +14 -14
  19. package/dist/model/AnalyticsEventsResponse.js +1 -1
  20. package/dist/model/AnalyticsRouteLogsData.js +15 -15
  21. package/dist/model/AnalyticsRouteLogsResponse.js +1 -1
  22. package/dist/model/AnalyticsSessionsData.js +14 -14
  23. package/dist/model/AnalyticsSessionsResponse.js +1 -1
  24. package/dist/model/Aws.js +86 -86
  25. package/dist/model/{HttpFilter.js → AwsFilter.js} +32 -32
  26. package/dist/model/{HttpTransform.js → AwsTransform.js} +21 -21
  27. package/dist/model/Azure.js +51 -51
  28. package/dist/model/BillingAccount.js +19 -19
  29. package/dist/model/Body.js +1 -1
  30. package/dist/model/CloneProjectRequest.js +25 -25
  31. package/dist/model/Contact.js +19 -19
  32. package/dist/model/CreateFleetRequest.js +1 -1
  33. package/dist/model/CreateMonitor.js +186 -186
  34. package/dist/model/CreateProductRequest.js +30 -30
  35. package/dist/model/CreateProjectRequest.js +20 -20
  36. package/dist/model/CreateUpdateRepository.js +18 -18
  37. package/dist/model/CurrentFirmware.js +12 -12
  38. package/dist/model/DFUEnv.js +1 -1
  39. package/dist/model/DFUState.js +60 -60
  40. package/dist/model/DataField.js +1 -1
  41. package/dist/model/DataSetField.js +14 -14
  42. package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
  43. package/dist/model/Device.js +134 -134
  44. package/dist/model/DeviceDfuHistory.js +15 -15
  45. package/dist/model/{DeviceDfuStatusCurrent.js → DeviceDfuHistoryCurrent.js} +52 -52
  46. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  47. package/dist/model/DeviceDfuStateMachine.js +14 -14
  48. package/dist/model/DeviceDfuStateMachineNode.js +27 -27
  49. package/dist/model/DeviceDfuStatus.js +15 -15
  50. package/dist/model/DeviceDfuStatusPage.js +1 -1
  51. package/dist/model/DeviceSession.js +278 -278
  52. package/dist/model/DeviceTowerInfo.js +15 -15
  53. package/dist/model/DeviceUsage.js +36 -36
  54. package/dist/model/DfuActionRequest.js +1 -1
  55. package/dist/model/EmailNotification.js +1 -1
  56. package/dist/model/EnvTreeJsonNode.js +76 -76
  57. package/dist/model/EnvVar.js +9 -9
  58. package/dist/model/EnvironmentVariables.js +1 -1
  59. package/dist/model/Error.js +38 -38
  60. package/dist/model/Event.js +340 -340
  61. package/dist/model/Firmware.js +45 -45
  62. package/dist/model/FirmwareInfo.js +71 -71
  63. package/dist/model/Fleet.js +31 -31
  64. package/dist/model/GetAlerts200Response.js +1 -1
  65. package/dist/model/GetBillingAccounts200Response.js +1 -1
  66. package/dist/model/{GetDeviceEnvironmentVariables200Response.js → GetDeviceEnvironmentVariablesByPin200Response.js} +30 -30
  67. package/dist/model/{GetProjectFleets200Response.js → GetDeviceFleets200Response.js} +20 -20
  68. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  69. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +15 -15
  70. package/dist/model/GetDeviceLatest200Response.js +1 -1
  71. package/dist/model/GetDevicePublicKey200Response.js +18 -18
  72. package/dist/model/GetDeviceSessions200Response.js +14 -14
  73. package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
  74. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  75. package/dist/model/GetProjectDevices200Response.js +1 -1
  76. package/dist/model/GetProjectEvents200Response.js +1 -1
  77. package/dist/model/GetProjectEventsByCursor200Response.js +16 -16
  78. package/dist/model/GetProjectMembers200Response.js +1 -1
  79. package/dist/model/GetProjectProducts200Response.js +1 -1
  80. package/dist/model/GetProjects200Response.js +1 -1
  81. package/dist/model/GetWebhooks200Response.js +1 -1
  82. package/dist/model/Google.js +35 -35
  83. package/dist/model/HandleNoteChanges200Response.js +10 -10
  84. package/dist/model/HandleNoteGet200Response.js +1 -1
  85. package/dist/model/HandleNoteSignal200Response.js +1 -1
  86. package/dist/model/HandleNotefileChanges200Response.js +10 -10
  87. package/dist/model/HandleNotefileChangesPending200Response.js +15 -15
  88. package/dist/model/HandleNotefileDeleteRequest.js +1 -1
  89. package/dist/model/Http.js +43 -43
  90. package/dist/model/Location.js +38 -38
  91. package/dist/model/Login200Response.js +1 -1
  92. package/dist/model/LoginRequest.js +12 -12
  93. package/dist/model/Monitor.js +135 -135
  94. package/dist/model/MonitorAlertRoutesInner.js +12 -12
  95. package/dist/model/Mqtt.js +91 -91
  96. package/dist/model/Note.js +1 -1
  97. package/dist/model/NotefileSchema.js +1 -1
  98. package/dist/model/NotehubRoute.js +30 -30
  99. package/dist/model/NotehubRouteSchema.js +80 -80
  100. package/dist/model/PersonalAccessToken.js +168 -0
  101. package/dist/model/PersonalAccessTokenCreatedBy.js +116 -0
  102. package/dist/model/PersonalAccessTokenInfo.js +121 -0
  103. package/dist/model/PersonalAccessTokenSecret.js +105 -0
  104. package/dist/model/PostProvisionProjectDeviceRequest.js +14 -14
  105. package/dist/model/Product.js +29 -29
  106. package/dist/model/Project.js +35 -35
  107. package/dist/model/ProjectMember.js +19 -19
  108. package/dist/model/Proxy.js +21 -21
  109. package/dist/model/PutDeviceFleetsRequest.js +1 -1
  110. package/dist/model/Radresponder.js +28 -28
  111. package/dist/model/Repository.js +22 -22
  112. package/dist/model/RouteLog.js +28 -28
  113. package/dist/model/SchemaProperty.js +34 -36
  114. package/dist/model/SimUsage.js +20 -20
  115. package/dist/model/Slack.js +71 -71
  116. package/dist/model/SlackBearerNotification.js +14 -14
  117. package/dist/model/{SnowflakeTransform.js → SlackTransform.js} +19 -19
  118. package/dist/model/SlackWebHookNotification.js +14 -14
  119. package/dist/model/Snowflake.js +57 -57
  120. package/dist/model/Thingworx.js +36 -36
  121. package/dist/model/TowerLocation.js +58 -58
  122. package/dist/model/Twilio.js +46 -46
  123. package/dist/model/UpdateFleetRequest.js +14 -14
  124. package/dist/model/UploadMetadata.js +68 -68
  125. package/dist/model/{QuestionDataResponseMap.js → UsageData.js} +45 -52
  126. package/dist/model/UserDbRoute.js +26 -26
  127. package/dist/model/UserDfuStateMachine.js +14 -14
  128. package/dist/model/UserDfuStateMachineStatus.js +9 -9
  129. package/dist/model/UserFirmwareInfo.js +1 -1
  130. package/dist/model/WebhookSettings.js +1 -1
  131. package/package.json +1 -1
  132. package/dist/model/DataSet.js +0 -164
  133. package/dist/model/OAuth2Error.js +0 -166
  134. package/dist/model/OAuth2TokenResponse.js +0 -154
  135. package/dist/model/QuestionDataResponseLineChart.js +0 -204
@@ -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 _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
8
+ var _AwsFilter = _interopRequireDefault(require("./AwsFilter"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -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.11
30
+ * @version 1.0.37-beta.12
31
31
  */
32
32
  var Twilio = /*#__PURE__*/function () {
33
33
  /**
@@ -61,23 +61,17 @@ var Twilio = /*#__PURE__*/function () {
61
61
  value: function constructFromObject(data, obj) {
62
62
  if (data) {
63
63
  obj = obj || new Twilio();
64
- if (data.hasOwnProperty('fleets')) {
65
- obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
66
- }
67
- if (data.hasOwnProperty('filter')) {
68
- obj['filter'] = _HttpFilter["default"].constructFromObject(data['filter']);
69
- }
70
- if (data.hasOwnProperty('timeout')) {
71
- obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
72
- }
73
64
  if (data.hasOwnProperty('account_sid')) {
74
65
  obj['account_sid'] = _ApiClient["default"].convertToType(data['account_sid'], 'String');
75
66
  }
76
67
  if (data.hasOwnProperty('auth_token')) {
77
68
  obj['auth_token'] = _ApiClient["default"].convertToType(data['auth_token'], 'String');
78
69
  }
79
- if (data.hasOwnProperty('to')) {
80
- obj['to'] = _ApiClient["default"].convertToType(data['to'], 'String');
70
+ if (data.hasOwnProperty('filter')) {
71
+ obj['filter'] = _AwsFilter["default"].constructFromObject(data['filter']);
72
+ }
73
+ if (data.hasOwnProperty('fleets')) {
74
+ obj['fleets'] = _ApiClient["default"].convertToType(data['fleets'], ['String']);
81
75
  }
82
76
  if (data.hasOwnProperty('from')) {
83
77
  obj['from'] = _ApiClient["default"].convertToType(data['from'], 'String');
@@ -88,6 +82,12 @@ var Twilio = /*#__PURE__*/function () {
88
82
  if (data.hasOwnProperty('throttle_ms')) {
89
83
  obj['throttle_ms'] = _ApiClient["default"].convertToType(data['throttle_ms'], 'Number');
90
84
  }
85
+ if (data.hasOwnProperty('timeout')) {
86
+ obj['timeout'] = _ApiClient["default"].convertToType(data['timeout'], 'Number');
87
+ }
88
+ if (data.hasOwnProperty('to')) {
89
+ obj['to'] = _ApiClient["default"].convertToType(data['to'], 'String');
90
+ }
91
91
  } else if (data === null) {
92
92
  return null;
93
93
  }
@@ -102,15 +102,6 @@ var Twilio = /*#__PURE__*/function () {
102
102
  }, {
103
103
  key: "validateJSON",
104
104
  value: function validateJSON(data) {
105
- // ensure the json data is an array
106
- if (!Array.isArray(data['fleets'])) {
107
- throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
108
- }
109
- // validate the optional field `filter`
110
- if (data['filter']) {
111
- // data not null
112
- _HttpFilter["default"].validateJSON(data['filter']);
113
- }
114
105
  // ensure the json data is a string
115
106
  if (data['account_sid'] && !(typeof data['account_sid'] === 'string' || data['account_sid'] instanceof String)) {
116
107
  throw new Error("Expected the field `account_sid` to be a primitive type in the JSON string but got " + data['account_sid']);
@@ -119,9 +110,14 @@ var Twilio = /*#__PURE__*/function () {
119
110
  if (data['auth_token'] && !(typeof data['auth_token'] === 'string' || data['auth_token'] instanceof String)) {
120
111
  throw new Error("Expected the field `auth_token` to be a primitive type in the JSON string but got " + data['auth_token']);
121
112
  }
122
- // ensure the json data is a string
123
- if (data['to'] && !(typeof data['to'] === 'string' || data['to'] instanceof String)) {
124
- throw new Error("Expected the field `to` to be a primitive type in the JSON string but got " + data['to']);
113
+ // validate the optional field `filter`
114
+ if (data['filter']) {
115
+ // data not null
116
+ _AwsFilter["default"].validateJSON(data['filter']);
117
+ }
118
+ // ensure the json data is an array
119
+ if (!Array.isArray(data['fleets'])) {
120
+ throw new Error("Expected the field `fleets` to be an array in the JSON data but got " + data['fleets']);
125
121
  }
126
122
  // ensure the json data is a string
127
123
  if (data['from'] && !(typeof data['from'] === 'string' || data['from'] instanceof String)) {
@@ -131,28 +127,14 @@ var Twilio = /*#__PURE__*/function () {
131
127
  if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
132
128
  throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
133
129
  }
130
+ // ensure the json data is a string
131
+ if (data['to'] && !(typeof data['to'] === 'string' || data['to'] instanceof String)) {
132
+ throw new Error("Expected the field `to` to be a primitive type in the JSON string but got " + data['to']);
133
+ }
134
134
  return true;
135
135
  }
136
136
  }]);
137
137
  }();
138
- /**
139
- * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
140
- * @member {Array.<String>} fleets
141
- */
142
- Twilio.prototype['fleets'] = undefined;
143
-
144
- /**
145
- * @member {module:model/HttpFilter} filter
146
- */
147
- Twilio.prototype['filter'] = undefined;
148
-
149
- /**
150
- * Timeout in seconds for each request
151
- * @member {Number} timeout
152
- * @default 15
153
- */
154
- Twilio.prototype['timeout'] = 15;
155
-
156
138
  /**
157
139
  * Twilio Account SID
158
140
  * @member {String} account_sid
@@ -166,10 +148,15 @@ Twilio.prototype['account_sid'] = undefined;
166
148
  Twilio.prototype['auth_token'] = undefined;
167
149
 
168
150
  /**
169
- * Phone number to send SMS to, leave blank to use notefile, must use E.164 format
170
- * @member {String} to
151
+ * @member {module:model/AwsFilter} filter
171
152
  */
172
- Twilio.prototype['to'] = undefined;
153
+ Twilio.prototype['filter'] = undefined;
154
+
155
+ /**
156
+ * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
157
+ * @member {Array.<String>} fleets
158
+ */
159
+ Twilio.prototype['fleets'] = undefined;
173
160
 
174
161
  /**
175
162
  * Phone number to send SMS from, leave blank to use notefile, must use E.164 format
@@ -187,4 +174,17 @@ Twilio.prototype['message'] = undefined;
187
174
  * @member {Number} throttle_ms
188
175
  */
189
176
  Twilio.prototype['throttle_ms'] = undefined;
177
+
178
+ /**
179
+ * Timeout in seconds for each request
180
+ * @member {Number} timeout
181
+ * @default 15
182
+ */
183
+ Twilio.prototype['timeout'] = 15;
184
+
185
+ /**
186
+ * Phone number to send SMS to, leave blank to use notefile, must use E.164 format
187
+ * @member {String} to
188
+ */
189
+ Twilio.prototype['to'] = undefined;
190
190
  var _default = exports["default"] = Twilio;
@@ -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.11
29
+ * @version 1.0.37-beta.12
30
30
  */
31
31
  var UpdateFleetRequest = /*#__PURE__*/function () {
32
32
  /**
@@ -59,12 +59,12 @@ var UpdateFleetRequest = /*#__PURE__*/function () {
59
59
  value: function constructFromObject(data, obj) {
60
60
  if (data) {
61
61
  obj = obj || new UpdateFleetRequest();
62
- if (data.hasOwnProperty('label')) {
63
- obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
64
- }
65
62
  if (data.hasOwnProperty('addDevices')) {
66
63
  obj['addDevices'] = _ApiClient["default"].convertToType(data['addDevices'], ['String']);
67
64
  }
65
+ if (data.hasOwnProperty('label')) {
66
+ obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
67
+ }
68
68
  if (data.hasOwnProperty('removeDevices')) {
69
69
  obj['removeDevices'] = _ApiClient["default"].convertToType(data['removeDevices'], ['String']);
70
70
  }
@@ -88,14 +88,14 @@ var UpdateFleetRequest = /*#__PURE__*/function () {
88
88
  }, {
89
89
  key: "validateJSON",
90
90
  value: function validateJSON(data) {
91
- // ensure the json data is a string
92
- if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
93
- throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
94
- }
95
91
  // ensure the json data is an array
96
92
  if (!Array.isArray(data['addDevices'])) {
97
93
  throw new Error("Expected the field `addDevices` to be an array in the JSON data but got " + data['addDevices']);
98
94
  }
95
+ // ensure the json data is a string
96
+ if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
97
+ throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
98
+ }
99
99
  // ensure the json data is an array
100
100
  if (!Array.isArray(data['removeDevices'])) {
101
101
  throw new Error("Expected the field `removeDevices` to be an array in the JSON data but got " + data['removeDevices']);
@@ -108,18 +108,18 @@ var UpdateFleetRequest = /*#__PURE__*/function () {
108
108
  }
109
109
  }]);
110
110
  }();
111
- /**
112
- * The label for the Fleet.
113
- * @member {String} label
114
- */
115
- UpdateFleetRequest.prototype['label'] = undefined;
116
-
117
111
  /**
118
112
  * List of DeviceUIDs to add to fleet
119
113
  * @member {Array.<String>} addDevices
120
114
  */
121
115
  UpdateFleetRequest.prototype['addDevices'] = undefined;
122
116
 
117
+ /**
118
+ * The label for the Fleet.
119
+ * @member {String} label
120
+ */
121
+ UpdateFleetRequest.prototype['label'] = undefined;
122
+
123
123
  /**
124
124
  * List of DeviceUIDs to remove from fleet
125
125
  * @member {Array.<String>} removeDevices
@@ -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.11
30
+ * @version 1.0.37-beta.12
31
31
  */
32
32
  var UploadMetadata = /*#__PURE__*/function () {
33
33
  /**
@@ -60,14 +60,8 @@ var UploadMetadata = /*#__PURE__*/function () {
60
60
  value: function constructFromObject(data, obj) {
61
61
  if (data) {
62
62
  obj = obj || new UploadMetadata();
63
- if (data.hasOwnProperty('name')) {
64
- obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
65
- }
66
- if (data.hasOwnProperty('length')) {
67
- obj['length'] = _ApiClient["default"].convertToType(data['length'], 'Number');
68
- }
69
- if (data.hasOwnProperty('md5')) {
70
- obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
63
+ if (data.hasOwnProperty('contains')) {
64
+ obj['contains'] = _ApiClient["default"].convertToType(data['contains'], 'String');
71
65
  }
72
66
  if (data.hasOwnProperty('crc32')) {
73
67
  obj['crc32'] = _ApiClient["default"].convertToType(data['crc32'], 'Number');
@@ -75,29 +69,35 @@ var UploadMetadata = /*#__PURE__*/function () {
75
69
  if (data.hasOwnProperty('created')) {
76
70
  obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Number');
77
71
  }
78
- if (data.hasOwnProperty('modified')) {
79
- obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'Number');
80
- }
81
- if (data.hasOwnProperty('source')) {
82
- obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String');
83
- }
84
- if (data.hasOwnProperty('contains')) {
85
- obj['contains'] = _ApiClient["default"].convertToType(data['contains'], 'String');
72
+ if (data.hasOwnProperty('firmware')) {
73
+ obj['firmware'] = _Firmware["default"].constructFromObject(data['firmware']);
86
74
  }
87
75
  if (data.hasOwnProperty('found')) {
88
76
  obj['found'] = _ApiClient["default"].convertToType(data['found'], 'String');
89
77
  }
90
- if (data.hasOwnProperty('type')) {
91
- obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
78
+ if (data.hasOwnProperty('length')) {
79
+ obj['length'] = _ApiClient["default"].convertToType(data['length'], 'Number');
92
80
  }
93
- if (data.hasOwnProperty('tags')) {
94
- obj['tags'] = _ApiClient["default"].convertToType(data['tags'], 'String');
81
+ if (data.hasOwnProperty('md5')) {
82
+ obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('modified')) {
85
+ obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'Number');
86
+ }
87
+ if (data.hasOwnProperty('name')) {
88
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
95
89
  }
96
90
  if (data.hasOwnProperty('notes')) {
97
91
  obj['notes'] = _ApiClient["default"].convertToType(data['notes'], 'String');
98
92
  }
99
- if (data.hasOwnProperty('firmware')) {
100
- obj['firmware'] = _Firmware["default"].constructFromObject(data['firmware']);
93
+ if (data.hasOwnProperty('source')) {
94
+ obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('tags')) {
97
+ obj['tags'] = _ApiClient["default"].convertToType(data['tags'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('type')) {
100
+ obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
101
101
  }
102
102
  } else if (data === null) {
103
103
  return null;
@@ -114,60 +114,50 @@ var UploadMetadata = /*#__PURE__*/function () {
114
114
  key: "validateJSON",
115
115
  value: function validateJSON(data) {
116
116
  // ensure the json data is a string
117
- if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
118
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
117
+ if (data['contains'] && !(typeof data['contains'] === 'string' || data['contains'] instanceof String)) {
118
+ throw new Error("Expected the field `contains` to be a primitive type in the JSON string but got " + data['contains']);
119
+ }
120
+ // validate the optional field `firmware`
121
+ if (data['firmware']) {
122
+ // data not null
123
+ _Firmware["default"].validateJSON(data['firmware']);
119
124
  }
120
125
  // ensure the json data is a string
121
- if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
122
- throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
126
+ if (data['found'] && !(typeof data['found'] === 'string' || data['found'] instanceof String)) {
127
+ throw new Error("Expected the field `found` to be a primitive type in the JSON string but got " + data['found']);
123
128
  }
124
129
  // ensure the json data is a string
125
- if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
126
- throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
130
+ if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
131
+ throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
127
132
  }
128
133
  // ensure the json data is a string
129
- if (data['contains'] && !(typeof data['contains'] === 'string' || data['contains'] instanceof String)) {
130
- throw new Error("Expected the field `contains` to be a primitive type in the JSON string but got " + data['contains']);
134
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
135
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
131
136
  }
132
137
  // ensure the json data is a string
133
- if (data['found'] && !(typeof data['found'] === 'string' || data['found'] instanceof String)) {
134
- throw new Error("Expected the field `found` to be a primitive type in the JSON string but got " + data['found']);
138
+ if (data['notes'] && !(typeof data['notes'] === 'string' || data['notes'] instanceof String)) {
139
+ throw new Error("Expected the field `notes` to be a primitive type in the JSON string but got " + data['notes']);
135
140
  }
136
141
  // ensure the json data is a string
137
- if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
138
- throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
142
+ if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
143
+ throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
139
144
  }
140
145
  // ensure the json data is a string
141
146
  if (data['tags'] && !(typeof data['tags'] === 'string' || data['tags'] instanceof String)) {
142
147
  throw new Error("Expected the field `tags` to be a primitive type in the JSON string but got " + data['tags']);
143
148
  }
144
149
  // ensure the json data is a string
145
- if (data['notes'] && !(typeof data['notes'] === 'string' || data['notes'] instanceof String)) {
146
- throw new Error("Expected the field `notes` to be a primitive type in the JSON string but got " + data['notes']);
147
- }
148
- // validate the optional field `firmware`
149
- if (data['firmware']) {
150
- // data not null
151
- _Firmware["default"].validateJSON(data['firmware']);
150
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
151
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
152
152
  }
153
153
  return true;
154
154
  }
155
155
  }]);
156
156
  }();
157
157
  /**
158
- * @member {String} name
159
- */
160
- UploadMetadata.prototype['name'] = undefined;
161
-
162
- /**
163
- * @member {Number} length
164
- */
165
- UploadMetadata.prototype['length'] = undefined;
166
-
167
- /**
168
- * @member {String} md5
158
+ * @member {String} contains
169
159
  */
170
- UploadMetadata.prototype['md5'] = undefined;
160
+ UploadMetadata.prototype['contains'] = undefined;
171
161
 
172
162
  /**
173
163
  * @member {Number} crc32
@@ -180,34 +170,34 @@ UploadMetadata.prototype['crc32'] = undefined;
180
170
  UploadMetadata.prototype['created'] = undefined;
181
171
 
182
172
  /**
183
- * @member {Number} modified
173
+ * @member {module:model/Firmware} firmware
184
174
  */
185
- UploadMetadata.prototype['modified'] = undefined;
175
+ UploadMetadata.prototype['firmware'] = undefined;
186
176
 
187
177
  /**
188
- * @member {String} source
178
+ * @member {String} found
189
179
  */
190
- UploadMetadata.prototype['source'] = undefined;
180
+ UploadMetadata.prototype['found'] = undefined;
191
181
 
192
182
  /**
193
- * @member {String} contains
183
+ * @member {Number} length
194
184
  */
195
- UploadMetadata.prototype['contains'] = undefined;
185
+ UploadMetadata.prototype['length'] = undefined;
196
186
 
197
187
  /**
198
- * @member {String} found
188
+ * @member {String} md5
199
189
  */
200
- UploadMetadata.prototype['found'] = undefined;
190
+ UploadMetadata.prototype['md5'] = undefined;
201
191
 
202
192
  /**
203
- * @member {String} type
193
+ * @member {Number} modified
204
194
  */
205
- UploadMetadata.prototype['type'] = undefined;
195
+ UploadMetadata.prototype['modified'] = undefined;
206
196
 
207
197
  /**
208
- * @member {String} tags
198
+ * @member {String} name
209
199
  */
210
- UploadMetadata.prototype['tags'] = undefined;
200
+ UploadMetadata.prototype['name'] = undefined;
211
201
 
212
202
  /**
213
203
  * @member {String} notes
@@ -215,7 +205,17 @@ UploadMetadata.prototype['tags'] = undefined;
215
205
  UploadMetadata.prototype['notes'] = undefined;
216
206
 
217
207
  /**
218
- * @member {module:model/Firmware} firmware
208
+ * @member {String} source
219
209
  */
220
- UploadMetadata.prototype['firmware'] = undefined;
210
+ UploadMetadata.prototype['source'] = undefined;
211
+
212
+ /**
213
+ * @member {String} tags
214
+ */
215
+ UploadMetadata.prototype['tags'] = undefined;
216
+
217
+ /**
218
+ * @member {String} type
219
+ */
220
+ UploadMetadata.prototype['type'] = undefined;
221
221
  var _default = exports["default"] = UploadMetadata;
@@ -27,20 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The QuestionDataResponseMap model module.
31
- * @module model/QuestionDataResponseMap
32
- * @version 1.0.37-beta.11
30
+ * The UsageData model module.
31
+ * @module model/UsageData
32
+ * @version 1.0.37-beta.12
33
33
  */
34
- var QuestionDataResponseMap = /*#__PURE__*/function () {
34
+ var UsageData = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>QuestionDataResponseMap</code>.
37
- * @alias module:model/QuestionDataResponseMap
38
- * @param type {module:model/QuestionDataResponseMap.TypeEnum} Graph type must be 'map' for a map visualization.
39
- * @param title {String} Title of the map.
36
+ * Constructs a new <code>UsageData</code>.
37
+ * @alias module:model/UsageData
38
+ * @param period {Date}
39
+ * @param totalBytes {Number}
40
40
  */
41
- function QuestionDataResponseMap(type, title) {
42
- _classCallCheck(this, QuestionDataResponseMap);
43
- QuestionDataResponseMap.initialize(this, type, title);
41
+ function UsageData(period, totalBytes) {
42
+ _classCallCheck(this, UsageData);
43
+ UsageData.initialize(this, period, totalBytes);
44
44
  }
45
45
 
46
46
  /**
@@ -48,30 +48,36 @@ var QuestionDataResponseMap = /*#__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(QuestionDataResponseMap, null, [{
51
+ return _createClass(UsageData, null, [{
52
52
  key: "initialize",
53
- value: function initialize(obj, type, title) {
54
- obj['type'] = type;
55
- obj['title'] = title;
53
+ value: function initialize(obj, period, totalBytes) {
54
+ obj['period'] = period;
55
+ obj['total_bytes'] = totalBytes;
56
56
  }
57
57
 
58
58
  /**
59
- * Constructs a <code>QuestionDataResponseMap</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.
60
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
61
  * @param {Object} data The plain JavaScript object bearing properties of interest.
62
- * @param {module:model/QuestionDataResponseMap} obj Optional instance to populate.
63
- * @return {module:model/QuestionDataResponseMap} The populated <code>QuestionDataResponseMap</code> instance.
62
+ * @param {module:model/UsageData} obj Optional instance to populate.
63
+ * @return {module:model/UsageData} The populated <code>UsageData</code> instance.
64
64
  */
65
65
  }, {
66
66
  key: "constructFromObject",
67
67
  value: function constructFromObject(data, obj) {
68
68
  if (data) {
69
- obj = obj || new QuestionDataResponseMap();
70
- if (data.hasOwnProperty('type')) {
71
- obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
69
+ obj = obj || new UsageData();
70
+ if (data.hasOwnProperty('bytes_received')) {
71
+ obj['bytes_received'] = _ApiClient["default"].convertToType(data['bytes_received'], 'Number');
72
72
  }
73
- if (data.hasOwnProperty('title')) {
74
- obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
73
+ if (data.hasOwnProperty('bytes_sent')) {
74
+ obj['bytes_sent'] = _ApiClient["default"].convertToType(data['bytes_sent'], 'Number');
75
+ }
76
+ if (data.hasOwnProperty('period')) {
77
+ obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Date');
78
+ }
79
+ if (data.hasOwnProperty('total_bytes')) {
80
+ obj['total_bytes'] = _ApiClient["default"].convertToType(data['total_bytes'], 'Number');
75
81
  }
76
82
  } else if (data === null) {
77
83
  return null;
@@ -80,15 +86,15 @@ var QuestionDataResponseMap = /*#__PURE__*/function () {
80
86
  }
81
87
 
82
88
  /**
83
- * Validates the JSON data with respect to <code>QuestionDataResponseMap</code>.
89
+ * Validates the JSON data with respect to <code>UsageData</code>.
84
90
  * @param {Object} data The plain JavaScript object bearing properties of interest.
85
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>QuestionDataResponseMap</code>.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageData</code>.
86
92
  */
87
93
  }, {
88
94
  key: "validateJSON",
89
95
  value: function validateJSON(data) {
90
96
  // check to make sure all required properties are present in the JSON string
91
- var _iterator = _createForOfIteratorHelper(QuestionDataResponseMap.RequiredProperties),
97
+ var _iterator = _createForOfIteratorHelper(UsageData.RequiredProperties),
92
98
  _step;
93
99
  try {
94
100
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -97,47 +103,34 @@ var QuestionDataResponseMap = /*#__PURE__*/function () {
97
103
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
98
104
  }
99
105
  }
100
- // ensure the json data is a string
101
106
  } catch (err) {
102
107
  _iterator.e(err);
103
108
  } finally {
104
109
  _iterator.f();
105
110
  }
106
- if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
107
- throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
108
- }
109
- // ensure the json data is a string
110
- if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
111
- throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
112
- }
113
111
  return true;
114
112
  }
115
113
  }]);
116
114
  }();
117
- QuestionDataResponseMap.RequiredProperties = ["type", "title"];
115
+ UsageData.RequiredProperties = ["period", "total_bytes"];
118
116
 
119
117
  /**
120
- * Graph type must be 'map' for a map visualization.
121
- * @member {module:model/QuestionDataResponseMap.TypeEnum} type
118
+ * @member {Number} bytes_received
122
119
  */
123
- QuestionDataResponseMap.prototype['type'] = undefined;
120
+ UsageData.prototype['bytes_received'] = undefined;
124
121
 
125
122
  /**
126
- * Title of the map.
127
- * @member {String} title
123
+ * @member {Number} bytes_sent
128
124
  */
129
- QuestionDataResponseMap.prototype['title'] = undefined;
125
+ UsageData.prototype['bytes_sent'] = undefined;
130
126
 
131
127
  /**
132
- * Allowed values for the <code>type</code> property.
133
- * @enum {String}
134
- * @readonly
128
+ * @member {Date} period
135
129
  */
136
- QuestionDataResponseMap['TypeEnum'] = {
137
- /**
138
- * value: "map"
139
- * @const
140
- */
141
- "map": "map"
142
- };
143
- var _default = exports["default"] = QuestionDataResponseMap;
130
+ UsageData.prototype['period'] = undefined;
131
+
132
+ /**
133
+ * @member {Number} total_bytes
134
+ */
135
+ UsageData.prototype['total_bytes'] = undefined;
136
+ var _default = exports["default"] = UsageData;