@aws-sdk/client-iot-events 3.489.0 → 3.495.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/dist-cjs/IoTEvents.js +1 -63
- package/dist-cjs/IoTEventsClient.js +1 -43
- package/dist-cjs/commands/CreateAlarmModelCommand.js +1 -28
- package/dist-cjs/commands/CreateDetectorModelCommand.js +1 -28
- package/dist-cjs/commands/CreateInputCommand.js +1 -28
- package/dist-cjs/commands/DeleteAlarmModelCommand.js +1 -28
- package/dist-cjs/commands/DeleteDetectorModelCommand.js +1 -28
- package/dist-cjs/commands/DeleteInputCommand.js +1 -28
- package/dist-cjs/commands/DescribeAlarmModelCommand.js +1 -28
- package/dist-cjs/commands/DescribeDetectorModelAnalysisCommand.js +1 -28
- package/dist-cjs/commands/DescribeDetectorModelCommand.js +1 -28
- package/dist-cjs/commands/DescribeInputCommand.js +1 -28
- package/dist-cjs/commands/DescribeLoggingOptionsCommand.js +1 -28
- package/dist-cjs/commands/GetDetectorModelAnalysisResultsCommand.js +1 -28
- package/dist-cjs/commands/ListAlarmModelVersionsCommand.js +1 -28
- package/dist-cjs/commands/ListAlarmModelsCommand.js +1 -28
- package/dist-cjs/commands/ListDetectorModelVersionsCommand.js +1 -28
- package/dist-cjs/commands/ListDetectorModelsCommand.js +1 -28
- package/dist-cjs/commands/ListInputRoutingsCommand.js +1 -28
- package/dist-cjs/commands/ListInputsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/PutLoggingOptionsCommand.js +1 -28
- package/dist-cjs/commands/StartDetectorModelAnalysisCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateAlarmModelCommand.js +1 -28
- package/dist-cjs/commands/UpdateDetectorModelCommand.js +1 -28
- package/dist-cjs/commands/UpdateInputCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -29
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2794 -10
- package/dist-cjs/models/IoTEventsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -175
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1927
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1927 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateAlarmModelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartDetectorModelAnalysisCommand = exports.de_PutLoggingOptionsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListInputsCommand = exports.de_ListInputRoutingsCommand = exports.de_ListDetectorModelVersionsCommand = exports.de_ListDetectorModelsCommand = exports.de_ListAlarmModelVersionsCommand = exports.de_ListAlarmModelsCommand = exports.de_GetDetectorModelAnalysisResultsCommand = exports.de_DescribeLoggingOptionsCommand = exports.de_DescribeInputCommand = exports.de_DescribeDetectorModelAnalysisCommand = exports.de_DescribeDetectorModelCommand = exports.de_DescribeAlarmModelCommand = exports.de_DeleteInputCommand = exports.de_DeleteDetectorModelCommand = exports.de_DeleteAlarmModelCommand = exports.de_CreateInputCommand = exports.de_CreateDetectorModelCommand = exports.de_CreateAlarmModelCommand = exports.se_UpdateInputCommand = exports.se_UpdateDetectorModelCommand = exports.se_UpdateAlarmModelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartDetectorModelAnalysisCommand = exports.se_PutLoggingOptionsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListInputsCommand = exports.se_ListInputRoutingsCommand = exports.se_ListDetectorModelVersionsCommand = exports.se_ListDetectorModelsCommand = exports.se_ListAlarmModelVersionsCommand = exports.se_ListAlarmModelsCommand = exports.se_GetDetectorModelAnalysisResultsCommand = exports.se_DescribeLoggingOptionsCommand = exports.se_DescribeInputCommand = exports.se_DescribeDetectorModelAnalysisCommand = exports.se_DescribeDetectorModelCommand = exports.se_DescribeAlarmModelCommand = exports.se_DeleteInputCommand = exports.se_DeleteDetectorModelCommand = exports.se_DeleteAlarmModelCommand = exports.se_CreateInputCommand = exports.se_CreateDetectorModelCommand = exports.se_CreateAlarmModelCommand = void 0;
|
|
4
|
-
exports.de_UpdateInputCommand = exports.de_UpdateDetectorModelCommand = void 0;
|
|
5
|
-
const core_1 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const IoTEventsServiceException_1 = require("../models/IoTEventsServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CreateAlarmModelCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/alarm-models");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
alarmCapabilities: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
alarmEventActions: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
-
alarmModelDescription: [],
|
|
20
|
-
alarmModelName: [],
|
|
21
|
-
alarmNotification: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
-
alarmRule: (_) => (0, smithy_client_1._json)(_),
|
|
23
|
-
key: [],
|
|
24
|
-
roleArn: [],
|
|
25
|
-
severity: [],
|
|
26
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
27
|
-
}));
|
|
28
|
-
b.m("POST").h(headers).b(body);
|
|
29
|
-
return b.build();
|
|
30
|
-
};
|
|
31
|
-
exports.se_CreateAlarmModelCommand = se_CreateAlarmModelCommand;
|
|
32
|
-
const se_CreateDetectorModelCommand = async (input, context) => {
|
|
33
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
34
|
-
const headers = {
|
|
35
|
-
"content-type": "application/json",
|
|
36
|
-
};
|
|
37
|
-
b.bp("/detector-models");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
40
|
-
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
41
|
-
detectorModelDescription: [],
|
|
42
|
-
detectorModelName: [],
|
|
43
|
-
evaluationMethod: [],
|
|
44
|
-
key: [],
|
|
45
|
-
roleArn: [],
|
|
46
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
47
|
-
}));
|
|
48
|
-
b.m("POST").h(headers).b(body);
|
|
49
|
-
return b.build();
|
|
50
|
-
};
|
|
51
|
-
exports.se_CreateDetectorModelCommand = se_CreateDetectorModelCommand;
|
|
52
|
-
const se_CreateInputCommand = async (input, context) => {
|
|
53
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
54
|
-
const headers = {
|
|
55
|
-
"content-type": "application/json",
|
|
56
|
-
};
|
|
57
|
-
b.bp("/inputs");
|
|
58
|
-
let body;
|
|
59
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
60
|
-
inputDefinition: (_) => (0, smithy_client_1._json)(_),
|
|
61
|
-
inputDescription: [],
|
|
62
|
-
inputName: [],
|
|
63
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
64
|
-
}));
|
|
65
|
-
b.m("POST").h(headers).b(body);
|
|
66
|
-
return b.build();
|
|
67
|
-
};
|
|
68
|
-
exports.se_CreateInputCommand = se_CreateInputCommand;
|
|
69
|
-
const se_DeleteAlarmModelCommand = async (input, context) => {
|
|
70
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
71
|
-
const headers = {};
|
|
72
|
-
b.bp("/alarm-models/{alarmModelName}");
|
|
73
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
74
|
-
let body;
|
|
75
|
-
b.m("DELETE").h(headers).b(body);
|
|
76
|
-
return b.build();
|
|
77
|
-
};
|
|
78
|
-
exports.se_DeleteAlarmModelCommand = se_DeleteAlarmModelCommand;
|
|
79
|
-
const se_DeleteDetectorModelCommand = async (input, context) => {
|
|
80
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
81
|
-
const headers = {};
|
|
82
|
-
b.bp("/detector-models/{detectorModelName}");
|
|
83
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
84
|
-
let body;
|
|
85
|
-
b.m("DELETE").h(headers).b(body);
|
|
86
|
-
return b.build();
|
|
87
|
-
};
|
|
88
|
-
exports.se_DeleteDetectorModelCommand = se_DeleteDetectorModelCommand;
|
|
89
|
-
const se_DeleteInputCommand = async (input, context) => {
|
|
90
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
91
|
-
const headers = {};
|
|
92
|
-
b.bp("/inputs/{inputName}");
|
|
93
|
-
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
94
|
-
let body;
|
|
95
|
-
b.m("DELETE").h(headers).b(body);
|
|
96
|
-
return b.build();
|
|
97
|
-
};
|
|
98
|
-
exports.se_DeleteInputCommand = se_DeleteInputCommand;
|
|
99
|
-
const se_DescribeAlarmModelCommand = async (input, context) => {
|
|
100
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
101
|
-
const headers = {};
|
|
102
|
-
b.bp("/alarm-models/{alarmModelName}");
|
|
103
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
104
|
-
const query = (0, smithy_client_1.map)({
|
|
105
|
-
[_v]: [, input[_aMV]],
|
|
106
|
-
});
|
|
107
|
-
let body;
|
|
108
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
109
|
-
return b.build();
|
|
110
|
-
};
|
|
111
|
-
exports.se_DescribeAlarmModelCommand = se_DescribeAlarmModelCommand;
|
|
112
|
-
const se_DescribeDetectorModelCommand = async (input, context) => {
|
|
113
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
114
|
-
const headers = {};
|
|
115
|
-
b.bp("/detector-models/{detectorModelName}");
|
|
116
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
117
|
-
const query = (0, smithy_client_1.map)({
|
|
118
|
-
[_v]: [, input[_dMV]],
|
|
119
|
-
});
|
|
120
|
-
let body;
|
|
121
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
122
|
-
return b.build();
|
|
123
|
-
};
|
|
124
|
-
exports.se_DescribeDetectorModelCommand = se_DescribeDetectorModelCommand;
|
|
125
|
-
const se_DescribeDetectorModelAnalysisCommand = async (input, context) => {
|
|
126
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
127
|
-
const headers = {};
|
|
128
|
-
b.bp("/analysis/detector-models/{analysisId}");
|
|
129
|
-
b.p("analysisId", () => input.analysisId, "{analysisId}", false);
|
|
130
|
-
let body;
|
|
131
|
-
b.m("GET").h(headers).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
exports.se_DescribeDetectorModelAnalysisCommand = se_DescribeDetectorModelAnalysisCommand;
|
|
135
|
-
const se_DescribeInputCommand = async (input, context) => {
|
|
136
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
137
|
-
const headers = {};
|
|
138
|
-
b.bp("/inputs/{inputName}");
|
|
139
|
-
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
140
|
-
let body;
|
|
141
|
-
b.m("GET").h(headers).b(body);
|
|
142
|
-
return b.build();
|
|
143
|
-
};
|
|
144
|
-
exports.se_DescribeInputCommand = se_DescribeInputCommand;
|
|
145
|
-
const se_DescribeLoggingOptionsCommand = async (input, context) => {
|
|
146
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
147
|
-
const headers = {
|
|
148
|
-
"content-type": "application/json",
|
|
149
|
-
};
|
|
150
|
-
b.bp("/logging");
|
|
151
|
-
let body;
|
|
152
|
-
body = "";
|
|
153
|
-
b.m("GET").h(headers).b(body);
|
|
154
|
-
return b.build();
|
|
155
|
-
};
|
|
156
|
-
exports.se_DescribeLoggingOptionsCommand = se_DescribeLoggingOptionsCommand;
|
|
157
|
-
const se_GetDetectorModelAnalysisResultsCommand = async (input, context) => {
|
|
158
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
159
|
-
const headers = {};
|
|
160
|
-
b.bp("/analysis/detector-models/{analysisId}/results");
|
|
161
|
-
b.p("analysisId", () => input.analysisId, "{analysisId}", false);
|
|
162
|
-
const query = (0, smithy_client_1.map)({
|
|
163
|
-
[_nT]: [, input[_nT]],
|
|
164
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
165
|
-
});
|
|
166
|
-
let body;
|
|
167
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
168
|
-
return b.build();
|
|
169
|
-
};
|
|
170
|
-
exports.se_GetDetectorModelAnalysisResultsCommand = se_GetDetectorModelAnalysisResultsCommand;
|
|
171
|
-
const se_ListAlarmModelsCommand = async (input, context) => {
|
|
172
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
173
|
-
const headers = {};
|
|
174
|
-
b.bp("/alarm-models");
|
|
175
|
-
const query = (0, smithy_client_1.map)({
|
|
176
|
-
[_nT]: [, input[_nT]],
|
|
177
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
178
|
-
});
|
|
179
|
-
let body;
|
|
180
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
181
|
-
return b.build();
|
|
182
|
-
};
|
|
183
|
-
exports.se_ListAlarmModelsCommand = se_ListAlarmModelsCommand;
|
|
184
|
-
const se_ListAlarmModelVersionsCommand = async (input, context) => {
|
|
185
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
186
|
-
const headers = {};
|
|
187
|
-
b.bp("/alarm-models/{alarmModelName}/versions");
|
|
188
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
189
|
-
const query = (0, smithy_client_1.map)({
|
|
190
|
-
[_nT]: [, input[_nT]],
|
|
191
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
192
|
-
});
|
|
193
|
-
let body;
|
|
194
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
195
|
-
return b.build();
|
|
196
|
-
};
|
|
197
|
-
exports.se_ListAlarmModelVersionsCommand = se_ListAlarmModelVersionsCommand;
|
|
198
|
-
const se_ListDetectorModelsCommand = async (input, context) => {
|
|
199
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
200
|
-
const headers = {};
|
|
201
|
-
b.bp("/detector-models");
|
|
202
|
-
const query = (0, smithy_client_1.map)({
|
|
203
|
-
[_nT]: [, input[_nT]],
|
|
204
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
205
|
-
});
|
|
206
|
-
let body;
|
|
207
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
208
|
-
return b.build();
|
|
209
|
-
};
|
|
210
|
-
exports.se_ListDetectorModelsCommand = se_ListDetectorModelsCommand;
|
|
211
|
-
const se_ListDetectorModelVersionsCommand = async (input, context) => {
|
|
212
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
213
|
-
const headers = {};
|
|
214
|
-
b.bp("/detector-models/{detectorModelName}/versions");
|
|
215
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
216
|
-
const query = (0, smithy_client_1.map)({
|
|
217
|
-
[_nT]: [, input[_nT]],
|
|
218
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
219
|
-
});
|
|
220
|
-
let body;
|
|
221
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
222
|
-
return b.build();
|
|
223
|
-
};
|
|
224
|
-
exports.se_ListDetectorModelVersionsCommand = se_ListDetectorModelVersionsCommand;
|
|
225
|
-
const se_ListInputRoutingsCommand = async (input, context) => {
|
|
226
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
227
|
-
const headers = {
|
|
228
|
-
"content-type": "application/json",
|
|
229
|
-
};
|
|
230
|
-
b.bp("/input-routings");
|
|
231
|
-
let body;
|
|
232
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
233
|
-
inputIdentifier: (_) => (0, smithy_client_1._json)(_),
|
|
234
|
-
maxResults: [],
|
|
235
|
-
nextToken: [],
|
|
236
|
-
}));
|
|
237
|
-
b.m("POST").h(headers).b(body);
|
|
238
|
-
return b.build();
|
|
239
|
-
};
|
|
240
|
-
exports.se_ListInputRoutingsCommand = se_ListInputRoutingsCommand;
|
|
241
|
-
const se_ListInputsCommand = async (input, context) => {
|
|
242
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
243
|
-
const headers = {};
|
|
244
|
-
b.bp("/inputs");
|
|
245
|
-
const query = (0, smithy_client_1.map)({
|
|
246
|
-
[_nT]: [, input[_nT]],
|
|
247
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
248
|
-
});
|
|
249
|
-
let body;
|
|
250
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
251
|
-
return b.build();
|
|
252
|
-
};
|
|
253
|
-
exports.se_ListInputsCommand = se_ListInputsCommand;
|
|
254
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
255
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
256
|
-
const headers = {};
|
|
257
|
-
b.bp("/tags");
|
|
258
|
-
const query = (0, smithy_client_1.map)({
|
|
259
|
-
[_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
|
|
260
|
-
});
|
|
261
|
-
let body;
|
|
262
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
263
|
-
return b.build();
|
|
264
|
-
};
|
|
265
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
266
|
-
const se_PutLoggingOptionsCommand = async (input, context) => {
|
|
267
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
268
|
-
const headers = {
|
|
269
|
-
"content-type": "application/json",
|
|
270
|
-
};
|
|
271
|
-
b.bp("/logging");
|
|
272
|
-
let body;
|
|
273
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
274
|
-
loggingOptions: (_) => (0, smithy_client_1._json)(_),
|
|
275
|
-
}));
|
|
276
|
-
b.m("PUT").h(headers).b(body);
|
|
277
|
-
return b.build();
|
|
278
|
-
};
|
|
279
|
-
exports.se_PutLoggingOptionsCommand = se_PutLoggingOptionsCommand;
|
|
280
|
-
const se_StartDetectorModelAnalysisCommand = async (input, context) => {
|
|
281
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
282
|
-
const headers = {
|
|
283
|
-
"content-type": "application/json",
|
|
284
|
-
};
|
|
285
|
-
b.bp("/analysis/detector-models");
|
|
286
|
-
let body;
|
|
287
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
288
|
-
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
289
|
-
}));
|
|
290
|
-
b.m("POST").h(headers).b(body);
|
|
291
|
-
return b.build();
|
|
292
|
-
};
|
|
293
|
-
exports.se_StartDetectorModelAnalysisCommand = se_StartDetectorModelAnalysisCommand;
|
|
294
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
295
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
296
|
-
const headers = {
|
|
297
|
-
"content-type": "application/json",
|
|
298
|
-
};
|
|
299
|
-
b.bp("/tags");
|
|
300
|
-
const query = (0, smithy_client_1.map)({
|
|
301
|
-
[_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
|
|
302
|
-
});
|
|
303
|
-
let body;
|
|
304
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
305
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
306
|
-
}));
|
|
307
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
308
|
-
return b.build();
|
|
309
|
-
};
|
|
310
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
311
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
312
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
313
|
-
const headers = {};
|
|
314
|
-
b.bp("/tags");
|
|
315
|
-
const query = (0, smithy_client_1.map)({
|
|
316
|
-
[_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
|
|
317
|
-
[_tK]: [
|
|
318
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
319
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
320
|
-
],
|
|
321
|
-
});
|
|
322
|
-
let body;
|
|
323
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
324
|
-
return b.build();
|
|
325
|
-
};
|
|
326
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
327
|
-
const se_UpdateAlarmModelCommand = async (input, context) => {
|
|
328
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
329
|
-
const headers = {
|
|
330
|
-
"content-type": "application/json",
|
|
331
|
-
};
|
|
332
|
-
b.bp("/alarm-models/{alarmModelName}");
|
|
333
|
-
b.p("alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
|
|
334
|
-
let body;
|
|
335
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
336
|
-
alarmCapabilities: (_) => (0, smithy_client_1._json)(_),
|
|
337
|
-
alarmEventActions: (_) => (0, smithy_client_1._json)(_),
|
|
338
|
-
alarmModelDescription: [],
|
|
339
|
-
alarmNotification: (_) => (0, smithy_client_1._json)(_),
|
|
340
|
-
alarmRule: (_) => (0, smithy_client_1._json)(_),
|
|
341
|
-
roleArn: [],
|
|
342
|
-
severity: [],
|
|
343
|
-
}));
|
|
344
|
-
b.m("POST").h(headers).b(body);
|
|
345
|
-
return b.build();
|
|
346
|
-
};
|
|
347
|
-
exports.se_UpdateAlarmModelCommand = se_UpdateAlarmModelCommand;
|
|
348
|
-
const se_UpdateDetectorModelCommand = async (input, context) => {
|
|
349
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
350
|
-
const headers = {
|
|
351
|
-
"content-type": "application/json",
|
|
352
|
-
};
|
|
353
|
-
b.bp("/detector-models/{detectorModelName}");
|
|
354
|
-
b.p("detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
|
|
355
|
-
let body;
|
|
356
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
357
|
-
detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
|
|
358
|
-
detectorModelDescription: [],
|
|
359
|
-
evaluationMethod: [],
|
|
360
|
-
roleArn: [],
|
|
361
|
-
}));
|
|
362
|
-
b.m("POST").h(headers).b(body);
|
|
363
|
-
return b.build();
|
|
364
|
-
};
|
|
365
|
-
exports.se_UpdateDetectorModelCommand = se_UpdateDetectorModelCommand;
|
|
366
|
-
const se_UpdateInputCommand = async (input, context) => {
|
|
367
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
368
|
-
const headers = {
|
|
369
|
-
"content-type": "application/json",
|
|
370
|
-
};
|
|
371
|
-
b.bp("/inputs/{inputName}");
|
|
372
|
-
b.p("inputName", () => input.inputName, "{inputName}", false);
|
|
373
|
-
let body;
|
|
374
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
375
|
-
inputDefinition: (_) => (0, smithy_client_1._json)(_),
|
|
376
|
-
inputDescription: [],
|
|
377
|
-
}));
|
|
378
|
-
b.m("PUT").h(headers).b(body);
|
|
379
|
-
return b.build();
|
|
380
|
-
};
|
|
381
|
-
exports.se_UpdateInputCommand = se_UpdateInputCommand;
|
|
382
|
-
const de_CreateAlarmModelCommand = async (output, context) => {
|
|
383
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
384
|
-
return de_CreateAlarmModelCommandError(output, context);
|
|
385
|
-
}
|
|
386
|
-
const contents = (0, smithy_client_1.map)({
|
|
387
|
-
$metadata: deserializeMetadata(output),
|
|
388
|
-
});
|
|
389
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
390
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
391
|
-
alarmModelArn: smithy_client_1.expectString,
|
|
392
|
-
alarmModelVersion: smithy_client_1.expectString,
|
|
393
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
394
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
395
|
-
status: smithy_client_1.expectString,
|
|
396
|
-
});
|
|
397
|
-
Object.assign(contents, doc);
|
|
398
|
-
return contents;
|
|
399
|
-
};
|
|
400
|
-
exports.de_CreateAlarmModelCommand = de_CreateAlarmModelCommand;
|
|
401
|
-
const de_CreateAlarmModelCommandError = 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.iotevents#InternalFailureException":
|
|
410
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
411
|
-
case "InvalidRequestException":
|
|
412
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
413
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
414
|
-
case "LimitExceededException":
|
|
415
|
-
case "com.amazonaws.iotevents#LimitExceededException":
|
|
416
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
417
|
-
case "ResourceAlreadyExistsException":
|
|
418
|
-
case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
|
|
419
|
-
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
|
|
420
|
-
case "ResourceInUseException":
|
|
421
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
422
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
423
|
-
case "ServiceUnavailableException":
|
|
424
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
425
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
426
|
-
case "ThrottlingException":
|
|
427
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
428
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
429
|
-
default:
|
|
430
|
-
const parsedBody = parsedOutput.body;
|
|
431
|
-
return throwDefaultError({
|
|
432
|
-
output,
|
|
433
|
-
parsedBody,
|
|
434
|
-
errorCode,
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
const de_CreateDetectorModelCommand = async (output, context) => {
|
|
439
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
440
|
-
return de_CreateDetectorModelCommandError(output, context);
|
|
441
|
-
}
|
|
442
|
-
const contents = (0, smithy_client_1.map)({
|
|
443
|
-
$metadata: deserializeMetadata(output),
|
|
444
|
-
});
|
|
445
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
446
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
447
|
-
detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
|
|
448
|
-
});
|
|
449
|
-
Object.assign(contents, doc);
|
|
450
|
-
return contents;
|
|
451
|
-
};
|
|
452
|
-
exports.de_CreateDetectorModelCommand = de_CreateDetectorModelCommand;
|
|
453
|
-
const de_CreateDetectorModelCommandError = async (output, context) => {
|
|
454
|
-
const parsedOutput = {
|
|
455
|
-
...output,
|
|
456
|
-
body: await parseErrorBody(output.body, context),
|
|
457
|
-
};
|
|
458
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
459
|
-
switch (errorCode) {
|
|
460
|
-
case "InternalFailureException":
|
|
461
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
462
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
463
|
-
case "InvalidRequestException":
|
|
464
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
465
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
466
|
-
case "LimitExceededException":
|
|
467
|
-
case "com.amazonaws.iotevents#LimitExceededException":
|
|
468
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
469
|
-
case "ResourceAlreadyExistsException":
|
|
470
|
-
case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
|
|
471
|
-
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
|
|
472
|
-
case "ResourceInUseException":
|
|
473
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
474
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
475
|
-
case "ServiceUnavailableException":
|
|
476
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
477
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
478
|
-
case "ThrottlingException":
|
|
479
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
480
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
481
|
-
default:
|
|
482
|
-
const parsedBody = parsedOutput.body;
|
|
483
|
-
return throwDefaultError({
|
|
484
|
-
output,
|
|
485
|
-
parsedBody,
|
|
486
|
-
errorCode,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
const de_CreateInputCommand = async (output, context) => {
|
|
491
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
492
|
-
return de_CreateInputCommandError(output, context);
|
|
493
|
-
}
|
|
494
|
-
const contents = (0, smithy_client_1.map)({
|
|
495
|
-
$metadata: deserializeMetadata(output),
|
|
496
|
-
});
|
|
497
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
498
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
499
|
-
inputConfiguration: (_) => de_InputConfiguration(_, context),
|
|
500
|
-
});
|
|
501
|
-
Object.assign(contents, doc);
|
|
502
|
-
return contents;
|
|
503
|
-
};
|
|
504
|
-
exports.de_CreateInputCommand = de_CreateInputCommand;
|
|
505
|
-
const de_CreateInputCommandError = async (output, context) => {
|
|
506
|
-
const parsedOutput = {
|
|
507
|
-
...output,
|
|
508
|
-
body: await parseErrorBody(output.body, context),
|
|
509
|
-
};
|
|
510
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
511
|
-
switch (errorCode) {
|
|
512
|
-
case "InternalFailureException":
|
|
513
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
514
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
515
|
-
case "InvalidRequestException":
|
|
516
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
517
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
518
|
-
case "ResourceAlreadyExistsException":
|
|
519
|
-
case "com.amazonaws.iotevents#ResourceAlreadyExistsException":
|
|
520
|
-
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
|
|
521
|
-
case "ServiceUnavailableException":
|
|
522
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
523
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
524
|
-
case "ThrottlingException":
|
|
525
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
526
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
527
|
-
default:
|
|
528
|
-
const parsedBody = parsedOutput.body;
|
|
529
|
-
return throwDefaultError({
|
|
530
|
-
output,
|
|
531
|
-
parsedBody,
|
|
532
|
-
errorCode,
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
const de_DeleteAlarmModelCommand = async (output, context) => {
|
|
537
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
538
|
-
return de_DeleteAlarmModelCommandError(output, context);
|
|
539
|
-
}
|
|
540
|
-
const contents = (0, smithy_client_1.map)({
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
});
|
|
543
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
544
|
-
return contents;
|
|
545
|
-
};
|
|
546
|
-
exports.de_DeleteAlarmModelCommand = de_DeleteAlarmModelCommand;
|
|
547
|
-
const de_DeleteAlarmModelCommandError = async (output, context) => {
|
|
548
|
-
const parsedOutput = {
|
|
549
|
-
...output,
|
|
550
|
-
body: await parseErrorBody(output.body, context),
|
|
551
|
-
};
|
|
552
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
|
-
switch (errorCode) {
|
|
554
|
-
case "InternalFailureException":
|
|
555
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
556
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
557
|
-
case "InvalidRequestException":
|
|
558
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
559
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
560
|
-
case "ResourceInUseException":
|
|
561
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
562
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
563
|
-
case "ResourceNotFoundException":
|
|
564
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
565
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
566
|
-
case "ServiceUnavailableException":
|
|
567
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
568
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
569
|
-
case "ThrottlingException":
|
|
570
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
571
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
572
|
-
default:
|
|
573
|
-
const parsedBody = parsedOutput.body;
|
|
574
|
-
return throwDefaultError({
|
|
575
|
-
output,
|
|
576
|
-
parsedBody,
|
|
577
|
-
errorCode,
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
const de_DeleteDetectorModelCommand = async (output, context) => {
|
|
582
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
583
|
-
return de_DeleteDetectorModelCommandError(output, context);
|
|
584
|
-
}
|
|
585
|
-
const contents = (0, smithy_client_1.map)({
|
|
586
|
-
$metadata: deserializeMetadata(output),
|
|
587
|
-
});
|
|
588
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
589
|
-
return contents;
|
|
590
|
-
};
|
|
591
|
-
exports.de_DeleteDetectorModelCommand = de_DeleteDetectorModelCommand;
|
|
592
|
-
const de_DeleteDetectorModelCommandError = async (output, context) => {
|
|
593
|
-
const parsedOutput = {
|
|
594
|
-
...output,
|
|
595
|
-
body: await parseErrorBody(output.body, context),
|
|
596
|
-
};
|
|
597
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
|
-
switch (errorCode) {
|
|
599
|
-
case "InternalFailureException":
|
|
600
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
601
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
602
|
-
case "InvalidRequestException":
|
|
603
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
604
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
605
|
-
case "ResourceInUseException":
|
|
606
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
607
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
608
|
-
case "ResourceNotFoundException":
|
|
609
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
610
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
611
|
-
case "ServiceUnavailableException":
|
|
612
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
613
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
614
|
-
case "ThrottlingException":
|
|
615
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
616
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
617
|
-
default:
|
|
618
|
-
const parsedBody = parsedOutput.body;
|
|
619
|
-
return throwDefaultError({
|
|
620
|
-
output,
|
|
621
|
-
parsedBody,
|
|
622
|
-
errorCode,
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
};
|
|
626
|
-
const de_DeleteInputCommand = async (output, context) => {
|
|
627
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
628
|
-
return de_DeleteInputCommandError(output, context);
|
|
629
|
-
}
|
|
630
|
-
const contents = (0, smithy_client_1.map)({
|
|
631
|
-
$metadata: deserializeMetadata(output),
|
|
632
|
-
});
|
|
633
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
634
|
-
return contents;
|
|
635
|
-
};
|
|
636
|
-
exports.de_DeleteInputCommand = de_DeleteInputCommand;
|
|
637
|
-
const de_DeleteInputCommandError = async (output, context) => {
|
|
638
|
-
const parsedOutput = {
|
|
639
|
-
...output,
|
|
640
|
-
body: await parseErrorBody(output.body, context),
|
|
641
|
-
};
|
|
642
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
643
|
-
switch (errorCode) {
|
|
644
|
-
case "InternalFailureException":
|
|
645
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
646
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
647
|
-
case "InvalidRequestException":
|
|
648
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
649
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
650
|
-
case "ResourceInUseException":
|
|
651
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
652
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
653
|
-
case "ResourceNotFoundException":
|
|
654
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
655
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
656
|
-
case "ServiceUnavailableException":
|
|
657
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
658
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
659
|
-
case "ThrottlingException":
|
|
660
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
661
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
662
|
-
default:
|
|
663
|
-
const parsedBody = parsedOutput.body;
|
|
664
|
-
return throwDefaultError({
|
|
665
|
-
output,
|
|
666
|
-
parsedBody,
|
|
667
|
-
errorCode,
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
const de_DescribeAlarmModelCommand = async (output, context) => {
|
|
672
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
673
|
-
return de_DescribeAlarmModelCommandError(output, context);
|
|
674
|
-
}
|
|
675
|
-
const contents = (0, smithy_client_1.map)({
|
|
676
|
-
$metadata: deserializeMetadata(output),
|
|
677
|
-
});
|
|
678
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
679
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
680
|
-
alarmCapabilities: smithy_client_1._json,
|
|
681
|
-
alarmEventActions: smithy_client_1._json,
|
|
682
|
-
alarmModelArn: smithy_client_1.expectString,
|
|
683
|
-
alarmModelDescription: smithy_client_1.expectString,
|
|
684
|
-
alarmModelName: smithy_client_1.expectString,
|
|
685
|
-
alarmModelVersion: smithy_client_1.expectString,
|
|
686
|
-
alarmNotification: smithy_client_1._json,
|
|
687
|
-
alarmRule: smithy_client_1._json,
|
|
688
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
689
|
-
key: smithy_client_1.expectString,
|
|
690
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
691
|
-
roleArn: smithy_client_1.expectString,
|
|
692
|
-
severity: smithy_client_1.expectInt32,
|
|
693
|
-
status: smithy_client_1.expectString,
|
|
694
|
-
statusMessage: smithy_client_1.expectString,
|
|
695
|
-
});
|
|
696
|
-
Object.assign(contents, doc);
|
|
697
|
-
return contents;
|
|
698
|
-
};
|
|
699
|
-
exports.de_DescribeAlarmModelCommand = de_DescribeAlarmModelCommand;
|
|
700
|
-
const de_DescribeAlarmModelCommandError = async (output, context) => {
|
|
701
|
-
const parsedOutput = {
|
|
702
|
-
...output,
|
|
703
|
-
body: await parseErrorBody(output.body, context),
|
|
704
|
-
};
|
|
705
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
706
|
-
switch (errorCode) {
|
|
707
|
-
case "InternalFailureException":
|
|
708
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
709
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
710
|
-
case "InvalidRequestException":
|
|
711
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
712
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
713
|
-
case "ResourceNotFoundException":
|
|
714
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
715
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
716
|
-
case "ServiceUnavailableException":
|
|
717
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
718
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
719
|
-
case "ThrottlingException":
|
|
720
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
721
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
722
|
-
default:
|
|
723
|
-
const parsedBody = parsedOutput.body;
|
|
724
|
-
return throwDefaultError({
|
|
725
|
-
output,
|
|
726
|
-
parsedBody,
|
|
727
|
-
errorCode,
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
const de_DescribeDetectorModelCommand = async (output, context) => {
|
|
732
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
733
|
-
return de_DescribeDetectorModelCommandError(output, context);
|
|
734
|
-
}
|
|
735
|
-
const contents = (0, smithy_client_1.map)({
|
|
736
|
-
$metadata: deserializeMetadata(output),
|
|
737
|
-
});
|
|
738
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
739
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
740
|
-
detectorModel: (_) => de_DetectorModel(_, context),
|
|
741
|
-
});
|
|
742
|
-
Object.assign(contents, doc);
|
|
743
|
-
return contents;
|
|
744
|
-
};
|
|
745
|
-
exports.de_DescribeDetectorModelCommand = de_DescribeDetectorModelCommand;
|
|
746
|
-
const de_DescribeDetectorModelCommandError = async (output, context) => {
|
|
747
|
-
const parsedOutput = {
|
|
748
|
-
...output,
|
|
749
|
-
body: await parseErrorBody(output.body, context),
|
|
750
|
-
};
|
|
751
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
|
-
switch (errorCode) {
|
|
753
|
-
case "InternalFailureException":
|
|
754
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
755
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
756
|
-
case "InvalidRequestException":
|
|
757
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
758
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
759
|
-
case "ResourceNotFoundException":
|
|
760
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
761
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
762
|
-
case "ServiceUnavailableException":
|
|
763
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
764
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
765
|
-
case "ThrottlingException":
|
|
766
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
767
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
768
|
-
default:
|
|
769
|
-
const parsedBody = parsedOutput.body;
|
|
770
|
-
return throwDefaultError({
|
|
771
|
-
output,
|
|
772
|
-
parsedBody,
|
|
773
|
-
errorCode,
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
};
|
|
777
|
-
const de_DescribeDetectorModelAnalysisCommand = async (output, context) => {
|
|
778
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
779
|
-
return de_DescribeDetectorModelAnalysisCommandError(output, context);
|
|
780
|
-
}
|
|
781
|
-
const contents = (0, smithy_client_1.map)({
|
|
782
|
-
$metadata: deserializeMetadata(output),
|
|
783
|
-
});
|
|
784
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
785
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
786
|
-
status: smithy_client_1.expectString,
|
|
787
|
-
});
|
|
788
|
-
Object.assign(contents, doc);
|
|
789
|
-
return contents;
|
|
790
|
-
};
|
|
791
|
-
exports.de_DescribeDetectorModelAnalysisCommand = de_DescribeDetectorModelAnalysisCommand;
|
|
792
|
-
const de_DescribeDetectorModelAnalysisCommandError = async (output, context) => {
|
|
793
|
-
const parsedOutput = {
|
|
794
|
-
...output,
|
|
795
|
-
body: await parseErrorBody(output.body, context),
|
|
796
|
-
};
|
|
797
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
798
|
-
switch (errorCode) {
|
|
799
|
-
case "InternalFailureException":
|
|
800
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
801
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
802
|
-
case "InvalidRequestException":
|
|
803
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
804
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
805
|
-
case "ResourceNotFoundException":
|
|
806
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
807
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
808
|
-
case "ServiceUnavailableException":
|
|
809
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
810
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
811
|
-
case "ThrottlingException":
|
|
812
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
813
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
814
|
-
default:
|
|
815
|
-
const parsedBody = parsedOutput.body;
|
|
816
|
-
return throwDefaultError({
|
|
817
|
-
output,
|
|
818
|
-
parsedBody,
|
|
819
|
-
errorCode,
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
const de_DescribeInputCommand = async (output, context) => {
|
|
824
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
825
|
-
return de_DescribeInputCommandError(output, context);
|
|
826
|
-
}
|
|
827
|
-
const contents = (0, smithy_client_1.map)({
|
|
828
|
-
$metadata: deserializeMetadata(output),
|
|
829
|
-
});
|
|
830
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
831
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
832
|
-
input: (_) => de_Input(_, context),
|
|
833
|
-
});
|
|
834
|
-
Object.assign(contents, doc);
|
|
835
|
-
return contents;
|
|
836
|
-
};
|
|
837
|
-
exports.de_DescribeInputCommand = de_DescribeInputCommand;
|
|
838
|
-
const de_DescribeInputCommandError = async (output, context) => {
|
|
839
|
-
const parsedOutput = {
|
|
840
|
-
...output,
|
|
841
|
-
body: await parseErrorBody(output.body, context),
|
|
842
|
-
};
|
|
843
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
844
|
-
switch (errorCode) {
|
|
845
|
-
case "InternalFailureException":
|
|
846
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
847
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
848
|
-
case "InvalidRequestException":
|
|
849
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
850
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
851
|
-
case "ResourceNotFoundException":
|
|
852
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
853
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
854
|
-
case "ServiceUnavailableException":
|
|
855
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
856
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
857
|
-
case "ThrottlingException":
|
|
858
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
859
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
860
|
-
default:
|
|
861
|
-
const parsedBody = parsedOutput.body;
|
|
862
|
-
return throwDefaultError({
|
|
863
|
-
output,
|
|
864
|
-
parsedBody,
|
|
865
|
-
errorCode,
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
const de_DescribeLoggingOptionsCommand = async (output, context) => {
|
|
870
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
871
|
-
return de_DescribeLoggingOptionsCommandError(output, context);
|
|
872
|
-
}
|
|
873
|
-
const contents = (0, smithy_client_1.map)({
|
|
874
|
-
$metadata: deserializeMetadata(output),
|
|
875
|
-
});
|
|
876
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
877
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
878
|
-
loggingOptions: smithy_client_1._json,
|
|
879
|
-
});
|
|
880
|
-
Object.assign(contents, doc);
|
|
881
|
-
return contents;
|
|
882
|
-
};
|
|
883
|
-
exports.de_DescribeLoggingOptionsCommand = de_DescribeLoggingOptionsCommand;
|
|
884
|
-
const de_DescribeLoggingOptionsCommandError = async (output, context) => {
|
|
885
|
-
const parsedOutput = {
|
|
886
|
-
...output,
|
|
887
|
-
body: await parseErrorBody(output.body, context),
|
|
888
|
-
};
|
|
889
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
890
|
-
switch (errorCode) {
|
|
891
|
-
case "InternalFailureException":
|
|
892
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
893
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
894
|
-
case "InvalidRequestException":
|
|
895
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
896
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
897
|
-
case "ResourceNotFoundException":
|
|
898
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
899
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
900
|
-
case "ServiceUnavailableException":
|
|
901
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
902
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
903
|
-
case "ThrottlingException":
|
|
904
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
905
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
906
|
-
case "UnsupportedOperationException":
|
|
907
|
-
case "com.amazonaws.iotevents#UnsupportedOperationException":
|
|
908
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
909
|
-
default:
|
|
910
|
-
const parsedBody = parsedOutput.body;
|
|
911
|
-
return throwDefaultError({
|
|
912
|
-
output,
|
|
913
|
-
parsedBody,
|
|
914
|
-
errorCode,
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
const de_GetDetectorModelAnalysisResultsCommand = async (output, context) => {
|
|
919
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
920
|
-
return de_GetDetectorModelAnalysisResultsCommandError(output, context);
|
|
921
|
-
}
|
|
922
|
-
const contents = (0, smithy_client_1.map)({
|
|
923
|
-
$metadata: deserializeMetadata(output),
|
|
924
|
-
});
|
|
925
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
926
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
927
|
-
analysisResults: smithy_client_1._json,
|
|
928
|
-
nextToken: smithy_client_1.expectString,
|
|
929
|
-
});
|
|
930
|
-
Object.assign(contents, doc);
|
|
931
|
-
return contents;
|
|
932
|
-
};
|
|
933
|
-
exports.de_GetDetectorModelAnalysisResultsCommand = de_GetDetectorModelAnalysisResultsCommand;
|
|
934
|
-
const de_GetDetectorModelAnalysisResultsCommandError = async (output, context) => {
|
|
935
|
-
const parsedOutput = {
|
|
936
|
-
...output,
|
|
937
|
-
body: await parseErrorBody(output.body, context),
|
|
938
|
-
};
|
|
939
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
940
|
-
switch (errorCode) {
|
|
941
|
-
case "InternalFailureException":
|
|
942
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
943
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
944
|
-
case "InvalidRequestException":
|
|
945
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
946
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
947
|
-
case "ResourceNotFoundException":
|
|
948
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
949
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
950
|
-
case "ServiceUnavailableException":
|
|
951
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
952
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
953
|
-
case "ThrottlingException":
|
|
954
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
955
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
956
|
-
default:
|
|
957
|
-
const parsedBody = parsedOutput.body;
|
|
958
|
-
return throwDefaultError({
|
|
959
|
-
output,
|
|
960
|
-
parsedBody,
|
|
961
|
-
errorCode,
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
};
|
|
965
|
-
const de_ListAlarmModelsCommand = async (output, context) => {
|
|
966
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
967
|
-
return de_ListAlarmModelsCommandError(output, context);
|
|
968
|
-
}
|
|
969
|
-
const contents = (0, smithy_client_1.map)({
|
|
970
|
-
$metadata: deserializeMetadata(output),
|
|
971
|
-
});
|
|
972
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
973
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
974
|
-
alarmModelSummaries: (_) => de_AlarmModelSummaries(_, context),
|
|
975
|
-
nextToken: smithy_client_1.expectString,
|
|
976
|
-
});
|
|
977
|
-
Object.assign(contents, doc);
|
|
978
|
-
return contents;
|
|
979
|
-
};
|
|
980
|
-
exports.de_ListAlarmModelsCommand = de_ListAlarmModelsCommand;
|
|
981
|
-
const de_ListAlarmModelsCommandError = async (output, context) => {
|
|
982
|
-
const parsedOutput = {
|
|
983
|
-
...output,
|
|
984
|
-
body: await parseErrorBody(output.body, context),
|
|
985
|
-
};
|
|
986
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
987
|
-
switch (errorCode) {
|
|
988
|
-
case "InternalFailureException":
|
|
989
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
990
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
991
|
-
case "InvalidRequestException":
|
|
992
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
993
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
994
|
-
case "ServiceUnavailableException":
|
|
995
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
996
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
997
|
-
case "ThrottlingException":
|
|
998
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
999
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1000
|
-
default:
|
|
1001
|
-
const parsedBody = parsedOutput.body;
|
|
1002
|
-
return throwDefaultError({
|
|
1003
|
-
output,
|
|
1004
|
-
parsedBody,
|
|
1005
|
-
errorCode,
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
const de_ListAlarmModelVersionsCommand = async (output, context) => {
|
|
1010
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1011
|
-
return de_ListAlarmModelVersionsCommandError(output, context);
|
|
1012
|
-
}
|
|
1013
|
-
const contents = (0, smithy_client_1.map)({
|
|
1014
|
-
$metadata: deserializeMetadata(output),
|
|
1015
|
-
});
|
|
1016
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1017
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1018
|
-
alarmModelVersionSummaries: (_) => de_AlarmModelVersionSummaries(_, context),
|
|
1019
|
-
nextToken: smithy_client_1.expectString,
|
|
1020
|
-
});
|
|
1021
|
-
Object.assign(contents, doc);
|
|
1022
|
-
return contents;
|
|
1023
|
-
};
|
|
1024
|
-
exports.de_ListAlarmModelVersionsCommand = de_ListAlarmModelVersionsCommand;
|
|
1025
|
-
const de_ListAlarmModelVersionsCommandError = async (output, context) => {
|
|
1026
|
-
const parsedOutput = {
|
|
1027
|
-
...output,
|
|
1028
|
-
body: await parseErrorBody(output.body, context),
|
|
1029
|
-
};
|
|
1030
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1031
|
-
switch (errorCode) {
|
|
1032
|
-
case "InternalFailureException":
|
|
1033
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1034
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1035
|
-
case "InvalidRequestException":
|
|
1036
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1037
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1038
|
-
case "ResourceNotFoundException":
|
|
1039
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1040
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1041
|
-
case "ServiceUnavailableException":
|
|
1042
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1043
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "ThrottlingException":
|
|
1045
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1046
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1047
|
-
default:
|
|
1048
|
-
const parsedBody = parsedOutput.body;
|
|
1049
|
-
return throwDefaultError({
|
|
1050
|
-
output,
|
|
1051
|
-
parsedBody,
|
|
1052
|
-
errorCode,
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
|
-
const de_ListDetectorModelsCommand = async (output, context) => {
|
|
1057
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1058
|
-
return de_ListDetectorModelsCommandError(output, context);
|
|
1059
|
-
}
|
|
1060
|
-
const contents = (0, smithy_client_1.map)({
|
|
1061
|
-
$metadata: deserializeMetadata(output),
|
|
1062
|
-
});
|
|
1063
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1064
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1065
|
-
detectorModelSummaries: (_) => de_DetectorModelSummaries(_, context),
|
|
1066
|
-
nextToken: smithy_client_1.expectString,
|
|
1067
|
-
});
|
|
1068
|
-
Object.assign(contents, doc);
|
|
1069
|
-
return contents;
|
|
1070
|
-
};
|
|
1071
|
-
exports.de_ListDetectorModelsCommand = de_ListDetectorModelsCommand;
|
|
1072
|
-
const de_ListDetectorModelsCommandError = async (output, context) => {
|
|
1073
|
-
const parsedOutput = {
|
|
1074
|
-
...output,
|
|
1075
|
-
body: await parseErrorBody(output.body, context),
|
|
1076
|
-
};
|
|
1077
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1078
|
-
switch (errorCode) {
|
|
1079
|
-
case "InternalFailureException":
|
|
1080
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1081
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1082
|
-
case "InvalidRequestException":
|
|
1083
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1084
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1085
|
-
case "ServiceUnavailableException":
|
|
1086
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1087
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1088
|
-
case "ThrottlingException":
|
|
1089
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1090
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1091
|
-
default:
|
|
1092
|
-
const parsedBody = parsedOutput.body;
|
|
1093
|
-
return throwDefaultError({
|
|
1094
|
-
output,
|
|
1095
|
-
parsedBody,
|
|
1096
|
-
errorCode,
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
|
-
const de_ListDetectorModelVersionsCommand = async (output, context) => {
|
|
1101
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1102
|
-
return de_ListDetectorModelVersionsCommandError(output, context);
|
|
1103
|
-
}
|
|
1104
|
-
const contents = (0, smithy_client_1.map)({
|
|
1105
|
-
$metadata: deserializeMetadata(output),
|
|
1106
|
-
});
|
|
1107
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1108
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1109
|
-
detectorModelVersionSummaries: (_) => de_DetectorModelVersionSummaries(_, context),
|
|
1110
|
-
nextToken: smithy_client_1.expectString,
|
|
1111
|
-
});
|
|
1112
|
-
Object.assign(contents, doc);
|
|
1113
|
-
return contents;
|
|
1114
|
-
};
|
|
1115
|
-
exports.de_ListDetectorModelVersionsCommand = de_ListDetectorModelVersionsCommand;
|
|
1116
|
-
const de_ListDetectorModelVersionsCommandError = async (output, context) => {
|
|
1117
|
-
const parsedOutput = {
|
|
1118
|
-
...output,
|
|
1119
|
-
body: await parseErrorBody(output.body, context),
|
|
1120
|
-
};
|
|
1121
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1122
|
-
switch (errorCode) {
|
|
1123
|
-
case "InternalFailureException":
|
|
1124
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1125
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1126
|
-
case "InvalidRequestException":
|
|
1127
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1128
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1129
|
-
case "ResourceNotFoundException":
|
|
1130
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1131
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1132
|
-
case "ServiceUnavailableException":
|
|
1133
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1134
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1135
|
-
case "ThrottlingException":
|
|
1136
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1137
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1138
|
-
default:
|
|
1139
|
-
const parsedBody = parsedOutput.body;
|
|
1140
|
-
return throwDefaultError({
|
|
1141
|
-
output,
|
|
1142
|
-
parsedBody,
|
|
1143
|
-
errorCode,
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
const de_ListInputRoutingsCommand = async (output, context) => {
|
|
1148
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1149
|
-
return de_ListInputRoutingsCommandError(output, context);
|
|
1150
|
-
}
|
|
1151
|
-
const contents = (0, smithy_client_1.map)({
|
|
1152
|
-
$metadata: deserializeMetadata(output),
|
|
1153
|
-
});
|
|
1154
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1155
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1156
|
-
nextToken: smithy_client_1.expectString,
|
|
1157
|
-
routedResources: smithy_client_1._json,
|
|
1158
|
-
});
|
|
1159
|
-
Object.assign(contents, doc);
|
|
1160
|
-
return contents;
|
|
1161
|
-
};
|
|
1162
|
-
exports.de_ListInputRoutingsCommand = de_ListInputRoutingsCommand;
|
|
1163
|
-
const de_ListInputRoutingsCommandError = async (output, context) => {
|
|
1164
|
-
const parsedOutput = {
|
|
1165
|
-
...output,
|
|
1166
|
-
body: await parseErrorBody(output.body, context),
|
|
1167
|
-
};
|
|
1168
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1169
|
-
switch (errorCode) {
|
|
1170
|
-
case "InternalFailureException":
|
|
1171
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1172
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1173
|
-
case "InvalidRequestException":
|
|
1174
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1175
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1176
|
-
case "ResourceNotFoundException":
|
|
1177
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1178
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1179
|
-
case "ServiceUnavailableException":
|
|
1180
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1181
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1182
|
-
case "ThrottlingException":
|
|
1183
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1184
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1185
|
-
default:
|
|
1186
|
-
const parsedBody = parsedOutput.body;
|
|
1187
|
-
return throwDefaultError({
|
|
1188
|
-
output,
|
|
1189
|
-
parsedBody,
|
|
1190
|
-
errorCode,
|
|
1191
|
-
});
|
|
1192
|
-
}
|
|
1193
|
-
};
|
|
1194
|
-
const de_ListInputsCommand = async (output, context) => {
|
|
1195
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1196
|
-
return de_ListInputsCommandError(output, context);
|
|
1197
|
-
}
|
|
1198
|
-
const contents = (0, smithy_client_1.map)({
|
|
1199
|
-
$metadata: deserializeMetadata(output),
|
|
1200
|
-
});
|
|
1201
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1202
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1203
|
-
inputSummaries: (_) => de_InputSummaries(_, context),
|
|
1204
|
-
nextToken: smithy_client_1.expectString,
|
|
1205
|
-
});
|
|
1206
|
-
Object.assign(contents, doc);
|
|
1207
|
-
return contents;
|
|
1208
|
-
};
|
|
1209
|
-
exports.de_ListInputsCommand = de_ListInputsCommand;
|
|
1210
|
-
const de_ListInputsCommandError = async (output, context) => {
|
|
1211
|
-
const parsedOutput = {
|
|
1212
|
-
...output,
|
|
1213
|
-
body: await parseErrorBody(output.body, context),
|
|
1214
|
-
};
|
|
1215
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1216
|
-
switch (errorCode) {
|
|
1217
|
-
case "InternalFailureException":
|
|
1218
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1219
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1220
|
-
case "InvalidRequestException":
|
|
1221
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1222
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1223
|
-
case "ServiceUnavailableException":
|
|
1224
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1225
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1226
|
-
case "ThrottlingException":
|
|
1227
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1228
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1229
|
-
default:
|
|
1230
|
-
const parsedBody = parsedOutput.body;
|
|
1231
|
-
return throwDefaultError({
|
|
1232
|
-
output,
|
|
1233
|
-
parsedBody,
|
|
1234
|
-
errorCode,
|
|
1235
|
-
});
|
|
1236
|
-
}
|
|
1237
|
-
};
|
|
1238
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1239
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1240
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1241
|
-
}
|
|
1242
|
-
const contents = (0, smithy_client_1.map)({
|
|
1243
|
-
$metadata: deserializeMetadata(output),
|
|
1244
|
-
});
|
|
1245
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1246
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1247
|
-
tags: smithy_client_1._json,
|
|
1248
|
-
});
|
|
1249
|
-
Object.assign(contents, doc);
|
|
1250
|
-
return contents;
|
|
1251
|
-
};
|
|
1252
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1253
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1254
|
-
const parsedOutput = {
|
|
1255
|
-
...output,
|
|
1256
|
-
body: await parseErrorBody(output.body, context),
|
|
1257
|
-
};
|
|
1258
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1259
|
-
switch (errorCode) {
|
|
1260
|
-
case "InternalFailureException":
|
|
1261
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1262
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1263
|
-
case "InvalidRequestException":
|
|
1264
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1265
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1266
|
-
case "ResourceInUseException":
|
|
1267
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1268
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1269
|
-
case "ResourceNotFoundException":
|
|
1270
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1271
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1272
|
-
case "ThrottlingException":
|
|
1273
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1274
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1275
|
-
default:
|
|
1276
|
-
const parsedBody = parsedOutput.body;
|
|
1277
|
-
return throwDefaultError({
|
|
1278
|
-
output,
|
|
1279
|
-
parsedBody,
|
|
1280
|
-
errorCode,
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
};
|
|
1284
|
-
const de_PutLoggingOptionsCommand = async (output, context) => {
|
|
1285
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1286
|
-
return de_PutLoggingOptionsCommandError(output, context);
|
|
1287
|
-
}
|
|
1288
|
-
const contents = (0, smithy_client_1.map)({
|
|
1289
|
-
$metadata: deserializeMetadata(output),
|
|
1290
|
-
});
|
|
1291
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1292
|
-
return contents;
|
|
1293
|
-
};
|
|
1294
|
-
exports.de_PutLoggingOptionsCommand = de_PutLoggingOptionsCommand;
|
|
1295
|
-
const de_PutLoggingOptionsCommandError = async (output, context) => {
|
|
1296
|
-
const parsedOutput = {
|
|
1297
|
-
...output,
|
|
1298
|
-
body: await parseErrorBody(output.body, context),
|
|
1299
|
-
};
|
|
1300
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1301
|
-
switch (errorCode) {
|
|
1302
|
-
case "InternalFailureException":
|
|
1303
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1304
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1305
|
-
case "InvalidRequestException":
|
|
1306
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1307
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1308
|
-
case "ResourceInUseException":
|
|
1309
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1310
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1311
|
-
case "ServiceUnavailableException":
|
|
1312
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1313
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1314
|
-
case "ThrottlingException":
|
|
1315
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1316
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1317
|
-
case "UnsupportedOperationException":
|
|
1318
|
-
case "com.amazonaws.iotevents#UnsupportedOperationException":
|
|
1319
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1320
|
-
default:
|
|
1321
|
-
const parsedBody = parsedOutput.body;
|
|
1322
|
-
return throwDefaultError({
|
|
1323
|
-
output,
|
|
1324
|
-
parsedBody,
|
|
1325
|
-
errorCode,
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
const de_StartDetectorModelAnalysisCommand = async (output, context) => {
|
|
1330
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1331
|
-
return de_StartDetectorModelAnalysisCommandError(output, context);
|
|
1332
|
-
}
|
|
1333
|
-
const contents = (0, smithy_client_1.map)({
|
|
1334
|
-
$metadata: deserializeMetadata(output),
|
|
1335
|
-
});
|
|
1336
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1337
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1338
|
-
analysisId: smithy_client_1.expectString,
|
|
1339
|
-
});
|
|
1340
|
-
Object.assign(contents, doc);
|
|
1341
|
-
return contents;
|
|
1342
|
-
};
|
|
1343
|
-
exports.de_StartDetectorModelAnalysisCommand = de_StartDetectorModelAnalysisCommand;
|
|
1344
|
-
const de_StartDetectorModelAnalysisCommandError = async (output, context) => {
|
|
1345
|
-
const parsedOutput = {
|
|
1346
|
-
...output,
|
|
1347
|
-
body: await parseErrorBody(output.body, context),
|
|
1348
|
-
};
|
|
1349
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1350
|
-
switch (errorCode) {
|
|
1351
|
-
case "InternalFailureException":
|
|
1352
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1353
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1354
|
-
case "InvalidRequestException":
|
|
1355
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1356
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1357
|
-
case "LimitExceededException":
|
|
1358
|
-
case "com.amazonaws.iotevents#LimitExceededException":
|
|
1359
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1360
|
-
case "ServiceUnavailableException":
|
|
1361
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1362
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1363
|
-
case "ThrottlingException":
|
|
1364
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1365
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1366
|
-
default:
|
|
1367
|
-
const parsedBody = parsedOutput.body;
|
|
1368
|
-
return throwDefaultError({
|
|
1369
|
-
output,
|
|
1370
|
-
parsedBody,
|
|
1371
|
-
errorCode,
|
|
1372
|
-
});
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1376
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1377
|
-
return de_TagResourceCommandError(output, context);
|
|
1378
|
-
}
|
|
1379
|
-
const contents = (0, smithy_client_1.map)({
|
|
1380
|
-
$metadata: deserializeMetadata(output),
|
|
1381
|
-
});
|
|
1382
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1383
|
-
return contents;
|
|
1384
|
-
};
|
|
1385
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1386
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1387
|
-
const parsedOutput = {
|
|
1388
|
-
...output,
|
|
1389
|
-
body: await parseErrorBody(output.body, context),
|
|
1390
|
-
};
|
|
1391
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1392
|
-
switch (errorCode) {
|
|
1393
|
-
case "InternalFailureException":
|
|
1394
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1395
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1396
|
-
case "InvalidRequestException":
|
|
1397
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1398
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1399
|
-
case "LimitExceededException":
|
|
1400
|
-
case "com.amazonaws.iotevents#LimitExceededException":
|
|
1401
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1402
|
-
case "ResourceInUseException":
|
|
1403
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1404
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1405
|
-
case "ResourceNotFoundException":
|
|
1406
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1407
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1408
|
-
case "ThrottlingException":
|
|
1409
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1410
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1411
|
-
default:
|
|
1412
|
-
const parsedBody = parsedOutput.body;
|
|
1413
|
-
return throwDefaultError({
|
|
1414
|
-
output,
|
|
1415
|
-
parsedBody,
|
|
1416
|
-
errorCode,
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
};
|
|
1420
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1421
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1422
|
-
return de_UntagResourceCommandError(output, context);
|
|
1423
|
-
}
|
|
1424
|
-
const contents = (0, smithy_client_1.map)({
|
|
1425
|
-
$metadata: deserializeMetadata(output),
|
|
1426
|
-
});
|
|
1427
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1428
|
-
return contents;
|
|
1429
|
-
};
|
|
1430
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1431
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1432
|
-
const parsedOutput = {
|
|
1433
|
-
...output,
|
|
1434
|
-
body: await parseErrorBody(output.body, context),
|
|
1435
|
-
};
|
|
1436
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1437
|
-
switch (errorCode) {
|
|
1438
|
-
case "InternalFailureException":
|
|
1439
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1440
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1441
|
-
case "InvalidRequestException":
|
|
1442
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1443
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1444
|
-
case "ResourceInUseException":
|
|
1445
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1446
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1447
|
-
case "ResourceNotFoundException":
|
|
1448
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1449
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1450
|
-
case "ThrottlingException":
|
|
1451
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1452
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1453
|
-
default:
|
|
1454
|
-
const parsedBody = parsedOutput.body;
|
|
1455
|
-
return throwDefaultError({
|
|
1456
|
-
output,
|
|
1457
|
-
parsedBody,
|
|
1458
|
-
errorCode,
|
|
1459
|
-
});
|
|
1460
|
-
}
|
|
1461
|
-
};
|
|
1462
|
-
const de_UpdateAlarmModelCommand = async (output, context) => {
|
|
1463
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1464
|
-
return de_UpdateAlarmModelCommandError(output, context);
|
|
1465
|
-
}
|
|
1466
|
-
const contents = (0, smithy_client_1.map)({
|
|
1467
|
-
$metadata: deserializeMetadata(output),
|
|
1468
|
-
});
|
|
1469
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1470
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1471
|
-
alarmModelArn: smithy_client_1.expectString,
|
|
1472
|
-
alarmModelVersion: smithy_client_1.expectString,
|
|
1473
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1474
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1475
|
-
status: smithy_client_1.expectString,
|
|
1476
|
-
});
|
|
1477
|
-
Object.assign(contents, doc);
|
|
1478
|
-
return contents;
|
|
1479
|
-
};
|
|
1480
|
-
exports.de_UpdateAlarmModelCommand = de_UpdateAlarmModelCommand;
|
|
1481
|
-
const de_UpdateAlarmModelCommandError = async (output, context) => {
|
|
1482
|
-
const parsedOutput = {
|
|
1483
|
-
...output,
|
|
1484
|
-
body: await parseErrorBody(output.body, context),
|
|
1485
|
-
};
|
|
1486
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1487
|
-
switch (errorCode) {
|
|
1488
|
-
case "InternalFailureException":
|
|
1489
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1490
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1491
|
-
case "InvalidRequestException":
|
|
1492
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1493
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1494
|
-
case "ResourceInUseException":
|
|
1495
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1496
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1497
|
-
case "ResourceNotFoundException":
|
|
1498
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1499
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1500
|
-
case "ServiceUnavailableException":
|
|
1501
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1502
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1503
|
-
case "ThrottlingException":
|
|
1504
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1505
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1506
|
-
default:
|
|
1507
|
-
const parsedBody = parsedOutput.body;
|
|
1508
|
-
return throwDefaultError({
|
|
1509
|
-
output,
|
|
1510
|
-
parsedBody,
|
|
1511
|
-
errorCode,
|
|
1512
|
-
});
|
|
1513
|
-
}
|
|
1514
|
-
};
|
|
1515
|
-
const de_UpdateDetectorModelCommand = async (output, context) => {
|
|
1516
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1517
|
-
return de_UpdateDetectorModelCommandError(output, context);
|
|
1518
|
-
}
|
|
1519
|
-
const contents = (0, smithy_client_1.map)({
|
|
1520
|
-
$metadata: deserializeMetadata(output),
|
|
1521
|
-
});
|
|
1522
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1523
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1524
|
-
detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
|
|
1525
|
-
});
|
|
1526
|
-
Object.assign(contents, doc);
|
|
1527
|
-
return contents;
|
|
1528
|
-
};
|
|
1529
|
-
exports.de_UpdateDetectorModelCommand = de_UpdateDetectorModelCommand;
|
|
1530
|
-
const de_UpdateDetectorModelCommandError = async (output, context) => {
|
|
1531
|
-
const parsedOutput = {
|
|
1532
|
-
...output,
|
|
1533
|
-
body: await parseErrorBody(output.body, context),
|
|
1534
|
-
};
|
|
1535
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1536
|
-
switch (errorCode) {
|
|
1537
|
-
case "InternalFailureException":
|
|
1538
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1539
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1540
|
-
case "InvalidRequestException":
|
|
1541
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1542
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1543
|
-
case "ResourceInUseException":
|
|
1544
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1545
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1546
|
-
case "ResourceNotFoundException":
|
|
1547
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1548
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1549
|
-
case "ServiceUnavailableException":
|
|
1550
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1551
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1552
|
-
case "ThrottlingException":
|
|
1553
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1554
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1555
|
-
default:
|
|
1556
|
-
const parsedBody = parsedOutput.body;
|
|
1557
|
-
return throwDefaultError({
|
|
1558
|
-
output,
|
|
1559
|
-
parsedBody,
|
|
1560
|
-
errorCode,
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
const de_UpdateInputCommand = async (output, context) => {
|
|
1565
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1566
|
-
return de_UpdateInputCommandError(output, context);
|
|
1567
|
-
}
|
|
1568
|
-
const contents = (0, smithy_client_1.map)({
|
|
1569
|
-
$metadata: deserializeMetadata(output),
|
|
1570
|
-
});
|
|
1571
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1572
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1573
|
-
inputConfiguration: (_) => de_InputConfiguration(_, context),
|
|
1574
|
-
});
|
|
1575
|
-
Object.assign(contents, doc);
|
|
1576
|
-
return contents;
|
|
1577
|
-
};
|
|
1578
|
-
exports.de_UpdateInputCommand = de_UpdateInputCommand;
|
|
1579
|
-
const de_UpdateInputCommandError = async (output, context) => {
|
|
1580
|
-
const parsedOutput = {
|
|
1581
|
-
...output,
|
|
1582
|
-
body: await parseErrorBody(output.body, context),
|
|
1583
|
-
};
|
|
1584
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1585
|
-
switch (errorCode) {
|
|
1586
|
-
case "InternalFailureException":
|
|
1587
|
-
case "com.amazonaws.iotevents#InternalFailureException":
|
|
1588
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1589
|
-
case "InvalidRequestException":
|
|
1590
|
-
case "com.amazonaws.iotevents#InvalidRequestException":
|
|
1591
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
1592
|
-
case "ResourceInUseException":
|
|
1593
|
-
case "com.amazonaws.iotevents#ResourceInUseException":
|
|
1594
|
-
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1595
|
-
case "ResourceNotFoundException":
|
|
1596
|
-
case "com.amazonaws.iotevents#ResourceNotFoundException":
|
|
1597
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1598
|
-
case "ServiceUnavailableException":
|
|
1599
|
-
case "com.amazonaws.iotevents#ServiceUnavailableException":
|
|
1600
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1601
|
-
case "ThrottlingException":
|
|
1602
|
-
case "com.amazonaws.iotevents#ThrottlingException":
|
|
1603
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1604
|
-
default:
|
|
1605
|
-
const parsedBody = parsedOutput.body;
|
|
1606
|
-
return throwDefaultError({
|
|
1607
|
-
output,
|
|
1608
|
-
parsedBody,
|
|
1609
|
-
errorCode,
|
|
1610
|
-
});
|
|
1611
|
-
}
|
|
1612
|
-
};
|
|
1613
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTEventsServiceException_1.IoTEventsServiceException);
|
|
1614
|
-
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
1615
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1616
|
-
const data = parsedOutput.body;
|
|
1617
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1618
|
-
message: smithy_client_1.expectString,
|
|
1619
|
-
});
|
|
1620
|
-
Object.assign(contents, doc);
|
|
1621
|
-
const exception = new models_0_1.InternalFailureException({
|
|
1622
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1623
|
-
...contents,
|
|
1624
|
-
});
|
|
1625
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1626
|
-
};
|
|
1627
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
1628
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1629
|
-
const data = parsedOutput.body;
|
|
1630
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1631
|
-
message: smithy_client_1.expectString,
|
|
1632
|
-
});
|
|
1633
|
-
Object.assign(contents, doc);
|
|
1634
|
-
const exception = new models_0_1.InvalidRequestException({
|
|
1635
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1636
|
-
...contents,
|
|
1637
|
-
});
|
|
1638
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1639
|
-
};
|
|
1640
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1641
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1642
|
-
const data = parsedOutput.body;
|
|
1643
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1644
|
-
message: smithy_client_1.expectString,
|
|
1645
|
-
});
|
|
1646
|
-
Object.assign(contents, doc);
|
|
1647
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1648
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1649
|
-
...contents,
|
|
1650
|
-
});
|
|
1651
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1652
|
-
};
|
|
1653
|
-
const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
1654
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1655
|
-
const data = parsedOutput.body;
|
|
1656
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1657
|
-
message: smithy_client_1.expectString,
|
|
1658
|
-
resourceArn: smithy_client_1.expectString,
|
|
1659
|
-
resourceId: smithy_client_1.expectString,
|
|
1660
|
-
});
|
|
1661
|
-
Object.assign(contents, doc);
|
|
1662
|
-
const exception = new models_0_1.ResourceAlreadyExistsException({
|
|
1663
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1664
|
-
...contents,
|
|
1665
|
-
});
|
|
1666
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1667
|
-
};
|
|
1668
|
-
const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
|
|
1669
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1670
|
-
const data = parsedOutput.body;
|
|
1671
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1672
|
-
message: smithy_client_1.expectString,
|
|
1673
|
-
});
|
|
1674
|
-
Object.assign(contents, doc);
|
|
1675
|
-
const exception = new models_0_1.ResourceInUseException({
|
|
1676
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1677
|
-
...contents,
|
|
1678
|
-
});
|
|
1679
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1680
|
-
};
|
|
1681
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1682
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1683
|
-
const data = parsedOutput.body;
|
|
1684
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1685
|
-
message: smithy_client_1.expectString,
|
|
1686
|
-
});
|
|
1687
|
-
Object.assign(contents, doc);
|
|
1688
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1689
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1690
|
-
...contents,
|
|
1691
|
-
});
|
|
1692
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1693
|
-
};
|
|
1694
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1695
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1696
|
-
const data = parsedOutput.body;
|
|
1697
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1698
|
-
message: smithy_client_1.expectString,
|
|
1699
|
-
});
|
|
1700
|
-
Object.assign(contents, doc);
|
|
1701
|
-
const exception = new models_0_1.ServiceUnavailableException({
|
|
1702
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1703
|
-
...contents,
|
|
1704
|
-
});
|
|
1705
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1706
|
-
};
|
|
1707
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1708
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1709
|
-
const data = parsedOutput.body;
|
|
1710
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1711
|
-
message: smithy_client_1.expectString,
|
|
1712
|
-
});
|
|
1713
|
-
Object.assign(contents, doc);
|
|
1714
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1715
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1716
|
-
...contents,
|
|
1717
|
-
});
|
|
1718
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1719
|
-
};
|
|
1720
|
-
const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
|
|
1721
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1722
|
-
const data = parsedOutput.body;
|
|
1723
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1724
|
-
message: smithy_client_1.expectString,
|
|
1725
|
-
});
|
|
1726
|
-
Object.assign(contents, doc);
|
|
1727
|
-
const exception = new models_0_1.UnsupportedOperationException({
|
|
1728
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1729
|
-
...contents,
|
|
1730
|
-
});
|
|
1731
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1732
|
-
};
|
|
1733
|
-
const se_DetectorModelDefinition = (input, context) => {
|
|
1734
|
-
return (0, smithy_client_1.take)(input, {
|
|
1735
|
-
initialStateName: [],
|
|
1736
|
-
states: smithy_client_1._json,
|
|
1737
|
-
});
|
|
1738
|
-
};
|
|
1739
|
-
const de_AlarmModelSummaries = (output, context) => {
|
|
1740
|
-
const retVal = (output || [])
|
|
1741
|
-
.filter((e) => e != null)
|
|
1742
|
-
.map((entry) => {
|
|
1743
|
-
return de_AlarmModelSummary(entry, context);
|
|
1744
|
-
});
|
|
1745
|
-
return retVal;
|
|
1746
|
-
};
|
|
1747
|
-
const de_AlarmModelSummary = (output, context) => {
|
|
1748
|
-
return (0, smithy_client_1.take)(output, {
|
|
1749
|
-
alarmModelDescription: smithy_client_1.expectString,
|
|
1750
|
-
alarmModelName: smithy_client_1.expectString,
|
|
1751
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1752
|
-
});
|
|
1753
|
-
};
|
|
1754
|
-
const de_AlarmModelVersionSummaries = (output, context) => {
|
|
1755
|
-
const retVal = (output || [])
|
|
1756
|
-
.filter((e) => e != null)
|
|
1757
|
-
.map((entry) => {
|
|
1758
|
-
return de_AlarmModelVersionSummary(entry, context);
|
|
1759
|
-
});
|
|
1760
|
-
return retVal;
|
|
1761
|
-
};
|
|
1762
|
-
const de_AlarmModelVersionSummary = (output, context) => {
|
|
1763
|
-
return (0, smithy_client_1.take)(output, {
|
|
1764
|
-
alarmModelArn: smithy_client_1.expectString,
|
|
1765
|
-
alarmModelName: smithy_client_1.expectString,
|
|
1766
|
-
alarmModelVersion: smithy_client_1.expectString,
|
|
1767
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1768
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1769
|
-
roleArn: smithy_client_1.expectString,
|
|
1770
|
-
status: smithy_client_1.expectString,
|
|
1771
|
-
statusMessage: smithy_client_1.expectString,
|
|
1772
|
-
});
|
|
1773
|
-
};
|
|
1774
|
-
const de_DetectorModel = (output, context) => {
|
|
1775
|
-
return (0, smithy_client_1.take)(output, {
|
|
1776
|
-
detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
|
|
1777
|
-
detectorModelDefinition: (_) => de_DetectorModelDefinition(_, context),
|
|
1778
|
-
});
|
|
1779
|
-
};
|
|
1780
|
-
const de_DetectorModelConfiguration = (output, context) => {
|
|
1781
|
-
return (0, smithy_client_1.take)(output, {
|
|
1782
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1783
|
-
detectorModelArn: smithy_client_1.expectString,
|
|
1784
|
-
detectorModelDescription: smithy_client_1.expectString,
|
|
1785
|
-
detectorModelName: smithy_client_1.expectString,
|
|
1786
|
-
detectorModelVersion: smithy_client_1.expectString,
|
|
1787
|
-
evaluationMethod: smithy_client_1.expectString,
|
|
1788
|
-
key: smithy_client_1.expectString,
|
|
1789
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1790
|
-
roleArn: smithy_client_1.expectString,
|
|
1791
|
-
status: smithy_client_1.expectString,
|
|
1792
|
-
});
|
|
1793
|
-
};
|
|
1794
|
-
const de_DetectorModelDefinition = (output, context) => {
|
|
1795
|
-
return (0, smithy_client_1.take)(output, {
|
|
1796
|
-
initialStateName: smithy_client_1.expectString,
|
|
1797
|
-
states: smithy_client_1._json,
|
|
1798
|
-
});
|
|
1799
|
-
};
|
|
1800
|
-
const de_DetectorModelSummaries = (output, context) => {
|
|
1801
|
-
const retVal = (output || [])
|
|
1802
|
-
.filter((e) => e != null)
|
|
1803
|
-
.map((entry) => {
|
|
1804
|
-
return de_DetectorModelSummary(entry, context);
|
|
1805
|
-
});
|
|
1806
|
-
return retVal;
|
|
1807
|
-
};
|
|
1808
|
-
const de_DetectorModelSummary = (output, context) => {
|
|
1809
|
-
return (0, smithy_client_1.take)(output, {
|
|
1810
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1811
|
-
detectorModelDescription: smithy_client_1.expectString,
|
|
1812
|
-
detectorModelName: smithy_client_1.expectString,
|
|
1813
|
-
});
|
|
1814
|
-
};
|
|
1815
|
-
const de_DetectorModelVersionSummaries = (output, context) => {
|
|
1816
|
-
const retVal = (output || [])
|
|
1817
|
-
.filter((e) => e != null)
|
|
1818
|
-
.map((entry) => {
|
|
1819
|
-
return de_DetectorModelVersionSummary(entry, context);
|
|
1820
|
-
});
|
|
1821
|
-
return retVal;
|
|
1822
|
-
};
|
|
1823
|
-
const de_DetectorModelVersionSummary = (output, context) => {
|
|
1824
|
-
return (0, smithy_client_1.take)(output, {
|
|
1825
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1826
|
-
detectorModelArn: smithy_client_1.expectString,
|
|
1827
|
-
detectorModelName: smithy_client_1.expectString,
|
|
1828
|
-
detectorModelVersion: smithy_client_1.expectString,
|
|
1829
|
-
evaluationMethod: smithy_client_1.expectString,
|
|
1830
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1831
|
-
roleArn: smithy_client_1.expectString,
|
|
1832
|
-
status: smithy_client_1.expectString,
|
|
1833
|
-
});
|
|
1834
|
-
};
|
|
1835
|
-
const de_Input = (output, context) => {
|
|
1836
|
-
return (0, smithy_client_1.take)(output, {
|
|
1837
|
-
inputConfiguration: (_) => de_InputConfiguration(_, context),
|
|
1838
|
-
inputDefinition: smithy_client_1._json,
|
|
1839
|
-
});
|
|
1840
|
-
};
|
|
1841
|
-
const de_InputConfiguration = (output, context) => {
|
|
1842
|
-
return (0, smithy_client_1.take)(output, {
|
|
1843
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1844
|
-
inputArn: smithy_client_1.expectString,
|
|
1845
|
-
inputDescription: smithy_client_1.expectString,
|
|
1846
|
-
inputName: smithy_client_1.expectString,
|
|
1847
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1848
|
-
status: smithy_client_1.expectString,
|
|
1849
|
-
});
|
|
1850
|
-
};
|
|
1851
|
-
const de_InputSummaries = (output, context) => {
|
|
1852
|
-
const retVal = (output || [])
|
|
1853
|
-
.filter((e) => e != null)
|
|
1854
|
-
.map((entry) => {
|
|
1855
|
-
return de_InputSummary(entry, context);
|
|
1856
|
-
});
|
|
1857
|
-
return retVal;
|
|
1858
|
-
};
|
|
1859
|
-
const de_InputSummary = (output, context) => {
|
|
1860
|
-
return (0, smithy_client_1.take)(output, {
|
|
1861
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1862
|
-
inputArn: smithy_client_1.expectString,
|
|
1863
|
-
inputDescription: smithy_client_1.expectString,
|
|
1864
|
-
inputName: smithy_client_1.expectString,
|
|
1865
|
-
lastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1866
|
-
status: smithy_client_1.expectString,
|
|
1867
|
-
});
|
|
1868
|
-
};
|
|
1869
|
-
const deserializeMetadata = (output) => ({
|
|
1870
|
-
httpStatusCode: output.statusCode,
|
|
1871
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1872
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1873
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1874
|
-
});
|
|
1875
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1876
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1877
|
-
value !== null &&
|
|
1878
|
-
value !== "" &&
|
|
1879
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1880
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1881
|
-
const _aMV = "alarmModelVersion";
|
|
1882
|
-
const _dMV = "detectorModelVersion";
|
|
1883
|
-
const _mR = "maxResults";
|
|
1884
|
-
const _nT = "nextToken";
|
|
1885
|
-
const _rA = "resourceArn";
|
|
1886
|
-
const _tK = "tagKeys";
|
|
1887
|
-
const _v = "version";
|
|
1888
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1889
|
-
if (encoded.length) {
|
|
1890
|
-
return JSON.parse(encoded);
|
|
1891
|
-
}
|
|
1892
|
-
return {};
|
|
1893
|
-
});
|
|
1894
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1895
|
-
const value = await parseBody(errorBody, context);
|
|
1896
|
-
value.message = value.message ?? value.Message;
|
|
1897
|
-
return value;
|
|
1898
|
-
};
|
|
1899
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1900
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1901
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1902
|
-
let cleanValue = rawValue;
|
|
1903
|
-
if (typeof cleanValue === "number") {
|
|
1904
|
-
cleanValue = cleanValue.toString();
|
|
1905
|
-
}
|
|
1906
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1907
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1908
|
-
}
|
|
1909
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1910
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1911
|
-
}
|
|
1912
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1913
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1914
|
-
}
|
|
1915
|
-
return cleanValue;
|
|
1916
|
-
};
|
|
1917
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1918
|
-
if (headerKey !== undefined) {
|
|
1919
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1920
|
-
}
|
|
1921
|
-
if (data.code !== undefined) {
|
|
1922
|
-
return sanitizeErrorCode(data.code);
|
|
1923
|
-
}
|
|
1924
|
-
if (data["__type"] !== undefined) {
|
|
1925
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1926
|
-
}
|
|
1927
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|