@blues-inc/notehub-js 1.0.4

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 (83) hide show
  1. package/README.md +297 -0
  2. package/dist/ApiClient.js +699 -0
  3. package/dist/api/AuthorizationApi.js +74 -0
  4. package/dist/api/BillingAccountApi.js +68 -0
  5. package/dist/api/DeviceApi.js +784 -0
  6. package/dist/api/DevicesApi.js +293 -0
  7. package/dist/api/EnvironmentVariablesApi.js +567 -0
  8. package/dist/api/EventApi.js +284 -0
  9. package/dist/api/FilesApi.js +193 -0
  10. package/dist/api/FleetApi.js +715 -0
  11. package/dist/api/NotesApi.js +435 -0
  12. package/dist/api/ProductApi.js +163 -0
  13. package/dist/api/ProjectApi.js +716 -0
  14. package/dist/api/RouteApi.js +266 -0
  15. package/dist/index.js +566 -0
  16. package/dist/model/Aws.js +233 -0
  17. package/dist/model/Azure.js +166 -0
  18. package/dist/model/BillingAccount.js +130 -0
  19. package/dist/model/BillingAccountRole.js +42 -0
  20. package/dist/model/Body.js +78 -0
  21. package/dist/model/Contact.js +118 -0
  22. package/dist/model/CreateFleetRequest.js +83 -0
  23. package/dist/model/CreateProductRequest.js +142 -0
  24. package/dist/model/CreateProjectRequest.js +119 -0
  25. package/dist/model/DFUEnv.js +97 -0
  26. package/dist/model/DFUState.js +276 -0
  27. package/dist/model/DeleteDeviceFleetsRequest.js +106 -0
  28. package/dist/model/Device.js +267 -0
  29. package/dist/model/DeviceSession.js +537 -0
  30. package/dist/model/DeviceTowerInfo.js +102 -0
  31. package/dist/model/DeviceUsage.js +150 -0
  32. package/dist/model/EnvironmentVariables.js +103 -0
  33. package/dist/model/Error.js +164 -0
  34. package/dist/model/Event.js +676 -0
  35. package/dist/model/Fleet.js +129 -0
  36. package/dist/model/GetBillingAccounts200Response.js +103 -0
  37. package/dist/model/GetDeviceEnvironmentVariables200Response.js +117 -0
  38. package/dist/model/GetDeviceHealthLog200Response.js +123 -0
  39. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +125 -0
  40. package/dist/model/GetDeviceLatest200Response.js +104 -0
  41. package/dist/model/GetDevicePublicKey200Response.js +119 -0
  42. package/dist/model/GetDeviceSessions200Response.js +133 -0
  43. package/dist/model/GetProjectDevicePublicKeys200Response.js +133 -0
  44. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +94 -0
  45. package/dist/model/GetProjectDevices200Response.js +133 -0
  46. package/dist/model/GetProjectEvents200Response.js +149 -0
  47. package/dist/model/GetProjectEventsByCursor200Response.js +149 -0
  48. package/dist/model/GetProjectFleets200Response.js +123 -0
  49. package/dist/model/GetProjectMembers200Response.js +123 -0
  50. package/dist/model/GetProjectProducts200Response.js +103 -0
  51. package/dist/model/GetProjects200Response.js +103 -0
  52. package/dist/model/Google.js +142 -0
  53. package/dist/model/HandleNoteChanges200Response.js +97 -0
  54. package/dist/model/HandleNoteGet200Response.js +101 -0
  55. package/dist/model/HandleNoteSignal200Response.js +79 -0
  56. package/dist/model/HandleNotefileChanges200Response.js +97 -0
  57. package/dist/model/HandleNotefileChangesPending200Response.js +106 -0
  58. package/dist/model/HandleNotefileDeleteRequest.js +83 -0
  59. package/dist/model/Http.js +163 -0
  60. package/dist/model/HttpFilter.js +128 -0
  61. package/dist/model/HttpTransform.js +139 -0
  62. package/dist/model/Location.js +167 -0
  63. package/dist/model/Login200Response.js +82 -0
  64. package/dist/model/LoginRequest.js +94 -0
  65. package/dist/model/Mqtt.js +240 -0
  66. package/dist/model/Note.js +90 -0
  67. package/dist/model/Product.js +141 -0
  68. package/dist/model/Project.js +165 -0
  69. package/dist/model/ProjectMember.js +131 -0
  70. package/dist/model/Proxy.js +128 -0
  71. package/dist/model/PutDeviceFleetsRequest.js +106 -0
  72. package/dist/model/Radresponder.js +130 -0
  73. package/dist/model/Role.js +43 -0
  74. package/dist/model/Route.js +245 -0
  75. package/dist/model/RouteSchema.js +427 -0
  76. package/dist/model/Snowflake.js +185 -0
  77. package/dist/model/SnowflakeTransform.js +97 -0
  78. package/dist/model/Thingworx.js +154 -0
  79. package/dist/model/TowerLocation.js +204 -0
  80. package/dist/model/Twilio.js +181 -0
  81. package/dist/model/UpdateFleetRequest.js +109 -0
  82. package/dist/model/UserDbRoute.js +131 -0
  83. package/package.json +49 -0
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _RouteSchema = _interopRequireDefault(require("./RouteSchema"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ /**
17
+ * The Route model module.
18
+ * @module model/Route
19
+ * @version 1.0.4
20
+ */
21
+ var Route = /*#__PURE__*/function () {
22
+ /**
23
+ * Constructs a new <code>Route</code>.
24
+ * @alias module:model/Route
25
+ */
26
+ function Route() {
27
+ _classCallCheck(this, Route);
28
+ Route.initialize(this);
29
+ }
30
+
31
+ /**
32
+ * Initializes the fields of this object.
33
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
34
+ * Only for internal use.
35
+ */
36
+ _createClass(Route, null, [{
37
+ key: "initialize",
38
+ value: function initialize(obj) {}
39
+
40
+ /**
41
+ * Constructs a <code>Route</code> from a plain JavaScript object, optionally creating a new instance.
42
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
43
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
44
+ * @param {module:model/Route} obj Optional instance to populate.
45
+ * @return {module:model/Route} The populated <code>Route</code> instance.
46
+ */
47
+ }, {
48
+ key: "constructFromObject",
49
+ value: function constructFromObject(data, obj) {
50
+ if (data) {
51
+ obj = obj || new Route();
52
+ if (data.hasOwnProperty('uid')) {
53
+ obj['uid'] = _ApiClient["default"].convertToType(data['uid'], 'String');
54
+ }
55
+ if (data.hasOwnProperty('label')) {
56
+ obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
57
+ }
58
+ if (data.hasOwnProperty('route_type')) {
59
+ obj['route_type'] = _ApiClient["default"].convertToType(data['route_type'], 'String');
60
+ }
61
+ if (data.hasOwnProperty('modified')) {
62
+ obj['modified'] = _ApiClient["default"].convertToType(data['modified'], 'String');
63
+ }
64
+ if (data.hasOwnProperty('disabled')) {
65
+ obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
66
+ }
67
+ if (data.hasOwnProperty('schema')) {
68
+ obj['schema'] = _RouteSchema["default"].constructFromObject(data['schema']);
69
+ }
70
+ } else if (data === null) {
71
+ return null;
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>Route</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Route</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // ensure the json data is a string
85
+ if (data['uid'] && !(typeof data['uid'] === 'string' || data['uid'] instanceof String)) {
86
+ throw new Error("Expected the field `uid` to be a primitive type in the JSON string but got " + data['uid']);
87
+ }
88
+ // ensure the json data is a string
89
+ if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
90
+ throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
91
+ }
92
+ // ensure the json data is a string
93
+ if (data['route_type'] && !(typeof data['route_type'] === 'string' || data['route_type'] instanceof String)) {
94
+ throw new Error("Expected the field `route_type` to be a primitive type in the JSON string but got " + data['route_type']);
95
+ }
96
+ // ensure the json data is a string
97
+ if (data['modified'] && !(typeof data['modified'] === 'string' || data['modified'] instanceof String)) {
98
+ throw new Error("Expected the field `modified` to be a primitive type in the JSON string but got " + data['modified']);
99
+ }
100
+ // validate the optional field `schema`
101
+ if (data['schema']) {
102
+ // data not null
103
+ _RouteSchema["default"].validateJSON(data['schema']);
104
+ }
105
+ return true;
106
+ }
107
+ }]);
108
+ return Route;
109
+ }();
110
+ /**
111
+ * Route UID
112
+ * @member {String} uid
113
+ */
114
+ Route.prototype['uid'] = undefined;
115
+
116
+ /**
117
+ * Route Label
118
+ * @member {String} label
119
+ */
120
+ Route.prototype['label'] = undefined;
121
+
122
+ /**
123
+ * Type of route.
124
+ * @member {module:model/Route.RouteTypeEnum} route_type
125
+ * @default 'http'
126
+ */
127
+ Route.prototype['route_type'] = 'http';
128
+
129
+ /**
130
+ * Last Modified
131
+ * @member {String} modified
132
+ */
133
+ Route.prototype['modified'] = undefined;
134
+
135
+ /**
136
+ * Is route disabled?
137
+ * @member {Boolean} disabled
138
+ * @default false
139
+ */
140
+ Route.prototype['disabled'] = false;
141
+
142
+ /**
143
+ * @member {module:model/RouteSchema} schema
144
+ */
145
+ Route.prototype['schema'] = undefined;
146
+
147
+ /**
148
+ * Allowed values for the <code>route_type</code> property.
149
+ * @enum {String}
150
+ * @readonly
151
+ */
152
+ Route['RouteTypeEnum'] = {
153
+ /**
154
+ * value: "http"
155
+ * @const
156
+ */
157
+ "http": "http",
158
+ /**
159
+ * value: "proxy"
160
+ * @const
161
+ */
162
+ "proxy": "proxy",
163
+ /**
164
+ * value: "google-function"
165
+ * @const
166
+ */
167
+ "google-function": "google-function",
168
+ /**
169
+ * value: "mqtt"
170
+ * @const
171
+ */
172
+ "mqtt": "mqtt",
173
+ /**
174
+ * value: "aws-lambda"
175
+ * @const
176
+ */
177
+ "aws-lambda": "aws-lambda",
178
+ /**
179
+ * value: "aws-lambda-with-access-key"
180
+ * @const
181
+ */
182
+ "aws-lambda-with-access-key": "aws-lambda-with-access-key",
183
+ /**
184
+ * value: "aws-sqs"
185
+ * @const
186
+ */
187
+ "aws-sqs": "aws-sqs",
188
+ /**
189
+ * value: "aws-sqs-with-access-key"
190
+ * @const
191
+ */
192
+ "aws-sqs-with-access-key": "aws-sqs-with-access-key",
193
+ /**
194
+ * value: "aws-sqs-fifo"
195
+ * @const
196
+ */
197
+ "aws-sqs-fifo": "aws-sqs-fifo",
198
+ /**
199
+ * value: "aws-sqs-fifo-with-access-key"
200
+ * @const
201
+ */
202
+ "aws-sqs-fifo-with-access-key": "aws-sqs-fifo-with-access-key",
203
+ /**
204
+ * value: "aws-iot-analytics"
205
+ * @const
206
+ */
207
+ "aws-iot-analytics": "aws-iot-analytics",
208
+ /**
209
+ * value: "radnote-radresp-fixed-survey"
210
+ * @const
211
+ */
212
+ "radnote-radresp-fixed-survey": "radnote-radresp-fixed-survey",
213
+ /**
214
+ * value: "radnote-radresp-mobile-survey"
215
+ * @const
216
+ */
217
+ "radnote-radresp-mobile-survey": "radnote-radresp-mobile-survey",
218
+ /**
219
+ * value: "azure-function"
220
+ * @const
221
+ */
222
+ "azure-function": "azure-function",
223
+ /**
224
+ * value: "azure-function-with-key"
225
+ * @const
226
+ */
227
+ "azure-function-with-key": "azure-function-with-key",
228
+ /**
229
+ * value: "azure-service-bus-with-sas-token"
230
+ * @const
231
+ */
232
+ "azure-service-bus-with-sas-token": "azure-service-bus-with-sas-token",
233
+ /**
234
+ * value: "thingworx"
235
+ * @const
236
+ */
237
+ "thingworx": "thingworx",
238
+ /**
239
+ * value: "snowflake"
240
+ * @const
241
+ */
242
+ "snowflake": "snowflake"
243
+ };
244
+ var _default = Route;
245
+ exports["default"] = _default;
@@ -0,0 +1,427 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Aws = _interopRequireDefault(require("./Aws"));
9
+ var _Azure = _interopRequireDefault(require("./Azure"));
10
+ var _Google = _interopRequireDefault(require("./Google"));
11
+ var _Http = _interopRequireDefault(require("./Http"));
12
+ var _HttpFilter = _interopRequireDefault(require("./HttpFilter"));
13
+ var _Mqtt = _interopRequireDefault(require("./Mqtt"));
14
+ var _Proxy = _interopRequireDefault(require("./Proxy"));
15
+ var _Radresponder = _interopRequireDefault(require("./Radresponder"));
16
+ var _Snowflake = _interopRequireDefault(require("./Snowflake"));
17
+ var _SnowflakeTransform = _interopRequireDefault(require("./SnowflakeTransform"));
18
+ var _Thingworx = _interopRequireDefault(require("./Thingworx"));
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
21
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
23
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
24
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
27
+ /**
28
+ * The RouteSchema model module.
29
+ * @module model/RouteSchema
30
+ * @version 1.0.4
31
+ */
32
+ var RouteSchema = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>RouteSchema</code>.
35
+ * @alias module:model/RouteSchema
36
+ * @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} instance The actual instance to initialize RouteSchema.
37
+ */
38
+ function RouteSchema() {
39
+ var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
40
+ _classCallCheck(this, RouteSchema);
41
+ _defineProperty(this, "toJSON", function () {
42
+ return this.getActualInstance();
43
+ });
44
+ if (instance === null) {
45
+ this.actualInstance = null;
46
+ return;
47
+ }
48
+ var match = 0;
49
+ var errorMessages = [];
50
+ try {
51
+ if (typeof instance === "Http") {
52
+ this.actualInstance = instance;
53
+ } else {
54
+ // plain JS object
55
+ // validate the object
56
+ _Http["default"].validateJSON(instance); // throw an exception if no match
57
+ // create Http from JS object
58
+ this.actualInstance = _Http["default"].constructFromObject(instance);
59
+ }
60
+ match++;
61
+ } catch (err) {
62
+ // json data failed to deserialize into Http
63
+ errorMessages.push("Failed to construct Http: " + err);
64
+ }
65
+ try {
66
+ if (typeof instance === "Google") {
67
+ this.actualInstance = instance;
68
+ } else {
69
+ // plain JS object
70
+ // validate the object
71
+ _Google["default"].validateJSON(instance); // throw an exception if no match
72
+ // create Google from JS object
73
+ this.actualInstance = _Google["default"].constructFromObject(instance);
74
+ }
75
+ match++;
76
+ } catch (err) {
77
+ // json data failed to deserialize into Google
78
+ errorMessages.push("Failed to construct Google: " + err);
79
+ }
80
+ try {
81
+ if (typeof instance === "Proxy") {
82
+ this.actualInstance = instance;
83
+ } else {
84
+ // plain JS object
85
+ // validate the object
86
+ _Proxy["default"].validateJSON(instance); // throw an exception if no match
87
+ // create Proxy from JS object
88
+ this.actualInstance = _Proxy["default"].constructFromObject(instance);
89
+ }
90
+ match++;
91
+ } catch (err) {
92
+ // json data failed to deserialize into Proxy
93
+ errorMessages.push("Failed to construct Proxy: " + err);
94
+ }
95
+ try {
96
+ if (typeof instance === "Mqtt") {
97
+ this.actualInstance = instance;
98
+ } else {
99
+ // plain JS object
100
+ // validate the object
101
+ _Mqtt["default"].validateJSON(instance); // throw an exception if no match
102
+ // create Mqtt from JS object
103
+ this.actualInstance = _Mqtt["default"].constructFromObject(instance);
104
+ }
105
+ match++;
106
+ } catch (err) {
107
+ // json data failed to deserialize into Mqtt
108
+ errorMessages.push("Failed to construct Mqtt: " + err);
109
+ }
110
+ try {
111
+ if (typeof instance === "Aws") {
112
+ this.actualInstance = instance;
113
+ } else {
114
+ // plain JS object
115
+ // validate the object
116
+ _Aws["default"].validateJSON(instance); // throw an exception if no match
117
+ // create Aws from JS object
118
+ this.actualInstance = _Aws["default"].constructFromObject(instance);
119
+ }
120
+ match++;
121
+ } catch (err) {
122
+ // json data failed to deserialize into Aws
123
+ errorMessages.push("Failed to construct Aws: " + err);
124
+ }
125
+ try {
126
+ if (typeof instance === "Radresponder") {
127
+ this.actualInstance = instance;
128
+ } else {
129
+ // plain JS object
130
+ // validate the object
131
+ _Radresponder["default"].validateJSON(instance); // throw an exception if no match
132
+ // create Radresponder from JS object
133
+ this.actualInstance = _Radresponder["default"].constructFromObject(instance);
134
+ }
135
+ match++;
136
+ } catch (err) {
137
+ // json data failed to deserialize into Radresponder
138
+ errorMessages.push("Failed to construct Radresponder: " + err);
139
+ }
140
+ try {
141
+ if (typeof instance === "Azure") {
142
+ this.actualInstance = instance;
143
+ } else {
144
+ // plain JS object
145
+ // validate the object
146
+ _Azure["default"].validateJSON(instance); // throw an exception if no match
147
+ // create Azure from JS object
148
+ this.actualInstance = _Azure["default"].constructFromObject(instance);
149
+ }
150
+ match++;
151
+ } catch (err) {
152
+ // json data failed to deserialize into Azure
153
+ errorMessages.push("Failed to construct Azure: " + err);
154
+ }
155
+ try {
156
+ if (typeof instance === "Thingworx") {
157
+ this.actualInstance = instance;
158
+ } else {
159
+ // plain JS object
160
+ // validate the object
161
+ _Thingworx["default"].validateJSON(instance); // throw an exception if no match
162
+ // create Thingworx from JS object
163
+ this.actualInstance = _Thingworx["default"].constructFromObject(instance);
164
+ }
165
+ match++;
166
+ } catch (err) {
167
+ // json data failed to deserialize into Thingworx
168
+ errorMessages.push("Failed to construct Thingworx: " + err);
169
+ }
170
+ try {
171
+ if (typeof instance === "Snowflake") {
172
+ this.actualInstance = instance;
173
+ } else {
174
+ // plain JS object
175
+ // validate the object
176
+ _Snowflake["default"].validateJSON(instance); // throw an exception if no match
177
+ // create Snowflake from JS object
178
+ this.actualInstance = _Snowflake["default"].constructFromObject(instance);
179
+ }
180
+ match++;
181
+ } catch (err) {
182
+ // json data failed to deserialize into Snowflake
183
+ errorMessages.push("Failed to construct Snowflake: " + err);
184
+ }
185
+ if (match > 1) {
186
+ throw new Error("Multiple matches found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Snowflake, Thingworx. Input: " + JSON.stringify(instance));
187
+ } else if (match === 0) {
188
+ this.actualInstance = null; // clear the actual instance in case there are multiple matches
189
+ throw new Error("No match found constructing `RouteSchema` with oneOf schemas Aws, Azure, Google, Http, Mqtt, Proxy, Radresponder, Snowflake, Thingworx. Details: " + errorMessages.join(", "));
190
+ } else {// only 1 match
191
+ // the input is valid
192
+ }
193
+ }
194
+
195
+ /**
196
+ * Constructs a <code>RouteSchema</code> from a plain JavaScript object, optionally creating a new instance.
197
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
198
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
199
+ * @param {module:model/RouteSchema} obj Optional instance to populate.
200
+ * @return {module:model/RouteSchema} The populated <code>RouteSchema</code> instance.
201
+ */
202
+ _createClass(RouteSchema, [{
203
+ key: "getActualInstance",
204
+ value:
205
+ /**
206
+ * Gets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Snowflake</code>, <code>Thingworx</code>.
207
+ * @return {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} The actual instance.
208
+ */
209
+ function getActualInstance() {
210
+ return this.actualInstance;
211
+ }
212
+
213
+ /**
214
+ * Sets the actaul instance, which can be <code>Aws</code>, <code>Azure</code>, <code>Google</code>, <code>Http</code>, <code>Mqtt</code>, <code>Proxy</code>, <code>Radresponder</code>, <code>Snowflake</code>, <code>Thingworx</code>.
215
+ * @param {(module:model/Aws|module:model/Azure|module:model/Google|module:model/Http|module:model/Mqtt|module:model/Proxy|module:model/Radresponder|module:model/Snowflake|module:model/Thingworx)} obj The actual instance.
216
+ */
217
+ }, {
218
+ key: "setActualInstance",
219
+ value: function setActualInstance(obj) {
220
+ this.actualInstance = RouteSchema.constructFromObject(obj).getActualInstance();
221
+ }
222
+
223
+ /**
224
+ * Returns the JSON representation of the actual intance.
225
+ * @return {string}
226
+ */
227
+ }], [{
228
+ key: "constructFromObject",
229
+ value: function constructFromObject(data, obj) {
230
+ return new RouteSchema(data);
231
+ }
232
+ }]);
233
+ return RouteSchema;
234
+ }();
235
+ /**
236
+ * list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
237
+ * @member {Array.<String>} fleets
238
+ */
239
+ _defineProperty(RouteSchema, "fromJSON", function (json_string) {
240
+ return RouteSchema.constructFromObject(JSON.parse(json_string));
241
+ });
242
+ RouteSchema.prototype['fleets'] = undefined;
243
+
244
+ /**
245
+ * @member {module:model/HttpFilter} filter
246
+ */
247
+ RouteSchema.prototype['filter'] = undefined;
248
+
249
+ /**
250
+ * @member {module:model/SnowflakeTransform} transform
251
+ */
252
+ RouteSchema.prototype['transform'] = undefined;
253
+
254
+ /**
255
+ * @member {Number} throttle_ms
256
+ */
257
+ RouteSchema.prototype['throttle_ms'] = undefined;
258
+
259
+ /**
260
+ * @member {String} url
261
+ */
262
+ RouteSchema.prototype['url'] = undefined;
263
+
264
+ /**
265
+ * @member {Object.<String, String>} http_headers
266
+ */
267
+ RouteSchema.prototype['http_headers'] = undefined;
268
+
269
+ /**
270
+ * @member {Boolean} disable_http_headers
271
+ * @default false
272
+ */
273
+ RouteSchema.prototype['disable_http_headers'] = false;
274
+
275
+ /**
276
+ * Timeout in seconds for each request
277
+ * @member {Number} timeout
278
+ * @default 15
279
+ */
280
+ RouteSchema.prototype['timeout'] = 15;
281
+
282
+ /**
283
+ * @member {String} alias
284
+ */
285
+ RouteSchema.prototype['alias'] = undefined;
286
+
287
+ /**
288
+ * @member {String} broker
289
+ */
290
+ RouteSchema.prototype['broker'] = undefined;
291
+
292
+ /**
293
+ * @member {Number} port
294
+ */
295
+ RouteSchema.prototype['port'] = undefined;
296
+
297
+ /**
298
+ * @member {String} username
299
+ */
300
+ RouteSchema.prototype['username'] = undefined;
301
+
302
+ /**
303
+ * @member {String} password
304
+ */
305
+ RouteSchema.prototype['password'] = undefined;
306
+
307
+ /**
308
+ * @member {String} topic
309
+ */
310
+ RouteSchema.prototype['topic'] = undefined;
311
+
312
+ /**
313
+ * Certificate with \\n newlines. Field is input only, will not show contents on GET operations.
314
+ * @member {String} certificate
315
+ */
316
+ RouteSchema.prototype['certificate'] = undefined;
317
+
318
+ /**
319
+ * Name of certificate. If omitted, defaults to \"present\"
320
+ * @member {String} certificate_name
321
+ * @default 'present'
322
+ */
323
+ RouteSchema.prototype['certificate_name'] = 'present';
324
+
325
+ /**
326
+ * Key with \\n newlines. Field is input only, will not show contents on GET operations.
327
+ * @member {String} key
328
+ */
329
+ RouteSchema.prototype['key'] = undefined;
330
+
331
+ /**
332
+ * Name of PEM key. If omitted, defaults to \"present\"
333
+ * @member {String} private_key_name
334
+ * @default 'present'
335
+ */
336
+ RouteSchema.prototype['private_key_name'] = 'present';
337
+
338
+ /**
339
+ * @member {String} region
340
+ */
341
+ RouteSchema.prototype['region'] = undefined;
342
+
343
+ /**
344
+ * @member {String} access_key_id
345
+ */
346
+ RouteSchema.prototype['access_key_id'] = undefined;
347
+
348
+ /**
349
+ * @member {String} access_key_secret
350
+ */
351
+ RouteSchema.prototype['access_key_secret'] = undefined;
352
+
353
+ /**
354
+ * @member {String} message_group_id
355
+ */
356
+ RouteSchema.prototype['message_group_id'] = undefined;
357
+
358
+ /**
359
+ * @member {String} message_deduplication_id
360
+ */
361
+ RouteSchema.prototype['message_deduplication_id'] = undefined;
362
+
363
+ /**
364
+ * @member {String} channel
365
+ */
366
+ RouteSchema.prototype['channel'] = undefined;
367
+
368
+ /**
369
+ * @member {Boolean} test_api
370
+ * @default false
371
+ */
372
+ RouteSchema.prototype['test_api'] = false;
373
+
374
+ /**
375
+ * @member {String} data_feed_key
376
+ */
377
+ RouteSchema.prototype['data_feed_key'] = undefined;
378
+
379
+ /**
380
+ * @member {String} client_id
381
+ */
382
+ RouteSchema.prototype['client_id'] = undefined;
383
+
384
+ /**
385
+ * Client Secret is input only, will not display on GET operations
386
+ * @member {String} client_secret
387
+ */
388
+ RouteSchema.prototype['client_secret'] = undefined;
389
+
390
+ /**
391
+ * @member {String} sas_policy_name
392
+ */
393
+ RouteSchema.prototype['sas_policy_name'] = undefined;
394
+
395
+ /**
396
+ * @member {String} sas_policy_key
397
+ */
398
+ RouteSchema.prototype['sas_policy_key'] = undefined;
399
+
400
+ /**
401
+ * @member {String} app_key
402
+ */
403
+ RouteSchema.prototype['app_key'] = undefined;
404
+
405
+ /**
406
+ * @member {String} organization_name
407
+ */
408
+ RouteSchema.prototype['organization_name'] = undefined;
409
+
410
+ /**
411
+ * @member {String} account_name
412
+ */
413
+ RouteSchema.prototype['account_name'] = undefined;
414
+
415
+ /**
416
+ * @member {String} user_name
417
+ */
418
+ RouteSchema.prototype['user_name'] = undefined;
419
+
420
+ /**
421
+ * PEM key with \\n newlines. Field is input only, will not show contents on GET operations.
422
+ * @member {String} pem
423
+ */
424
+ RouteSchema.prototype['pem'] = undefined;
425
+ RouteSchema.OneOf = ["Aws", "Azure", "Google", "Http", "Mqtt", "Proxy", "Radresponder", "Snowflake", "Thingworx"];
426
+ var _default = RouteSchema;
427
+ exports["default"] = _default;