@blues-inc/notehub-js 6.2.0-beta.2 → 6.2.0-beta.3

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 (165) hide show
  1. package/README.md +285 -293
  2. package/dist/ApiClient.js +150 -150
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +30 -30
  6. package/dist/api/DeviceApi.js +354 -354
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/JobsApi.js +127 -74
  10. package/dist/api/MonitorApi.js +52 -52
  11. package/dist/api/ProjectApi.js +403 -702
  12. package/dist/api/RouteApi.js +83 -83
  13. package/dist/api/UsageApi.js +67 -67
  14. package/dist/api/WebhookApi.js +51 -51
  15. package/dist/index.js +0 -35
  16. package/dist/model/AWSRoleConfig.js +14 -14
  17. package/dist/model/AddDeviceToFleetsRequest.js +8 -8
  18. package/dist/model/Alert.js +76 -74
  19. package/dist/model/AlertDataInner.js +36 -36
  20. package/dist/model/AlertNotificationsInner.js +18 -18
  21. package/dist/model/AwsRoute.js +70 -70
  22. package/dist/model/AzureRoute.js +43 -43
  23. package/dist/model/BillingAccount.js +21 -21
  24. package/dist/model/BillingAccountRole.js +9 -9
  25. package/dist/model/BlynkRoute.js +28 -28
  26. package/dist/model/Body.js +5 -5
  27. package/dist/model/CancelJobRun200Response.js +6 -6
  28. package/dist/model/CellularPlan.js +34 -34
  29. package/dist/model/CloneProjectRequest.js +20 -20
  30. package/dist/model/Contact.js +22 -22
  31. package/dist/model/CreateFleetRequest.js +20 -20
  32. package/dist/model/CreateJob201Response.js +8 -8
  33. package/dist/model/CreateMonitor.js +128 -127
  34. package/dist/model/CreateProductRequest.js +22 -22
  35. package/dist/model/CreateProjectRequest.js +16 -16
  36. package/dist/model/CreateUpdateRepository.js +17 -17
  37. package/dist/model/CurrentFirmware.js +12 -12
  38. package/dist/model/DFUEnv.js +12 -12
  39. package/dist/model/DFUState.js +65 -65
  40. package/dist/model/DataField.js +7 -7
  41. package/dist/model/DataSetField.js +19 -19
  42. package/dist/model/DataUsage.js +14 -14
  43. package/dist/model/DatacakeRoute.js +35 -35
  44. package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
  45. package/dist/model/DeleteJob200Response.js +6 -6
  46. package/dist/model/DeleteNotefilesRequest.js +7 -7
  47. package/dist/model/Device.js +107 -106
  48. package/dist/model/DeviceDfuHistory.js +20 -19
  49. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  50. package/dist/model/DeviceDfuHistoryPage.js +13 -12
  51. package/dist/model/DeviceDfuStateMachine.js +25 -24
  52. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  53. package/dist/model/DeviceDfuStatus.js +20 -20
  54. package/dist/model/DeviceDfuStatusPage.js +13 -12
  55. package/dist/model/DeviceSession.js +221 -221
  56. package/dist/model/DeviceTowerInfo.js +14 -14
  57. package/dist/model/DeviceUsage.js +32 -32
  58. package/dist/model/DfuActionRequest.js +7 -7
  59. package/dist/model/EmailNotification.js +7 -7
  60. package/dist/model/EnvTreeJsonNode.js +69 -67
  61. package/dist/model/EnvVar.js +18 -18
  62. package/dist/model/EnvironmentVariables.js +8 -8
  63. package/dist/model/Error.js +31 -31
  64. package/dist/model/Event.js +248 -248
  65. package/dist/model/Filter.js +16 -16
  66. package/dist/model/Firmware.js +49 -49
  67. package/dist/model/FirmwareInfo.js +68 -68
  68. package/dist/model/Fleet.js +38 -38
  69. package/dist/model/FleetConnectivityAssurance.js +5 -5
  70. package/dist/model/GetAlerts200Response.js +15 -14
  71. package/dist/model/GetBillingAccount200Response.js +25 -25
  72. package/dist/model/GetBillingAccount200ResponsePlan.js +22 -22
  73. package/dist/model/GetBillingAccountBalanceHistory200Response.js +10 -9
  74. package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +17 -17
  75. package/dist/model/GetBillingAccounts200Response.js +10 -9
  76. package/dist/model/GetDataUsage200Response.js +13 -12
  77. package/dist/model/GetDataUsage200ResponseDataInner.js +44 -43
  78. package/dist/model/GetDbNote200Response.js +13 -13
  79. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  80. package/dist/model/GetDeviceFleets200Response.js +12 -11
  81. package/dist/model/GetDeviceHealthLog200Response.js +12 -11
  82. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  83. package/dist/model/GetDeviceLatestEvents200Response.js +10 -9
  84. package/dist/model/GetDevicePlans200Response.js +10 -9
  85. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  86. package/dist/model/GetDevicePublicKeys200Response.js +17 -16
  87. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  88. package/dist/model/GetDeviceSessions200Response.js +17 -16
  89. package/dist/model/GetDevices200Response.js +17 -16
  90. package/dist/model/GetEvents200Response.js +21 -20
  91. package/dist/model/GetEventsByCursor200Response.js +24 -23
  92. package/dist/model/GetJobRuns200Response.js +12 -11
  93. package/dist/model/GetJobs200Response.js +12 -11
  94. package/dist/model/GetNotefile200Response.js +11 -11
  95. package/dist/model/GetProducts200Response.js +10 -9
  96. package/dist/model/GetProjectMembers200Response.js +12 -11
  97. package/dist/model/GetProjects200Response.js +10 -9
  98. package/dist/model/GetRouteLogsUsage200Response.js +15 -14
  99. package/dist/model/GetSessionsUsage200Response.js +16 -15
  100. package/dist/model/GetWebhooks200Response.js +10 -9
  101. package/dist/model/GoogleRoute.js +33 -33
  102. package/dist/model/HttpRoute.js +35 -35
  103. package/dist/model/Job.js +50 -28
  104. package/dist/model/JobRun.js +57 -57
  105. package/dist/model/Location.js +40 -40
  106. package/dist/model/Login200Response.js +7 -7
  107. package/dist/model/LoginRequest.js +12 -12
  108. package/dist/model/Monitor.js +102 -101
  109. package/dist/model/MonitorAlertRoutesInner.js +9 -10
  110. package/dist/model/MqttRoute.js +68 -68
  111. package/dist/model/Note.js +31 -31
  112. package/dist/model/NoteInput.js +9 -9
  113. package/dist/model/Notefile.js +23 -22
  114. package/dist/model/NotefileSchema.js +19 -18
  115. package/dist/model/NotehubRoute.js +103 -103
  116. package/dist/model/NotehubRouteSummary.js +23 -23
  117. package/dist/model/OAuth2Error.js +20 -20
  118. package/dist/model/OAuth2TokenResponse.js +23 -23
  119. package/dist/model/PersonalAccessToken.js +34 -34
  120. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  121. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  122. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  123. package/dist/model/Product.js +26 -26
  124. package/dist/model/Project.js +34 -34
  125. package/dist/model/ProjectMember.js +22 -22
  126. package/dist/model/ProvisionDeviceRequest.js +18 -18
  127. package/dist/model/ProxyRoute.js +29 -29
  128. package/dist/model/QubitroRoute.js +33 -33
  129. package/dist/model/RadRoute.js +31 -31
  130. package/dist/model/Repository.js +22 -22
  131. package/dist/model/Role.js +9 -9
  132. package/dist/model/RouteLog.js +38 -38
  133. package/dist/model/RouteTransformSettings.js +18 -18
  134. package/dist/model/RunJob200Response.js +8 -8
  135. package/dist/model/S3ArchiveRoute.js +79 -79
  136. package/dist/model/SatelliteDataUsage.js +18 -18
  137. package/dist/model/SatellitePlan.js +29 -29
  138. package/dist/model/SchemaProperty.js +38 -36
  139. package/dist/model/SignalDevice200Response.js +5 -5
  140. package/dist/model/SimUsage.js +19 -19
  141. package/dist/model/SlackBearerNotification.js +25 -25
  142. package/dist/model/SlackRoute.js +48 -48
  143. package/dist/model/SlackWebHookNotification.js +20 -20
  144. package/dist/model/SnowflakeRoute.js +45 -45
  145. package/dist/model/SnowpipeStreamingRoute.js +60 -60
  146. package/dist/model/ThingworxRoute.js +33 -33
  147. package/dist/model/TowerLocation.js +54 -54
  148. package/dist/model/TwilioRoute.js +43 -43
  149. package/dist/model/UpdateFleetRequest.js +33 -33
  150. package/dist/model/UploadMetadata.js +64 -64
  151. package/dist/model/UsageData.js +33 -33
  152. package/dist/model/UsageEventsData.js +49 -49
  153. package/dist/model/UsageEventsResponse.js +15 -14
  154. package/dist/model/UsageRouteLogsData.js +30 -30
  155. package/dist/model/UsageSessionsData.js +43 -43
  156. package/dist/model/UserDfuStateMachine.js +20 -20
  157. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  158. package/dist/model/UserFirmwareInfo.js +12 -12
  159. package/dist/model/WebhookSettings.js +15 -15
  160. package/package.json +3 -3
  161. package/dist/model/CreateProjectSecretRequest.js +0 -130
  162. package/dist/model/GetProjectSecretsResponse.js +0 -131
  163. package/dist/model/ProjectSecret.js +0 -164
  164. package/dist/model/UpdateHostFirmwareRequest.js +0 -117
  165. package/dist/model/UpdateProjectSecretRequest.js +0 -115
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
20
  * Notehub API
21
- * The OpenAPI definition for the Notehub.io API.
21
+ * The OpenAPI definition for the Notehub.io API.
22
22
  *
23
23
  * The version of the OpenAPI document: 1.2.0
24
24
  * Contact: engineering@blues.io
@@ -31,16 +31,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The CreateMonitor model module.
33
33
  * @module model/CreateMonitor
34
- * @version 6.2.0-beta.2
34
+ * @version 6.2.0-beta.3
35
35
  */
36
36
  var CreateMonitor = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>CreateMonitor</code>.
39
39
  * @alias module:model/CreateMonitor
40
40
  * @implements module:model/Monitor
41
- * @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
42
- * @param description {String}
43
- * @param name {String}
41
+ * @param alertRoutes {Array.<module:model/MonitorAlertRoutesInner>}
42
+ * @param description {String}
43
+ * @param name {String}
44
44
  * @param sourceType {module:model/CreateMonitor.SourceTypeEnum} The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
45
45
  * @param threshold {Number} The type of condition to apply to the value selected by the source_selector
46
46
  */
@@ -58,11 +58,11 @@ var CreateMonitor = /*#__PURE__*/function () {
58
58
  return _createClass(CreateMonitor, null, [{
59
59
  key: "initialize",
60
60
  value: function initialize(obj, alertRoutes, description, name, sourceType, threshold) {
61
- obj["alert_routes"] = alertRoutes;
62
- obj["description"] = description;
63
- obj["name"] = name;
64
- obj["source_type"] = sourceType;
65
- obj["threshold"] = threshold;
61
+ obj['alert_routes'] = alertRoutes;
62
+ obj['description'] = description;
63
+ obj['name'] = name;
64
+ obj['source_type'] = sourceType;
65
+ obj['threshold'] = threshold;
66
66
  }
67
67
 
68
68
  /**
@@ -78,59 +78,59 @@ var CreateMonitor = /*#__PURE__*/function () {
78
78
  if (data) {
79
79
  obj = obj || new CreateMonitor();
80
80
  _Monitor["default"].constructFromObject(data, obj);
81
- if (data.hasOwnProperty("aggregate_function")) {
82
- obj["aggregate_function"] = _ApiClient["default"].convertToType(data["aggregate_function"], "String");
81
+ if (data.hasOwnProperty('aggregate_function')) {
82
+ obj['aggregate_function'] = _ApiClient["default"].convertToType(data['aggregate_function'], 'String');
83
83
  }
84
- if (data.hasOwnProperty("aggregate_window")) {
85
- obj["aggregate_window"] = _ApiClient["default"].convertToType(data["aggregate_window"], "String");
84
+ if (data.hasOwnProperty('aggregate_window')) {
85
+ obj['aggregate_window'] = _ApiClient["default"].convertToType(data['aggregate_window'], 'String');
86
86
  }
87
- if (data.hasOwnProperty("alert")) {
88
- obj["alert"] = _ApiClient["default"].convertToType(data["alert"], "Boolean");
87
+ if (data.hasOwnProperty('alert')) {
88
+ obj['alert'] = _ApiClient["default"].convertToType(data['alert'], 'Boolean');
89
89
  }
90
- if (data.hasOwnProperty("alert_routes")) {
91
- obj["alert_routes"] = _ApiClient["default"].convertToType(data["alert_routes"], [_MonitorAlertRoutesInner["default"]]);
90
+ if (data.hasOwnProperty('alert_routes')) {
91
+ obj['alert_routes'] = _ApiClient["default"].convertToType(data['alert_routes'], [_MonitorAlertRoutesInner["default"]]);
92
92
  }
93
- if (data.hasOwnProperty("condition_type")) {
94
- obj["condition_type"] = _ApiClient["default"].convertToType(data["condition_type"], "String");
93
+ if (data.hasOwnProperty('condition_type')) {
94
+ obj['condition_type'] = _ApiClient["default"].convertToType(data['condition_type'], 'String');
95
95
  }
96
- if (data.hasOwnProperty("description")) {
97
- obj["description"] = _ApiClient["default"].convertToType(data["description"], "String");
96
+ if (data.hasOwnProperty('description')) {
97
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
98
98
  }
99
- if (data.hasOwnProperty("disabled")) {
100
- obj["disabled"] = _ApiClient["default"].convertToType(data["disabled"], "Boolean");
99
+ if (data.hasOwnProperty('disabled')) {
100
+ obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
101
101
  }
102
- if (data.hasOwnProperty("fleet_filter")) {
103
- obj["fleet_filter"] = _ApiClient["default"].convertToType(data["fleet_filter"], ["String"]);
102
+ if (data.hasOwnProperty('fleet_filter')) {
103
+ obj['fleet_filter'] = _ApiClient["default"].convertToType(data['fleet_filter'], ['String']);
104
104
  }
105
- if (data.hasOwnProperty("last_routed_at")) {
106
- obj["last_routed_at"] = _ApiClient["default"].convertToType(data["last_routed_at"], "String");
105
+ if (data.hasOwnProperty('last_routed_at')) {
106
+ obj['last_routed_at'] = _ApiClient["default"].convertToType(data['last_routed_at'], 'String');
107
107
  }
108
- if (data.hasOwnProperty("name")) {
109
- obj["name"] = _ApiClient["default"].convertToType(data["name"], "String");
108
+ if (data.hasOwnProperty('name')) {
109
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
110
110
  }
111
- if (data.hasOwnProperty("notefile_filter")) {
112
- obj["notefile_filter"] = _ApiClient["default"].convertToType(data["notefile_filter"], ["String"]);
111
+ if (data.hasOwnProperty('notefile_filter')) {
112
+ obj['notefile_filter'] = _ApiClient["default"].convertToType(data['notefile_filter'], ['String']);
113
113
  }
114
- if (data.hasOwnProperty("per_device")) {
115
- obj["per_device"] = _ApiClient["default"].convertToType(data["per_device"], "Boolean");
114
+ if (data.hasOwnProperty('per_device')) {
115
+ obj['per_device'] = _ApiClient["default"].convertToType(data['per_device'], 'Boolean');
116
116
  }
117
- if (data.hasOwnProperty("routing_cooldown_period")) {
118
- obj["routing_cooldown_period"] = _ApiClient["default"].convertToType(data["routing_cooldown_period"], "String");
117
+ if (data.hasOwnProperty('routing_cooldown_period')) {
118
+ obj['routing_cooldown_period'] = _ApiClient["default"].convertToType(data['routing_cooldown_period'], 'String');
119
119
  }
120
- if (data.hasOwnProperty("silenced")) {
121
- obj["silenced"] = _ApiClient["default"].convertToType(data["silenced"], "Boolean");
120
+ if (data.hasOwnProperty('silenced')) {
121
+ obj['silenced'] = _ApiClient["default"].convertToType(data['silenced'], 'Boolean');
122
122
  }
123
- if (data.hasOwnProperty("source_selector")) {
124
- obj["source_selector"] = _ApiClient["default"].convertToType(data["source_selector"], "String");
123
+ if (data.hasOwnProperty('source_selector')) {
124
+ obj['source_selector'] = _ApiClient["default"].convertToType(data['source_selector'], 'String');
125
125
  }
126
- if (data.hasOwnProperty("source_type")) {
127
- obj["source_type"] = _ApiClient["default"].convertToType(data["source_type"], "String");
126
+ if (data.hasOwnProperty('source_type')) {
127
+ obj['source_type'] = _ApiClient["default"].convertToType(data['source_type'], 'String');
128
128
  }
129
- if (data.hasOwnProperty("threshold")) {
130
- obj["threshold"] = _ApiClient["default"].convertToType(data["threshold"], "Number");
129
+ if (data.hasOwnProperty('threshold')) {
130
+ obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number');
131
131
  }
132
- if (data.hasOwnProperty("uid")) {
133
- obj["uid"] = _ApiClient["default"].convertToType(data["uid"], "String");
132
+ if (data.hasOwnProperty('uid')) {
133
+ obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
134
134
  }
135
135
  } else if (data === null) {
136
136
  return null;
@@ -162,21 +162,21 @@ var CreateMonitor = /*#__PURE__*/function () {
162
162
  } finally {
163
163
  _iterator.f();
164
164
  }
165
- if (data["aggregate_function"] && !(typeof data["aggregate_function"] === "string" || data["aggregate_function"] instanceof String)) {
166
- throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data["aggregate_function"]);
165
+ if (data['aggregate_function'] && !(typeof data['aggregate_function'] === 'string' || data['aggregate_function'] instanceof String)) {
166
+ throw new Error("Expected the field `aggregate_function` to be a primitive type in the JSON string but got " + data['aggregate_function']);
167
167
  }
168
168
  // ensure the json data is a string
169
- if (data["aggregate_window"] && !(typeof data["aggregate_window"] === "string" || data["aggregate_window"] instanceof String)) {
170
- throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data["aggregate_window"]);
169
+ if (data['aggregate_window'] && !(typeof data['aggregate_window'] === 'string' || data['aggregate_window'] instanceof String)) {
170
+ throw new Error("Expected the field `aggregate_window` to be a primitive type in the JSON string but got " + data['aggregate_window']);
171
171
  }
172
- if (data["alert_routes"]) {
172
+ if (data['alert_routes']) {
173
173
  // data not null
174
174
  // ensure the json data is an array
175
- if (!Array.isArray(data["alert_routes"])) {
176
- throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data["alert_routes"]);
175
+ if (!Array.isArray(data['alert_routes'])) {
176
+ throw new Error("Expected the field `alert_routes` to be an array in the JSON data but got " + data['alert_routes']);
177
177
  }
178
178
  // validate the optional field `alert_routes` (array)
179
- var _iterator2 = _createForOfIteratorHelper(data["alert_routes"]),
179
+ var _iterator2 = _createForOfIteratorHelper(data['alert_routes']),
180
180
  _step2;
181
181
  try {
182
182
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -188,46 +188,47 @@ var CreateMonitor = /*#__PURE__*/function () {
188
188
  } finally {
189
189
  _iterator2.f();
190
190
  }
191
+ ;
191
192
  }
192
193
  // ensure the json data is a string
193
- if (data["condition_type"] && !(typeof data["condition_type"] === "string" || data["condition_type"] instanceof String)) {
194
- throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data["condition_type"]);
194
+ if (data['condition_type'] && !(typeof data['condition_type'] === 'string' || data['condition_type'] instanceof String)) {
195
+ throw new Error("Expected the field `condition_type` to be a primitive type in the JSON string but got " + data['condition_type']);
195
196
  }
196
197
  // ensure the json data is a string
197
- if (data["description"] && !(typeof data["description"] === "string" || data["description"] instanceof String)) {
198
- throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data["description"]);
198
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
199
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
199
200
  }
200
201
  // ensure the json data is an array
201
- if (!Array.isArray(data["fleet_filter"])) {
202
- throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data["fleet_filter"]);
202
+ if (!Array.isArray(data['fleet_filter'])) {
203
+ throw new Error("Expected the field `fleet_filter` to be an array in the JSON data but got " + data['fleet_filter']);
203
204
  }
204
205
  // ensure the json data is a string
205
- if (data["last_routed_at"] && !(typeof data["last_routed_at"] === "string" || data["last_routed_at"] instanceof String)) {
206
- throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data["last_routed_at"]);
206
+ if (data['last_routed_at'] && !(typeof data['last_routed_at'] === 'string' || data['last_routed_at'] instanceof String)) {
207
+ throw new Error("Expected the field `last_routed_at` to be a primitive type in the JSON string but got " + data['last_routed_at']);
207
208
  }
208
209
  // ensure the json data is a string
209
- if (data["name"] && !(typeof data["name"] === "string" || data["name"] instanceof String)) {
210
- throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data["name"]);
210
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
211
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
211
212
  }
212
213
  // ensure the json data is an array
213
- if (!Array.isArray(data["notefile_filter"])) {
214
- throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data["notefile_filter"]);
214
+ if (!Array.isArray(data['notefile_filter'])) {
215
+ throw new Error("Expected the field `notefile_filter` to be an array in the JSON data but got " + data['notefile_filter']);
215
216
  }
216
217
  // ensure the json data is a string
217
- if (data["routing_cooldown_period"] && !(typeof data["routing_cooldown_period"] === "string" || data["routing_cooldown_period"] instanceof String)) {
218
- throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data["routing_cooldown_period"]);
218
+ if (data['routing_cooldown_period'] && !(typeof data['routing_cooldown_period'] === 'string' || data['routing_cooldown_period'] instanceof String)) {
219
+ throw new Error("Expected the field `routing_cooldown_period` to be a primitive type in the JSON string but got " + data['routing_cooldown_period']);
219
220
  }
220
221
  // ensure the json data is a string
221
- if (data["source_selector"] && !(typeof data["source_selector"] === "string" || data["source_selector"] instanceof String)) {
222
- throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data["source_selector"]);
222
+ if (data['source_selector'] && !(typeof data['source_selector'] === 'string' || data['source_selector'] instanceof String)) {
223
+ throw new Error("Expected the field `source_selector` to be a primitive type in the JSON string but got " + data['source_selector']);
223
224
  }
224
225
  // ensure the json data is a string
225
- if (data["source_type"] && !(typeof data["source_type"] === "string" || data["source_type"] instanceof String)) {
226
- throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data["source_type"]);
226
+ if (data['source_type'] && !(typeof data['source_type'] === 'string' || data['source_type'] instanceof String)) {
227
+ throw new Error("Expected the field `source_type` to be a primitive type in the JSON string but got " + data['source_type']);
227
228
  }
228
229
  // ensure the json data is a string
229
- if (data["uid"] && !(typeof data["uid"] === "string" || data["uid"] instanceof String)) {
230
- throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data["uid"]);
230
+ if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
231
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
231
232
  }
232
233
  return true;
233
234
  }
@@ -239,221 +240,221 @@ CreateMonitor.RequiredProperties = ["alert_routes", "description", "name", "sour
239
240
  * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
240
241
  * @member {module:model/CreateMonitor.AggregateFunctionEnum} aggregate_function
241
242
  */
242
- CreateMonitor.prototype["aggregate_function"] = undefined;
243
+ CreateMonitor.prototype['aggregate_function'] = undefined;
243
244
 
244
245
  /**
245
246
  * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
246
247
  * @member {String} aggregate_window
247
248
  */
248
- CreateMonitor.prototype["aggregate_window"] = undefined;
249
+ CreateMonitor.prototype['aggregate_window'] = undefined;
249
250
 
250
251
  /**
251
252
  * If true, the monitor is in alert state.
252
253
  * @member {Boolean} alert
253
254
  */
254
- CreateMonitor.prototype["alert"] = undefined;
255
+ CreateMonitor.prototype['alert'] = undefined;
255
256
 
256
257
  /**
257
258
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
258
259
  */
259
- CreateMonitor.prototype["alert_routes"] = undefined;
260
+ CreateMonitor.prototype['alert_routes'] = undefined;
260
261
 
261
262
  /**
262
263
  * A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
263
264
  * @member {module:model/CreateMonitor.ConditionTypeEnum} condition_type
264
265
  */
265
- CreateMonitor.prototype["condition_type"] = undefined;
266
+ CreateMonitor.prototype['condition_type'] = undefined;
266
267
 
267
268
  /**
268
269
  * @member {String} description
269
270
  */
270
- CreateMonitor.prototype["description"] = undefined;
271
+ CreateMonitor.prototype['description'] = undefined;
271
272
 
272
273
  /**
273
274
  * If true, the monitor will not be evaluated.
274
275
  * @member {Boolean} disabled
275
276
  */
276
- CreateMonitor.prototype["disabled"] = undefined;
277
+ CreateMonitor.prototype['disabled'] = undefined;
277
278
 
278
279
  /**
279
280
  * @member {Array.<String>} fleet_filter
280
281
  */
281
- CreateMonitor.prototype["fleet_filter"] = undefined;
282
+ CreateMonitor.prototype['fleet_filter'] = undefined;
282
283
 
283
284
  /**
284
285
  * The last time the monitor was evaluated and routed.
285
286
  * @member {String} last_routed_at
286
287
  */
287
- CreateMonitor.prototype["last_routed_at"] = undefined;
288
+ CreateMonitor.prototype['last_routed_at'] = undefined;
288
289
 
289
290
  /**
290
291
  * @member {String} name
291
292
  */
292
- CreateMonitor.prototype["name"] = undefined;
293
+ CreateMonitor.prototype['name'] = undefined;
293
294
 
294
295
  /**
295
296
  * @member {Array.<String>} notefile_filter
296
297
  */
297
- CreateMonitor.prototype["notefile_filter"] = undefined;
298
+ CreateMonitor.prototype['notefile_filter'] = undefined;
298
299
 
299
300
  /**
300
301
  * Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
301
302
  * @member {Boolean} per_device
302
303
  */
303
- CreateMonitor.prototype["per_device"] = undefined;
304
+ CreateMonitor.prototype['per_device'] = undefined;
304
305
 
305
306
  /**
306
307
  * The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
307
308
  * @member {String} routing_cooldown_period
308
309
  */
309
- CreateMonitor.prototype["routing_cooldown_period"] = undefined;
310
+ CreateMonitor.prototype['routing_cooldown_period'] = undefined;
310
311
 
311
312
  /**
312
313
  * If true, alerts will be created, but no notifications will be sent.
313
314
  * @member {Boolean} silenced
314
315
  */
315
- CreateMonitor.prototype["silenced"] = undefined;
316
+ CreateMonitor.prototype['silenced'] = undefined;
316
317
 
317
318
  /**
318
319
  * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
319
320
  * @member {String} source_selector
320
321
  */
321
- CreateMonitor.prototype["source_selector"] = undefined;
322
+ CreateMonitor.prototype['source_selector'] = undefined;
322
323
 
323
324
  /**
324
325
  * The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
325
326
  * @member {module:model/CreateMonitor.SourceTypeEnum} source_type
326
327
  */
327
- CreateMonitor.prototype["source_type"] = undefined;
328
+ CreateMonitor.prototype['source_type'] = undefined;
328
329
 
329
330
  /**
330
331
  * The type of condition to apply to the value selected by the source_selector
331
332
  * @member {Number} threshold
332
333
  */
333
- CreateMonitor.prototype["threshold"] = undefined;
334
+ CreateMonitor.prototype['threshold'] = undefined;
334
335
 
335
336
  /**
336
337
  * @member {String} uid
337
338
  */
338
- CreateMonitor.prototype["uid"] = undefined;
339
+ CreateMonitor.prototype['uid'] = undefined;
339
340
 
340
341
  // Implement Monitor interface:
341
342
  /**
342
343
  * Aggregate function to apply to the selected values before applying the condition. [none, sum, average, max, min]
343
344
  * @member {module:model/Monitor.AggregateFunctionEnum} aggregate_function
344
345
  */
345
- _Monitor["default"].prototype["aggregate_function"] = undefined;
346
+ _Monitor["default"].prototype['aggregate_function'] = undefined;
346
347
  /**
347
348
  * The time window to aggregate the selected values. It follows the format of a number followed by a time unit
348
349
  * @member {String} aggregate_window
349
350
  */
350
- _Monitor["default"].prototype["aggregate_window"] = undefined;
351
+ _Monitor["default"].prototype['aggregate_window'] = undefined;
351
352
  /**
352
353
  * If true, the monitor is in alert state.
353
354
  * @member {Boolean} alert
354
355
  */
355
- _Monitor["default"].prototype["alert"] = undefined;
356
+ _Monitor["default"].prototype['alert'] = undefined;
356
357
  /**
357
358
  * @member {Array.<module:model/MonitorAlertRoutesInner>} alert_routes
358
359
  */
359
- _Monitor["default"].prototype["alert_routes"] = undefined;
360
+ _Monitor["default"].prototype['alert_routes'] = undefined;
360
361
  /**
361
362
  * A comparison operation to apply to the value selected by the source_selector [greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to]
362
363
  * @member {module:model/Monitor.ConditionTypeEnum} condition_type
363
364
  */
364
- _Monitor["default"].prototype["condition_type"] = undefined;
365
+ _Monitor["default"].prototype['condition_type'] = undefined;
365
366
  /**
366
367
  * @member {String} description
367
368
  */
368
- _Monitor["default"].prototype["description"] = undefined;
369
+ _Monitor["default"].prototype['description'] = undefined;
369
370
  /**
370
371
  * If true, the monitor will not be evaluated.
371
372
  * @member {Boolean} disabled
372
373
  */
373
- _Monitor["default"].prototype["disabled"] = undefined;
374
+ _Monitor["default"].prototype['disabled'] = undefined;
374
375
  /**
375
376
  * @member {Array.<String>} fleet_filter
376
377
  */
377
- _Monitor["default"].prototype["fleet_filter"] = undefined;
378
+ _Monitor["default"].prototype['fleet_filter'] = undefined;
378
379
  /**
379
380
  * The last time the monitor was evaluated and routed.
380
381
  * @member {String} last_routed_at
381
382
  */
382
- _Monitor["default"].prototype["last_routed_at"] = undefined;
383
+ _Monitor["default"].prototype['last_routed_at'] = undefined;
383
384
  /**
384
385
  * @member {String} name
385
386
  */
386
- _Monitor["default"].prototype["name"] = undefined;
387
+ _Monitor["default"].prototype['name'] = undefined;
387
388
  /**
388
389
  * @member {Array.<String>} notefile_filter
389
390
  */
390
- _Monitor["default"].prototype["notefile_filter"] = undefined;
391
+ _Monitor["default"].prototype['notefile_filter'] = undefined;
391
392
  /**
392
393
  * Only relevant when using an aggregate_function. If true, the monitor will be evaluated per device, | rather than across the set of selected devices. If true then if a single device matches the specified criteria, | and alert will be created, otherwise the aggregate function will be applied across all devices.
393
394
  * @member {Boolean} per_device
394
395
  */
395
- _Monitor["default"].prototype["per_device"] = undefined;
396
+ _Monitor["default"].prototype['per_device'] = undefined;
396
397
  /**
397
398
  * The time period to wait before routing another event after the monitor | has been triggered. It follows the format of a number followed by a time unit.
398
399
  * @member {String} routing_cooldown_period
399
400
  */
400
- _Monitor["default"].prototype["routing_cooldown_period"] = undefined;
401
+ _Monitor["default"].prototype['routing_cooldown_period'] = undefined;
401
402
  /**
402
403
  * If true, alerts will be created, but no notifications will be sent.
403
404
  * @member {Boolean} silenced
404
405
  */
405
- _Monitor["default"].prototype["silenced"] = undefined;
406
+ _Monitor["default"].prototype['silenced'] = undefined;
406
407
  /**
407
408
  * A valid JSONata expression that selects the value to monitor from the source. | It should return a single, numeric value.
408
409
  * @member {String} source_selector
409
410
  */
410
- _Monitor["default"].prototype["source_selector"] = undefined;
411
+ _Monitor["default"].prototype['source_selector'] = undefined;
411
412
  /**
412
413
  * The type of source to monitor. Supported values are \"event\" and \"heartbeat\".
413
414
  * @member {module:model/Monitor.SourceTypeEnum} source_type
414
415
  */
415
- _Monitor["default"].prototype["source_type"] = undefined;
416
+ _Monitor["default"].prototype['source_type'] = undefined;
416
417
  /**
417
418
  * The type of condition to apply to the value selected by the source_selector
418
419
  * @member {Number} threshold
419
420
  */
420
- _Monitor["default"].prototype["threshold"] = undefined;
421
+ _Monitor["default"].prototype['threshold'] = undefined;
421
422
  /**
422
423
  * @member {String} uid
423
424
  */
424
- _Monitor["default"].prototype["uid"] = undefined;
425
+ _Monitor["default"].prototype['uid'] = undefined;
425
426
 
426
427
  /**
427
428
  * Allowed values for the <code>aggregate_function</code> property.
428
429
  * @enum {String}
429
430
  * @readonly
430
431
  */
431
- CreateMonitor["AggregateFunctionEnum"] = {
432
+ CreateMonitor['AggregateFunctionEnum'] = {
432
433
  /**
433
434
  * value: "none"
434
435
  * @const
435
436
  */
436
- none: "none",
437
+ "none": "none",
437
438
  /**
438
439
  * value: "sum"
439
440
  * @const
440
441
  */
441
- sum: "sum",
442
+ "sum": "sum",
442
443
  /**
443
444
  * value: "average"
444
445
  * @const
445
446
  */
446
- average: "average",
447
+ "average": "average",
447
448
  /**
448
449
  * value: "max"
449
450
  * @const
450
451
  */
451
- max: "max",
452
+ "max": "max",
452
453
  /**
453
454
  * value: "min"
454
455
  * @const
455
456
  */
456
- min: "min"
457
+ "min": "min"
457
458
  };
458
459
 
459
460
  /**
@@ -461,42 +462,42 @@ CreateMonitor["AggregateFunctionEnum"] = {
461
462
  * @enum {String}
462
463
  * @readonly
463
464
  */
464
- CreateMonitor["ConditionTypeEnum"] = {
465
+ CreateMonitor['ConditionTypeEnum'] = {
465
466
  /**
466
467
  * value: "greater_than"
467
468
  * @const
468
469
  */
469
- greater_than: "greater_than",
470
+ "greater_than": "greater_than",
470
471
  /**
471
472
  * value: "greater_than_or_equal_to"
472
473
  * @const
473
474
  */
474
- greater_than_or_equal_to: "greater_than_or_equal_to",
475
+ "greater_than_or_equal_to": "greater_than_or_equal_to",
475
476
  /**
476
477
  * value: "less_than"
477
478
  * @const
478
479
  */
479
- less_than: "less_than",
480
+ "less_than": "less_than",
480
481
  /**
481
482
  * value: "less_than_or_equal_to"
482
483
  * @const
483
484
  */
484
- less_than_or_equal_to: "less_than_or_equal_to",
485
+ "less_than_or_equal_to": "less_than_or_equal_to",
485
486
  /**
486
487
  * value: "equal_to"
487
488
  * @const
488
489
  */
489
- equal_to: "equal_to",
490
+ "equal_to": "equal_to",
490
491
  /**
491
492
  * value: "not_equal_to"
492
493
  * @const
493
494
  */
494
- not_equal_to: "not_equal_to",
495
+ "not_equal_to": "not_equal_to",
495
496
  /**
496
497
  * value: "count"
497
498
  * @const
498
499
  */
499
- count: "count"
500
+ "count": "count"
500
501
  };
501
502
 
502
503
  /**
@@ -504,16 +505,16 @@ CreateMonitor["ConditionTypeEnum"] = {
504
505
  * @enum {String}
505
506
  * @readonly
506
507
  */
507
- CreateMonitor["SourceTypeEnum"] = {
508
+ CreateMonitor['SourceTypeEnum'] = {
508
509
  /**
509
510
  * value: "event"
510
511
  * @const
511
512
  */
512
- event: "event",
513
+ "event": "event",
513
514
  /**
514
515
  * value: "heartbeat"
515
516
  * @const
516
517
  */
517
- heartbeat: "heartbeat"
518
+ "heartbeat": "heartbeat"
518
519
  };
519
520
  var _default = exports["default"] = CreateMonitor;