@aws-sdk/client-iot-events-data 3.183.0 → 3.185.0
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.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/IoTEventsData.js +57 -50
- package/dist-es/IoTEventsDataClient.js +28 -22
- package/dist-es/commands/BatchAcknowledgeAlarmCommand.js +28 -21
- package/dist-es/commands/BatchDeleteDetectorCommand.js +28 -21
- package/dist-es/commands/BatchDisableAlarmCommand.js +28 -21
- package/dist-es/commands/BatchEnableAlarmCommand.js +28 -21
- package/dist-es/commands/BatchPutMessageCommand.js +28 -21
- package/dist-es/commands/BatchResetAlarmCommand.js +28 -21
- package/dist-es/commands/BatchSnoozeAlarmCommand.js +28 -21
- package/dist-es/commands/BatchUpdateDetectorCommand.js +28 -21
- package/dist-es/commands/DescribeAlarmCommand.js +28 -21
- package/dist-es/commands/DescribeDetectorCommand.js +28 -21
- package/dist-es/commands/ListAlarmsCommand.js +28 -21
- package/dist-es/commands/ListDetectorsCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/IoTEventsDataServiceException.js +10 -5
- package/dist-es/models/models_0.js +115 -232
- package/dist-es/protocols/Aws_restJson1.js +1327 -988
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,1011 +1,1332 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { IoTEventsDataServiceException as __BaseException } from "../models/IoTEventsDataServiceException";
|
|
4
5
|
import { InternalFailureException, InvalidRequestException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
export var serializeAws_restJson1BatchAcknowledgeAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/acknowledge";
|
|
17
|
+
body = JSON.stringify(__assign({}, (input.acknowledgeActionRequests != null && {
|
|
18
|
+
acknowledgeActionRequests: serializeAws_restJson1AcknowledgeAlarmActionRequests(input.acknowledgeActionRequests, context),
|
|
19
|
+
})));
|
|
20
|
+
return [2, new __HttpRequest({
|
|
21
|
+
protocol: protocol,
|
|
22
|
+
hostname: hostname,
|
|
23
|
+
port: port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body: body,
|
|
28
|
+
})];
|
|
29
|
+
}
|
|
16
30
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
}); };
|
|
32
|
+
export var serializeAws_restJson1BatchDeleteDetectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
34
|
+
return __generator(this, function (_c) {
|
|
35
|
+
switch (_c.label) {
|
|
36
|
+
case 0: return [4, context.endpoint()];
|
|
37
|
+
case 1:
|
|
38
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
+
headers = {
|
|
40
|
+
"content-type": "application/json",
|
|
41
|
+
};
|
|
42
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/detectors/delete";
|
|
43
|
+
body = JSON.stringify(__assign({}, (input.detectors != null && {
|
|
44
|
+
detectors: serializeAws_restJson1DeleteDetectorRequests(input.detectors, context),
|
|
45
|
+
})));
|
|
46
|
+
return [2, new __HttpRequest({
|
|
47
|
+
protocol: protocol,
|
|
48
|
+
hostname: hostname,
|
|
49
|
+
port: port,
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: headers,
|
|
52
|
+
path: resolvedPath,
|
|
53
|
+
body: body,
|
|
54
|
+
})];
|
|
55
|
+
}
|
|
25
56
|
});
|
|
26
|
-
};
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
57
|
+
}); };
|
|
58
|
+
export var serializeAws_restJson1BatchDisableAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
60
|
+
return __generator(this, function (_c) {
|
|
61
|
+
switch (_c.label) {
|
|
62
|
+
case 0: return [4, context.endpoint()];
|
|
63
|
+
case 1:
|
|
64
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
65
|
+
headers = {
|
|
66
|
+
"content-type": "application/json",
|
|
67
|
+
};
|
|
68
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/disable";
|
|
69
|
+
body = JSON.stringify(__assign({}, (input.disableActionRequests != null && {
|
|
70
|
+
disableActionRequests: serializeAws_restJson1DisableAlarmActionRequests(input.disableActionRequests, context),
|
|
71
|
+
})));
|
|
72
|
+
return [2, new __HttpRequest({
|
|
73
|
+
protocol: protocol,
|
|
74
|
+
hostname: hostname,
|
|
75
|
+
port: port,
|
|
76
|
+
method: "POST",
|
|
77
|
+
headers: headers,
|
|
78
|
+
path: resolvedPath,
|
|
79
|
+
body: body,
|
|
80
|
+
})];
|
|
81
|
+
}
|
|
38
82
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
83
|
+
}); };
|
|
84
|
+
export var serializeAws_restJson1BatchEnableAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
86
|
+
return __generator(this, function (_c) {
|
|
87
|
+
switch (_c.label) {
|
|
88
|
+
case 0: return [4, context.endpoint()];
|
|
89
|
+
case 1:
|
|
90
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
91
|
+
headers = {
|
|
92
|
+
"content-type": "application/json",
|
|
93
|
+
};
|
|
94
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/enable";
|
|
95
|
+
body = JSON.stringify(__assign({}, (input.enableActionRequests != null && {
|
|
96
|
+
enableActionRequests: serializeAws_restJson1EnableAlarmActionRequests(input.enableActionRequests, context),
|
|
97
|
+
})));
|
|
98
|
+
return [2, new __HttpRequest({
|
|
99
|
+
protocol: protocol,
|
|
100
|
+
hostname: hostname,
|
|
101
|
+
port: port,
|
|
102
|
+
method: "POST",
|
|
103
|
+
headers: headers,
|
|
104
|
+
path: resolvedPath,
|
|
105
|
+
body: body,
|
|
106
|
+
})];
|
|
107
|
+
}
|
|
47
108
|
});
|
|
48
|
-
};
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
109
|
+
}); };
|
|
110
|
+
export var serializeAws_restJson1BatchPutMessageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
111
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
112
|
+
return __generator(this, function (_c) {
|
|
113
|
+
switch (_c.label) {
|
|
114
|
+
case 0: return [4, context.endpoint()];
|
|
115
|
+
case 1:
|
|
116
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
117
|
+
headers = {
|
|
118
|
+
"content-type": "application/json",
|
|
119
|
+
};
|
|
120
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/inputs/messages";
|
|
121
|
+
body = JSON.stringify(__assign({}, (input.messages != null && { messages: serializeAws_restJson1Messages(input.messages, context) })));
|
|
122
|
+
return [2, new __HttpRequest({
|
|
123
|
+
protocol: protocol,
|
|
124
|
+
hostname: hostname,
|
|
125
|
+
port: port,
|
|
126
|
+
method: "POST",
|
|
127
|
+
headers: headers,
|
|
128
|
+
path: resolvedPath,
|
|
129
|
+
body: body,
|
|
130
|
+
})];
|
|
131
|
+
}
|
|
60
132
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
133
|
+
}); };
|
|
134
|
+
export var serializeAws_restJson1BatchResetAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
136
|
+
return __generator(this, function (_c) {
|
|
137
|
+
switch (_c.label) {
|
|
138
|
+
case 0: return [4, context.endpoint()];
|
|
139
|
+
case 1:
|
|
140
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
141
|
+
headers = {
|
|
142
|
+
"content-type": "application/json",
|
|
143
|
+
};
|
|
144
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/reset";
|
|
145
|
+
body = JSON.stringify(__assign({}, (input.resetActionRequests != null && {
|
|
146
|
+
resetActionRequests: serializeAws_restJson1ResetAlarmActionRequests(input.resetActionRequests, context),
|
|
147
|
+
})));
|
|
148
|
+
return [2, new __HttpRequest({
|
|
149
|
+
protocol: protocol,
|
|
150
|
+
hostname: hostname,
|
|
151
|
+
port: port,
|
|
152
|
+
method: "POST",
|
|
153
|
+
headers: headers,
|
|
154
|
+
path: resolvedPath,
|
|
155
|
+
body: body,
|
|
156
|
+
})];
|
|
157
|
+
}
|
|
69
158
|
});
|
|
70
|
-
};
|
|
71
|
-
export
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
159
|
+
}); };
|
|
160
|
+
export var serializeAws_restJson1BatchSnoozeAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
161
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
162
|
+
return __generator(this, function (_c) {
|
|
163
|
+
switch (_c.label) {
|
|
164
|
+
case 0: return [4, context.endpoint()];
|
|
165
|
+
case 1:
|
|
166
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
167
|
+
headers = {
|
|
168
|
+
"content-type": "application/json",
|
|
169
|
+
};
|
|
170
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/snooze";
|
|
171
|
+
body = JSON.stringify(__assign({}, (input.snoozeActionRequests != null && {
|
|
172
|
+
snoozeActionRequests: serializeAws_restJson1SnoozeAlarmActionRequests(input.snoozeActionRequests, context),
|
|
173
|
+
})));
|
|
174
|
+
return [2, new __HttpRequest({
|
|
175
|
+
protocol: protocol,
|
|
176
|
+
hostname: hostname,
|
|
177
|
+
port: port,
|
|
178
|
+
method: "POST",
|
|
179
|
+
headers: headers,
|
|
180
|
+
path: resolvedPath,
|
|
181
|
+
body: body,
|
|
182
|
+
})];
|
|
183
|
+
}
|
|
82
184
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
185
|
+
}); };
|
|
186
|
+
export var serializeAws_restJson1BatchUpdateDetectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
188
|
+
return __generator(this, function (_c) {
|
|
189
|
+
switch (_c.label) {
|
|
190
|
+
case 0: return [4, context.endpoint()];
|
|
191
|
+
case 1:
|
|
192
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
193
|
+
headers = {
|
|
194
|
+
"content-type": "application/json",
|
|
195
|
+
};
|
|
196
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/detectors";
|
|
197
|
+
body = JSON.stringify(__assign({}, (input.detectors != null && {
|
|
198
|
+
detectors: serializeAws_restJson1UpdateDetectorRequests(input.detectors, context),
|
|
199
|
+
})));
|
|
200
|
+
return [2, new __HttpRequest({
|
|
201
|
+
protocol: protocol,
|
|
202
|
+
hostname: hostname,
|
|
203
|
+
port: port,
|
|
204
|
+
method: "POST",
|
|
205
|
+
headers: headers,
|
|
206
|
+
path: resolvedPath,
|
|
207
|
+
body: body,
|
|
208
|
+
})];
|
|
209
|
+
}
|
|
91
210
|
});
|
|
92
|
-
};
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
211
|
+
}); };
|
|
212
|
+
export var serializeAws_restJson1DescribeAlarmCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
213
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
214
|
+
return __generator(this, function (_c) {
|
|
215
|
+
switch (_c.label) {
|
|
216
|
+
case 0: return [4, context.endpoint()];
|
|
217
|
+
case 1:
|
|
218
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
219
|
+
headers = {};
|
|
220
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/{alarmModelName}/keyValues";
|
|
221
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "alarmModelName", function () { return input.alarmModelName; }, "{alarmModelName}", false);
|
|
222
|
+
query = map({
|
|
223
|
+
keyValue: [, input.keyValue],
|
|
224
|
+
});
|
|
225
|
+
return [2, new __HttpRequest({
|
|
226
|
+
protocol: protocol,
|
|
227
|
+
hostname: hostname,
|
|
228
|
+
port: port,
|
|
229
|
+
method: "GET",
|
|
230
|
+
headers: headers,
|
|
231
|
+
path: resolvedPath,
|
|
232
|
+
query: query,
|
|
233
|
+
body: body,
|
|
234
|
+
})];
|
|
235
|
+
}
|
|
102
236
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
237
|
+
}); };
|
|
238
|
+
export var serializeAws_restJson1DescribeDetectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
239
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
240
|
+
return __generator(this, function (_c) {
|
|
241
|
+
switch (_c.label) {
|
|
242
|
+
case 0: return [4, context.endpoint()];
|
|
243
|
+
case 1:
|
|
244
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
245
|
+
headers = {};
|
|
246
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/detectors/{detectorModelName}/keyValues";
|
|
247
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "detectorModelName", function () { return input.detectorModelName; }, "{detectorModelName}", false);
|
|
248
|
+
query = map({
|
|
249
|
+
keyValue: [, input.keyValue],
|
|
250
|
+
});
|
|
251
|
+
return [2, new __HttpRequest({
|
|
252
|
+
protocol: protocol,
|
|
253
|
+
hostname: hostname,
|
|
254
|
+
port: port,
|
|
255
|
+
method: "GET",
|
|
256
|
+
headers: headers,
|
|
257
|
+
path: resolvedPath,
|
|
258
|
+
query: query,
|
|
259
|
+
body: body,
|
|
260
|
+
})];
|
|
261
|
+
}
|
|
111
262
|
});
|
|
112
|
-
};
|
|
113
|
-
export
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
263
|
+
}); };
|
|
264
|
+
export var serializeAws_restJson1ListAlarmsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
265
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
266
|
+
return __generator(this, function (_c) {
|
|
267
|
+
switch (_c.label) {
|
|
268
|
+
case 0: return [4, context.endpoint()];
|
|
269
|
+
case 1:
|
|
270
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
271
|
+
headers = {};
|
|
272
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/alarms/{alarmModelName}";
|
|
273
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "alarmModelName", function () { return input.alarmModelName; }, "{alarmModelName}", false);
|
|
274
|
+
query = map({
|
|
275
|
+
nextToken: [, input.nextToken],
|
|
276
|
+
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
277
|
+
});
|
|
278
|
+
return [2, new __HttpRequest({
|
|
279
|
+
protocol: protocol,
|
|
280
|
+
hostname: hostname,
|
|
281
|
+
port: port,
|
|
282
|
+
method: "GET",
|
|
283
|
+
headers: headers,
|
|
284
|
+
path: resolvedPath,
|
|
285
|
+
query: query,
|
|
286
|
+
body: body,
|
|
287
|
+
})];
|
|
288
|
+
}
|
|
124
289
|
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
290
|
+
}); };
|
|
291
|
+
export var serializeAws_restJson1ListDetectorsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
292
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
293
|
+
return __generator(this, function (_c) {
|
|
294
|
+
switch (_c.label) {
|
|
295
|
+
case 0: return [4, context.endpoint()];
|
|
296
|
+
case 1:
|
|
297
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
298
|
+
headers = {};
|
|
299
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/detectors/{detectorModelName}";
|
|
300
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "detectorModelName", function () { return input.detectorModelName; }, "{detectorModelName}", false);
|
|
301
|
+
query = map({
|
|
302
|
+
stateName: [, input.stateName],
|
|
303
|
+
nextToken: [, input.nextToken],
|
|
304
|
+
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
305
|
+
});
|
|
306
|
+
return [2, new __HttpRequest({
|
|
307
|
+
protocol: protocol,
|
|
308
|
+
hostname: hostname,
|
|
309
|
+
port: port,
|
|
310
|
+
method: "GET",
|
|
311
|
+
headers: headers,
|
|
312
|
+
path: resolvedPath,
|
|
313
|
+
query: query,
|
|
314
|
+
body: body,
|
|
315
|
+
})];
|
|
316
|
+
}
|
|
133
317
|
});
|
|
134
|
-
};
|
|
135
|
-
export
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
318
|
+
}); };
|
|
319
|
+
export var deserializeAws_restJson1BatchAcknowledgeAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
320
|
+
var contents, data, _a, _b;
|
|
321
|
+
return __generator(this, function (_c) {
|
|
322
|
+
switch (_c.label) {
|
|
323
|
+
case 0:
|
|
324
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
325
|
+
return [2, deserializeAws_restJson1BatchAcknowledgeAlarmCommandError(output, context)];
|
|
326
|
+
}
|
|
327
|
+
contents = map({
|
|
328
|
+
$metadata: deserializeMetadata(output),
|
|
329
|
+
});
|
|
330
|
+
_a = __expectNonNull;
|
|
331
|
+
_b = __expectObject;
|
|
332
|
+
return [4, parseBody(output.body, context)];
|
|
333
|
+
case 1:
|
|
334
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
335
|
+
if (data.errorEntries != null) {
|
|
336
|
+
contents.errorEntries = deserializeAws_restJson1BatchAlarmActionErrorEntries(data.errorEntries, context);
|
|
337
|
+
}
|
|
338
|
+
return [2, contents];
|
|
339
|
+
}
|
|
146
340
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
341
|
+
}); };
|
|
342
|
+
var deserializeAws_restJson1BatchAcknowledgeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
343
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
344
|
+
var _c;
|
|
345
|
+
return __generator(this, function (_d) {
|
|
346
|
+
switch (_d.label) {
|
|
347
|
+
case 0:
|
|
348
|
+
_a = [__assign({}, output)];
|
|
349
|
+
_c = {};
|
|
350
|
+
return [4, parseErrorBody(output.body, context)];
|
|
351
|
+
case 1:
|
|
352
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
353
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
354
|
+
_b = errorCode;
|
|
355
|
+
switch (_b) {
|
|
356
|
+
case "InternalFailureException": return [3, 2];
|
|
357
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
358
|
+
case "InvalidRequestException": return [3, 4];
|
|
359
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
360
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
361
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
362
|
+
case "ThrottlingException": return [3, 8];
|
|
363
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
364
|
+
}
|
|
365
|
+
return [3, 10];
|
|
366
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
367
|
+
case 3: throw _d.sent();
|
|
368
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
369
|
+
case 5: throw _d.sent();
|
|
370
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
371
|
+
case 7: throw _d.sent();
|
|
372
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
373
|
+
case 9: throw _d.sent();
|
|
374
|
+
case 10:
|
|
375
|
+
parsedBody = parsedOutput.body;
|
|
376
|
+
throwDefaultError({
|
|
377
|
+
output: output,
|
|
378
|
+
parsedBody: parsedBody,
|
|
379
|
+
exceptionCtor: __BaseException,
|
|
380
|
+
errorCode: errorCode,
|
|
381
|
+
});
|
|
382
|
+
_d.label = 11;
|
|
383
|
+
case 11: return [2];
|
|
384
|
+
}
|
|
155
385
|
});
|
|
156
|
-
};
|
|
157
|
-
export
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
386
|
+
}); };
|
|
387
|
+
export var deserializeAws_restJson1BatchDeleteDetectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
388
|
+
var contents, data, _a, _b;
|
|
389
|
+
return __generator(this, function (_c) {
|
|
390
|
+
switch (_c.label) {
|
|
391
|
+
case 0:
|
|
392
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
393
|
+
return [2, deserializeAws_restJson1BatchDeleteDetectorCommandError(output, context)];
|
|
394
|
+
}
|
|
395
|
+
contents = map({
|
|
396
|
+
$metadata: deserializeMetadata(output),
|
|
397
|
+
});
|
|
398
|
+
_a = __expectNonNull;
|
|
399
|
+
_b = __expectObject;
|
|
400
|
+
return [4, parseBody(output.body, context)];
|
|
401
|
+
case 1:
|
|
402
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
403
|
+
if (data.batchDeleteDetectorErrorEntries != null) {
|
|
404
|
+
contents.batchDeleteDetectorErrorEntries = deserializeAws_restJson1BatchDeleteDetectorErrorEntries(data.batchDeleteDetectorErrorEntries, context);
|
|
405
|
+
}
|
|
406
|
+
return [2, contents];
|
|
407
|
+
}
|
|
168
408
|
});
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
409
|
+
}); };
|
|
410
|
+
var deserializeAws_restJson1BatchDeleteDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
411
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
412
|
+
var _c;
|
|
413
|
+
return __generator(this, function (_d) {
|
|
414
|
+
switch (_d.label) {
|
|
415
|
+
case 0:
|
|
416
|
+
_a = [__assign({}, output)];
|
|
417
|
+
_c = {};
|
|
418
|
+
return [4, parseErrorBody(output.body, context)];
|
|
419
|
+
case 1:
|
|
420
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
421
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
422
|
+
_b = errorCode;
|
|
423
|
+
switch (_b) {
|
|
424
|
+
case "InternalFailureException": return [3, 2];
|
|
425
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
426
|
+
case "InvalidRequestException": return [3, 4];
|
|
427
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
428
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
429
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
430
|
+
case "ThrottlingException": return [3, 8];
|
|
431
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
432
|
+
}
|
|
433
|
+
return [3, 10];
|
|
434
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
435
|
+
case 3: throw _d.sent();
|
|
436
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
437
|
+
case 5: throw _d.sent();
|
|
438
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
439
|
+
case 7: throw _d.sent();
|
|
440
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
441
|
+
case 9: throw _d.sent();
|
|
442
|
+
case 10:
|
|
443
|
+
parsedBody = parsedOutput.body;
|
|
444
|
+
throwDefaultError({
|
|
445
|
+
output: output,
|
|
446
|
+
parsedBody: parsedBody,
|
|
447
|
+
exceptionCtor: __BaseException,
|
|
448
|
+
errorCode: errorCode,
|
|
449
|
+
});
|
|
450
|
+
_d.label = 11;
|
|
451
|
+
case 11: return [2];
|
|
452
|
+
}
|
|
177
453
|
});
|
|
178
|
-
};
|
|
179
|
-
export
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
454
|
+
}); };
|
|
455
|
+
export var deserializeAws_restJson1BatchDisableAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
456
|
+
var contents, data, _a, _b;
|
|
457
|
+
return __generator(this, function (_c) {
|
|
458
|
+
switch (_c.label) {
|
|
459
|
+
case 0:
|
|
460
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
461
|
+
return [2, deserializeAws_restJson1BatchDisableAlarmCommandError(output, context)];
|
|
462
|
+
}
|
|
463
|
+
contents = map({
|
|
464
|
+
$metadata: deserializeMetadata(output),
|
|
465
|
+
});
|
|
466
|
+
_a = __expectNonNull;
|
|
467
|
+
_b = __expectObject;
|
|
468
|
+
return [4, parseBody(output.body, context)];
|
|
469
|
+
case 1:
|
|
470
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
471
|
+
if (data.errorEntries != null) {
|
|
472
|
+
contents.errorEntries = deserializeAws_restJson1BatchAlarmActionErrorEntries(data.errorEntries, context);
|
|
473
|
+
}
|
|
474
|
+
return [2, contents];
|
|
475
|
+
}
|
|
186
476
|
});
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
477
|
+
}); };
|
|
478
|
+
var deserializeAws_restJson1BatchDisableAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
479
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
480
|
+
var _c;
|
|
481
|
+
return __generator(this, function (_d) {
|
|
482
|
+
switch (_d.label) {
|
|
483
|
+
case 0:
|
|
484
|
+
_a = [__assign({}, output)];
|
|
485
|
+
_c = {};
|
|
486
|
+
return [4, parseErrorBody(output.body, context)];
|
|
487
|
+
case 1:
|
|
488
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
489
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
490
|
+
_b = errorCode;
|
|
491
|
+
switch (_b) {
|
|
492
|
+
case "InternalFailureException": return [3, 2];
|
|
493
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
494
|
+
case "InvalidRequestException": return [3, 4];
|
|
495
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
496
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
497
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
498
|
+
case "ThrottlingException": return [3, 8];
|
|
499
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
500
|
+
}
|
|
501
|
+
return [3, 10];
|
|
502
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
503
|
+
case 3: throw _d.sent();
|
|
504
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
505
|
+
case 5: throw _d.sent();
|
|
506
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
507
|
+
case 7: throw _d.sent();
|
|
508
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
509
|
+
case 9: throw _d.sent();
|
|
510
|
+
case 10:
|
|
511
|
+
parsedBody = parsedOutput.body;
|
|
512
|
+
throwDefaultError({
|
|
513
|
+
output: output,
|
|
514
|
+
parsedBody: parsedBody,
|
|
515
|
+
exceptionCtor: __BaseException,
|
|
516
|
+
errorCode: errorCode,
|
|
517
|
+
});
|
|
518
|
+
_d.label = 11;
|
|
519
|
+
case 11: return [2];
|
|
520
|
+
}
|
|
197
521
|
});
|
|
198
|
-
};
|
|
199
|
-
export
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
522
|
+
}); };
|
|
523
|
+
export var deserializeAws_restJson1BatchEnableAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
524
|
+
var contents, data, _a, _b;
|
|
525
|
+
return __generator(this, function (_c) {
|
|
526
|
+
switch (_c.label) {
|
|
527
|
+
case 0:
|
|
528
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
529
|
+
return [2, deserializeAws_restJson1BatchEnableAlarmCommandError(output, context)];
|
|
530
|
+
}
|
|
531
|
+
contents = map({
|
|
532
|
+
$metadata: deserializeMetadata(output),
|
|
533
|
+
});
|
|
534
|
+
_a = __expectNonNull;
|
|
535
|
+
_b = __expectObject;
|
|
536
|
+
return [4, parseBody(output.body, context)];
|
|
537
|
+
case 1:
|
|
538
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
539
|
+
if (data.errorEntries != null) {
|
|
540
|
+
contents.errorEntries = deserializeAws_restJson1BatchAlarmActionErrorEntries(data.errorEntries, context);
|
|
541
|
+
}
|
|
542
|
+
return [2, contents];
|
|
543
|
+
}
|
|
206
544
|
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
545
|
+
}); };
|
|
546
|
+
var deserializeAws_restJson1BatchEnableAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
547
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
548
|
+
var _c;
|
|
549
|
+
return __generator(this, function (_d) {
|
|
550
|
+
switch (_d.label) {
|
|
551
|
+
case 0:
|
|
552
|
+
_a = [__assign({}, output)];
|
|
553
|
+
_c = {};
|
|
554
|
+
return [4, parseErrorBody(output.body, context)];
|
|
555
|
+
case 1:
|
|
556
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
557
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
558
|
+
_b = errorCode;
|
|
559
|
+
switch (_b) {
|
|
560
|
+
case "InternalFailureException": return [3, 2];
|
|
561
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
562
|
+
case "InvalidRequestException": return [3, 4];
|
|
563
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
564
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
565
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
566
|
+
case "ThrottlingException": return [3, 8];
|
|
567
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
568
|
+
}
|
|
569
|
+
return [3, 10];
|
|
570
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
571
|
+
case 3: throw _d.sent();
|
|
572
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
573
|
+
case 5: throw _d.sent();
|
|
574
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
575
|
+
case 7: throw _d.sent();
|
|
576
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
577
|
+
case 9: throw _d.sent();
|
|
578
|
+
case 10:
|
|
579
|
+
parsedBody = parsedOutput.body;
|
|
580
|
+
throwDefaultError({
|
|
581
|
+
output: output,
|
|
582
|
+
parsedBody: parsedBody,
|
|
583
|
+
exceptionCtor: __BaseException,
|
|
584
|
+
errorCode: errorCode,
|
|
585
|
+
});
|
|
586
|
+
_d.label = 11;
|
|
587
|
+
case 11: return [2];
|
|
588
|
+
}
|
|
217
589
|
});
|
|
218
|
-
};
|
|
219
|
-
export
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
590
|
+
}); };
|
|
591
|
+
export var deserializeAws_restJson1BatchPutMessageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
592
|
+
var contents, data, _a, _b;
|
|
593
|
+
return __generator(this, function (_c) {
|
|
594
|
+
switch (_c.label) {
|
|
595
|
+
case 0:
|
|
596
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
597
|
+
return [2, deserializeAws_restJson1BatchPutMessageCommandError(output, context)];
|
|
598
|
+
}
|
|
599
|
+
contents = map({
|
|
600
|
+
$metadata: deserializeMetadata(output),
|
|
601
|
+
});
|
|
602
|
+
_a = __expectNonNull;
|
|
603
|
+
_b = __expectObject;
|
|
604
|
+
return [4, parseBody(output.body, context)];
|
|
605
|
+
case 1:
|
|
606
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
607
|
+
if (data.BatchPutMessageErrorEntries != null) {
|
|
608
|
+
contents.BatchPutMessageErrorEntries = deserializeAws_restJson1BatchPutMessageErrorEntries(data.BatchPutMessageErrorEntries, context);
|
|
609
|
+
}
|
|
610
|
+
return [2, contents];
|
|
611
|
+
}
|
|
227
612
|
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
613
|
+
}); };
|
|
614
|
+
var deserializeAws_restJson1BatchPutMessageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
615
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
616
|
+
var _c;
|
|
617
|
+
return __generator(this, function (_d) {
|
|
618
|
+
switch (_d.label) {
|
|
619
|
+
case 0:
|
|
620
|
+
_a = [__assign({}, output)];
|
|
621
|
+
_c = {};
|
|
622
|
+
return [4, parseErrorBody(output.body, context)];
|
|
623
|
+
case 1:
|
|
624
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
625
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
626
|
+
_b = errorCode;
|
|
627
|
+
switch (_b) {
|
|
628
|
+
case "InternalFailureException": return [3, 2];
|
|
629
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
630
|
+
case "InvalidRequestException": return [3, 4];
|
|
631
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
632
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
633
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
634
|
+
case "ThrottlingException": return [3, 8];
|
|
635
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
636
|
+
}
|
|
637
|
+
return [3, 10];
|
|
638
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
639
|
+
case 3: throw _d.sent();
|
|
640
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
641
|
+
case 5: throw _d.sent();
|
|
642
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
643
|
+
case 7: throw _d.sent();
|
|
644
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
645
|
+
case 9: throw _d.sent();
|
|
646
|
+
case 10:
|
|
647
|
+
parsedBody = parsedOutput.body;
|
|
648
|
+
throwDefaultError({
|
|
649
|
+
output: output,
|
|
650
|
+
parsedBody: parsedBody,
|
|
651
|
+
exceptionCtor: __BaseException,
|
|
652
|
+
errorCode: errorCode,
|
|
653
|
+
});
|
|
654
|
+
_d.label = 11;
|
|
655
|
+
case 11: return [2];
|
|
656
|
+
}
|
|
238
657
|
});
|
|
239
|
-
};
|
|
240
|
-
export
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
658
|
+
}); };
|
|
659
|
+
export var deserializeAws_restJson1BatchResetAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
660
|
+
var contents, data, _a, _b;
|
|
661
|
+
return __generator(this, function (_c) {
|
|
662
|
+
switch (_c.label) {
|
|
663
|
+
case 0:
|
|
664
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
665
|
+
return [2, deserializeAws_restJson1BatchResetAlarmCommandError(output, context)];
|
|
666
|
+
}
|
|
667
|
+
contents = map({
|
|
668
|
+
$metadata: deserializeMetadata(output),
|
|
669
|
+
});
|
|
670
|
+
_a = __expectNonNull;
|
|
671
|
+
_b = __expectObject;
|
|
672
|
+
return [4, parseBody(output.body, context)];
|
|
673
|
+
case 1:
|
|
674
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
675
|
+
if (data.errorEntries != null) {
|
|
676
|
+
contents.errorEntries = deserializeAws_restJson1BatchAlarmActionErrorEntries(data.errorEntries, context);
|
|
677
|
+
}
|
|
678
|
+
return [2, contents];
|
|
679
|
+
}
|
|
249
680
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
681
|
+
}); };
|
|
682
|
+
var deserializeAws_restJson1BatchResetAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
683
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
684
|
+
var _c;
|
|
685
|
+
return __generator(this, function (_d) {
|
|
686
|
+
switch (_d.label) {
|
|
687
|
+
case 0:
|
|
688
|
+
_a = [__assign({}, output)];
|
|
689
|
+
_c = {};
|
|
690
|
+
return [4, parseErrorBody(output.body, context)];
|
|
691
|
+
case 1:
|
|
692
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
693
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
694
|
+
_b = errorCode;
|
|
695
|
+
switch (_b) {
|
|
696
|
+
case "InternalFailureException": return [3, 2];
|
|
697
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
698
|
+
case "InvalidRequestException": return [3, 4];
|
|
699
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
700
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
701
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
702
|
+
case "ThrottlingException": return [3, 8];
|
|
703
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
704
|
+
}
|
|
705
|
+
return [3, 10];
|
|
706
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
707
|
+
case 3: throw _d.sent();
|
|
708
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
709
|
+
case 5: throw _d.sent();
|
|
710
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
711
|
+
case 7: throw _d.sent();
|
|
712
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
713
|
+
case 9: throw _d.sent();
|
|
714
|
+
case 10:
|
|
715
|
+
parsedBody = parsedOutput.body;
|
|
716
|
+
throwDefaultError({
|
|
717
|
+
output: output,
|
|
718
|
+
parsedBody: parsedBody,
|
|
719
|
+
exceptionCtor: __BaseException,
|
|
720
|
+
errorCode: errorCode,
|
|
721
|
+
});
|
|
722
|
+
_d.label = 11;
|
|
723
|
+
case 11: return [2];
|
|
724
|
+
}
|
|
260
725
|
});
|
|
261
|
-
};
|
|
262
|
-
export
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
726
|
+
}); };
|
|
727
|
+
export var deserializeAws_restJson1BatchSnoozeAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
728
|
+
var contents, data, _a, _b;
|
|
729
|
+
return __generator(this, function (_c) {
|
|
730
|
+
switch (_c.label) {
|
|
731
|
+
case 0:
|
|
732
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
733
|
+
return [2, deserializeAws_restJson1BatchSnoozeAlarmCommandError(output, context)];
|
|
734
|
+
}
|
|
735
|
+
contents = map({
|
|
736
|
+
$metadata: deserializeMetadata(output),
|
|
737
|
+
});
|
|
738
|
+
_a = __expectNonNull;
|
|
739
|
+
_b = __expectObject;
|
|
740
|
+
return [4, parseBody(output.body, context)];
|
|
741
|
+
case 1:
|
|
742
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
743
|
+
if (data.errorEntries != null) {
|
|
744
|
+
contents.errorEntries = deserializeAws_restJson1BatchAlarmActionErrorEntries(data.errorEntries, context);
|
|
745
|
+
}
|
|
746
|
+
return [2, contents];
|
|
747
|
+
}
|
|
268
748
|
});
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
749
|
+
}); };
|
|
750
|
+
var deserializeAws_restJson1BatchSnoozeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
751
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
752
|
+
var _c;
|
|
753
|
+
return __generator(this, function (_d) {
|
|
754
|
+
switch (_d.label) {
|
|
755
|
+
case 0:
|
|
756
|
+
_a = [__assign({}, output)];
|
|
757
|
+
_c = {};
|
|
758
|
+
return [4, parseErrorBody(output.body, context)];
|
|
759
|
+
case 1:
|
|
760
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
761
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
762
|
+
_b = errorCode;
|
|
763
|
+
switch (_b) {
|
|
764
|
+
case "InternalFailureException": return [3, 2];
|
|
765
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
766
|
+
case "InvalidRequestException": return [3, 4];
|
|
767
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
768
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
769
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
770
|
+
case "ThrottlingException": return [3, 8];
|
|
771
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
772
|
+
}
|
|
773
|
+
return [3, 10];
|
|
774
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
775
|
+
case 3: throw _d.sent();
|
|
776
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
777
|
+
case 5: throw _d.sent();
|
|
778
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
779
|
+
case 7: throw _d.sent();
|
|
780
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
781
|
+
case 9: throw _d.sent();
|
|
782
|
+
case 10:
|
|
783
|
+
parsedBody = parsedOutput.body;
|
|
784
|
+
throwDefaultError({
|
|
785
|
+
output: output,
|
|
786
|
+
parsedBody: parsedBody,
|
|
787
|
+
exceptionCtor: __BaseException,
|
|
788
|
+
errorCode: errorCode,
|
|
789
|
+
});
|
|
790
|
+
_d.label = 11;
|
|
791
|
+
case 11: return [2];
|
|
792
|
+
}
|
|
310
793
|
});
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
case "ThrottlingException":
|
|
334
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
335
|
-
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
336
|
-
default:
|
|
337
|
-
const parsedBody = parsedOutput.body;
|
|
338
|
-
throwDefaultError({
|
|
339
|
-
output,
|
|
340
|
-
parsedBody,
|
|
341
|
-
exceptionCtor: __BaseException,
|
|
342
|
-
errorCode,
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
export const deserializeAws_restJson1BatchDisableAlarmCommand = async (output, context) => {
|
|
347
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
348
|
-
return deserializeAws_restJson1BatchDisableAlarmCommandError(output, context);
|
|
349
|
-
}
|
|
350
|
-
const contents = map({
|
|
351
|
-
$metadata: deserializeMetadata(output),
|
|
794
|
+
}); };
|
|
795
|
+
export var deserializeAws_restJson1BatchUpdateDetectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
796
|
+
var contents, data, _a, _b;
|
|
797
|
+
return __generator(this, function (_c) {
|
|
798
|
+
switch (_c.label) {
|
|
799
|
+
case 0:
|
|
800
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
801
|
+
return [2, deserializeAws_restJson1BatchUpdateDetectorCommandError(output, context)];
|
|
802
|
+
}
|
|
803
|
+
contents = map({
|
|
804
|
+
$metadata: deserializeMetadata(output),
|
|
805
|
+
});
|
|
806
|
+
_a = __expectNonNull;
|
|
807
|
+
_b = __expectObject;
|
|
808
|
+
return [4, parseBody(output.body, context)];
|
|
809
|
+
case 1:
|
|
810
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
811
|
+
if (data.batchUpdateDetectorErrorEntries != null) {
|
|
812
|
+
contents.batchUpdateDetectorErrorEntries = deserializeAws_restJson1BatchUpdateDetectorErrorEntries(data.batchUpdateDetectorErrorEntries, context);
|
|
813
|
+
}
|
|
814
|
+
return [2, contents];
|
|
815
|
+
}
|
|
352
816
|
});
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
817
|
+
}); };
|
|
818
|
+
var deserializeAws_restJson1BatchUpdateDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
819
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
820
|
+
var _c;
|
|
821
|
+
return __generator(this, function (_d) {
|
|
822
|
+
switch (_d.label) {
|
|
823
|
+
case 0:
|
|
824
|
+
_a = [__assign({}, output)];
|
|
825
|
+
_c = {};
|
|
826
|
+
return [4, parseErrorBody(output.body, context)];
|
|
827
|
+
case 1:
|
|
828
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
829
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
830
|
+
_b = errorCode;
|
|
831
|
+
switch (_b) {
|
|
832
|
+
case "InternalFailureException": return [3, 2];
|
|
833
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
834
|
+
case "InvalidRequestException": return [3, 4];
|
|
835
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
836
|
+
case "ServiceUnavailableException": return [3, 6];
|
|
837
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 6];
|
|
838
|
+
case "ThrottlingException": return [3, 8];
|
|
839
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 8];
|
|
840
|
+
}
|
|
841
|
+
return [3, 10];
|
|
842
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
843
|
+
case 3: throw _d.sent();
|
|
844
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
845
|
+
case 5: throw _d.sent();
|
|
846
|
+
case 6: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
847
|
+
case 7: throw _d.sent();
|
|
848
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
849
|
+
case 9: throw _d.sent();
|
|
850
|
+
case 10:
|
|
851
|
+
parsedBody = parsedOutput.body;
|
|
852
|
+
throwDefaultError({
|
|
853
|
+
output: output,
|
|
854
|
+
parsedBody: parsedBody,
|
|
855
|
+
exceptionCtor: __BaseException,
|
|
856
|
+
errorCode: errorCode,
|
|
857
|
+
});
|
|
858
|
+
_d.label = 11;
|
|
859
|
+
case 11: return [2];
|
|
860
|
+
}
|
|
394
861
|
});
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
case "ThrottlingException":
|
|
418
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
419
|
-
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
420
|
-
default:
|
|
421
|
-
const parsedBody = parsedOutput.body;
|
|
422
|
-
throwDefaultError({
|
|
423
|
-
output,
|
|
424
|
-
parsedBody,
|
|
425
|
-
exceptionCtor: __BaseException,
|
|
426
|
-
errorCode,
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
export const deserializeAws_restJson1BatchPutMessageCommand = async (output, context) => {
|
|
431
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
432
|
-
return deserializeAws_restJson1BatchPutMessageCommandError(output, context);
|
|
433
|
-
}
|
|
434
|
-
const contents = map({
|
|
435
|
-
$metadata: deserializeMetadata(output),
|
|
862
|
+
}); };
|
|
863
|
+
export var deserializeAws_restJson1DescribeAlarmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
864
|
+
var contents, data, _a, _b;
|
|
865
|
+
return __generator(this, function (_c) {
|
|
866
|
+
switch (_c.label) {
|
|
867
|
+
case 0:
|
|
868
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
869
|
+
return [2, deserializeAws_restJson1DescribeAlarmCommandError(output, context)];
|
|
870
|
+
}
|
|
871
|
+
contents = map({
|
|
872
|
+
$metadata: deserializeMetadata(output),
|
|
873
|
+
});
|
|
874
|
+
_a = __expectNonNull;
|
|
875
|
+
_b = __expectObject;
|
|
876
|
+
return [4, parseBody(output.body, context)];
|
|
877
|
+
case 1:
|
|
878
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
879
|
+
if (data.alarm != null) {
|
|
880
|
+
contents.alarm = deserializeAws_restJson1Alarm(data.alarm, context);
|
|
881
|
+
}
|
|
882
|
+
return [2, contents];
|
|
883
|
+
}
|
|
436
884
|
});
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
return
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
885
|
+
}); };
|
|
886
|
+
var deserializeAws_restJson1DescribeAlarmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
887
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
888
|
+
var _c;
|
|
889
|
+
return __generator(this, function (_d) {
|
|
890
|
+
switch (_d.label) {
|
|
891
|
+
case 0:
|
|
892
|
+
_a = [__assign({}, output)];
|
|
893
|
+
_c = {};
|
|
894
|
+
return [4, parseErrorBody(output.body, context)];
|
|
895
|
+
case 1:
|
|
896
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
897
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
|
+
_b = errorCode;
|
|
899
|
+
switch (_b) {
|
|
900
|
+
case "InternalFailureException": return [3, 2];
|
|
901
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
902
|
+
case "InvalidRequestException": return [3, 4];
|
|
903
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
904
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
905
|
+
case "com.amazonaws.ioteventsdata#ResourceNotFoundException": return [3, 6];
|
|
906
|
+
case "ServiceUnavailableException": return [3, 8];
|
|
907
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 8];
|
|
908
|
+
case "ThrottlingException": return [3, 10];
|
|
909
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
910
|
+
}
|
|
911
|
+
return [3, 12];
|
|
912
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
913
|
+
case 3: throw _d.sent();
|
|
914
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
915
|
+
case 5: throw _d.sent();
|
|
916
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
917
|
+
case 7: throw _d.sent();
|
|
918
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
919
|
+
case 9: throw _d.sent();
|
|
920
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
921
|
+
case 11: throw _d.sent();
|
|
922
|
+
case 12:
|
|
923
|
+
parsedBody = parsedOutput.body;
|
|
924
|
+
throwDefaultError({
|
|
925
|
+
output: output,
|
|
926
|
+
parsedBody: parsedBody,
|
|
927
|
+
exceptionCtor: __BaseException,
|
|
928
|
+
errorCode: errorCode,
|
|
929
|
+
});
|
|
930
|
+
_d.label = 13;
|
|
931
|
+
case 13: return [2];
|
|
932
|
+
}
|
|
478
933
|
});
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
case "ThrottlingException":
|
|
502
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
503
|
-
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
504
|
-
default:
|
|
505
|
-
const parsedBody = parsedOutput.body;
|
|
506
|
-
throwDefaultError({
|
|
507
|
-
output,
|
|
508
|
-
parsedBody,
|
|
509
|
-
exceptionCtor: __BaseException,
|
|
510
|
-
errorCode,
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
export const deserializeAws_restJson1BatchSnoozeAlarmCommand = async (output, context) => {
|
|
515
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
516
|
-
return deserializeAws_restJson1BatchSnoozeAlarmCommandError(output, context);
|
|
517
|
-
}
|
|
518
|
-
const contents = map({
|
|
519
|
-
$metadata: deserializeMetadata(output),
|
|
934
|
+
}); };
|
|
935
|
+
export var deserializeAws_restJson1DescribeDetectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
936
|
+
var contents, data, _a, _b;
|
|
937
|
+
return __generator(this, function (_c) {
|
|
938
|
+
switch (_c.label) {
|
|
939
|
+
case 0:
|
|
940
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
941
|
+
return [2, deserializeAws_restJson1DescribeDetectorCommandError(output, context)];
|
|
942
|
+
}
|
|
943
|
+
contents = map({
|
|
944
|
+
$metadata: deserializeMetadata(output),
|
|
945
|
+
});
|
|
946
|
+
_a = __expectNonNull;
|
|
947
|
+
_b = __expectObject;
|
|
948
|
+
return [4, parseBody(output.body, context)];
|
|
949
|
+
case 1:
|
|
950
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
951
|
+
if (data.detector != null) {
|
|
952
|
+
contents.detector = deserializeAws_restJson1Detector(data.detector, context);
|
|
953
|
+
}
|
|
954
|
+
return [2, contents];
|
|
955
|
+
}
|
|
520
956
|
});
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
return
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
957
|
+
}); };
|
|
958
|
+
var deserializeAws_restJson1DescribeDetectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
959
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
960
|
+
var _c;
|
|
961
|
+
return __generator(this, function (_d) {
|
|
962
|
+
switch (_d.label) {
|
|
963
|
+
case 0:
|
|
964
|
+
_a = [__assign({}, output)];
|
|
965
|
+
_c = {};
|
|
966
|
+
return [4, parseErrorBody(output.body, context)];
|
|
967
|
+
case 1:
|
|
968
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
969
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
970
|
+
_b = errorCode;
|
|
971
|
+
switch (_b) {
|
|
972
|
+
case "InternalFailureException": return [3, 2];
|
|
973
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
974
|
+
case "InvalidRequestException": return [3, 4];
|
|
975
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
976
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
977
|
+
case "com.amazonaws.ioteventsdata#ResourceNotFoundException": return [3, 6];
|
|
978
|
+
case "ServiceUnavailableException": return [3, 8];
|
|
979
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 8];
|
|
980
|
+
case "ThrottlingException": return [3, 10];
|
|
981
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
982
|
+
}
|
|
983
|
+
return [3, 12];
|
|
984
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
985
|
+
case 3: throw _d.sent();
|
|
986
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
987
|
+
case 5: throw _d.sent();
|
|
988
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
989
|
+
case 7: throw _d.sent();
|
|
990
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
991
|
+
case 9: throw _d.sent();
|
|
992
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
993
|
+
case 11: throw _d.sent();
|
|
994
|
+
case 12:
|
|
995
|
+
parsedBody = parsedOutput.body;
|
|
996
|
+
throwDefaultError({
|
|
997
|
+
output: output,
|
|
998
|
+
parsedBody: parsedBody,
|
|
999
|
+
exceptionCtor: __BaseException,
|
|
1000
|
+
errorCode: errorCode,
|
|
1001
|
+
});
|
|
1002
|
+
_d.label = 13;
|
|
1003
|
+
case 13: return [2];
|
|
1004
|
+
}
|
|
562
1005
|
});
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
default:
|
|
589
|
-
const parsedBody = parsedOutput.body;
|
|
590
|
-
throwDefaultError({
|
|
591
|
-
output,
|
|
592
|
-
parsedBody,
|
|
593
|
-
exceptionCtor: __BaseException,
|
|
594
|
-
errorCode,
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
export const deserializeAws_restJson1DescribeAlarmCommand = async (output, context) => {
|
|
599
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
600
|
-
return deserializeAws_restJson1DescribeAlarmCommandError(output, context);
|
|
601
|
-
}
|
|
602
|
-
const contents = map({
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
1006
|
+
}); };
|
|
1007
|
+
export var deserializeAws_restJson1ListAlarmsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1008
|
+
var contents, data, _a, _b;
|
|
1009
|
+
return __generator(this, function (_c) {
|
|
1010
|
+
switch (_c.label) {
|
|
1011
|
+
case 0:
|
|
1012
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1013
|
+
return [2, deserializeAws_restJson1ListAlarmsCommandError(output, context)];
|
|
1014
|
+
}
|
|
1015
|
+
contents = map({
|
|
1016
|
+
$metadata: deserializeMetadata(output),
|
|
1017
|
+
});
|
|
1018
|
+
_a = __expectNonNull;
|
|
1019
|
+
_b = __expectObject;
|
|
1020
|
+
return [4, parseBody(output.body, context)];
|
|
1021
|
+
case 1:
|
|
1022
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1023
|
+
if (data.alarmSummaries != null) {
|
|
1024
|
+
contents.alarmSummaries = deserializeAws_restJson1AlarmSummaries(data.alarmSummaries, context);
|
|
1025
|
+
}
|
|
1026
|
+
if (data.nextToken != null) {
|
|
1027
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1028
|
+
}
|
|
1029
|
+
return [2, contents];
|
|
1030
|
+
}
|
|
604
1031
|
});
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
return
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
1032
|
+
}); };
|
|
1033
|
+
var deserializeAws_restJson1ListAlarmsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1034
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1035
|
+
var _c;
|
|
1036
|
+
return __generator(this, function (_d) {
|
|
1037
|
+
switch (_d.label) {
|
|
1038
|
+
case 0:
|
|
1039
|
+
_a = [__assign({}, output)];
|
|
1040
|
+
_c = {};
|
|
1041
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1042
|
+
case 1:
|
|
1043
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1044
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1045
|
+
_b = errorCode;
|
|
1046
|
+
switch (_b) {
|
|
1047
|
+
case "InternalFailureException": return [3, 2];
|
|
1048
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
1049
|
+
case "InvalidRequestException": return [3, 4];
|
|
1050
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
1051
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1052
|
+
case "com.amazonaws.ioteventsdata#ResourceNotFoundException": return [3, 6];
|
|
1053
|
+
case "ServiceUnavailableException": return [3, 8];
|
|
1054
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 8];
|
|
1055
|
+
case "ThrottlingException": return [3, 10];
|
|
1056
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
1057
|
+
}
|
|
1058
|
+
return [3, 12];
|
|
1059
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
1060
|
+
case 3: throw _d.sent();
|
|
1061
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1062
|
+
case 5: throw _d.sent();
|
|
1063
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1064
|
+
case 7: throw _d.sent();
|
|
1065
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1066
|
+
case 9: throw _d.sent();
|
|
1067
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1068
|
+
case 11: throw _d.sent();
|
|
1069
|
+
case 12:
|
|
1070
|
+
parsedBody = parsedOutput.body;
|
|
1071
|
+
throwDefaultError({
|
|
1072
|
+
output: output,
|
|
1073
|
+
parsedBody: parsedBody,
|
|
1074
|
+
exceptionCtor: __BaseException,
|
|
1075
|
+
errorCode: errorCode,
|
|
1076
|
+
});
|
|
1077
|
+
_d.label = 13;
|
|
1078
|
+
case 13: return [2];
|
|
1079
|
+
}
|
|
649
1080
|
});
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
case "ThrottlingException":
|
|
676
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
677
|
-
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
678
|
-
default:
|
|
679
|
-
const parsedBody = parsedOutput.body;
|
|
680
|
-
throwDefaultError({
|
|
681
|
-
output,
|
|
682
|
-
parsedBody,
|
|
683
|
-
exceptionCtor: __BaseException,
|
|
684
|
-
errorCode,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
export const deserializeAws_restJson1ListAlarmsCommand = async (output, context) => {
|
|
689
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
-
return deserializeAws_restJson1ListAlarmsCommandError(output, context);
|
|
691
|
-
}
|
|
692
|
-
const contents = map({
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
+
}); };
|
|
1082
|
+
export var deserializeAws_restJson1ListDetectorsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1083
|
+
var contents, data, _a, _b;
|
|
1084
|
+
return __generator(this, function (_c) {
|
|
1085
|
+
switch (_c.label) {
|
|
1086
|
+
case 0:
|
|
1087
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1088
|
+
return [2, deserializeAws_restJson1ListDetectorsCommandError(output, context)];
|
|
1089
|
+
}
|
|
1090
|
+
contents = map({
|
|
1091
|
+
$metadata: deserializeMetadata(output),
|
|
1092
|
+
});
|
|
1093
|
+
_a = __expectNonNull;
|
|
1094
|
+
_b = __expectObject;
|
|
1095
|
+
return [4, parseBody(output.body, context)];
|
|
1096
|
+
case 1:
|
|
1097
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1098
|
+
if (data.detectorSummaries != null) {
|
|
1099
|
+
contents.detectorSummaries = deserializeAws_restJson1DetectorSummaries(data.detectorSummaries, context);
|
|
1100
|
+
}
|
|
1101
|
+
if (data.nextToken != null) {
|
|
1102
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1103
|
+
}
|
|
1104
|
+
return [2, contents];
|
|
1105
|
+
}
|
|
694
1106
|
});
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
};
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
throw
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
1107
|
+
}); };
|
|
1108
|
+
var deserializeAws_restJson1ListDetectorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1109
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1110
|
+
var _c;
|
|
1111
|
+
return __generator(this, function (_d) {
|
|
1112
|
+
switch (_d.label) {
|
|
1113
|
+
case 0:
|
|
1114
|
+
_a = [__assign({}, output)];
|
|
1115
|
+
_c = {};
|
|
1116
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1117
|
+
case 1:
|
|
1118
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1119
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1120
|
+
_b = errorCode;
|
|
1121
|
+
switch (_b) {
|
|
1122
|
+
case "InternalFailureException": return [3, 2];
|
|
1123
|
+
case "com.amazonaws.ioteventsdata#InternalFailureException": return [3, 2];
|
|
1124
|
+
case "InvalidRequestException": return [3, 4];
|
|
1125
|
+
case "com.amazonaws.ioteventsdata#InvalidRequestException": return [3, 4];
|
|
1126
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1127
|
+
case "com.amazonaws.ioteventsdata#ResourceNotFoundException": return [3, 6];
|
|
1128
|
+
case "ServiceUnavailableException": return [3, 8];
|
|
1129
|
+
case "com.amazonaws.ioteventsdata#ServiceUnavailableException": return [3, 8];
|
|
1130
|
+
case "ThrottlingException": return [3, 10];
|
|
1131
|
+
case "com.amazonaws.ioteventsdata#ThrottlingException": return [3, 10];
|
|
1132
|
+
}
|
|
1133
|
+
return [3, 12];
|
|
1134
|
+
case 2: return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
1135
|
+
case 3: throw _d.sent();
|
|
1136
|
+
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1137
|
+
case 5: throw _d.sent();
|
|
1138
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1139
|
+
case 7: throw _d.sent();
|
|
1140
|
+
case 8: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1141
|
+
case 9: throw _d.sent();
|
|
1142
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1143
|
+
case 11: throw _d.sent();
|
|
1144
|
+
case 12:
|
|
1145
|
+
parsedBody = parsedOutput.body;
|
|
1146
|
+
throwDefaultError({
|
|
1147
|
+
output: output,
|
|
1148
|
+
parsedBody: parsedBody,
|
|
1149
|
+
exceptionCtor: __BaseException,
|
|
1150
|
+
errorCode: errorCode,
|
|
1151
|
+
});
|
|
1152
|
+
_d.label = 13;
|
|
1153
|
+
case 13: return [2];
|
|
1154
|
+
}
|
|
742
1155
|
});
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
contents
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
body: await parseErrorBody(output.body, context),
|
|
756
|
-
};
|
|
757
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
|
-
switch (errorCode) {
|
|
759
|
-
case "InternalFailureException":
|
|
760
|
-
case "com.amazonaws.ioteventsdata#InternalFailureException":
|
|
761
|
-
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
762
|
-
case "InvalidRequestException":
|
|
763
|
-
case "com.amazonaws.ioteventsdata#InvalidRequestException":
|
|
764
|
-
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
765
|
-
case "ResourceNotFoundException":
|
|
766
|
-
case "com.amazonaws.ioteventsdata#ResourceNotFoundException":
|
|
767
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
768
|
-
case "ServiceUnavailableException":
|
|
769
|
-
case "com.amazonaws.ioteventsdata#ServiceUnavailableException":
|
|
770
|
-
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
771
|
-
case "ThrottlingException":
|
|
772
|
-
case "com.amazonaws.ioteventsdata#ThrottlingException":
|
|
773
|
-
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
774
|
-
default:
|
|
775
|
-
const parsedBody = parsedOutput.body;
|
|
776
|
-
throwDefaultError({
|
|
777
|
-
output,
|
|
778
|
-
parsedBody,
|
|
779
|
-
exceptionCtor: __BaseException,
|
|
780
|
-
errorCode,
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
const map = __map;
|
|
785
|
-
const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOutput, context) => {
|
|
786
|
-
const contents = map({});
|
|
787
|
-
const data = parsedOutput.body;
|
|
788
|
-
if (data.message != null) {
|
|
789
|
-
contents.message = __expectString(data.message);
|
|
790
|
-
}
|
|
791
|
-
const exception = new InternalFailureException({
|
|
792
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
793
|
-
...contents,
|
|
1156
|
+
}); };
|
|
1157
|
+
var map = __map;
|
|
1158
|
+
var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1159
|
+
var contents, data, exception;
|
|
1160
|
+
return __generator(this, function (_a) {
|
|
1161
|
+
contents = map({});
|
|
1162
|
+
data = parsedOutput.body;
|
|
1163
|
+
if (data.message != null) {
|
|
1164
|
+
contents.message = __expectString(data.message);
|
|
1165
|
+
}
|
|
1166
|
+
exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1167
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
794
1168
|
});
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
805
|
-
|
|
1169
|
+
}); };
|
|
1170
|
+
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1171
|
+
var contents, data, exception;
|
|
1172
|
+
return __generator(this, function (_a) {
|
|
1173
|
+
contents = map({});
|
|
1174
|
+
data = parsedOutput.body;
|
|
1175
|
+
if (data.message != null) {
|
|
1176
|
+
contents.message = __expectString(data.message);
|
|
1177
|
+
}
|
|
1178
|
+
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1179
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
806
1180
|
});
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
817
|
-
|
|
1181
|
+
}); };
|
|
1182
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1183
|
+
var contents, data, exception;
|
|
1184
|
+
return __generator(this, function (_a) {
|
|
1185
|
+
contents = map({});
|
|
1186
|
+
data = parsedOutput.body;
|
|
1187
|
+
if (data.message != null) {
|
|
1188
|
+
contents.message = __expectString(data.message);
|
|
1189
|
+
}
|
|
1190
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1191
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
818
1192
|
});
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
829
|
-
|
|
1193
|
+
}); };
|
|
1194
|
+
var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1195
|
+
var contents, data, exception;
|
|
1196
|
+
return __generator(this, function (_a) {
|
|
1197
|
+
contents = map({});
|
|
1198
|
+
data = parsedOutput.body;
|
|
1199
|
+
if (data.message != null) {
|
|
1200
|
+
contents.message = __expectString(data.message);
|
|
1201
|
+
}
|
|
1202
|
+
exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1203
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
830
1204
|
});
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
841
|
-
|
|
1205
|
+
}); };
|
|
1206
|
+
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1207
|
+
var contents, data, exception;
|
|
1208
|
+
return __generator(this, function (_a) {
|
|
1209
|
+
contents = map({});
|
|
1210
|
+
data = parsedOutput.body;
|
|
1211
|
+
if (data.message != null) {
|
|
1212
|
+
contents.message = __expectString(data.message);
|
|
1213
|
+
}
|
|
1214
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1215
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
842
1216
|
});
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
return {
|
|
847
|
-
...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
|
|
848
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
849
|
-
...(input.note != null && { note: input.note }),
|
|
850
|
-
...(input.requestId != null && { requestId: input.requestId }),
|
|
851
|
-
};
|
|
1217
|
+
}); };
|
|
1218
|
+
var serializeAws_restJson1AcknowledgeAlarmActionRequest = function (input, context) {
|
|
1219
|
+
return __assign(__assign(__assign(__assign({}, (input.alarmModelName != null && { alarmModelName: input.alarmModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.note != null && { note: input.note })), (input.requestId != null && { requestId: input.requestId }));
|
|
852
1220
|
};
|
|
853
|
-
|
|
1221
|
+
var serializeAws_restJson1AcknowledgeAlarmActionRequests = function (input, context) {
|
|
854
1222
|
return input
|
|
855
|
-
.filter((e)
|
|
856
|
-
.map((entry)
|
|
1223
|
+
.filter(function (e) { return e != null; })
|
|
1224
|
+
.map(function (entry) {
|
|
857
1225
|
return serializeAws_restJson1AcknowledgeAlarmActionRequest(entry, context);
|
|
858
1226
|
});
|
|
859
1227
|
};
|
|
860
|
-
|
|
861
|
-
return {
|
|
862
|
-
...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
|
|
863
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
864
|
-
...(input.messageId != null && { messageId: input.messageId }),
|
|
865
|
-
};
|
|
1228
|
+
var serializeAws_restJson1DeleteDetectorRequest = function (input, context) {
|
|
1229
|
+
return __assign(__assign(__assign({}, (input.detectorModelName != null && { detectorModelName: input.detectorModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.messageId != null && { messageId: input.messageId }));
|
|
866
1230
|
};
|
|
867
|
-
|
|
1231
|
+
var serializeAws_restJson1DeleteDetectorRequests = function (input, context) {
|
|
868
1232
|
return input
|
|
869
|
-
.filter((e)
|
|
870
|
-
.map((entry)
|
|
1233
|
+
.filter(function (e) { return e != null; })
|
|
1234
|
+
.map(function (entry) {
|
|
871
1235
|
return serializeAws_restJson1DeleteDetectorRequest(entry, context);
|
|
872
1236
|
});
|
|
873
1237
|
};
|
|
874
|
-
|
|
875
|
-
return {
|
|
876
|
-
...(input.stateName != null && { stateName: input.stateName }),
|
|
877
|
-
...(input.timers != null && { timers: serializeAws_restJson1TimerDefinitions(input.timers, context) }),
|
|
878
|
-
...(input.variables != null && { variables: serializeAws_restJson1VariableDefinitions(input.variables, context) }),
|
|
879
|
-
};
|
|
1238
|
+
var serializeAws_restJson1DetectorStateDefinition = function (input, context) {
|
|
1239
|
+
return __assign(__assign(__assign({}, (input.stateName != null && { stateName: input.stateName })), (input.timers != null && { timers: serializeAws_restJson1TimerDefinitions(input.timers, context) })), (input.variables != null && { variables: serializeAws_restJson1VariableDefinitions(input.variables, context) }));
|
|
880
1240
|
};
|
|
881
|
-
|
|
882
|
-
return {
|
|
883
|
-
...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
|
|
884
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
885
|
-
...(input.note != null && { note: input.note }),
|
|
886
|
-
...(input.requestId != null && { requestId: input.requestId }),
|
|
887
|
-
};
|
|
1241
|
+
var serializeAws_restJson1DisableAlarmActionRequest = function (input, context) {
|
|
1242
|
+
return __assign(__assign(__assign(__assign({}, (input.alarmModelName != null && { alarmModelName: input.alarmModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.note != null && { note: input.note })), (input.requestId != null && { requestId: input.requestId }));
|
|
888
1243
|
};
|
|
889
|
-
|
|
1244
|
+
var serializeAws_restJson1DisableAlarmActionRequests = function (input, context) {
|
|
890
1245
|
return input
|
|
891
|
-
.filter((e)
|
|
892
|
-
.map((entry)
|
|
1246
|
+
.filter(function (e) { return e != null; })
|
|
1247
|
+
.map(function (entry) {
|
|
893
1248
|
return serializeAws_restJson1DisableAlarmActionRequest(entry, context);
|
|
894
1249
|
});
|
|
895
1250
|
};
|
|
896
|
-
|
|
897
|
-
return {
|
|
898
|
-
...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
|
|
899
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
900
|
-
...(input.note != null && { note: input.note }),
|
|
901
|
-
...(input.requestId != null && { requestId: input.requestId }),
|
|
902
|
-
};
|
|
1251
|
+
var serializeAws_restJson1EnableAlarmActionRequest = function (input, context) {
|
|
1252
|
+
return __assign(__assign(__assign(__assign({}, (input.alarmModelName != null && { alarmModelName: input.alarmModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.note != null && { note: input.note })), (input.requestId != null && { requestId: input.requestId }));
|
|
903
1253
|
};
|
|
904
|
-
|
|
1254
|
+
var serializeAws_restJson1EnableAlarmActionRequests = function (input, context) {
|
|
905
1255
|
return input
|
|
906
|
-
.filter((e)
|
|
907
|
-
.map((entry)
|
|
1256
|
+
.filter(function (e) { return e != null; })
|
|
1257
|
+
.map(function (entry) {
|
|
908
1258
|
return serializeAws_restJson1EnableAlarmActionRequest(entry, context);
|
|
909
1259
|
});
|
|
910
1260
|
};
|
|
911
|
-
|
|
912
|
-
return {
|
|
913
|
-
...(input.inputName != null && { inputName: input.inputName }),
|
|
914
|
-
...(input.messageId != null && { messageId: input.messageId }),
|
|
915
|
-
...(input.payload != null && { payload: context.base64Encoder(input.payload) }),
|
|
916
|
-
...(input.timestamp != null && { timestamp: serializeAws_restJson1TimestampValue(input.timestamp, context) }),
|
|
917
|
-
};
|
|
1261
|
+
var serializeAws_restJson1Message = function (input, context) {
|
|
1262
|
+
return __assign(__assign(__assign(__assign({}, (input.inputName != null && { inputName: input.inputName })), (input.messageId != null && { messageId: input.messageId })), (input.payload != null && { payload: context.base64Encoder(input.payload) })), (input.timestamp != null && { timestamp: serializeAws_restJson1TimestampValue(input.timestamp, context) }));
|
|
918
1263
|
};
|
|
919
|
-
|
|
1264
|
+
var serializeAws_restJson1Messages = function (input, context) {
|
|
920
1265
|
return input
|
|
921
|
-
.filter((e)
|
|
922
|
-
.map((entry)
|
|
1266
|
+
.filter(function (e) { return e != null; })
|
|
1267
|
+
.map(function (entry) {
|
|
923
1268
|
return serializeAws_restJson1Message(entry, context);
|
|
924
1269
|
});
|
|
925
1270
|
};
|
|
926
|
-
|
|
927
|
-
return {
|
|
928
|
-
...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
|
|
929
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
930
|
-
...(input.note != null && { note: input.note }),
|
|
931
|
-
...(input.requestId != null && { requestId: input.requestId }),
|
|
932
|
-
};
|
|
1271
|
+
var serializeAws_restJson1ResetAlarmActionRequest = function (input, context) {
|
|
1272
|
+
return __assign(__assign(__assign(__assign({}, (input.alarmModelName != null && { alarmModelName: input.alarmModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.note != null && { note: input.note })), (input.requestId != null && { requestId: input.requestId }));
|
|
933
1273
|
};
|
|
934
|
-
|
|
1274
|
+
var serializeAws_restJson1ResetAlarmActionRequests = function (input, context) {
|
|
935
1275
|
return input
|
|
936
|
-
.filter((e)
|
|
937
|
-
.map((entry)
|
|
1276
|
+
.filter(function (e) { return e != null; })
|
|
1277
|
+
.map(function (entry) {
|
|
938
1278
|
return serializeAws_restJson1ResetAlarmActionRequest(entry, context);
|
|
939
1279
|
});
|
|
940
1280
|
};
|
|
941
|
-
|
|
942
|
-
return {
|
|
943
|
-
...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
|
|
944
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
945
|
-
...(input.note != null && { note: input.note }),
|
|
946
|
-
...(input.requestId != null && { requestId: input.requestId }),
|
|
947
|
-
...(input.snoozeDuration != null && { snoozeDuration: input.snoozeDuration }),
|
|
948
|
-
};
|
|
1281
|
+
var serializeAws_restJson1SnoozeAlarmActionRequest = function (input, context) {
|
|
1282
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.alarmModelName != null && { alarmModelName: input.alarmModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.note != null && { note: input.note })), (input.requestId != null && { requestId: input.requestId })), (input.snoozeDuration != null && { snoozeDuration: input.snoozeDuration }));
|
|
949
1283
|
};
|
|
950
|
-
|
|
1284
|
+
var serializeAws_restJson1SnoozeAlarmActionRequests = function (input, context) {
|
|
951
1285
|
return input
|
|
952
|
-
.filter((e)
|
|
953
|
-
.map((entry)
|
|
1286
|
+
.filter(function (e) { return e != null; })
|
|
1287
|
+
.map(function (entry) {
|
|
954
1288
|
return serializeAws_restJson1SnoozeAlarmActionRequest(entry, context);
|
|
955
1289
|
});
|
|
956
1290
|
};
|
|
957
|
-
|
|
958
|
-
return {
|
|
959
|
-
...(input.name != null && { name: input.name }),
|
|
960
|
-
...(input.seconds != null && { seconds: input.seconds }),
|
|
961
|
-
};
|
|
1291
|
+
var serializeAws_restJson1TimerDefinition = function (input, context) {
|
|
1292
|
+
return __assign(__assign({}, (input.name != null && { name: input.name })), (input.seconds != null && { seconds: input.seconds }));
|
|
962
1293
|
};
|
|
963
|
-
|
|
1294
|
+
var serializeAws_restJson1TimerDefinitions = function (input, context) {
|
|
964
1295
|
return input
|
|
965
|
-
.filter((e)
|
|
966
|
-
.map((entry)
|
|
1296
|
+
.filter(function (e) { return e != null; })
|
|
1297
|
+
.map(function (entry) {
|
|
967
1298
|
return serializeAws_restJson1TimerDefinition(entry, context);
|
|
968
1299
|
});
|
|
969
1300
|
};
|
|
970
|
-
|
|
971
|
-
return {
|
|
972
|
-
...(input.timeInMillis != null && { timeInMillis: input.timeInMillis }),
|
|
973
|
-
};
|
|
1301
|
+
var serializeAws_restJson1TimestampValue = function (input, context) {
|
|
1302
|
+
return __assign({}, (input.timeInMillis != null && { timeInMillis: input.timeInMillis }));
|
|
974
1303
|
};
|
|
975
|
-
|
|
976
|
-
return {
|
|
977
|
-
...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
|
|
978
|
-
...(input.keyValue != null && { keyValue: input.keyValue }),
|
|
979
|
-
...(input.messageId != null && { messageId: input.messageId }),
|
|
980
|
-
...(input.state != null && { state: serializeAws_restJson1DetectorStateDefinition(input.state, context) }),
|
|
981
|
-
};
|
|
1304
|
+
var serializeAws_restJson1UpdateDetectorRequest = function (input, context) {
|
|
1305
|
+
return __assign(__assign(__assign(__assign({}, (input.detectorModelName != null && { detectorModelName: input.detectorModelName })), (input.keyValue != null && { keyValue: input.keyValue })), (input.messageId != null && { messageId: input.messageId })), (input.state != null && { state: serializeAws_restJson1DetectorStateDefinition(input.state, context) }));
|
|
982
1306
|
};
|
|
983
|
-
|
|
1307
|
+
var serializeAws_restJson1UpdateDetectorRequests = function (input, context) {
|
|
984
1308
|
return input
|
|
985
|
-
.filter((e)
|
|
986
|
-
.map((entry)
|
|
1309
|
+
.filter(function (e) { return e != null; })
|
|
1310
|
+
.map(function (entry) {
|
|
987
1311
|
return serializeAws_restJson1UpdateDetectorRequest(entry, context);
|
|
988
1312
|
});
|
|
989
1313
|
};
|
|
990
|
-
|
|
991
|
-
return {
|
|
992
|
-
...(input.name != null && { name: input.name }),
|
|
993
|
-
...(input.value != null && { value: input.value }),
|
|
994
|
-
};
|
|
1314
|
+
var serializeAws_restJson1VariableDefinition = function (input, context) {
|
|
1315
|
+
return __assign(__assign({}, (input.name != null && { name: input.name })), (input.value != null && { value: input.value }));
|
|
995
1316
|
};
|
|
996
|
-
|
|
1317
|
+
var serializeAws_restJson1VariableDefinitions = function (input, context) {
|
|
997
1318
|
return input
|
|
998
|
-
.filter((e)
|
|
999
|
-
.map((entry)
|
|
1319
|
+
.filter(function (e) { return e != null; })
|
|
1320
|
+
.map(function (entry) {
|
|
1000
1321
|
return serializeAws_restJson1VariableDefinition(entry, context);
|
|
1001
1322
|
});
|
|
1002
1323
|
};
|
|
1003
|
-
|
|
1324
|
+
var deserializeAws_restJson1AcknowledgeActionConfiguration = function (output, context) {
|
|
1004
1325
|
return {
|
|
1005
1326
|
note: __expectString(output.note),
|
|
1006
1327
|
};
|
|
1007
1328
|
};
|
|
1008
|
-
|
|
1329
|
+
var deserializeAws_restJson1Alarm = function (output, context) {
|
|
1009
1330
|
return {
|
|
1010
1331
|
alarmModelName: __expectString(output.alarmModelName),
|
|
1011
1332
|
alarmModelVersion: __expectString(output.alarmModelVersion),
|
|
@@ -1020,7 +1341,7 @@ const deserializeAws_restJson1Alarm = (output, context) => {
|
|
|
1020
1341
|
severity: __expectInt32(output.severity),
|
|
1021
1342
|
};
|
|
1022
1343
|
};
|
|
1023
|
-
|
|
1344
|
+
var deserializeAws_restJson1AlarmState = function (output, context) {
|
|
1024
1345
|
return {
|
|
1025
1346
|
customerAction: output.customerAction != null
|
|
1026
1347
|
? deserializeAws_restJson1CustomerAction(output.customerAction, context)
|
|
@@ -1032,10 +1353,10 @@ const deserializeAws_restJson1AlarmState = (output, context) => {
|
|
|
1032
1353
|
systemEvent: output.systemEvent != null ? deserializeAws_restJson1SystemEvent(output.systemEvent, context) : undefined,
|
|
1033
1354
|
};
|
|
1034
1355
|
};
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
.filter((e)
|
|
1038
|
-
.map((entry)
|
|
1356
|
+
var deserializeAws_restJson1AlarmSummaries = function (output, context) {
|
|
1357
|
+
var retVal = (output || [])
|
|
1358
|
+
.filter(function (e) { return e != null; })
|
|
1359
|
+
.map(function (entry) {
|
|
1039
1360
|
if (entry === null) {
|
|
1040
1361
|
return null;
|
|
1041
1362
|
}
|
|
@@ -1043,7 +1364,7 @@ const deserializeAws_restJson1AlarmSummaries = (output, context) => {
|
|
|
1043
1364
|
});
|
|
1044
1365
|
return retVal;
|
|
1045
1366
|
};
|
|
1046
|
-
|
|
1367
|
+
var deserializeAws_restJson1AlarmSummary = function (output, context) {
|
|
1047
1368
|
return {
|
|
1048
1369
|
alarmModelName: __expectString(output.alarmModelName),
|
|
1049
1370
|
alarmModelVersion: __expectString(output.alarmModelVersion),
|
|
@@ -1057,10 +1378,10 @@ const deserializeAws_restJson1AlarmSummary = (output, context) => {
|
|
|
1057
1378
|
stateName: __expectString(output.stateName),
|
|
1058
1379
|
};
|
|
1059
1380
|
};
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
.filter((e)
|
|
1063
|
-
.map((entry)
|
|
1381
|
+
var deserializeAws_restJson1BatchAlarmActionErrorEntries = function (output, context) {
|
|
1382
|
+
var retVal = (output || [])
|
|
1383
|
+
.filter(function (e) { return e != null; })
|
|
1384
|
+
.map(function (entry) {
|
|
1064
1385
|
if (entry === null) {
|
|
1065
1386
|
return null;
|
|
1066
1387
|
}
|
|
@@ -1068,17 +1389,17 @@ const deserializeAws_restJson1BatchAlarmActionErrorEntries = (output, context) =
|
|
|
1068
1389
|
});
|
|
1069
1390
|
return retVal;
|
|
1070
1391
|
};
|
|
1071
|
-
|
|
1392
|
+
var deserializeAws_restJson1BatchAlarmActionErrorEntry = function (output, context) {
|
|
1072
1393
|
return {
|
|
1073
1394
|
errorCode: __expectString(output.errorCode),
|
|
1074
1395
|
errorMessage: __expectString(output.errorMessage),
|
|
1075
1396
|
requestId: __expectString(output.requestId),
|
|
1076
1397
|
};
|
|
1077
1398
|
};
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
.filter((e)
|
|
1081
|
-
.map((entry)
|
|
1399
|
+
var deserializeAws_restJson1BatchDeleteDetectorErrorEntries = function (output, context) {
|
|
1400
|
+
var retVal = (output || [])
|
|
1401
|
+
.filter(function (e) { return e != null; })
|
|
1402
|
+
.map(function (entry) {
|
|
1082
1403
|
if (entry === null) {
|
|
1083
1404
|
return null;
|
|
1084
1405
|
}
|
|
@@ -1086,17 +1407,17 @@ const deserializeAws_restJson1BatchDeleteDetectorErrorEntries = (output, context
|
|
|
1086
1407
|
});
|
|
1087
1408
|
return retVal;
|
|
1088
1409
|
};
|
|
1089
|
-
|
|
1410
|
+
var deserializeAws_restJson1BatchDeleteDetectorErrorEntry = function (output, context) {
|
|
1090
1411
|
return {
|
|
1091
1412
|
errorCode: __expectString(output.errorCode),
|
|
1092
1413
|
errorMessage: __expectString(output.errorMessage),
|
|
1093
1414
|
messageId: __expectString(output.messageId),
|
|
1094
1415
|
};
|
|
1095
1416
|
};
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
.filter((e)
|
|
1099
|
-
.map((entry)
|
|
1417
|
+
var deserializeAws_restJson1BatchPutMessageErrorEntries = function (output, context) {
|
|
1418
|
+
var retVal = (output || [])
|
|
1419
|
+
.filter(function (e) { return e != null; })
|
|
1420
|
+
.map(function (entry) {
|
|
1100
1421
|
if (entry === null) {
|
|
1101
1422
|
return null;
|
|
1102
1423
|
}
|
|
@@ -1104,17 +1425,17 @@ const deserializeAws_restJson1BatchPutMessageErrorEntries = (output, context) =>
|
|
|
1104
1425
|
});
|
|
1105
1426
|
return retVal;
|
|
1106
1427
|
};
|
|
1107
|
-
|
|
1428
|
+
var deserializeAws_restJson1BatchPutMessageErrorEntry = function (output, context) {
|
|
1108
1429
|
return {
|
|
1109
1430
|
errorCode: __expectString(output.errorCode),
|
|
1110
1431
|
errorMessage: __expectString(output.errorMessage),
|
|
1111
1432
|
messageId: __expectString(output.messageId),
|
|
1112
1433
|
};
|
|
1113
1434
|
};
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
.filter((e)
|
|
1117
|
-
.map((entry)
|
|
1435
|
+
var deserializeAws_restJson1BatchUpdateDetectorErrorEntries = function (output, context) {
|
|
1436
|
+
var retVal = (output || [])
|
|
1437
|
+
.filter(function (e) { return e != null; })
|
|
1438
|
+
.map(function (entry) {
|
|
1118
1439
|
if (entry === null) {
|
|
1119
1440
|
return null;
|
|
1120
1441
|
}
|
|
@@ -1122,14 +1443,14 @@ const deserializeAws_restJson1BatchUpdateDetectorErrorEntries = (output, context
|
|
|
1122
1443
|
});
|
|
1123
1444
|
return retVal;
|
|
1124
1445
|
};
|
|
1125
|
-
|
|
1446
|
+
var deserializeAws_restJson1BatchUpdateDetectorErrorEntry = function (output, context) {
|
|
1126
1447
|
return {
|
|
1127
1448
|
errorCode: __expectString(output.errorCode),
|
|
1128
1449
|
errorMessage: __expectString(output.errorMessage),
|
|
1129
1450
|
messageId: __expectString(output.messageId),
|
|
1130
1451
|
};
|
|
1131
1452
|
};
|
|
1132
|
-
|
|
1453
|
+
var deserializeAws_restJson1CustomerAction = function (output, context) {
|
|
1133
1454
|
return {
|
|
1134
1455
|
acknowledgeActionConfiguration: output.acknowledgeActionConfiguration != null
|
|
1135
1456
|
? deserializeAws_restJson1AcknowledgeActionConfiguration(output.acknowledgeActionConfiguration, context)
|
|
@@ -1149,7 +1470,7 @@ const deserializeAws_restJson1CustomerAction = (output, context) => {
|
|
|
1149
1470
|
: undefined,
|
|
1150
1471
|
};
|
|
1151
1472
|
};
|
|
1152
|
-
|
|
1473
|
+
var deserializeAws_restJson1Detector = function (output, context) {
|
|
1153
1474
|
return {
|
|
1154
1475
|
creationTime: output.creationTime != null
|
|
1155
1476
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
@@ -1163,22 +1484,22 @@ const deserializeAws_restJson1Detector = (output, context) => {
|
|
|
1163
1484
|
state: output.state != null ? deserializeAws_restJson1DetectorState(output.state, context) : undefined,
|
|
1164
1485
|
};
|
|
1165
1486
|
};
|
|
1166
|
-
|
|
1487
|
+
var deserializeAws_restJson1DetectorState = function (output, context) {
|
|
1167
1488
|
return {
|
|
1168
1489
|
stateName: __expectString(output.stateName),
|
|
1169
1490
|
timers: output.timers != null ? deserializeAws_restJson1Timers(output.timers, context) : undefined,
|
|
1170
1491
|
variables: output.variables != null ? deserializeAws_restJson1Variables(output.variables, context) : undefined,
|
|
1171
1492
|
};
|
|
1172
1493
|
};
|
|
1173
|
-
|
|
1494
|
+
var deserializeAws_restJson1DetectorStateSummary = function (output, context) {
|
|
1174
1495
|
return {
|
|
1175
1496
|
stateName: __expectString(output.stateName),
|
|
1176
1497
|
};
|
|
1177
1498
|
};
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
.filter((e)
|
|
1181
|
-
.map((entry)
|
|
1499
|
+
var deserializeAws_restJson1DetectorSummaries = function (output, context) {
|
|
1500
|
+
var retVal = (output || [])
|
|
1501
|
+
.filter(function (e) { return e != null; })
|
|
1502
|
+
.map(function (entry) {
|
|
1182
1503
|
if (entry === null) {
|
|
1183
1504
|
return null;
|
|
1184
1505
|
}
|
|
@@ -1186,7 +1507,7 @@ const deserializeAws_restJson1DetectorSummaries = (output, context) => {
|
|
|
1186
1507
|
});
|
|
1187
1508
|
return retVal;
|
|
1188
1509
|
};
|
|
1189
|
-
|
|
1510
|
+
var deserializeAws_restJson1DetectorSummary = function (output, context) {
|
|
1190
1511
|
return {
|
|
1191
1512
|
creationTime: output.creationTime != null
|
|
1192
1513
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
@@ -1200,47 +1521,47 @@ const deserializeAws_restJson1DetectorSummary = (output, context) => {
|
|
|
1200
1521
|
state: output.state != null ? deserializeAws_restJson1DetectorStateSummary(output.state, context) : undefined,
|
|
1201
1522
|
};
|
|
1202
1523
|
};
|
|
1203
|
-
|
|
1524
|
+
var deserializeAws_restJson1DisableActionConfiguration = function (output, context) {
|
|
1204
1525
|
return {
|
|
1205
1526
|
note: __expectString(output.note),
|
|
1206
1527
|
};
|
|
1207
1528
|
};
|
|
1208
|
-
|
|
1529
|
+
var deserializeAws_restJson1EnableActionConfiguration = function (output, context) {
|
|
1209
1530
|
return {
|
|
1210
1531
|
note: __expectString(output.note),
|
|
1211
1532
|
};
|
|
1212
1533
|
};
|
|
1213
|
-
|
|
1534
|
+
var deserializeAws_restJson1ResetActionConfiguration = function (output, context) {
|
|
1214
1535
|
return {
|
|
1215
1536
|
note: __expectString(output.note),
|
|
1216
1537
|
};
|
|
1217
1538
|
};
|
|
1218
|
-
|
|
1539
|
+
var deserializeAws_restJson1RuleEvaluation = function (output, context) {
|
|
1219
1540
|
return {
|
|
1220
1541
|
simpleRuleEvaluation: output.simpleRuleEvaluation != null
|
|
1221
1542
|
? deserializeAws_restJson1SimpleRuleEvaluation(output.simpleRuleEvaluation, context)
|
|
1222
1543
|
: undefined,
|
|
1223
1544
|
};
|
|
1224
1545
|
};
|
|
1225
|
-
|
|
1546
|
+
var deserializeAws_restJson1SimpleRuleEvaluation = function (output, context) {
|
|
1226
1547
|
return {
|
|
1227
1548
|
inputPropertyValue: __expectString(output.inputPropertyValue),
|
|
1228
1549
|
operator: __expectString(output.operator),
|
|
1229
1550
|
thresholdValue: __expectString(output.thresholdValue),
|
|
1230
1551
|
};
|
|
1231
1552
|
};
|
|
1232
|
-
|
|
1553
|
+
var deserializeAws_restJson1SnoozeActionConfiguration = function (output, context) {
|
|
1233
1554
|
return {
|
|
1234
1555
|
note: __expectString(output.note),
|
|
1235
1556
|
snoozeDuration: __expectInt32(output.snoozeDuration),
|
|
1236
1557
|
};
|
|
1237
1558
|
};
|
|
1238
|
-
|
|
1559
|
+
var deserializeAws_restJson1StateChangeConfiguration = function (output, context) {
|
|
1239
1560
|
return {
|
|
1240
1561
|
triggerType: __expectString(output.triggerType),
|
|
1241
1562
|
};
|
|
1242
1563
|
};
|
|
1243
|
-
|
|
1564
|
+
var deserializeAws_restJson1SystemEvent = function (output, context) {
|
|
1244
1565
|
return {
|
|
1245
1566
|
eventType: __expectString(output.eventType),
|
|
1246
1567
|
stateChangeConfiguration: output.stateChangeConfiguration != null
|
|
@@ -1248,16 +1569,16 @@ const deserializeAws_restJson1SystemEvent = (output, context) => {
|
|
|
1248
1569
|
: undefined,
|
|
1249
1570
|
};
|
|
1250
1571
|
};
|
|
1251
|
-
|
|
1572
|
+
var deserializeAws_restJson1Timer = function (output, context) {
|
|
1252
1573
|
return {
|
|
1253
1574
|
name: __expectString(output.name),
|
|
1254
1575
|
timestamp: output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined,
|
|
1255
1576
|
};
|
|
1256
1577
|
};
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
.filter((e)
|
|
1260
|
-
.map((entry)
|
|
1578
|
+
var deserializeAws_restJson1Timers = function (output, context) {
|
|
1579
|
+
var retVal = (output || [])
|
|
1580
|
+
.filter(function (e) { return e != null; })
|
|
1581
|
+
.map(function (entry) {
|
|
1261
1582
|
if (entry === null) {
|
|
1262
1583
|
return null;
|
|
1263
1584
|
}
|
|
@@ -1265,16 +1586,16 @@ const deserializeAws_restJson1Timers = (output, context) => {
|
|
|
1265
1586
|
});
|
|
1266
1587
|
return retVal;
|
|
1267
1588
|
};
|
|
1268
|
-
|
|
1589
|
+
var deserializeAws_restJson1Variable = function (output, context) {
|
|
1269
1590
|
return {
|
|
1270
1591
|
name: __expectString(output.name),
|
|
1271
1592
|
value: __expectString(output.value),
|
|
1272
1593
|
};
|
|
1273
1594
|
};
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
.filter((e)
|
|
1277
|
-
.map((entry)
|
|
1595
|
+
var deserializeAws_restJson1Variables = function (output, context) {
|
|
1596
|
+
var retVal = (output || [])
|
|
1597
|
+
.filter(function (e) { return e != null; })
|
|
1598
|
+
.map(function (entry) {
|
|
1278
1599
|
if (entry === null) {
|
|
1279
1600
|
return null;
|
|
1280
1601
|
}
|
|
@@ -1282,39 +1603,57 @@ const deserializeAws_restJson1Variables = (output, context) => {
|
|
|
1282
1603
|
});
|
|
1283
1604
|
return retVal;
|
|
1284
1605
|
};
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1606
|
+
var deserializeMetadata = function (output) {
|
|
1607
|
+
var _a, _b;
|
|
1608
|
+
return ({
|
|
1609
|
+
httpStatusCode: output.statusCode,
|
|
1610
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1611
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1612
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1613
|
+
});
|
|
1614
|
+
};
|
|
1615
|
+
var collectBody = function (streamBody, context) {
|
|
1616
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1292
1617
|
if (streamBody instanceof Uint8Array) {
|
|
1293
1618
|
return Promise.resolve(streamBody);
|
|
1294
1619
|
}
|
|
1295
1620
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1296
1621
|
};
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
}
|
|
1307
|
-
return {};
|
|
1308
|
-
});
|
|
1309
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1310
|
-
const value = await parseBody(errorBody, context);
|
|
1311
|
-
value.message = value.message ?? value.Message;
|
|
1312
|
-
return value;
|
|
1622
|
+
var collectBodyString = function (streamBody, context) {
|
|
1623
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1624
|
+
};
|
|
1625
|
+
var isSerializableHeaderValue = function (value) {
|
|
1626
|
+
return value !== undefined &&
|
|
1627
|
+
value !== null &&
|
|
1628
|
+
value !== "" &&
|
|
1629
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1630
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1313
1631
|
};
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1632
|
+
var parseBody = function (streamBody, context) {
|
|
1633
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1634
|
+
if (encoded.length) {
|
|
1635
|
+
return JSON.parse(encoded);
|
|
1636
|
+
}
|
|
1637
|
+
return {};
|
|
1638
|
+
});
|
|
1639
|
+
};
|
|
1640
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1641
|
+
var value;
|
|
1642
|
+
var _a;
|
|
1643
|
+
return __generator(this, function (_b) {
|
|
1644
|
+
switch (_b.label) {
|
|
1645
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1646
|
+
case 1:
|
|
1647
|
+
value = _b.sent();
|
|
1648
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1649
|
+
return [2, value];
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
1652
|
+
}); };
|
|
1653
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1654
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1655
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1656
|
+
var cleanValue = rawValue;
|
|
1318
1657
|
if (typeof cleanValue === "number") {
|
|
1319
1658
|
cleanValue = cleanValue.toString();
|
|
1320
1659
|
}
|
|
@@ -1329,7 +1668,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1329
1668
|
}
|
|
1330
1669
|
return cleanValue;
|
|
1331
1670
|
};
|
|
1332
|
-
|
|
1671
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1333
1672
|
if (headerKey !== undefined) {
|
|
1334
1673
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1335
1674
|
}
|