@blues-inc/notehub-js 1.0.36-beta.9 → 1.0.37

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