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