@blues-inc/notehub-js 3.0.0 → 4.0.0-beta.2

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