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