@aws-sdk/client-iotdeviceadvisor 3.181.0 → 3.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist-es/IotDeviceAdvisor.js +58 -65
- package/dist-es/IotDeviceAdvisorClient.js +22 -28
- package/dist-es/commands/CreateSuiteDefinitionCommand.js +21 -28
- package/dist-es/commands/DeleteSuiteDefinitionCommand.js +21 -28
- package/dist-es/commands/GetEndpointCommand.js +21 -28
- package/dist-es/commands/GetSuiteDefinitionCommand.js +21 -28
- package/dist-es/commands/GetSuiteRunCommand.js +21 -28
- package/dist-es/commands/GetSuiteRunReportCommand.js +21 -28
- package/dist-es/commands/ListSuiteDefinitionsCommand.js +21 -28
- package/dist-es/commands/ListSuiteRunsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/StartSuiteRunCommand.js +21 -28
- package/dist-es/commands/StopSuiteRunCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateSuiteDefinitionCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/IotDeviceAdvisorServiceException.js +5 -10
- package/dist-es/models/models_0.js +155 -82
- package/dist-es/pagination/ListSuiteDefinitionsPaginator.js +25 -68
- package/dist-es/pagination/ListSuiteRunsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1003 -1415
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1401 +1,1006 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { IotDeviceAdvisorServiceException as __BaseException } from "../models/IotDeviceAdvisorServiceException";
|
|
5
4
|
import { ConflictException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
suiteDefinitionConfiguration: serializeAws_restJson1SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context),
|
|
19
|
-
})), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
20
|
-
return [2, new __HttpRequest({
|
|
21
|
-
protocol: protocol,
|
|
22
|
-
hostname: hostname,
|
|
23
|
-
port: port,
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers: headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body: body,
|
|
28
|
-
})];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}); };
|
|
32
|
-
export var serializeAws_restJson1DeleteSuiteDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
34
|
-
return __generator(this, function (_c) {
|
|
35
|
-
switch (_c.label) {
|
|
36
|
-
case 0: return [4, context.endpoint()];
|
|
37
|
-
case 1:
|
|
38
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
-
headers = {};
|
|
40
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/suiteDefinitions/{suiteDefinitionId}";
|
|
41
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
42
|
-
return [2, new __HttpRequest({
|
|
43
|
-
protocol: protocol,
|
|
44
|
-
hostname: hostname,
|
|
45
|
-
port: port,
|
|
46
|
-
method: "DELETE",
|
|
47
|
-
headers: headers,
|
|
48
|
-
path: resolvedPath,
|
|
49
|
-
body: body,
|
|
50
|
-
})];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}); };
|
|
54
|
-
export var serializeAws_restJson1GetEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
56
|
-
return __generator(this, function (_c) {
|
|
57
|
-
switch (_c.label) {
|
|
58
|
-
case 0: return [4, context.endpoint()];
|
|
59
|
-
case 1:
|
|
60
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
61
|
-
headers = {};
|
|
62
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/endpoint";
|
|
63
|
-
query = map({
|
|
64
|
-
thingArn: [, input.thingArn],
|
|
65
|
-
certificateArn: [, input.certificateArn],
|
|
66
|
-
});
|
|
67
|
-
return [2, new __HttpRequest({
|
|
68
|
-
protocol: protocol,
|
|
69
|
-
hostname: hostname,
|
|
70
|
-
port: port,
|
|
71
|
-
method: "GET",
|
|
72
|
-
headers: headers,
|
|
73
|
-
path: resolvedPath,
|
|
74
|
-
query: query,
|
|
75
|
-
body: body,
|
|
76
|
-
})];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}); };
|
|
80
|
-
export var serializeAws_restJson1GetSuiteDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
82
|
-
return __generator(this, function (_c) {
|
|
83
|
-
switch (_c.label) {
|
|
84
|
-
case 0: return [4, context.endpoint()];
|
|
85
|
-
case 1:
|
|
86
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
87
|
-
headers = {};
|
|
88
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/suiteDefinitions/{suiteDefinitionId}";
|
|
89
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
90
|
-
query = map({
|
|
91
|
-
suiteDefinitionVersion: [, input.suiteDefinitionVersion],
|
|
92
|
-
});
|
|
93
|
-
return [2, new __HttpRequest({
|
|
94
|
-
protocol: protocol,
|
|
95
|
-
hostname: hostname,
|
|
96
|
-
port: port,
|
|
97
|
-
method: "GET",
|
|
98
|
-
headers: headers,
|
|
99
|
-
path: resolvedPath,
|
|
100
|
-
query: query,
|
|
101
|
-
body: body,
|
|
102
|
-
})];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}); };
|
|
106
|
-
export var serializeAws_restJson1GetSuiteRunCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
108
|
-
return __generator(this, function (_c) {
|
|
109
|
-
switch (_c.label) {
|
|
110
|
-
case 0: return [4, context.endpoint()];
|
|
111
|
-
case 1:
|
|
112
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
113
|
-
headers = {};
|
|
114
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
115
|
-
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}";
|
|
116
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
117
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", function () { return input.suiteRunId; }, "{suiteRunId}", false);
|
|
118
|
-
return [2, new __HttpRequest({
|
|
119
|
-
protocol: protocol,
|
|
120
|
-
hostname: hostname,
|
|
121
|
-
port: port,
|
|
122
|
-
method: "GET",
|
|
123
|
-
headers: headers,
|
|
124
|
-
path: resolvedPath,
|
|
125
|
-
body: body,
|
|
126
|
-
})];
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}); };
|
|
130
|
-
export var serializeAws_restJson1GetSuiteRunReportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
132
|
-
return __generator(this, function (_c) {
|
|
133
|
-
switch (_c.label) {
|
|
134
|
-
case 0: return [4, context.endpoint()];
|
|
135
|
-
case 1:
|
|
136
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
137
|
-
headers = {};
|
|
138
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
139
|
-
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/report";
|
|
140
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
141
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", function () { return input.suiteRunId; }, "{suiteRunId}", false);
|
|
142
|
-
return [2, new __HttpRequest({
|
|
143
|
-
protocol: protocol,
|
|
144
|
-
hostname: hostname,
|
|
145
|
-
port: port,
|
|
146
|
-
method: "GET",
|
|
147
|
-
headers: headers,
|
|
148
|
-
path: resolvedPath,
|
|
149
|
-
body: body,
|
|
150
|
-
})];
|
|
151
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateSuiteDefinitionCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.suiteDefinitionConfiguration != null && {
|
|
14
|
+
suiteDefinitionConfiguration: serializeAws_restJson1SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context),
|
|
15
|
+
}),
|
|
16
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
152
17
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
headers = {};
|
|
162
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/suiteDefinitions";
|
|
163
|
-
query = map({
|
|
164
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
165
|
-
nextToken: [, input.nextToken],
|
|
166
|
-
});
|
|
167
|
-
return [2, new __HttpRequest({
|
|
168
|
-
protocol: protocol,
|
|
169
|
-
hostname: hostname,
|
|
170
|
-
port: port,
|
|
171
|
-
method: "GET",
|
|
172
|
-
headers: headers,
|
|
173
|
-
path: resolvedPath,
|
|
174
|
-
query: query,
|
|
175
|
-
body: body,
|
|
176
|
-
})];
|
|
177
|
-
}
|
|
18
|
+
return new __HttpRequest({
|
|
19
|
+
protocol,
|
|
20
|
+
hostname,
|
|
21
|
+
port,
|
|
22
|
+
method: "POST",
|
|
23
|
+
headers,
|
|
24
|
+
path: resolvedPath,
|
|
25
|
+
body,
|
|
178
26
|
});
|
|
179
|
-
}
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
195
|
-
return [2, new __HttpRequest({
|
|
196
|
-
protocol: protocol,
|
|
197
|
-
hostname: hostname,
|
|
198
|
-
port: port,
|
|
199
|
-
method: "GET",
|
|
200
|
-
headers: headers,
|
|
201
|
-
path: resolvedPath,
|
|
202
|
-
query: query,
|
|
203
|
-
body: body,
|
|
204
|
-
})];
|
|
205
|
-
}
|
|
27
|
+
};
|
|
28
|
+
export const serializeAws_restJson1DeleteSuiteDefinitionCommand = async (input, context) => {
|
|
29
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
30
|
+
const headers = {};
|
|
31
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions/{suiteDefinitionId}";
|
|
32
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
33
|
+
let body;
|
|
34
|
+
return new __HttpRequest({
|
|
35
|
+
protocol,
|
|
36
|
+
hostname,
|
|
37
|
+
port,
|
|
38
|
+
method: "DELETE",
|
|
39
|
+
headers,
|
|
40
|
+
path: resolvedPath,
|
|
41
|
+
body,
|
|
206
42
|
});
|
|
207
|
-
}
|
|
208
|
-
export
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
headers = {};
|
|
216
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
217
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
218
|
-
return [2, new __HttpRequest({
|
|
219
|
-
protocol: protocol,
|
|
220
|
-
hostname: hostname,
|
|
221
|
-
port: port,
|
|
222
|
-
method: "GET",
|
|
223
|
-
headers: headers,
|
|
224
|
-
path: resolvedPath,
|
|
225
|
-
body: body,
|
|
226
|
-
})];
|
|
227
|
-
}
|
|
43
|
+
};
|
|
44
|
+
export const serializeAws_restJson1GetEndpointCommand = async (input, context) => {
|
|
45
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
46
|
+
const headers = {};
|
|
47
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/endpoint";
|
|
48
|
+
const query = map({
|
|
49
|
+
thingArn: [, input.thingArn],
|
|
50
|
+
certificateArn: [, input.certificateArn],
|
|
228
51
|
});
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
};
|
|
240
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
241
|
-
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns";
|
|
242
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
243
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.suiteDefinitionVersion != null && { suiteDefinitionVersion: input.suiteDefinitionVersion })), (input.suiteRunConfiguration != null && {
|
|
244
|
-
suiteRunConfiguration: serializeAws_restJson1SuiteRunConfiguration(input.suiteRunConfiguration, context),
|
|
245
|
-
})), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
246
|
-
return [2, new __HttpRequest({
|
|
247
|
-
protocol: protocol,
|
|
248
|
-
hostname: hostname,
|
|
249
|
-
port: port,
|
|
250
|
-
method: "POST",
|
|
251
|
-
headers: headers,
|
|
252
|
-
path: resolvedPath,
|
|
253
|
-
body: body,
|
|
254
|
-
})];
|
|
255
|
-
}
|
|
52
|
+
let body;
|
|
53
|
+
return new __HttpRequest({
|
|
54
|
+
protocol,
|
|
55
|
+
hostname,
|
|
56
|
+
port,
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers,
|
|
59
|
+
path: resolvedPath,
|
|
60
|
+
query,
|
|
61
|
+
body,
|
|
256
62
|
});
|
|
257
|
-
}
|
|
258
|
-
export
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
headers = {};
|
|
266
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
267
|
-
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/stop";
|
|
268
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", function () { return input.suiteDefinitionId; }, "{suiteDefinitionId}", false);
|
|
269
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", function () { return input.suiteRunId; }, "{suiteRunId}", false);
|
|
270
|
-
return [2, new __HttpRequest({
|
|
271
|
-
protocol: protocol,
|
|
272
|
-
hostname: hostname,
|
|
273
|
-
port: port,
|
|
274
|
-
method: "POST",
|
|
275
|
-
headers: headers,
|
|
276
|
-
path: resolvedPath,
|
|
277
|
-
body: body,
|
|
278
|
-
})];
|
|
279
|
-
}
|
|
63
|
+
};
|
|
64
|
+
export const serializeAws_restJson1GetSuiteDefinitionCommand = async (input, context) => {
|
|
65
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
66
|
+
const headers = {};
|
|
67
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions/{suiteDefinitionId}";
|
|
68
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
69
|
+
const query = map({
|
|
70
|
+
suiteDefinitionVersion: [, input.suiteDefinitionVersion],
|
|
280
71
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
};
|
|
292
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
293
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
294
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
295
|
-
return [2, new __HttpRequest({
|
|
296
|
-
protocol: protocol,
|
|
297
|
-
hostname: hostname,
|
|
298
|
-
port: port,
|
|
299
|
-
method: "POST",
|
|
300
|
-
headers: headers,
|
|
301
|
-
path: resolvedPath,
|
|
302
|
-
body: body,
|
|
303
|
-
})];
|
|
304
|
-
}
|
|
72
|
+
let body;
|
|
73
|
+
return new __HttpRequest({
|
|
74
|
+
protocol,
|
|
75
|
+
hostname,
|
|
76
|
+
port,
|
|
77
|
+
method: "GET",
|
|
78
|
+
headers,
|
|
79
|
+
path: resolvedPath,
|
|
80
|
+
query,
|
|
81
|
+
body,
|
|
305
82
|
});
|
|
306
|
-
}
|
|
307
|
-
export
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
port: port,
|
|
324
|
-
method: "DELETE",
|
|
325
|
-
headers: headers,
|
|
326
|
-
path: resolvedPath,
|
|
327
|
-
query: query,
|
|
328
|
-
body: body,
|
|
329
|
-
})];
|
|
330
|
-
}
|
|
83
|
+
};
|
|
84
|
+
export const serializeAws_restJson1GetSuiteRunCommand = async (input, context) => {
|
|
85
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
86
|
+
const headers = {};
|
|
87
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
88
|
+
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}";
|
|
89
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
90
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
91
|
+
let body;
|
|
92
|
+
return new __HttpRequest({
|
|
93
|
+
protocol,
|
|
94
|
+
hostname,
|
|
95
|
+
port,
|
|
96
|
+
method: "GET",
|
|
97
|
+
headers,
|
|
98
|
+
path: resolvedPath,
|
|
99
|
+
body,
|
|
331
100
|
});
|
|
332
|
-
}
|
|
333
|
-
export
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
protocol: protocol,
|
|
350
|
-
hostname: hostname,
|
|
351
|
-
port: port,
|
|
352
|
-
method: "PATCH",
|
|
353
|
-
headers: headers,
|
|
354
|
-
path: resolvedPath,
|
|
355
|
-
body: body,
|
|
356
|
-
})];
|
|
357
|
-
}
|
|
101
|
+
};
|
|
102
|
+
export const serializeAws_restJson1GetSuiteRunReportCommand = async (input, context) => {
|
|
103
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
104
|
+
const headers = {};
|
|
105
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
106
|
+
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/report";
|
|
107
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
108
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
109
|
+
let body;
|
|
110
|
+
return new __HttpRequest({
|
|
111
|
+
protocol,
|
|
112
|
+
hostname,
|
|
113
|
+
port,
|
|
114
|
+
method: "GET",
|
|
115
|
+
headers,
|
|
116
|
+
path: resolvedPath,
|
|
117
|
+
body,
|
|
358
118
|
});
|
|
359
|
-
}
|
|
360
|
-
export
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
contents = map({
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
});
|
|
371
|
-
_a = __expectNonNull;
|
|
372
|
-
_b = __expectObject;
|
|
373
|
-
return [4, parseBody(output.body, context)];
|
|
374
|
-
case 1:
|
|
375
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
376
|
-
if (data.createdAt != null) {
|
|
377
|
-
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
378
|
-
}
|
|
379
|
-
if (data.suiteDefinitionArn != null) {
|
|
380
|
-
contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn);
|
|
381
|
-
}
|
|
382
|
-
if (data.suiteDefinitionId != null) {
|
|
383
|
-
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
384
|
-
}
|
|
385
|
-
if (data.suiteDefinitionName != null) {
|
|
386
|
-
contents.suiteDefinitionName = __expectString(data.suiteDefinitionName);
|
|
387
|
-
}
|
|
388
|
-
return [2, contents];
|
|
389
|
-
}
|
|
119
|
+
};
|
|
120
|
+
export const serializeAws_restJson1ListSuiteDefinitionsCommand = async (input, context) => {
|
|
121
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
+
const headers = {};
|
|
123
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions";
|
|
124
|
+
const query = map({
|
|
125
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
126
|
+
nextToken: [, input.nextToken],
|
|
390
127
|
});
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
case 1:
|
|
402
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
403
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
404
|
-
_b = errorCode;
|
|
405
|
-
switch (_b) {
|
|
406
|
-
case "InternalServerException": return [3, 2];
|
|
407
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
408
|
-
case "ValidationException": return [3, 4];
|
|
409
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 4];
|
|
410
|
-
}
|
|
411
|
-
return [3, 6];
|
|
412
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
413
|
-
case 3: throw _d.sent();
|
|
414
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
415
|
-
case 5: throw _d.sent();
|
|
416
|
-
case 6:
|
|
417
|
-
parsedBody = parsedOutput.body;
|
|
418
|
-
throwDefaultError({
|
|
419
|
-
output: output,
|
|
420
|
-
parsedBody: parsedBody,
|
|
421
|
-
exceptionCtor: __BaseException,
|
|
422
|
-
errorCode: errorCode,
|
|
423
|
-
});
|
|
424
|
-
_d.label = 7;
|
|
425
|
-
case 7: return [2];
|
|
426
|
-
}
|
|
128
|
+
let body;
|
|
129
|
+
return new __HttpRequest({
|
|
130
|
+
protocol,
|
|
131
|
+
hostname,
|
|
132
|
+
port,
|
|
133
|
+
method: "GET",
|
|
134
|
+
headers,
|
|
135
|
+
path: resolvedPath,
|
|
136
|
+
query,
|
|
137
|
+
body,
|
|
427
138
|
});
|
|
428
|
-
}
|
|
429
|
-
export
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
$metadata: deserializeMetadata(output),
|
|
439
|
-
});
|
|
440
|
-
return [4, collectBody(output.body, context)];
|
|
441
|
-
case 1:
|
|
442
|
-
_a.sent();
|
|
443
|
-
return [2, contents];
|
|
444
|
-
}
|
|
139
|
+
};
|
|
140
|
+
export const serializeAws_restJson1ListSuiteRunsCommand = async (input, context) => {
|
|
141
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
142
|
+
const headers = {};
|
|
143
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteRuns";
|
|
144
|
+
const query = map({
|
|
145
|
+
suiteDefinitionId: [, input.suiteDefinitionId],
|
|
146
|
+
suiteDefinitionVersion: [, input.suiteDefinitionVersion],
|
|
147
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
148
|
+
nextToken: [, input.nextToken],
|
|
445
149
|
});
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
case 1:
|
|
457
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
458
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
459
|
-
_b = errorCode;
|
|
460
|
-
switch (_b) {
|
|
461
|
-
case "InternalServerException": return [3, 2];
|
|
462
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
463
|
-
case "ValidationException": return [3, 4];
|
|
464
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 4];
|
|
465
|
-
}
|
|
466
|
-
return [3, 6];
|
|
467
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
468
|
-
case 3: throw _d.sent();
|
|
469
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
470
|
-
case 5: throw _d.sent();
|
|
471
|
-
case 6:
|
|
472
|
-
parsedBody = parsedOutput.body;
|
|
473
|
-
throwDefaultError({
|
|
474
|
-
output: output,
|
|
475
|
-
parsedBody: parsedBody,
|
|
476
|
-
exceptionCtor: __BaseException,
|
|
477
|
-
errorCode: errorCode,
|
|
478
|
-
});
|
|
479
|
-
_d.label = 7;
|
|
480
|
-
case 7: return [2];
|
|
481
|
-
}
|
|
150
|
+
let body;
|
|
151
|
+
return new __HttpRequest({
|
|
152
|
+
protocol,
|
|
153
|
+
hostname,
|
|
154
|
+
port,
|
|
155
|
+
method: "GET",
|
|
156
|
+
headers,
|
|
157
|
+
path: resolvedPath,
|
|
158
|
+
query,
|
|
159
|
+
body,
|
|
482
160
|
});
|
|
483
|
-
}
|
|
484
|
-
export
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
case 1:
|
|
499
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
500
|
-
if (data.endpoint != null) {
|
|
501
|
-
contents.endpoint = __expectString(data.endpoint);
|
|
502
|
-
}
|
|
503
|
-
return [2, contents];
|
|
504
|
-
}
|
|
161
|
+
};
|
|
162
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
163
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
164
|
+
const headers = {};
|
|
165
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
166
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
167
|
+
let body;
|
|
168
|
+
return new __HttpRequest({
|
|
169
|
+
protocol,
|
|
170
|
+
hostname,
|
|
171
|
+
port,
|
|
172
|
+
method: "GET",
|
|
173
|
+
headers,
|
|
174
|
+
path: resolvedPath,
|
|
175
|
+
body,
|
|
505
176
|
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
523
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
524
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException": return [3, 4];
|
|
525
|
-
case "ValidationException": return [3, 6];
|
|
526
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 6];
|
|
527
|
-
}
|
|
528
|
-
return [3, 8];
|
|
529
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
530
|
-
case 3: throw _d.sent();
|
|
531
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
532
|
-
case 5: throw _d.sent();
|
|
533
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
534
|
-
case 7: throw _d.sent();
|
|
535
|
-
case 8:
|
|
536
|
-
parsedBody = parsedOutput.body;
|
|
537
|
-
throwDefaultError({
|
|
538
|
-
output: output,
|
|
539
|
-
parsedBody: parsedBody,
|
|
540
|
-
exceptionCtor: __BaseException,
|
|
541
|
-
errorCode: errorCode,
|
|
542
|
-
});
|
|
543
|
-
_d.label = 9;
|
|
544
|
-
case 9: return [2];
|
|
545
|
-
}
|
|
177
|
+
};
|
|
178
|
+
export const serializeAws_restJson1StartSuiteRunCommand = async (input, context) => {
|
|
179
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
180
|
+
const headers = {
|
|
181
|
+
"content-type": "application/json",
|
|
182
|
+
};
|
|
183
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
184
|
+
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns";
|
|
185
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
186
|
+
let body;
|
|
187
|
+
body = JSON.stringify({
|
|
188
|
+
...(input.suiteDefinitionVersion != null && { suiteDefinitionVersion: input.suiteDefinitionVersion }),
|
|
189
|
+
...(input.suiteRunConfiguration != null && {
|
|
190
|
+
suiteRunConfiguration: serializeAws_restJson1SuiteRunConfiguration(input.suiteRunConfiguration, context),
|
|
191
|
+
}),
|
|
192
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
546
193
|
});
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}
|
|
556
|
-
contents = map({
|
|
557
|
-
$metadata: deserializeMetadata(output),
|
|
558
|
-
});
|
|
559
|
-
_a = __expectNonNull;
|
|
560
|
-
_b = __expectObject;
|
|
561
|
-
return [4, parseBody(output.body, context)];
|
|
562
|
-
case 1:
|
|
563
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
564
|
-
if (data.createdAt != null) {
|
|
565
|
-
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
566
|
-
}
|
|
567
|
-
if (data.lastModifiedAt != null) {
|
|
568
|
-
contents.lastModifiedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedAt)));
|
|
569
|
-
}
|
|
570
|
-
if (data.latestVersion != null) {
|
|
571
|
-
contents.latestVersion = __expectString(data.latestVersion);
|
|
572
|
-
}
|
|
573
|
-
if (data.suiteDefinitionArn != null) {
|
|
574
|
-
contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn);
|
|
575
|
-
}
|
|
576
|
-
if (data.suiteDefinitionConfiguration != null) {
|
|
577
|
-
contents.suiteDefinitionConfiguration = deserializeAws_restJson1SuiteDefinitionConfiguration(data.suiteDefinitionConfiguration, context);
|
|
578
|
-
}
|
|
579
|
-
if (data.suiteDefinitionId != null) {
|
|
580
|
-
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
581
|
-
}
|
|
582
|
-
if (data.suiteDefinitionVersion != null) {
|
|
583
|
-
contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion);
|
|
584
|
-
}
|
|
585
|
-
if (data.tags != null) {
|
|
586
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
587
|
-
}
|
|
588
|
-
return [2, contents];
|
|
589
|
-
}
|
|
194
|
+
return new __HttpRequest({
|
|
195
|
+
protocol,
|
|
196
|
+
hostname,
|
|
197
|
+
port,
|
|
198
|
+
method: "POST",
|
|
199
|
+
headers,
|
|
200
|
+
path: resolvedPath,
|
|
201
|
+
body,
|
|
590
202
|
});
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
609
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException": return [3, 4];
|
|
610
|
-
case "ValidationException": return [3, 6];
|
|
611
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 6];
|
|
612
|
-
}
|
|
613
|
-
return [3, 8];
|
|
614
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
615
|
-
case 3: throw _d.sent();
|
|
616
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
617
|
-
case 5: throw _d.sent();
|
|
618
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
619
|
-
case 7: throw _d.sent();
|
|
620
|
-
case 8:
|
|
621
|
-
parsedBody = parsedOutput.body;
|
|
622
|
-
throwDefaultError({
|
|
623
|
-
output: output,
|
|
624
|
-
parsedBody: parsedBody,
|
|
625
|
-
exceptionCtor: __BaseException,
|
|
626
|
-
errorCode: errorCode,
|
|
627
|
-
});
|
|
628
|
-
_d.label = 9;
|
|
629
|
-
case 9: return [2];
|
|
630
|
-
}
|
|
203
|
+
};
|
|
204
|
+
export const serializeAws_restJson1StopSuiteRunCommand = async (input, context) => {
|
|
205
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
206
|
+
const headers = {};
|
|
207
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
208
|
+
"/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/stop";
|
|
209
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
210
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteRunId", () => input.suiteRunId, "{suiteRunId}", false);
|
|
211
|
+
let body;
|
|
212
|
+
return new __HttpRequest({
|
|
213
|
+
protocol,
|
|
214
|
+
hostname,
|
|
215
|
+
port,
|
|
216
|
+
method: "POST",
|
|
217
|
+
headers,
|
|
218
|
+
path: resolvedPath,
|
|
219
|
+
body,
|
|
631
220
|
});
|
|
632
|
-
}
|
|
633
|
-
export
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
});
|
|
644
|
-
_a = __expectNonNull;
|
|
645
|
-
_b = __expectObject;
|
|
646
|
-
return [4, parseBody(output.body, context)];
|
|
647
|
-
case 1:
|
|
648
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
649
|
-
if (data.endTime != null) {
|
|
650
|
-
contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
|
|
651
|
-
}
|
|
652
|
-
if (data.errorReason != null) {
|
|
653
|
-
contents.errorReason = __expectString(data.errorReason);
|
|
654
|
-
}
|
|
655
|
-
if (data.startTime != null) {
|
|
656
|
-
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
657
|
-
}
|
|
658
|
-
if (data.status != null) {
|
|
659
|
-
contents.status = __expectString(data.status);
|
|
660
|
-
}
|
|
661
|
-
if (data.suiteDefinitionId != null) {
|
|
662
|
-
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
663
|
-
}
|
|
664
|
-
if (data.suiteDefinitionVersion != null) {
|
|
665
|
-
contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion);
|
|
666
|
-
}
|
|
667
|
-
if (data.suiteRunArn != null) {
|
|
668
|
-
contents.suiteRunArn = __expectString(data.suiteRunArn);
|
|
669
|
-
}
|
|
670
|
-
if (data.suiteRunConfiguration != null) {
|
|
671
|
-
contents.suiteRunConfiguration = deserializeAws_restJson1SuiteRunConfiguration(data.suiteRunConfiguration, context);
|
|
672
|
-
}
|
|
673
|
-
if (data.suiteRunId != null) {
|
|
674
|
-
contents.suiteRunId = __expectString(data.suiteRunId);
|
|
675
|
-
}
|
|
676
|
-
if (data.tags != null) {
|
|
677
|
-
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
678
|
-
}
|
|
679
|
-
if (data.testResult != null) {
|
|
680
|
-
contents.testResult = deserializeAws_restJson1TestResult(data.testResult, context);
|
|
681
|
-
}
|
|
682
|
-
return [2, contents];
|
|
683
|
-
}
|
|
221
|
+
};
|
|
222
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
223
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
224
|
+
const headers = {
|
|
225
|
+
"content-type": "application/json",
|
|
226
|
+
};
|
|
227
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
228
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
229
|
+
let body;
|
|
230
|
+
body = JSON.stringify({
|
|
231
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
684
232
|
});
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
_c = {};
|
|
694
|
-
return [4, parseErrorBody(output.body, context)];
|
|
695
|
-
case 1:
|
|
696
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
697
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
698
|
-
_b = errorCode;
|
|
699
|
-
switch (_b) {
|
|
700
|
-
case "InternalServerException": return [3, 2];
|
|
701
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
702
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
703
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException": return [3, 4];
|
|
704
|
-
case "ValidationException": return [3, 6];
|
|
705
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 6];
|
|
706
|
-
}
|
|
707
|
-
return [3, 8];
|
|
708
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
709
|
-
case 3: throw _d.sent();
|
|
710
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
711
|
-
case 5: throw _d.sent();
|
|
712
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
713
|
-
case 7: throw _d.sent();
|
|
714
|
-
case 8:
|
|
715
|
-
parsedBody = parsedOutput.body;
|
|
716
|
-
throwDefaultError({
|
|
717
|
-
output: output,
|
|
718
|
-
parsedBody: parsedBody,
|
|
719
|
-
exceptionCtor: __BaseException,
|
|
720
|
-
errorCode: errorCode,
|
|
721
|
-
});
|
|
722
|
-
_d.label = 9;
|
|
723
|
-
case 9: return [2];
|
|
724
|
-
}
|
|
233
|
+
return new __HttpRequest({
|
|
234
|
+
protocol,
|
|
235
|
+
hostname,
|
|
236
|
+
port,
|
|
237
|
+
method: "POST",
|
|
238
|
+
headers,
|
|
239
|
+
path: resolvedPath,
|
|
240
|
+
body,
|
|
725
241
|
});
|
|
726
|
-
}
|
|
727
|
-
export
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
contents = map({
|
|
736
|
-
$metadata: deserializeMetadata(output),
|
|
737
|
-
});
|
|
738
|
-
_a = __expectNonNull;
|
|
739
|
-
_b = __expectObject;
|
|
740
|
-
return [4, parseBody(output.body, context)];
|
|
741
|
-
case 1:
|
|
742
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
743
|
-
if (data.qualificationReportDownloadUrl != null) {
|
|
744
|
-
contents.qualificationReportDownloadUrl = __expectString(data.qualificationReportDownloadUrl);
|
|
745
|
-
}
|
|
746
|
-
return [2, contents];
|
|
747
|
-
}
|
|
242
|
+
};
|
|
243
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
244
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
245
|
+
const headers = {};
|
|
246
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
247
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
248
|
+
const query = map({
|
|
249
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
748
250
|
});
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
case 1:
|
|
760
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
761
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
762
|
-
_b = errorCode;
|
|
763
|
-
switch (_b) {
|
|
764
|
-
case "InternalServerException": return [3, 2];
|
|
765
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
766
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
767
|
-
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException": return [3, 4];
|
|
768
|
-
case "ValidationException": return [3, 6];
|
|
769
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 6];
|
|
770
|
-
}
|
|
771
|
-
return [3, 8];
|
|
772
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
773
|
-
case 3: throw _d.sent();
|
|
774
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
775
|
-
case 5: throw _d.sent();
|
|
776
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
777
|
-
case 7: throw _d.sent();
|
|
778
|
-
case 8:
|
|
779
|
-
parsedBody = parsedOutput.body;
|
|
780
|
-
throwDefaultError({
|
|
781
|
-
output: output,
|
|
782
|
-
parsedBody: parsedBody,
|
|
783
|
-
exceptionCtor: __BaseException,
|
|
784
|
-
errorCode: errorCode,
|
|
785
|
-
});
|
|
786
|
-
_d.label = 9;
|
|
787
|
-
case 9: return [2];
|
|
788
|
-
}
|
|
251
|
+
let body;
|
|
252
|
+
return new __HttpRequest({
|
|
253
|
+
protocol,
|
|
254
|
+
hostname,
|
|
255
|
+
port,
|
|
256
|
+
method: "DELETE",
|
|
257
|
+
headers,
|
|
258
|
+
path: resolvedPath,
|
|
259
|
+
query,
|
|
260
|
+
body,
|
|
789
261
|
});
|
|
790
|
-
}
|
|
791
|
-
export
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
_b = __expectObject;
|
|
804
|
-
return [4, parseBody(output.body, context)];
|
|
805
|
-
case 1:
|
|
806
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
807
|
-
if (data.nextToken != null) {
|
|
808
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
809
|
-
}
|
|
810
|
-
if (data.suiteDefinitionInformationList != null) {
|
|
811
|
-
contents.suiteDefinitionInformationList = deserializeAws_restJson1SuiteDefinitionInformationList(data.suiteDefinitionInformationList, context);
|
|
812
|
-
}
|
|
813
|
-
return [2, contents];
|
|
814
|
-
}
|
|
262
|
+
};
|
|
263
|
+
export const serializeAws_restJson1UpdateSuiteDefinitionCommand = async (input, context) => {
|
|
264
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
265
|
+
const headers = {
|
|
266
|
+
"content-type": "application/json",
|
|
267
|
+
};
|
|
268
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions/{suiteDefinitionId}";
|
|
269
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "suiteDefinitionId", () => input.suiteDefinitionId, "{suiteDefinitionId}", false);
|
|
270
|
+
let body;
|
|
271
|
+
body = JSON.stringify({
|
|
272
|
+
...(input.suiteDefinitionConfiguration != null && {
|
|
273
|
+
suiteDefinitionConfiguration: serializeAws_restJson1SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context),
|
|
274
|
+
}),
|
|
815
275
|
});
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
_c = {};
|
|
825
|
-
return [4, parseErrorBody(output.body, context)];
|
|
826
|
-
case 1:
|
|
827
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
828
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
829
|
-
_b = errorCode;
|
|
830
|
-
switch (_b) {
|
|
831
|
-
case "InternalServerException": return [3, 2];
|
|
832
|
-
case "com.amazonaws.iotdeviceadvisor#InternalServerException": return [3, 2];
|
|
833
|
-
case "ValidationException": return [3, 4];
|
|
834
|
-
case "com.amazonaws.iotdeviceadvisor#ValidationException": return [3, 4];
|
|
835
|
-
}
|
|
836
|
-
return [3, 6];
|
|
837
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
838
|
-
case 3: throw _d.sent();
|
|
839
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
840
|
-
case 5: throw _d.sent();
|
|
841
|
-
case 6:
|
|
842
|
-
parsedBody = parsedOutput.body;
|
|
843
|
-
throwDefaultError({
|
|
844
|
-
output: output,
|
|
845
|
-
parsedBody: parsedBody,
|
|
846
|
-
exceptionCtor: __BaseException,
|
|
847
|
-
errorCode: errorCode,
|
|
848
|
-
});
|
|
849
|
-
_d.label = 7;
|
|
850
|
-
case 7: return [2];
|
|
851
|
-
}
|
|
276
|
+
return new __HttpRequest({
|
|
277
|
+
protocol,
|
|
278
|
+
hostname,
|
|
279
|
+
port,
|
|
280
|
+
method: "PATCH",
|
|
281
|
+
headers,
|
|
282
|
+
path: resolvedPath,
|
|
283
|
+
body,
|
|
852
284
|
});
|
|
853
|
-
}
|
|
854
|
-
export
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
return [2, deserializeAws_restJson1ListSuiteRunsCommandError(output, context)];
|
|
861
|
-
}
|
|
862
|
-
contents = map({
|
|
863
|
-
$metadata: deserializeMetadata(output),
|
|
864
|
-
});
|
|
865
|
-
_a = __expectNonNull;
|
|
866
|
-
_b = __expectObject;
|
|
867
|
-
return [4, parseBody(output.body, context)];
|
|
868
|
-
case 1:
|
|
869
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
870
|
-
if (data.nextToken != null) {
|
|
871
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
872
|
-
}
|
|
873
|
-
if (data.suiteRunsList != null) {
|
|
874
|
-
contents.suiteRunsList = deserializeAws_restJson1SuiteRunsList(data.suiteRunsList, context);
|
|
875
|
-
}
|
|
876
|
-
return [2, contents];
|
|
877
|
-
}
|
|
285
|
+
};
|
|
286
|
+
export const deserializeAws_restJson1CreateSuiteDefinitionCommand = async (output, context) => {
|
|
287
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
288
|
+
return deserializeAws_restJson1CreateSuiteDefinitionCommandError(output, context);
|
|
289
|
+
}
|
|
290
|
+
const contents = map({
|
|
291
|
+
$metadata: deserializeMetadata(output),
|
|
878
292
|
});
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
293
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
294
|
+
if (data.createdAt != null) {
|
|
295
|
+
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
296
|
+
}
|
|
297
|
+
if (data.suiteDefinitionArn != null) {
|
|
298
|
+
contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn);
|
|
299
|
+
}
|
|
300
|
+
if (data.suiteDefinitionId != null) {
|
|
301
|
+
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
302
|
+
}
|
|
303
|
+
if (data.suiteDefinitionName != null) {
|
|
304
|
+
contents.suiteDefinitionName = __expectString(data.suiteDefinitionName);
|
|
305
|
+
}
|
|
306
|
+
return contents;
|
|
307
|
+
};
|
|
308
|
+
const deserializeAws_restJson1CreateSuiteDefinitionCommandError = async (output, context) => {
|
|
309
|
+
const parsedOutput = {
|
|
310
|
+
...output,
|
|
311
|
+
body: await parseErrorBody(output.body, context),
|
|
312
|
+
};
|
|
313
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
314
|
+
switch (errorCode) {
|
|
315
|
+
case "InternalServerException":
|
|
316
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
317
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
318
|
+
case "ValidationException":
|
|
319
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
320
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
321
|
+
default:
|
|
322
|
+
const parsedBody = parsedOutput.body;
|
|
323
|
+
throwDefaultError({
|
|
324
|
+
output,
|
|
325
|
+
parsedBody,
|
|
326
|
+
exceptionCtor: __BaseException,
|
|
327
|
+
errorCode,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
export const deserializeAws_restJson1DeleteSuiteDefinitionCommand = async (output, context) => {
|
|
332
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
333
|
+
return deserializeAws_restJson1DeleteSuiteDefinitionCommandError(output, context);
|
|
334
|
+
}
|
|
335
|
+
const contents = map({
|
|
336
|
+
$metadata: deserializeMetadata(output),
|
|
915
337
|
});
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
338
|
+
await collectBody(output.body, context);
|
|
339
|
+
return contents;
|
|
340
|
+
};
|
|
341
|
+
const deserializeAws_restJson1DeleteSuiteDefinitionCommandError = async (output, context) => {
|
|
342
|
+
const parsedOutput = {
|
|
343
|
+
...output,
|
|
344
|
+
body: await parseErrorBody(output.body, context),
|
|
345
|
+
};
|
|
346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
347
|
+
switch (errorCode) {
|
|
348
|
+
case "InternalServerException":
|
|
349
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
350
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
351
|
+
case "ValidationException":
|
|
352
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
353
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
354
|
+
default:
|
|
355
|
+
const parsedBody = parsedOutput.body;
|
|
356
|
+
throwDefaultError({
|
|
357
|
+
output,
|
|
358
|
+
parsedBody,
|
|
359
|
+
exceptionCtor: __BaseException,
|
|
360
|
+
errorCode,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
export const deserializeAws_restJson1GetEndpointCommand = async (output, context) => {
|
|
365
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
366
|
+
return deserializeAws_restJson1GetEndpointCommandError(output, context);
|
|
367
|
+
}
|
|
368
|
+
const contents = map({
|
|
369
|
+
$metadata: deserializeMetadata(output),
|
|
938
370
|
});
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
return
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
case 9: return [2];
|
|
978
|
-
}
|
|
371
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
372
|
+
if (data.endpoint != null) {
|
|
373
|
+
contents.endpoint = __expectString(data.endpoint);
|
|
374
|
+
}
|
|
375
|
+
return contents;
|
|
376
|
+
};
|
|
377
|
+
const deserializeAws_restJson1GetEndpointCommandError = async (output, context) => {
|
|
378
|
+
const parsedOutput = {
|
|
379
|
+
...output,
|
|
380
|
+
body: await parseErrorBody(output.body, context),
|
|
381
|
+
};
|
|
382
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
383
|
+
switch (errorCode) {
|
|
384
|
+
case "InternalServerException":
|
|
385
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
386
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
387
|
+
case "ResourceNotFoundException":
|
|
388
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
389
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
390
|
+
case "ValidationException":
|
|
391
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
392
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
393
|
+
default:
|
|
394
|
+
const parsedBody = parsedOutput.body;
|
|
395
|
+
throwDefaultError({
|
|
396
|
+
output,
|
|
397
|
+
parsedBody,
|
|
398
|
+
exceptionCtor: __BaseException,
|
|
399
|
+
errorCode,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
export const deserializeAws_restJson1GetSuiteDefinitionCommand = async (output, context) => {
|
|
404
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
+
return deserializeAws_restJson1GetSuiteDefinitionCommandError(output, context);
|
|
406
|
+
}
|
|
407
|
+
const contents = map({
|
|
408
|
+
$metadata: deserializeMetadata(output),
|
|
979
409
|
});
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
410
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
411
|
+
if (data.createdAt != null) {
|
|
412
|
+
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
413
|
+
}
|
|
414
|
+
if (data.lastModifiedAt != null) {
|
|
415
|
+
contents.lastModifiedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedAt)));
|
|
416
|
+
}
|
|
417
|
+
if (data.latestVersion != null) {
|
|
418
|
+
contents.latestVersion = __expectString(data.latestVersion);
|
|
419
|
+
}
|
|
420
|
+
if (data.suiteDefinitionArn != null) {
|
|
421
|
+
contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn);
|
|
422
|
+
}
|
|
423
|
+
if (data.suiteDefinitionConfiguration != null) {
|
|
424
|
+
contents.suiteDefinitionConfiguration = deserializeAws_restJson1SuiteDefinitionConfiguration(data.suiteDefinitionConfiguration, context);
|
|
425
|
+
}
|
|
426
|
+
if (data.suiteDefinitionId != null) {
|
|
427
|
+
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
428
|
+
}
|
|
429
|
+
if (data.suiteDefinitionVersion != null) {
|
|
430
|
+
contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion);
|
|
431
|
+
}
|
|
432
|
+
if (data.tags != null) {
|
|
433
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
434
|
+
}
|
|
435
|
+
return contents;
|
|
436
|
+
};
|
|
437
|
+
const deserializeAws_restJson1GetSuiteDefinitionCommandError = async (output, context) => {
|
|
438
|
+
const parsedOutput = {
|
|
439
|
+
...output,
|
|
440
|
+
body: await parseErrorBody(output.body, context),
|
|
441
|
+
};
|
|
442
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
443
|
+
switch (errorCode) {
|
|
444
|
+
case "InternalServerException":
|
|
445
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
446
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
447
|
+
case "ResourceNotFoundException":
|
|
448
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
449
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
450
|
+
case "ValidationException":
|
|
451
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
452
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
453
|
+
default:
|
|
454
|
+
const parsedBody = parsedOutput.body;
|
|
455
|
+
throwDefaultError({
|
|
456
|
+
output,
|
|
457
|
+
parsedBody,
|
|
458
|
+
exceptionCtor: __BaseException,
|
|
459
|
+
errorCode,
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
export const deserializeAws_restJson1GetSuiteRunCommand = async (output, context) => {
|
|
464
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
465
|
+
return deserializeAws_restJson1GetSuiteRunCommandError(output, context);
|
|
466
|
+
}
|
|
467
|
+
const contents = map({
|
|
468
|
+
$metadata: deserializeMetadata(output),
|
|
1008
469
|
});
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
470
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
471
|
+
if (data.endTime != null) {
|
|
472
|
+
contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
|
|
473
|
+
}
|
|
474
|
+
if (data.errorReason != null) {
|
|
475
|
+
contents.errorReason = __expectString(data.errorReason);
|
|
476
|
+
}
|
|
477
|
+
if (data.startTime != null) {
|
|
478
|
+
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
479
|
+
}
|
|
480
|
+
if (data.status != null) {
|
|
481
|
+
contents.status = __expectString(data.status);
|
|
482
|
+
}
|
|
483
|
+
if (data.suiteDefinitionId != null) {
|
|
484
|
+
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
485
|
+
}
|
|
486
|
+
if (data.suiteDefinitionVersion != null) {
|
|
487
|
+
contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion);
|
|
488
|
+
}
|
|
489
|
+
if (data.suiteRunArn != null) {
|
|
490
|
+
contents.suiteRunArn = __expectString(data.suiteRunArn);
|
|
491
|
+
}
|
|
492
|
+
if (data.suiteRunConfiguration != null) {
|
|
493
|
+
contents.suiteRunConfiguration = deserializeAws_restJson1SuiteRunConfiguration(data.suiteRunConfiguration, context);
|
|
494
|
+
}
|
|
495
|
+
if (data.suiteRunId != null) {
|
|
496
|
+
contents.suiteRunId = __expectString(data.suiteRunId);
|
|
497
|
+
}
|
|
498
|
+
if (data.tags != null) {
|
|
499
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
500
|
+
}
|
|
501
|
+
if (data.testResult != null) {
|
|
502
|
+
contents.testResult = deserializeAws_restJson1TestResult(data.testResult, context);
|
|
503
|
+
}
|
|
504
|
+
return contents;
|
|
505
|
+
};
|
|
506
|
+
const deserializeAws_restJson1GetSuiteRunCommandError = async (output, context) => {
|
|
507
|
+
const parsedOutput = {
|
|
508
|
+
...output,
|
|
509
|
+
body: await parseErrorBody(output.body, context),
|
|
510
|
+
};
|
|
511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
512
|
+
switch (errorCode) {
|
|
513
|
+
case "InternalServerException":
|
|
514
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
515
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
516
|
+
case "ResourceNotFoundException":
|
|
517
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
518
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
519
|
+
case "ValidationException":
|
|
520
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
521
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
522
|
+
default:
|
|
523
|
+
const parsedBody = parsedOutput.body;
|
|
524
|
+
throwDefaultError({
|
|
525
|
+
output,
|
|
526
|
+
parsedBody,
|
|
527
|
+
exceptionCtor: __BaseException,
|
|
528
|
+
errorCode,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
export const deserializeAws_restJson1GetSuiteRunReportCommand = async (output, context) => {
|
|
533
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
534
|
+
return deserializeAws_restJson1GetSuiteRunReportCommandError(output, context);
|
|
535
|
+
}
|
|
536
|
+
const contents = map({
|
|
537
|
+
$metadata: deserializeMetadata(output),
|
|
1049
538
|
});
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
539
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
540
|
+
if (data.qualificationReportDownloadUrl != null) {
|
|
541
|
+
contents.qualificationReportDownloadUrl = __expectString(data.qualificationReportDownloadUrl);
|
|
542
|
+
}
|
|
543
|
+
return contents;
|
|
544
|
+
};
|
|
545
|
+
const deserializeAws_restJson1GetSuiteRunReportCommandError = async (output, context) => {
|
|
546
|
+
const parsedOutput = {
|
|
547
|
+
...output,
|
|
548
|
+
body: await parseErrorBody(output.body, context),
|
|
549
|
+
};
|
|
550
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
551
|
+
switch (errorCode) {
|
|
552
|
+
case "InternalServerException":
|
|
553
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
554
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
555
|
+
case "ResourceNotFoundException":
|
|
556
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
557
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
558
|
+
case "ValidationException":
|
|
559
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
560
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
561
|
+
default:
|
|
562
|
+
const parsedBody = parsedOutput.body;
|
|
563
|
+
throwDefaultError({
|
|
564
|
+
output,
|
|
565
|
+
parsedBody,
|
|
566
|
+
exceptionCtor: __BaseException,
|
|
567
|
+
errorCode,
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
export const deserializeAws_restJson1ListSuiteDefinitionsCommand = async (output, context) => {
|
|
572
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
573
|
+
return deserializeAws_restJson1ListSuiteDefinitionsCommandError(output, context);
|
|
574
|
+
}
|
|
575
|
+
const contents = map({
|
|
576
|
+
$metadata: deserializeMetadata(output),
|
|
1067
577
|
});
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
case 9: return [2];
|
|
1107
|
-
}
|
|
578
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
579
|
+
if (data.nextToken != null) {
|
|
580
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
581
|
+
}
|
|
582
|
+
if (data.suiteDefinitionInformationList != null) {
|
|
583
|
+
contents.suiteDefinitionInformationList = deserializeAws_restJson1SuiteDefinitionInformationList(data.suiteDefinitionInformationList, context);
|
|
584
|
+
}
|
|
585
|
+
return contents;
|
|
586
|
+
};
|
|
587
|
+
const deserializeAws_restJson1ListSuiteDefinitionsCommandError = async (output, context) => {
|
|
588
|
+
const parsedOutput = {
|
|
589
|
+
...output,
|
|
590
|
+
body: await parseErrorBody(output.body, context),
|
|
591
|
+
};
|
|
592
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
593
|
+
switch (errorCode) {
|
|
594
|
+
case "InternalServerException":
|
|
595
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
596
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
597
|
+
case "ValidationException":
|
|
598
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
599
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
600
|
+
default:
|
|
601
|
+
const parsedBody = parsedOutput.body;
|
|
602
|
+
throwDefaultError({
|
|
603
|
+
output,
|
|
604
|
+
parsedBody,
|
|
605
|
+
exceptionCtor: __BaseException,
|
|
606
|
+
errorCode,
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
export const deserializeAws_restJson1ListSuiteRunsCommand = async (output, context) => {
|
|
611
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
612
|
+
return deserializeAws_restJson1ListSuiteRunsCommandError(output, context);
|
|
613
|
+
}
|
|
614
|
+
const contents = map({
|
|
615
|
+
$metadata: deserializeMetadata(output),
|
|
1108
616
|
});
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
617
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
618
|
+
if (data.nextToken != null) {
|
|
619
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
620
|
+
}
|
|
621
|
+
if (data.suiteRunsList != null) {
|
|
622
|
+
contents.suiteRunsList = deserializeAws_restJson1SuiteRunsList(data.suiteRunsList, context);
|
|
623
|
+
}
|
|
624
|
+
return contents;
|
|
625
|
+
};
|
|
626
|
+
const deserializeAws_restJson1ListSuiteRunsCommandError = async (output, context) => {
|
|
627
|
+
const parsedOutput = {
|
|
628
|
+
...output,
|
|
629
|
+
body: await parseErrorBody(output.body, context),
|
|
630
|
+
};
|
|
631
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
632
|
+
switch (errorCode) {
|
|
633
|
+
case "InternalServerException":
|
|
634
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
635
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
636
|
+
case "ValidationException":
|
|
637
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
638
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
639
|
+
default:
|
|
640
|
+
const parsedBody = parsedOutput.body;
|
|
641
|
+
throwDefaultError({
|
|
642
|
+
output,
|
|
643
|
+
parsedBody,
|
|
644
|
+
exceptionCtor: __BaseException,
|
|
645
|
+
errorCode,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
650
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
651
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
652
|
+
}
|
|
653
|
+
const contents = map({
|
|
654
|
+
$metadata: deserializeMetadata(output),
|
|
1126
655
|
});
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
return
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
case 9: return [2];
|
|
1166
|
-
}
|
|
656
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
657
|
+
if (data.tags != null) {
|
|
658
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
659
|
+
}
|
|
660
|
+
return contents;
|
|
661
|
+
};
|
|
662
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
663
|
+
const parsedOutput = {
|
|
664
|
+
...output,
|
|
665
|
+
body: await parseErrorBody(output.body, context),
|
|
666
|
+
};
|
|
667
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
668
|
+
switch (errorCode) {
|
|
669
|
+
case "InternalServerException":
|
|
670
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
671
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
672
|
+
case "ResourceNotFoundException":
|
|
673
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
674
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
675
|
+
case "ValidationException":
|
|
676
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
677
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
678
|
+
default:
|
|
679
|
+
const parsedBody = parsedOutput.body;
|
|
680
|
+
throwDefaultError({
|
|
681
|
+
output,
|
|
682
|
+
parsedBody,
|
|
683
|
+
exceptionCtor: __BaseException,
|
|
684
|
+
errorCode,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
export const deserializeAws_restJson1StartSuiteRunCommand = async (output, context) => {
|
|
689
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
+
return deserializeAws_restJson1StartSuiteRunCommandError(output, context);
|
|
691
|
+
}
|
|
692
|
+
const contents = map({
|
|
693
|
+
$metadata: deserializeMetadata(output),
|
|
1167
694
|
});
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
695
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
696
|
+
if (data.createdAt != null) {
|
|
697
|
+
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
698
|
+
}
|
|
699
|
+
if (data.suiteRunArn != null) {
|
|
700
|
+
contents.suiteRunArn = __expectString(data.suiteRunArn);
|
|
701
|
+
}
|
|
702
|
+
if (data.suiteRunId != null) {
|
|
703
|
+
contents.suiteRunId = __expectString(data.suiteRunId);
|
|
704
|
+
}
|
|
705
|
+
return contents;
|
|
706
|
+
};
|
|
707
|
+
const deserializeAws_restJson1StartSuiteRunCommandError = async (output, context) => {
|
|
708
|
+
const parsedOutput = {
|
|
709
|
+
...output,
|
|
710
|
+
body: await parseErrorBody(output.body, context),
|
|
711
|
+
};
|
|
712
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
713
|
+
switch (errorCode) {
|
|
714
|
+
case "ConflictException":
|
|
715
|
+
case "com.amazonaws.iotdeviceadvisor#ConflictException":
|
|
716
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
717
|
+
case "InternalServerException":
|
|
718
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
719
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
720
|
+
case "ValidationException":
|
|
721
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
722
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
723
|
+
default:
|
|
724
|
+
const parsedBody = parsedOutput.body;
|
|
725
|
+
throwDefaultError({
|
|
726
|
+
output,
|
|
727
|
+
parsedBody,
|
|
728
|
+
exceptionCtor: __BaseException,
|
|
729
|
+
errorCode,
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
export const deserializeAws_restJson1StopSuiteRunCommand = async (output, context) => {
|
|
734
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
735
|
+
return deserializeAws_restJson1StopSuiteRunCommandError(output, context);
|
|
736
|
+
}
|
|
737
|
+
const contents = map({
|
|
738
|
+
$metadata: deserializeMetadata(output),
|
|
1185
739
|
});
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
errorCode: errorCode,
|
|
1222
|
-
});
|
|
1223
|
-
_d.label = 9;
|
|
1224
|
-
case 9: return [2];
|
|
1225
|
-
}
|
|
740
|
+
await collectBody(output.body, context);
|
|
741
|
+
return contents;
|
|
742
|
+
};
|
|
743
|
+
const deserializeAws_restJson1StopSuiteRunCommandError = async (output, context) => {
|
|
744
|
+
const parsedOutput = {
|
|
745
|
+
...output,
|
|
746
|
+
body: await parseErrorBody(output.body, context),
|
|
747
|
+
};
|
|
748
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
749
|
+
switch (errorCode) {
|
|
750
|
+
case "InternalServerException":
|
|
751
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
752
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
753
|
+
case "ResourceNotFoundException":
|
|
754
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
755
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
756
|
+
case "ValidationException":
|
|
757
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
758
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
759
|
+
default:
|
|
760
|
+
const parsedBody = parsedOutput.body;
|
|
761
|
+
throwDefaultError({
|
|
762
|
+
output,
|
|
763
|
+
parsedBody,
|
|
764
|
+
exceptionCtor: __BaseException,
|
|
765
|
+
errorCode,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
770
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
771
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
772
|
+
}
|
|
773
|
+
const contents = map({
|
|
774
|
+
$metadata: deserializeMetadata(output),
|
|
1226
775
|
});
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
return [2, contents];
|
|
1263
|
-
}
|
|
776
|
+
await collectBody(output.body, context);
|
|
777
|
+
return contents;
|
|
778
|
+
};
|
|
779
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
780
|
+
const parsedOutput = {
|
|
781
|
+
...output,
|
|
782
|
+
body: await parseErrorBody(output.body, context),
|
|
783
|
+
};
|
|
784
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
785
|
+
switch (errorCode) {
|
|
786
|
+
case "InternalServerException":
|
|
787
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
788
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
789
|
+
case "ResourceNotFoundException":
|
|
790
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
791
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
792
|
+
case "ValidationException":
|
|
793
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
794
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
795
|
+
default:
|
|
796
|
+
const parsedBody = parsedOutput.body;
|
|
797
|
+
throwDefaultError({
|
|
798
|
+
output,
|
|
799
|
+
parsedBody,
|
|
800
|
+
exceptionCtor: __BaseException,
|
|
801
|
+
errorCode,
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
806
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
807
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
808
|
+
}
|
|
809
|
+
const contents = map({
|
|
810
|
+
$metadata: deserializeMetadata(output),
|
|
1264
811
|
});
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
}
|
|
812
|
+
await collectBody(output.body, context);
|
|
813
|
+
return contents;
|
|
814
|
+
};
|
|
815
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
816
|
+
const parsedOutput = {
|
|
817
|
+
...output,
|
|
818
|
+
body: await parseErrorBody(output.body, context),
|
|
819
|
+
};
|
|
820
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
821
|
+
switch (errorCode) {
|
|
822
|
+
case "InternalServerException":
|
|
823
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
824
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
825
|
+
case "ResourceNotFoundException":
|
|
826
|
+
case "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException":
|
|
827
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
828
|
+
case "ValidationException":
|
|
829
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
830
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
831
|
+
default:
|
|
832
|
+
const parsedBody = parsedOutput.body;
|
|
833
|
+
throwDefaultError({
|
|
834
|
+
output,
|
|
835
|
+
parsedBody,
|
|
836
|
+
exceptionCtor: __BaseException,
|
|
837
|
+
errorCode,
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
export const deserializeAws_restJson1UpdateSuiteDefinitionCommand = async (output, context) => {
|
|
842
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
843
|
+
return deserializeAws_restJson1UpdateSuiteDefinitionCommandError(output, context);
|
|
844
|
+
}
|
|
845
|
+
const contents = map({
|
|
846
|
+
$metadata: deserializeMetadata(output),
|
|
1301
847
|
});
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
contents =
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
848
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
849
|
+
if (data.createdAt != null) {
|
|
850
|
+
contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt)));
|
|
851
|
+
}
|
|
852
|
+
if (data.lastUpdatedAt != null) {
|
|
853
|
+
contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt)));
|
|
854
|
+
}
|
|
855
|
+
if (data.suiteDefinitionArn != null) {
|
|
856
|
+
contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn);
|
|
857
|
+
}
|
|
858
|
+
if (data.suiteDefinitionId != null) {
|
|
859
|
+
contents.suiteDefinitionId = __expectString(data.suiteDefinitionId);
|
|
860
|
+
}
|
|
861
|
+
if (data.suiteDefinitionName != null) {
|
|
862
|
+
contents.suiteDefinitionName = __expectString(data.suiteDefinitionName);
|
|
863
|
+
}
|
|
864
|
+
if (data.suiteDefinitionVersion != null) {
|
|
865
|
+
contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion);
|
|
866
|
+
}
|
|
867
|
+
return contents;
|
|
868
|
+
};
|
|
869
|
+
const deserializeAws_restJson1UpdateSuiteDefinitionCommandError = async (output, context) => {
|
|
870
|
+
const parsedOutput = {
|
|
871
|
+
...output,
|
|
872
|
+
body: await parseErrorBody(output.body, context),
|
|
873
|
+
};
|
|
874
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
875
|
+
switch (errorCode) {
|
|
876
|
+
case "InternalServerException":
|
|
877
|
+
case "com.amazonaws.iotdeviceadvisor#InternalServerException":
|
|
878
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
879
|
+
case "ValidationException":
|
|
880
|
+
case "com.amazonaws.iotdeviceadvisor#ValidationException":
|
|
881
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
882
|
+
default:
|
|
883
|
+
const parsedBody = parsedOutput.body;
|
|
884
|
+
throwDefaultError({
|
|
885
|
+
output,
|
|
886
|
+
parsedBody,
|
|
887
|
+
exceptionCtor: __BaseException,
|
|
888
|
+
errorCode,
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
const map = __map;
|
|
893
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
894
|
+
const contents = map({});
|
|
895
|
+
const data = parsedOutput.body;
|
|
896
|
+
if (data.message != null) {
|
|
897
|
+
contents.message = __expectString(data.message);
|
|
898
|
+
}
|
|
899
|
+
const exception = new ConflictException({
|
|
900
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
901
|
+
...contents,
|
|
1314
902
|
});
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
903
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
904
|
+
};
|
|
905
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
906
|
+
const contents = map({});
|
|
907
|
+
const data = parsedOutput.body;
|
|
908
|
+
if (data.message != null) {
|
|
909
|
+
contents.message = __expectString(data.message);
|
|
910
|
+
}
|
|
911
|
+
const exception = new InternalServerException({
|
|
912
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
913
|
+
...contents,
|
|
1326
914
|
});
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
915
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
916
|
+
};
|
|
917
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
918
|
+
const contents = map({});
|
|
919
|
+
const data = parsedOutput.body;
|
|
920
|
+
if (data.message != null) {
|
|
921
|
+
contents.message = __expectString(data.message);
|
|
922
|
+
}
|
|
923
|
+
const exception = new ResourceNotFoundException({
|
|
924
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
925
|
+
...contents,
|
|
1338
926
|
});
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
927
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
928
|
+
};
|
|
929
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
930
|
+
const contents = map({});
|
|
931
|
+
const data = parsedOutput.body;
|
|
932
|
+
if (data.message != null) {
|
|
933
|
+
contents.message = __expectString(data.message);
|
|
934
|
+
}
|
|
935
|
+
const exception = new ValidationException({
|
|
936
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
937
|
+
...contents,
|
|
1350
938
|
});
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
939
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
940
|
+
};
|
|
941
|
+
const serializeAws_restJson1DeviceUnderTest = (input, context) => {
|
|
942
|
+
return {
|
|
943
|
+
...(input.certificateArn != null && { certificateArn: input.certificateArn }),
|
|
944
|
+
...(input.thingArn != null && { thingArn: input.thingArn }),
|
|
945
|
+
};
|
|
1354
946
|
};
|
|
1355
|
-
|
|
947
|
+
const serializeAws_restJson1DeviceUnderTestList = (input, context) => {
|
|
1356
948
|
return input
|
|
1357
|
-
.filter(
|
|
1358
|
-
.map(
|
|
949
|
+
.filter((e) => e != null)
|
|
950
|
+
.map((entry) => {
|
|
1359
951
|
return serializeAws_restJson1DeviceUnderTest(entry, context);
|
|
1360
952
|
});
|
|
1361
953
|
};
|
|
1362
|
-
|
|
954
|
+
const serializeAws_restJson1SelectedTestList = (input, context) => {
|
|
1363
955
|
return input
|
|
1364
|
-
.filter(
|
|
1365
|
-
.map(
|
|
956
|
+
.filter((e) => e != null)
|
|
957
|
+
.map((entry) => {
|
|
1366
958
|
return entry;
|
|
1367
959
|
});
|
|
1368
960
|
};
|
|
1369
|
-
|
|
1370
|
-
return
|
|
961
|
+
const serializeAws_restJson1SuiteDefinitionConfiguration = (input, context) => {
|
|
962
|
+
return {
|
|
963
|
+
...(input.devicePermissionRoleArn != null && { devicePermissionRoleArn: input.devicePermissionRoleArn }),
|
|
964
|
+
...(input.devices != null && { devices: serializeAws_restJson1DeviceUnderTestList(input.devices, context) }),
|
|
965
|
+
...(input.intendedForQualification != null && { intendedForQualification: input.intendedForQualification }),
|
|
966
|
+
...(input.isLongDurationTest != null && { isLongDurationTest: input.isLongDurationTest }),
|
|
967
|
+
...(input.protocol != null && { protocol: input.protocol }),
|
|
968
|
+
...(input.rootGroup != null && { rootGroup: input.rootGroup }),
|
|
969
|
+
...(input.suiteDefinitionName != null && { suiteDefinitionName: input.suiteDefinitionName }),
|
|
970
|
+
};
|
|
1371
971
|
};
|
|
1372
|
-
|
|
1373
|
-
return
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
972
|
+
const serializeAws_restJson1SuiteRunConfiguration = (input, context) => {
|
|
973
|
+
return {
|
|
974
|
+
...(input.parallelRun != null && { parallelRun: input.parallelRun }),
|
|
975
|
+
...(input.primaryDevice != null && {
|
|
976
|
+
primaryDevice: serializeAws_restJson1DeviceUnderTest(input.primaryDevice, context),
|
|
977
|
+
}),
|
|
978
|
+
...(input.selectedTestList != null && {
|
|
979
|
+
selectedTestList: serializeAws_restJson1SelectedTestList(input.selectedTestList, context),
|
|
980
|
+
}),
|
|
981
|
+
};
|
|
1378
982
|
};
|
|
1379
|
-
|
|
1380
|
-
return Object.entries(input).reduce(
|
|
1381
|
-
var _b;
|
|
1382
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
983
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
984
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1383
985
|
if (value === null) {
|
|
1384
986
|
return acc;
|
|
1385
987
|
}
|
|
1386
|
-
return
|
|
988
|
+
return {
|
|
989
|
+
...acc,
|
|
990
|
+
[key]: value,
|
|
991
|
+
};
|
|
1387
992
|
}, {});
|
|
1388
993
|
};
|
|
1389
|
-
|
|
994
|
+
const deserializeAws_restJson1DeviceUnderTest = (output, context) => {
|
|
1390
995
|
return {
|
|
1391
996
|
certificateArn: __expectString(output.certificateArn),
|
|
1392
997
|
thingArn: __expectString(output.thingArn),
|
|
1393
998
|
};
|
|
1394
999
|
};
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
.filter(
|
|
1398
|
-
.map(
|
|
1000
|
+
const deserializeAws_restJson1DeviceUnderTestList = (output, context) => {
|
|
1001
|
+
const retVal = (output || [])
|
|
1002
|
+
.filter((e) => e != null)
|
|
1003
|
+
.map((entry) => {
|
|
1399
1004
|
if (entry === null) {
|
|
1400
1005
|
return null;
|
|
1401
1006
|
}
|
|
@@ -1403,17 +1008,17 @@ var deserializeAws_restJson1DeviceUnderTestList = function (output, context) {
|
|
|
1403
1008
|
});
|
|
1404
1009
|
return retVal;
|
|
1405
1010
|
};
|
|
1406
|
-
|
|
1011
|
+
const deserializeAws_restJson1GroupResult = (output, context) => {
|
|
1407
1012
|
return {
|
|
1408
1013
|
groupId: __expectString(output.groupId),
|
|
1409
1014
|
groupName: __expectString(output.groupName),
|
|
1410
1015
|
tests: output.tests != null ? deserializeAws_restJson1TestCaseRuns(output.tests, context) : undefined,
|
|
1411
1016
|
};
|
|
1412
1017
|
};
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
.filter(
|
|
1416
|
-
.map(
|
|
1018
|
+
const deserializeAws_restJson1GroupResultList = (output, context) => {
|
|
1019
|
+
const retVal = (output || [])
|
|
1020
|
+
.filter((e) => e != null)
|
|
1021
|
+
.map((entry) => {
|
|
1417
1022
|
if (entry === null) {
|
|
1418
1023
|
return null;
|
|
1419
1024
|
}
|
|
@@ -1421,10 +1026,10 @@ var deserializeAws_restJson1GroupResultList = function (output, context) {
|
|
|
1421
1026
|
});
|
|
1422
1027
|
return retVal;
|
|
1423
1028
|
};
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
.filter(
|
|
1427
|
-
.map(
|
|
1029
|
+
const deserializeAws_restJson1SelectedTestList = (output, context) => {
|
|
1030
|
+
const retVal = (output || [])
|
|
1031
|
+
.filter((e) => e != null)
|
|
1032
|
+
.map((entry) => {
|
|
1428
1033
|
if (entry === null) {
|
|
1429
1034
|
return null;
|
|
1430
1035
|
}
|
|
@@ -1432,7 +1037,7 @@ var deserializeAws_restJson1SelectedTestList = function (output, context) {
|
|
|
1432
1037
|
});
|
|
1433
1038
|
return retVal;
|
|
1434
1039
|
};
|
|
1435
|
-
|
|
1040
|
+
const deserializeAws_restJson1SuiteDefinitionConfiguration = (output, context) => {
|
|
1436
1041
|
return {
|
|
1437
1042
|
devicePermissionRoleArn: __expectString(output.devicePermissionRoleArn),
|
|
1438
1043
|
devices: output.devices != null ? deserializeAws_restJson1DeviceUnderTestList(output.devices, context) : undefined,
|
|
@@ -1443,7 +1048,7 @@ var deserializeAws_restJson1SuiteDefinitionConfiguration = function (output, con
|
|
|
1443
1048
|
suiteDefinitionName: __expectString(output.suiteDefinitionName),
|
|
1444
1049
|
};
|
|
1445
1050
|
};
|
|
1446
|
-
|
|
1051
|
+
const deserializeAws_restJson1SuiteDefinitionInformation = (output, context) => {
|
|
1447
1052
|
return {
|
|
1448
1053
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
1449
1054
|
defaultDevices: output.defaultDevices != null
|
|
@@ -1456,10 +1061,10 @@ var deserializeAws_restJson1SuiteDefinitionInformation = function (output, conte
|
|
|
1456
1061
|
suiteDefinitionName: __expectString(output.suiteDefinitionName),
|
|
1457
1062
|
};
|
|
1458
1063
|
};
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
.filter(
|
|
1462
|
-
.map(
|
|
1064
|
+
const deserializeAws_restJson1SuiteDefinitionInformationList = (output, context) => {
|
|
1065
|
+
const retVal = (output || [])
|
|
1066
|
+
.filter((e) => e != null)
|
|
1067
|
+
.map((entry) => {
|
|
1463
1068
|
if (entry === null) {
|
|
1464
1069
|
return null;
|
|
1465
1070
|
}
|
|
@@ -1467,7 +1072,7 @@ var deserializeAws_restJson1SuiteDefinitionInformationList = function (output, c
|
|
|
1467
1072
|
});
|
|
1468
1073
|
return retVal;
|
|
1469
1074
|
};
|
|
1470
|
-
|
|
1075
|
+
const deserializeAws_restJson1SuiteRunConfiguration = (output, context) => {
|
|
1471
1076
|
return {
|
|
1472
1077
|
parallelRun: __expectBoolean(output.parallelRun),
|
|
1473
1078
|
primaryDevice: output.primaryDevice != null ? deserializeAws_restJson1DeviceUnderTest(output.primaryDevice, context) : undefined,
|
|
@@ -1476,7 +1081,7 @@ var deserializeAws_restJson1SuiteRunConfiguration = function (output, context) {
|
|
|
1476
1081
|
: undefined,
|
|
1477
1082
|
};
|
|
1478
1083
|
};
|
|
1479
|
-
|
|
1084
|
+
const deserializeAws_restJson1SuiteRunInformation = (output, context) => {
|
|
1480
1085
|
return {
|
|
1481
1086
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
1482
1087
|
endAt: output.endAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endAt))) : undefined,
|
|
@@ -1490,10 +1095,10 @@ var deserializeAws_restJson1SuiteRunInformation = function (output, context) {
|
|
|
1490
1095
|
suiteRunId: __expectString(output.suiteRunId),
|
|
1491
1096
|
};
|
|
1492
1097
|
};
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
.filter(
|
|
1496
|
-
.map(
|
|
1098
|
+
const deserializeAws_restJson1SuiteRunsList = (output, context) => {
|
|
1099
|
+
const retVal = (output || [])
|
|
1100
|
+
.filter((e) => e != null)
|
|
1101
|
+
.map((entry) => {
|
|
1497
1102
|
if (entry === null) {
|
|
1498
1103
|
return null;
|
|
1499
1104
|
}
|
|
@@ -1501,17 +1106,18 @@ var deserializeAws_restJson1SuiteRunsList = function (output, context) {
|
|
|
1501
1106
|
});
|
|
1502
1107
|
return retVal;
|
|
1503
1108
|
};
|
|
1504
|
-
|
|
1505
|
-
return Object.entries(output).reduce(
|
|
1506
|
-
var _b;
|
|
1507
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1109
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1110
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1508
1111
|
if (value === null) {
|
|
1509
1112
|
return acc;
|
|
1510
1113
|
}
|
|
1511
|
-
return
|
|
1114
|
+
return {
|
|
1115
|
+
...acc,
|
|
1116
|
+
[key]: __expectString(value),
|
|
1117
|
+
};
|
|
1512
1118
|
}, {});
|
|
1513
1119
|
};
|
|
1514
|
-
|
|
1120
|
+
const deserializeAws_restJson1TestCaseRun = (output, context) => {
|
|
1515
1121
|
return {
|
|
1516
1122
|
endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
|
|
1517
1123
|
failure: __expectString(output.failure),
|
|
@@ -1527,10 +1133,10 @@ var deserializeAws_restJson1TestCaseRun = function (output, context) {
|
|
|
1527
1133
|
warnings: __expectString(output.warnings),
|
|
1528
1134
|
};
|
|
1529
1135
|
};
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
.filter(
|
|
1533
|
-
.map(
|
|
1136
|
+
const deserializeAws_restJson1TestCaseRuns = (output, context) => {
|
|
1137
|
+
const retVal = (output || [])
|
|
1138
|
+
.filter((e) => e != null)
|
|
1139
|
+
.map((entry) => {
|
|
1534
1140
|
if (entry === null) {
|
|
1535
1141
|
return null;
|
|
1536
1142
|
}
|
|
@@ -1538,7 +1144,7 @@ var deserializeAws_restJson1TestCaseRuns = function (output, context) {
|
|
|
1538
1144
|
});
|
|
1539
1145
|
return retVal;
|
|
1540
1146
|
};
|
|
1541
|
-
|
|
1147
|
+
const deserializeAws_restJson1TestCaseScenario = (output, context) => {
|
|
1542
1148
|
return {
|
|
1543
1149
|
failure: __expectString(output.failure),
|
|
1544
1150
|
status: __expectString(output.status),
|
|
@@ -1547,10 +1153,10 @@ var deserializeAws_restJson1TestCaseScenario = function (output, context) {
|
|
|
1547
1153
|
testCaseScenarioType: __expectString(output.testCaseScenarioType),
|
|
1548
1154
|
};
|
|
1549
1155
|
};
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
.filter(
|
|
1553
|
-
.map(
|
|
1156
|
+
const deserializeAws_restJson1TestCaseScenariosList = (output, context) => {
|
|
1157
|
+
const retVal = (output || [])
|
|
1158
|
+
.filter((e) => e != null)
|
|
1159
|
+
.map((entry) => {
|
|
1554
1160
|
if (entry === null) {
|
|
1555
1161
|
return null;
|
|
1556
1162
|
}
|
|
@@ -1558,62 +1164,44 @@ var deserializeAws_restJson1TestCaseScenariosList = function (output, context) {
|
|
|
1558
1164
|
});
|
|
1559
1165
|
return retVal;
|
|
1560
1166
|
};
|
|
1561
|
-
|
|
1167
|
+
const deserializeAws_restJson1TestResult = (output, context) => {
|
|
1562
1168
|
return {
|
|
1563
1169
|
groups: output.groups != null ? deserializeAws_restJson1GroupResultList(output.groups, context) : undefined,
|
|
1564
1170
|
};
|
|
1565
1171
|
};
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
});
|
|
1574
|
-
};
|
|
1575
|
-
var collectBody = function (streamBody, context) {
|
|
1576
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1172
|
+
const deserializeMetadata = (output) => ({
|
|
1173
|
+
httpStatusCode: output.statusCode,
|
|
1174
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1175
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1176
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1177
|
+
});
|
|
1178
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1577
1179
|
if (streamBody instanceof Uint8Array) {
|
|
1578
1180
|
return Promise.resolve(streamBody);
|
|
1579
1181
|
}
|
|
1580
1182
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1581
1183
|
};
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
});
|
|
1184
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1185
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1186
|
+
value !== null &&
|
|
1187
|
+
value !== "" &&
|
|
1188
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1189
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1190
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1191
|
+
if (encoded.length) {
|
|
1192
|
+
return JSON.parse(encoded);
|
|
1193
|
+
}
|
|
1194
|
+
return {};
|
|
1195
|
+
});
|
|
1196
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1197
|
+
const value = await parseBody(errorBody, context);
|
|
1198
|
+
value.message = value.message ?? value.Message;
|
|
1199
|
+
return value;
|
|
1599
1200
|
};
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
switch (_b.label) {
|
|
1605
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1606
|
-
case 1:
|
|
1607
|
-
value = _b.sent();
|
|
1608
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1609
|
-
return [2, value];
|
|
1610
|
-
}
|
|
1611
|
-
});
|
|
1612
|
-
}); };
|
|
1613
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1614
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1615
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1616
|
-
var cleanValue = rawValue;
|
|
1201
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1202
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1203
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1204
|
+
let cleanValue = rawValue;
|
|
1617
1205
|
if (typeof cleanValue === "number") {
|
|
1618
1206
|
cleanValue = cleanValue.toString();
|
|
1619
1207
|
}
|
|
@@ -1628,7 +1216,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1628
1216
|
}
|
|
1629
1217
|
return cleanValue;
|
|
1630
1218
|
};
|
|
1631
|
-
|
|
1219
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1632
1220
|
if (headerKey !== undefined) {
|
|
1633
1221
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1634
1222
|
}
|