@aws-sdk/client-iotdeviceadvisor 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/IotDeviceAdvisor.js +1 -39
- package/dist-cjs/IotDeviceAdvisorClient.js +1 -43
- package/dist-cjs/commands/CreateSuiteDefinitionCommand.js +1 -28
- package/dist-cjs/commands/DeleteSuiteDefinitionCommand.js +1 -28
- package/dist-cjs/commands/GetEndpointCommand.js +1 -28
- package/dist-cjs/commands/GetSuiteDefinitionCommand.js +1 -28
- package/dist-cjs/commands/GetSuiteRunCommand.js +1 -28
- package/dist-cjs/commands/GetSuiteRunReportCommand.js +1 -28
- package/dist-cjs/commands/ListSuiteDefinitionsCommand.js +1 -28
- package/dist-cjs/commands/ListSuiteRunsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartSuiteRunCommand.js +1 -28
- package/dist-cjs/commands/StopSuiteRunCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateSuiteDefinitionCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -17
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1496 -11
- package/dist-cjs/models/IotDeviceAdvisorServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -103
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListSuiteDefinitionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListSuiteRunsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -950
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,950 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateSuiteDefinitionCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSuiteRunCommand = exports.de_StartSuiteRunCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSuiteRunsCommand = exports.de_ListSuiteDefinitionsCommand = exports.de_GetSuiteRunReportCommand = exports.de_GetSuiteRunCommand = exports.de_GetSuiteDefinitionCommand = exports.de_GetEndpointCommand = exports.de_DeleteSuiteDefinitionCommand = exports.de_CreateSuiteDefinitionCommand = exports.se_UpdateSuiteDefinitionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSuiteRunCommand = exports.se_StartSuiteRunCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSuiteRunsCommand = exports.se_ListSuiteDefinitionsCommand = exports.se_GetSuiteRunReportCommand = exports.se_GetSuiteRunCommand = exports.se_GetSuiteDefinitionCommand = exports.se_GetEndpointCommand = exports.se_DeleteSuiteDefinitionCommand = exports.se_CreateSuiteDefinitionCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const IotDeviceAdvisorServiceException_1 = require("../models/IotDeviceAdvisorServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CreateSuiteDefinitionCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/suiteDefinitions");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
suiteDefinitionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
17
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
}));
|
|
19
|
-
b.m("POST").h(headers).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_CreateSuiteDefinitionCommand = se_CreateSuiteDefinitionCommand;
|
|
23
|
-
const se_DeleteSuiteDefinitionCommand = async (input, context) => {
|
|
24
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
25
|
-
const headers = {};
|
|
26
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}");
|
|
27
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
28
|
-
let body;
|
|
29
|
-
b.m("DELETE").h(headers).b(body);
|
|
30
|
-
return b.build();
|
|
31
|
-
};
|
|
32
|
-
exports.se_DeleteSuiteDefinitionCommand = se_DeleteSuiteDefinitionCommand;
|
|
33
|
-
const se_GetEndpointCommand = async (input, context) => {
|
|
34
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
35
|
-
const headers = {};
|
|
36
|
-
b.bp("/endpoint");
|
|
37
|
-
const query = (0, smithy_client_1.map)({
|
|
38
|
-
[_tA]: [, input[_tA]],
|
|
39
|
-
[_cA]: [, input[_cA]],
|
|
40
|
-
[_dRA]: [, input[_dRA]],
|
|
41
|
-
[_aM]: [, input[_aM]],
|
|
42
|
-
});
|
|
43
|
-
let body;
|
|
44
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
45
|
-
return b.build();
|
|
46
|
-
};
|
|
47
|
-
exports.se_GetEndpointCommand = se_GetEndpointCommand;
|
|
48
|
-
const se_GetSuiteDefinitionCommand = async (input, context) => {
|
|
49
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
50
|
-
const headers = {};
|
|
51
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}");
|
|
52
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
53
|
-
const query = (0, smithy_client_1.map)({
|
|
54
|
-
[_sDV]: [, input[_sDV]],
|
|
55
|
-
});
|
|
56
|
-
let body;
|
|
57
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
58
|
-
return b.build();
|
|
59
|
-
};
|
|
60
|
-
exports.se_GetSuiteDefinitionCommand = se_GetSuiteDefinitionCommand;
|
|
61
|
-
const se_GetSuiteRunCommand = async (input, context) => {
|
|
62
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
63
|
-
const headers = {};
|
|
64
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}");
|
|
65
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
66
|
-
b.p("suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
67
|
-
let body;
|
|
68
|
-
b.m("GET").h(headers).b(body);
|
|
69
|
-
return b.build();
|
|
70
|
-
};
|
|
71
|
-
exports.se_GetSuiteRunCommand = se_GetSuiteRunCommand;
|
|
72
|
-
const se_GetSuiteRunReportCommand = async (input, context) => {
|
|
73
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
74
|
-
const headers = {};
|
|
75
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/report");
|
|
76
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
77
|
-
b.p("suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
78
|
-
let body;
|
|
79
|
-
b.m("GET").h(headers).b(body);
|
|
80
|
-
return b.build();
|
|
81
|
-
};
|
|
82
|
-
exports.se_GetSuiteRunReportCommand = se_GetSuiteRunReportCommand;
|
|
83
|
-
const se_ListSuiteDefinitionsCommand = async (input, context) => {
|
|
84
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
|
-
const headers = {};
|
|
86
|
-
b.bp("/suiteDefinitions");
|
|
87
|
-
const query = (0, smithy_client_1.map)({
|
|
88
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
89
|
-
[_nT]: [, input[_nT]],
|
|
90
|
-
});
|
|
91
|
-
let body;
|
|
92
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
93
|
-
return b.build();
|
|
94
|
-
};
|
|
95
|
-
exports.se_ListSuiteDefinitionsCommand = se_ListSuiteDefinitionsCommand;
|
|
96
|
-
const se_ListSuiteRunsCommand = async (input, context) => {
|
|
97
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
98
|
-
const headers = {};
|
|
99
|
-
b.bp("/suiteRuns");
|
|
100
|
-
const query = (0, smithy_client_1.map)({
|
|
101
|
-
[_sDI]: [, input[_sDI]],
|
|
102
|
-
[_sDV]: [, input[_sDV]],
|
|
103
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
104
|
-
[_nT]: [, input[_nT]],
|
|
105
|
-
});
|
|
106
|
-
let body;
|
|
107
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
exports.se_ListSuiteRunsCommand = se_ListSuiteRunsCommand;
|
|
111
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
112
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
113
|
-
const headers = {};
|
|
114
|
-
b.bp("/tags/{resourceArn}");
|
|
115
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
116
|
-
let body;
|
|
117
|
-
b.m("GET").h(headers).b(body);
|
|
118
|
-
return b.build();
|
|
119
|
-
};
|
|
120
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
121
|
-
const se_StartSuiteRunCommand = async (input, context) => {
|
|
122
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
123
|
-
const headers = {
|
|
124
|
-
"content-type": "application/json",
|
|
125
|
-
};
|
|
126
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}/suiteRuns");
|
|
127
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
128
|
-
let body;
|
|
129
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
130
|
-
suiteDefinitionVersion: [],
|
|
131
|
-
suiteRunConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
132
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
133
|
-
}));
|
|
134
|
-
b.m("POST").h(headers).b(body);
|
|
135
|
-
return b.build();
|
|
136
|
-
};
|
|
137
|
-
exports.se_StartSuiteRunCommand = se_StartSuiteRunCommand;
|
|
138
|
-
const se_StopSuiteRunCommand = async (input, context) => {
|
|
139
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
140
|
-
const headers = {};
|
|
141
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/stop");
|
|
142
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
143
|
-
b.p("suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
144
|
-
let body;
|
|
145
|
-
b.m("POST").h(headers).b(body);
|
|
146
|
-
return b.build();
|
|
147
|
-
};
|
|
148
|
-
exports.se_StopSuiteRunCommand = se_StopSuiteRunCommand;
|
|
149
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
150
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
151
|
-
const headers = {
|
|
152
|
-
"content-type": "application/json",
|
|
153
|
-
};
|
|
154
|
-
b.bp("/tags/{resourceArn}");
|
|
155
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
156
|
-
let body;
|
|
157
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
158
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
159
|
-
}));
|
|
160
|
-
b.m("POST").h(headers).b(body);
|
|
161
|
-
return b.build();
|
|
162
|
-
};
|
|
163
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
164
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
165
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
166
|
-
const headers = {};
|
|
167
|
-
b.bp("/tags/{resourceArn}");
|
|
168
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
169
|
-
const query = (0, smithy_client_1.map)({
|
|
170
|
-
[_tK]: [
|
|
171
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
172
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
173
|
-
],
|
|
174
|
-
});
|
|
175
|
-
let body;
|
|
176
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
177
|
-
return b.build();
|
|
178
|
-
};
|
|
179
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
180
|
-
const se_UpdateSuiteDefinitionCommand = async (input, context) => {
|
|
181
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
182
|
-
const headers = {
|
|
183
|
-
"content-type": "application/json",
|
|
184
|
-
};
|
|
185
|
-
b.bp("/suiteDefinitions/{suiteDefinitionId}");
|
|
186
|
-
b.p("suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
187
|
-
let body;
|
|
188
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
189
|
-
suiteDefinitionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
190
|
-
}));
|
|
191
|
-
b.m("PATCH").h(headers).b(body);
|
|
192
|
-
return b.build();
|
|
193
|
-
};
|
|
194
|
-
exports.se_UpdateSuiteDefinitionCommand = se_UpdateSuiteDefinitionCommand;
|
|
195
|
-
const de_CreateSuiteDefinitionCommand = async (output, context) => {
|
|
196
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
197
|
-
return de_CreateSuiteDefinitionCommandError(output, context);
|
|
198
|
-
}
|
|
199
|
-
const contents = (0, smithy_client_1.map)({
|
|
200
|
-
$metadata: deserializeMetadata(output),
|
|
201
|
-
});
|
|
202
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
203
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
204
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
205
|
-
suiteDefinitionArn: smithy_client_1.expectString,
|
|
206
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
207
|
-
suiteDefinitionName: smithy_client_1.expectString,
|
|
208
|
-
});
|
|
209
|
-
Object.assign(contents, doc);
|
|
210
|
-
return contents;
|
|
211
|
-
};
|
|
212
|
-
exports.de_CreateSuiteDefinitionCommand = de_CreateSuiteDefinitionCommand;
|
|
213
|
-
const de_CreateSuiteDefinitionCommandError = async (output, context) => {
|
|
214
|
-
const parsedOutput = {
|
|
215
|
-
...output,
|
|
216
|
-
body: await parseErrorBody(output.body, context),
|
|
217
|
-
};
|
|
218
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
219
|
-
switch (errorCode) {
|
|
220
|
-
case "InternalServerException":
|
|
221
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
222
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
223
|
-
case "ValidationException":
|
|
224
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
225
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
226
|
-
default:
|
|
227
|
-
const parsedBody = parsedOutput.body;
|
|
228
|
-
return throwDefaultError({
|
|
229
|
-
output,
|
|
230
|
-
parsedBody,
|
|
231
|
-
errorCode,
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
const de_DeleteSuiteDefinitionCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
-
return de_DeleteSuiteDefinitionCommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const contents = (0, smithy_client_1.map)({
|
|
240
|
-
$metadata: deserializeMetadata(output),
|
|
241
|
-
});
|
|
242
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
243
|
-
return contents;
|
|
244
|
-
};
|
|
245
|
-
exports.de_DeleteSuiteDefinitionCommand = de_DeleteSuiteDefinitionCommand;
|
|
246
|
-
const de_DeleteSuiteDefinitionCommandError = async (output, context) => {
|
|
247
|
-
const parsedOutput = {
|
|
248
|
-
...output,
|
|
249
|
-
body: await parseErrorBody(output.body, context),
|
|
250
|
-
};
|
|
251
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
252
|
-
switch (errorCode) {
|
|
253
|
-
case "InternalServerException":
|
|
254
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
255
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
256
|
-
case "ValidationException":
|
|
257
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
258
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
259
|
-
default:
|
|
260
|
-
const parsedBody = parsedOutput.body;
|
|
261
|
-
return throwDefaultError({
|
|
262
|
-
output,
|
|
263
|
-
parsedBody,
|
|
264
|
-
errorCode,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
const de_GetEndpointCommand = async (output, context) => {
|
|
269
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
270
|
-
return de_GetEndpointCommandError(output, context);
|
|
271
|
-
}
|
|
272
|
-
const contents = (0, smithy_client_1.map)({
|
|
273
|
-
$metadata: deserializeMetadata(output),
|
|
274
|
-
});
|
|
275
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
276
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
277
|
-
endpoint: smithy_client_1.expectString,
|
|
278
|
-
});
|
|
279
|
-
Object.assign(contents, doc);
|
|
280
|
-
return contents;
|
|
281
|
-
};
|
|
282
|
-
exports.de_GetEndpointCommand = de_GetEndpointCommand;
|
|
283
|
-
const de_GetEndpointCommandError = async (output, context) => {
|
|
284
|
-
const parsedOutput = {
|
|
285
|
-
...output,
|
|
286
|
-
body: await parseErrorBody(output.body, context),
|
|
287
|
-
};
|
|
288
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
289
|
-
switch (errorCode) {
|
|
290
|
-
case "InternalServerException":
|
|
291
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
292
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
293
|
-
case "ResourceNotFoundException":
|
|
294
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
295
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
296
|
-
case "ValidationException":
|
|
297
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
298
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
299
|
-
default:
|
|
300
|
-
const parsedBody = parsedOutput.body;
|
|
301
|
-
return throwDefaultError({
|
|
302
|
-
output,
|
|
303
|
-
parsedBody,
|
|
304
|
-
errorCode,
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
const de_GetSuiteDefinitionCommand = async (output, context) => {
|
|
309
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
310
|
-
return de_GetSuiteDefinitionCommandError(output, context);
|
|
311
|
-
}
|
|
312
|
-
const contents = (0, smithy_client_1.map)({
|
|
313
|
-
$metadata: deserializeMetadata(output),
|
|
314
|
-
});
|
|
315
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
316
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
317
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
318
|
-
lastModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
319
|
-
latestVersion: smithy_client_1.expectString,
|
|
320
|
-
suiteDefinitionArn: smithy_client_1.expectString,
|
|
321
|
-
suiteDefinitionConfiguration: smithy_client_1._json,
|
|
322
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
323
|
-
suiteDefinitionVersion: smithy_client_1.expectString,
|
|
324
|
-
tags: smithy_client_1._json,
|
|
325
|
-
});
|
|
326
|
-
Object.assign(contents, doc);
|
|
327
|
-
return contents;
|
|
328
|
-
};
|
|
329
|
-
exports.de_GetSuiteDefinitionCommand = de_GetSuiteDefinitionCommand;
|
|
330
|
-
const de_GetSuiteDefinitionCommandError = async (output, context) => {
|
|
331
|
-
const parsedOutput = {
|
|
332
|
-
...output,
|
|
333
|
-
body: await parseErrorBody(output.body, context),
|
|
334
|
-
};
|
|
335
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
336
|
-
switch (errorCode) {
|
|
337
|
-
case "InternalServerException":
|
|
338
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
339
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
340
|
-
case "ResourceNotFoundException":
|
|
341
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
342
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
343
|
-
case "ValidationException":
|
|
344
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
345
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
346
|
-
default:
|
|
347
|
-
const parsedBody = parsedOutput.body;
|
|
348
|
-
return throwDefaultError({
|
|
349
|
-
output,
|
|
350
|
-
parsedBody,
|
|
351
|
-
errorCode,
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
const de_GetSuiteRunCommand = async (output, context) => {
|
|
356
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
357
|
-
return de_GetSuiteRunCommandError(output, context);
|
|
358
|
-
}
|
|
359
|
-
const contents = (0, smithy_client_1.map)({
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
});
|
|
362
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
363
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
365
|
-
errorReason: smithy_client_1.expectString,
|
|
366
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
367
|
-
status: smithy_client_1.expectString,
|
|
368
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
369
|
-
suiteDefinitionVersion: smithy_client_1.expectString,
|
|
370
|
-
suiteRunArn: smithy_client_1.expectString,
|
|
371
|
-
suiteRunConfiguration: smithy_client_1._json,
|
|
372
|
-
suiteRunId: smithy_client_1.expectString,
|
|
373
|
-
tags: smithy_client_1._json,
|
|
374
|
-
testResult: (_) => de_TestResult(_, context),
|
|
375
|
-
});
|
|
376
|
-
Object.assign(contents, doc);
|
|
377
|
-
return contents;
|
|
378
|
-
};
|
|
379
|
-
exports.de_GetSuiteRunCommand = de_GetSuiteRunCommand;
|
|
380
|
-
const de_GetSuiteRunCommandError = async (output, context) => {
|
|
381
|
-
const parsedOutput = {
|
|
382
|
-
...output,
|
|
383
|
-
body: await parseErrorBody(output.body, context),
|
|
384
|
-
};
|
|
385
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
386
|
-
switch (errorCode) {
|
|
387
|
-
case "InternalServerException":
|
|
388
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
389
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
390
|
-
case "ResourceNotFoundException":
|
|
391
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
392
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
393
|
-
case "ValidationException":
|
|
394
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
395
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
396
|
-
default:
|
|
397
|
-
const parsedBody = parsedOutput.body;
|
|
398
|
-
return throwDefaultError({
|
|
399
|
-
output,
|
|
400
|
-
parsedBody,
|
|
401
|
-
errorCode,
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
const de_GetSuiteRunReportCommand = async (output, context) => {
|
|
406
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
407
|
-
return de_GetSuiteRunReportCommandError(output, context);
|
|
408
|
-
}
|
|
409
|
-
const contents = (0, smithy_client_1.map)({
|
|
410
|
-
$metadata: deserializeMetadata(output),
|
|
411
|
-
});
|
|
412
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
413
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
414
|
-
qualificationReportDownloadUrl: smithy_client_1.expectString,
|
|
415
|
-
});
|
|
416
|
-
Object.assign(contents, doc);
|
|
417
|
-
return contents;
|
|
418
|
-
};
|
|
419
|
-
exports.de_GetSuiteRunReportCommand = de_GetSuiteRunReportCommand;
|
|
420
|
-
const de_GetSuiteRunReportCommandError = async (output, context) => {
|
|
421
|
-
const parsedOutput = {
|
|
422
|
-
...output,
|
|
423
|
-
body: await parseErrorBody(output.body, context),
|
|
424
|
-
};
|
|
425
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
426
|
-
switch (errorCode) {
|
|
427
|
-
case "InternalServerException":
|
|
428
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
429
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
430
|
-
case "ResourceNotFoundException":
|
|
431
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
432
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
433
|
-
case "ValidationException":
|
|
434
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
435
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
436
|
-
default:
|
|
437
|
-
const parsedBody = parsedOutput.body;
|
|
438
|
-
return throwDefaultError({
|
|
439
|
-
output,
|
|
440
|
-
parsedBody,
|
|
441
|
-
errorCode,
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
const de_ListSuiteDefinitionsCommand = async (output, context) => {
|
|
446
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
447
|
-
return de_ListSuiteDefinitionsCommandError(output, context);
|
|
448
|
-
}
|
|
449
|
-
const contents = (0, smithy_client_1.map)({
|
|
450
|
-
$metadata: deserializeMetadata(output),
|
|
451
|
-
});
|
|
452
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
453
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
454
|
-
nextToken: smithy_client_1.expectString,
|
|
455
|
-
suiteDefinitionInformationList: (_) => de_SuiteDefinitionInformationList(_, context),
|
|
456
|
-
});
|
|
457
|
-
Object.assign(contents, doc);
|
|
458
|
-
return contents;
|
|
459
|
-
};
|
|
460
|
-
exports.de_ListSuiteDefinitionsCommand = de_ListSuiteDefinitionsCommand;
|
|
461
|
-
const de_ListSuiteDefinitionsCommandError = async (output, context) => {
|
|
462
|
-
const parsedOutput = {
|
|
463
|
-
...output,
|
|
464
|
-
body: await parseErrorBody(output.body, context),
|
|
465
|
-
};
|
|
466
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
467
|
-
switch (errorCode) {
|
|
468
|
-
case "InternalServerException":
|
|
469
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
470
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
471
|
-
case "ValidationException":
|
|
472
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
473
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
474
|
-
default:
|
|
475
|
-
const parsedBody = parsedOutput.body;
|
|
476
|
-
return throwDefaultError({
|
|
477
|
-
output,
|
|
478
|
-
parsedBody,
|
|
479
|
-
errorCode,
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
const de_ListSuiteRunsCommand = async (output, context) => {
|
|
484
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
485
|
-
return de_ListSuiteRunsCommandError(output, context);
|
|
486
|
-
}
|
|
487
|
-
const contents = (0, smithy_client_1.map)({
|
|
488
|
-
$metadata: deserializeMetadata(output),
|
|
489
|
-
});
|
|
490
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
491
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
492
|
-
nextToken: smithy_client_1.expectString,
|
|
493
|
-
suiteRunsList: (_) => de_SuiteRunsList(_, context),
|
|
494
|
-
});
|
|
495
|
-
Object.assign(contents, doc);
|
|
496
|
-
return contents;
|
|
497
|
-
};
|
|
498
|
-
exports.de_ListSuiteRunsCommand = de_ListSuiteRunsCommand;
|
|
499
|
-
const de_ListSuiteRunsCommandError = async (output, context) => {
|
|
500
|
-
const parsedOutput = {
|
|
501
|
-
...output,
|
|
502
|
-
body: await parseErrorBody(output.body, context),
|
|
503
|
-
};
|
|
504
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
505
|
-
switch (errorCode) {
|
|
506
|
-
case "InternalServerException":
|
|
507
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
508
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
509
|
-
case "ValidationException":
|
|
510
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
511
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
512
|
-
default:
|
|
513
|
-
const parsedBody = parsedOutput.body;
|
|
514
|
-
return throwDefaultError({
|
|
515
|
-
output,
|
|
516
|
-
parsedBody,
|
|
517
|
-
errorCode,
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
522
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
523
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
524
|
-
}
|
|
525
|
-
const contents = (0, smithy_client_1.map)({
|
|
526
|
-
$metadata: deserializeMetadata(output),
|
|
527
|
-
});
|
|
528
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
529
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
530
|
-
tags: smithy_client_1._json,
|
|
531
|
-
});
|
|
532
|
-
Object.assign(contents, doc);
|
|
533
|
-
return contents;
|
|
534
|
-
};
|
|
535
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
536
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
537
|
-
const parsedOutput = {
|
|
538
|
-
...output,
|
|
539
|
-
body: await parseErrorBody(output.body, context),
|
|
540
|
-
};
|
|
541
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
542
|
-
switch (errorCode) {
|
|
543
|
-
case "InternalServerException":
|
|
544
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
545
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
546
|
-
case "ResourceNotFoundException":
|
|
547
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
548
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ValidationException":
|
|
550
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
551
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_StartSuiteRunCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_StartSuiteRunCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, smithy_client_1.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
569
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
570
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
571
|
-
endpoint: smithy_client_1.expectString,
|
|
572
|
-
suiteRunArn: smithy_client_1.expectString,
|
|
573
|
-
suiteRunId: smithy_client_1.expectString,
|
|
574
|
-
});
|
|
575
|
-
Object.assign(contents, doc);
|
|
576
|
-
return contents;
|
|
577
|
-
};
|
|
578
|
-
exports.de_StartSuiteRunCommand = de_StartSuiteRunCommand;
|
|
579
|
-
const de_StartSuiteRunCommandError = async (output, context) => {
|
|
580
|
-
const parsedOutput = {
|
|
581
|
-
...output,
|
|
582
|
-
body: await parseErrorBody(output.body, context),
|
|
583
|
-
};
|
|
584
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
585
|
-
switch (errorCode) {
|
|
586
|
-
case "ConflictException":
|
|
587
|
-
case "com.amazonaws.iotdeviceadvisor#ConflictException":
|
|
588
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
589
|
-
case "InternalServerException":
|
|
590
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
591
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
592
|
-
case "ValidationException":
|
|
593
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
594
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
595
|
-
default:
|
|
596
|
-
const parsedBody = parsedOutput.body;
|
|
597
|
-
return throwDefaultError({
|
|
598
|
-
output,
|
|
599
|
-
parsedBody,
|
|
600
|
-
errorCode,
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
const de_StopSuiteRunCommand = async (output, context) => {
|
|
605
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
606
|
-
return de_StopSuiteRunCommandError(output, context);
|
|
607
|
-
}
|
|
608
|
-
const contents = (0, smithy_client_1.map)({
|
|
609
|
-
$metadata: deserializeMetadata(output),
|
|
610
|
-
});
|
|
611
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
612
|
-
return contents;
|
|
613
|
-
};
|
|
614
|
-
exports.de_StopSuiteRunCommand = de_StopSuiteRunCommand;
|
|
615
|
-
const de_StopSuiteRunCommandError = async (output, context) => {
|
|
616
|
-
const parsedOutput = {
|
|
617
|
-
...output,
|
|
618
|
-
body: await parseErrorBody(output.body, context),
|
|
619
|
-
};
|
|
620
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
621
|
-
switch (errorCode) {
|
|
622
|
-
case "InternalServerException":
|
|
623
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
624
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
625
|
-
case "ResourceNotFoundException":
|
|
626
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
627
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
628
|
-
case "ValidationException":
|
|
629
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
630
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
631
|
-
default:
|
|
632
|
-
const parsedBody = parsedOutput.body;
|
|
633
|
-
return throwDefaultError({
|
|
634
|
-
output,
|
|
635
|
-
parsedBody,
|
|
636
|
-
errorCode,
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
};
|
|
640
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
641
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
642
|
-
return de_TagResourceCommandError(output, context);
|
|
643
|
-
}
|
|
644
|
-
const contents = (0, smithy_client_1.map)({
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
});
|
|
647
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
648
|
-
return contents;
|
|
649
|
-
};
|
|
650
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
651
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
652
|
-
const parsedOutput = {
|
|
653
|
-
...output,
|
|
654
|
-
body: await parseErrorBody(output.body, context),
|
|
655
|
-
};
|
|
656
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
657
|
-
switch (errorCode) {
|
|
658
|
-
case "InternalServerException":
|
|
659
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
660
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
661
|
-
case "ResourceNotFoundException":
|
|
662
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
663
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
664
|
-
case "ValidationException":
|
|
665
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
666
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
667
|
-
default:
|
|
668
|
-
const parsedBody = parsedOutput.body;
|
|
669
|
-
return throwDefaultError({
|
|
670
|
-
output,
|
|
671
|
-
parsedBody,
|
|
672
|
-
errorCode,
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
};
|
|
676
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
677
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
678
|
-
return de_UntagResourceCommandError(output, context);
|
|
679
|
-
}
|
|
680
|
-
const contents = (0, smithy_client_1.map)({
|
|
681
|
-
$metadata: deserializeMetadata(output),
|
|
682
|
-
});
|
|
683
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
684
|
-
return contents;
|
|
685
|
-
};
|
|
686
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
687
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
688
|
-
const parsedOutput = {
|
|
689
|
-
...output,
|
|
690
|
-
body: await parseErrorBody(output.body, context),
|
|
691
|
-
};
|
|
692
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
693
|
-
switch (errorCode) {
|
|
694
|
-
case "InternalServerException":
|
|
695
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
696
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
697
|
-
case "ResourceNotFoundException":
|
|
698
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
699
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ValidationException":
|
|
701
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
702
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
703
|
-
default:
|
|
704
|
-
const parsedBody = parsedOutput.body;
|
|
705
|
-
return throwDefaultError({
|
|
706
|
-
output,
|
|
707
|
-
parsedBody,
|
|
708
|
-
errorCode,
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
const de_UpdateSuiteDefinitionCommand = async (output, context) => {
|
|
713
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
714
|
-
return de_UpdateSuiteDefinitionCommandError(output, context);
|
|
715
|
-
}
|
|
716
|
-
const contents = (0, smithy_client_1.map)({
|
|
717
|
-
$metadata: deserializeMetadata(output),
|
|
718
|
-
});
|
|
719
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
720
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
721
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
722
|
-
lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
723
|
-
suiteDefinitionArn: smithy_client_1.expectString,
|
|
724
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
725
|
-
suiteDefinitionName: smithy_client_1.expectString,
|
|
726
|
-
suiteDefinitionVersion: smithy_client_1.expectString,
|
|
727
|
-
});
|
|
728
|
-
Object.assign(contents, doc);
|
|
729
|
-
return contents;
|
|
730
|
-
};
|
|
731
|
-
exports.de_UpdateSuiteDefinitionCommand = de_UpdateSuiteDefinitionCommand;
|
|
732
|
-
const de_UpdateSuiteDefinitionCommandError = async (output, context) => {
|
|
733
|
-
const parsedOutput = {
|
|
734
|
-
...output,
|
|
735
|
-
body: await parseErrorBody(output.body, context),
|
|
736
|
-
};
|
|
737
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
738
|
-
switch (errorCode) {
|
|
739
|
-
case "InternalServerException":
|
|
740
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
741
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
742
|
-
case "ValidationException":
|
|
743
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
744
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
745
|
-
default:
|
|
746
|
-
const parsedBody = parsedOutput.body;
|
|
747
|
-
return throwDefaultError({
|
|
748
|
-
output,
|
|
749
|
-
parsedBody,
|
|
750
|
-
errorCode,
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
};
|
|
754
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(IotDeviceAdvisorServiceException_1.IotDeviceAdvisorServiceException);
|
|
755
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
756
|
-
const contents = (0, smithy_client_1.map)({});
|
|
757
|
-
const data = parsedOutput.body;
|
|
758
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
759
|
-
message: smithy_client_1.expectString,
|
|
760
|
-
});
|
|
761
|
-
Object.assign(contents, doc);
|
|
762
|
-
const exception = new models_0_1.ConflictException({
|
|
763
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
764
|
-
...contents,
|
|
765
|
-
});
|
|
766
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
767
|
-
};
|
|
768
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
769
|
-
const contents = (0, smithy_client_1.map)({});
|
|
770
|
-
const data = parsedOutput.body;
|
|
771
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
772
|
-
message: smithy_client_1.expectString,
|
|
773
|
-
});
|
|
774
|
-
Object.assign(contents, doc);
|
|
775
|
-
const exception = new models_0_1.InternalServerException({
|
|
776
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
777
|
-
...contents,
|
|
778
|
-
});
|
|
779
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
780
|
-
};
|
|
781
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
782
|
-
const contents = (0, smithy_client_1.map)({});
|
|
783
|
-
const data = parsedOutput.body;
|
|
784
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
785
|
-
message: smithy_client_1.expectString,
|
|
786
|
-
});
|
|
787
|
-
Object.assign(contents, doc);
|
|
788
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
789
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
790
|
-
...contents,
|
|
791
|
-
});
|
|
792
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
793
|
-
};
|
|
794
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
795
|
-
const contents = (0, smithy_client_1.map)({});
|
|
796
|
-
const data = parsedOutput.body;
|
|
797
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
798
|
-
message: smithy_client_1.expectString,
|
|
799
|
-
});
|
|
800
|
-
Object.assign(contents, doc);
|
|
801
|
-
const exception = new models_0_1.ValidationException({
|
|
802
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
803
|
-
...contents,
|
|
804
|
-
});
|
|
805
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
806
|
-
};
|
|
807
|
-
const de_GroupResult = (output, context) => {
|
|
808
|
-
return (0, smithy_client_1.take)(output, {
|
|
809
|
-
groupId: smithy_client_1.expectString,
|
|
810
|
-
groupName: smithy_client_1.expectString,
|
|
811
|
-
tests: (_) => de_TestCaseRuns(_, context),
|
|
812
|
-
});
|
|
813
|
-
};
|
|
814
|
-
const de_GroupResultList = (output, context) => {
|
|
815
|
-
const retVal = (output || [])
|
|
816
|
-
.filter((e) => e != null)
|
|
817
|
-
.map((entry) => {
|
|
818
|
-
return de_GroupResult(entry, context);
|
|
819
|
-
});
|
|
820
|
-
return retVal;
|
|
821
|
-
};
|
|
822
|
-
const de_SuiteDefinitionInformation = (output, context) => {
|
|
823
|
-
return (0, smithy_client_1.take)(output, {
|
|
824
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
825
|
-
defaultDevices: smithy_client_1._json,
|
|
826
|
-
intendedForQualification: smithy_client_1.expectBoolean,
|
|
827
|
-
isLongDurationTest: smithy_client_1.expectBoolean,
|
|
828
|
-
protocol: smithy_client_1.expectString,
|
|
829
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
830
|
-
suiteDefinitionName: smithy_client_1.expectString,
|
|
831
|
-
});
|
|
832
|
-
};
|
|
833
|
-
const de_SuiteDefinitionInformationList = (output, context) => {
|
|
834
|
-
const retVal = (output || [])
|
|
835
|
-
.filter((e) => e != null)
|
|
836
|
-
.map((entry) => {
|
|
837
|
-
return de_SuiteDefinitionInformation(entry, context);
|
|
838
|
-
});
|
|
839
|
-
return retVal;
|
|
840
|
-
};
|
|
841
|
-
const de_SuiteRunInformation = (output, context) => {
|
|
842
|
-
return (0, smithy_client_1.take)(output, {
|
|
843
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
844
|
-
endAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
845
|
-
failed: smithy_client_1.expectInt32,
|
|
846
|
-
passed: smithy_client_1.expectInt32,
|
|
847
|
-
startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
848
|
-
status: smithy_client_1.expectString,
|
|
849
|
-
suiteDefinitionId: smithy_client_1.expectString,
|
|
850
|
-
suiteDefinitionName: smithy_client_1.expectString,
|
|
851
|
-
suiteDefinitionVersion: smithy_client_1.expectString,
|
|
852
|
-
suiteRunId: smithy_client_1.expectString,
|
|
853
|
-
});
|
|
854
|
-
};
|
|
855
|
-
const de_SuiteRunsList = (output, context) => {
|
|
856
|
-
const retVal = (output || [])
|
|
857
|
-
.filter((e) => e != null)
|
|
858
|
-
.map((entry) => {
|
|
859
|
-
return de_SuiteRunInformation(entry, context);
|
|
860
|
-
});
|
|
861
|
-
return retVal;
|
|
862
|
-
};
|
|
863
|
-
const de_TestCaseRun = (output, context) => {
|
|
864
|
-
return (0, smithy_client_1.take)(output, {
|
|
865
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
866
|
-
failure: smithy_client_1.expectString,
|
|
867
|
-
logUrl: smithy_client_1.expectString,
|
|
868
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
869
|
-
status: smithy_client_1.expectString,
|
|
870
|
-
testCaseDefinitionId: smithy_client_1.expectString,
|
|
871
|
-
testCaseDefinitionName: smithy_client_1.expectString,
|
|
872
|
-
testCaseRunId: smithy_client_1.expectString,
|
|
873
|
-
testScenarios: smithy_client_1._json,
|
|
874
|
-
warnings: smithy_client_1.expectString,
|
|
875
|
-
});
|
|
876
|
-
};
|
|
877
|
-
const de_TestCaseRuns = (output, context) => {
|
|
878
|
-
const retVal = (output || [])
|
|
879
|
-
.filter((e) => e != null)
|
|
880
|
-
.map((entry) => {
|
|
881
|
-
return de_TestCaseRun(entry, context);
|
|
882
|
-
});
|
|
883
|
-
return retVal;
|
|
884
|
-
};
|
|
885
|
-
const de_TestResult = (output, context) => {
|
|
886
|
-
return (0, smithy_client_1.take)(output, {
|
|
887
|
-
groups: (_) => de_GroupResultList(_, context),
|
|
888
|
-
});
|
|
889
|
-
};
|
|
890
|
-
const deserializeMetadata = (output) => ({
|
|
891
|
-
httpStatusCode: output.statusCode,
|
|
892
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
893
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
894
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
895
|
-
});
|
|
896
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
897
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
898
|
-
value !== null &&
|
|
899
|
-
value !== "" &&
|
|
900
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
901
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
902
|
-
const _aM = "authenticationMethod";
|
|
903
|
-
const _cA = "certificateArn";
|
|
904
|
-
const _dRA = "deviceRoleArn";
|
|
905
|
-
const _mR = "maxResults";
|
|
906
|
-
const _nT = "nextToken";
|
|
907
|
-
const _sDI = "suiteDefinitionId";
|
|
908
|
-
const _sDV = "suiteDefinitionVersion";
|
|
909
|
-
const _tA = "thingArn";
|
|
910
|
-
const _tK = "tagKeys";
|
|
911
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
912
|
-
if (encoded.length) {
|
|
913
|
-
return JSON.parse(encoded);
|
|
914
|
-
}
|
|
915
|
-
return {};
|
|
916
|
-
});
|
|
917
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
918
|
-
const value = await parseBody(errorBody, context);
|
|
919
|
-
value.message = value.message ?? value.Message;
|
|
920
|
-
return value;
|
|
921
|
-
};
|
|
922
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
923
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
924
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
925
|
-
let cleanValue = rawValue;
|
|
926
|
-
if (typeof cleanValue === "number") {
|
|
927
|
-
cleanValue = cleanValue.toString();
|
|
928
|
-
}
|
|
929
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
930
|
-
cleanValue = cleanValue.split(",")[0];
|
|
931
|
-
}
|
|
932
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
933
|
-
cleanValue = cleanValue.split(":")[0];
|
|
934
|
-
}
|
|
935
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
936
|
-
cleanValue = cleanValue.split("#")[1];
|
|
937
|
-
}
|
|
938
|
-
return cleanValue;
|
|
939
|
-
};
|
|
940
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
941
|
-
if (headerKey !== undefined) {
|
|
942
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
943
|
-
}
|
|
944
|
-
if (data.code !== undefined) {
|
|
945
|
-
return sanitizeErrorCode(data.code);
|
|
946
|
-
}
|
|
947
|
-
if (data["__type"] !== undefined) {
|
|
948
|
-
return sanitizeErrorCode(data["__type"]);
|
|
949
|
-
}
|
|
950
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|