@aws-sdk/client-wellarchitected 3.43.0 → 3.44.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/README.md +6 -6
- package/dist-cjs/WellArchitected.js +120 -0
- package/dist-cjs/commands/CreateLensShareCommand.js +36 -0
- package/dist-cjs/commands/CreateLensVersionCommand.js +36 -0
- package/dist-cjs/commands/DeleteLensCommand.js +36 -0
- package/dist-cjs/commands/DeleteLensShareCommand.js +36 -0
- package/dist-cjs/commands/ExportLensCommand.js +36 -0
- package/dist-cjs/commands/GetLensCommand.js +36 -0
- package/dist-cjs/commands/ImportLensCommand.js +36 -0
- package/dist-cjs/commands/ListLensSharesCommand.js +36 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/models/models_0.js +150 -17
- package/dist-cjs/pagination/ListLensSharesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1137 -62
- package/dist-es/WellArchitected.js +120 -0
- package/dist-es/commands/CreateLensShareCommand.js +39 -0
- package/dist-es/commands/CreateLensVersionCommand.js +39 -0
- package/dist-es/commands/DeleteLensCommand.js +39 -0
- package/dist-es/commands/DeleteLensShareCommand.js +39 -0
- package/dist-es/commands/ExportLensCommand.js +39 -0
- package/dist-es/commands/GetLensCommand.js +39 -0
- package/dist-es/commands/ImportLensCommand.js +39 -0
- package/dist-es/commands/ListLensSharesCommand.js +39 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/models/models_0.js +109 -12
- package/dist-es/pagination/ListLensSharesPaginator.js +74 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +1232 -40
- package/dist-types/WellArchitected.d.ts +156 -13
- package/dist-types/WellArchitectedClient.d.ts +16 -8
- package/dist-types/commands/AssociateLensesCommand.d.ts +10 -0
- package/dist-types/commands/CreateLensShareCommand.d.ts +48 -0
- package/dist-types/commands/CreateLensVersionCommand.d.ts +39 -0
- package/dist-types/commands/CreateWorkloadCommand.d.ts +3 -3
- package/dist-types/commands/CreateWorkloadShareCommand.d.ts +3 -3
- package/dist-types/commands/DeleteLensCommand.d.ts +49 -0
- package/dist-types/commands/DeleteLensShareCommand.d.ts +48 -0
- package/dist-types/commands/DisassociateLensesCommand.d.ts +2 -1
- package/dist-types/commands/ExportLensCommand.d.ts +49 -0
- package/dist-types/commands/GetLensCommand.d.ts +35 -0
- package/dist-types/commands/ImportLensCommand.d.ts +53 -0
- package/dist-types/commands/ListLensSharesCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +676 -118
- package/dist-types/pagination/ListLensSharesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/ts3.4/WellArchitected.d.ts +40 -0
- package/dist-types/ts3.4/WellArchitectedClient.d.ts +10 -2
- package/dist-types/ts3.4/commands/CreateLensShareCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateLensVersionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteLensCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteLensShareCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ExportLensCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetLensCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ImportLensCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListLensSharesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +321 -24
- package/dist-types/ts3.4/pagination/ListLensSharesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +1 -1
|
@@ -37,6 +37,77 @@ export var serializeAws_restJson1AssociateLensesCommand = function (input, conte
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}); };
|
|
40
|
+
export var serializeAws_restJson1CreateLensShareCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
42
|
+
var _c;
|
|
43
|
+
return __generator(this, function (_d) {
|
|
44
|
+
switch (_d.label) {
|
|
45
|
+
case 0: return [4, context.endpoint()];
|
|
46
|
+
case 1:
|
|
47
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
48
|
+
headers = {
|
|
49
|
+
"content-type": "application/json",
|
|
50
|
+
};
|
|
51
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}/shares";
|
|
52
|
+
if (input.LensAlias !== undefined) {
|
|
53
|
+
labelValue = input.LensAlias;
|
|
54
|
+
if (labelValue.length <= 0) {
|
|
55
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
56
|
+
}
|
|
57
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
61
|
+
}
|
|
62
|
+
body = JSON.stringify(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.SharedWith !== undefined && input.SharedWith !== null && { SharedWith: input.SharedWith })));
|
|
63
|
+
return [2, new __HttpRequest({
|
|
64
|
+
protocol: protocol,
|
|
65
|
+
hostname: hostname,
|
|
66
|
+
port: port,
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body: body,
|
|
71
|
+
})];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}); };
|
|
75
|
+
export var serializeAws_restJson1CreateLensVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
77
|
+
var _c;
|
|
78
|
+
return __generator(this, function (_d) {
|
|
79
|
+
switch (_d.label) {
|
|
80
|
+
case 0: return [4, context.endpoint()];
|
|
81
|
+
case 1:
|
|
82
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
83
|
+
headers = {
|
|
84
|
+
"content-type": "application/json",
|
|
85
|
+
};
|
|
86
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}/versions";
|
|
87
|
+
if (input.LensAlias !== undefined) {
|
|
88
|
+
labelValue = input.LensAlias;
|
|
89
|
+
if (labelValue.length <= 0) {
|
|
90
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
91
|
+
}
|
|
92
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
96
|
+
}
|
|
97
|
+
body = JSON.stringify(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.IsMajorVersion !== undefined &&
|
|
98
|
+
input.IsMajorVersion !== null && { IsMajorVersion: input.IsMajorVersion })), (input.LensVersion !== undefined && input.LensVersion !== null && { LensVersion: input.LensVersion })));
|
|
99
|
+
return [2, new __HttpRequest({
|
|
100
|
+
protocol: protocol,
|
|
101
|
+
hostname: hostname,
|
|
102
|
+
port: port,
|
|
103
|
+
method: "POST",
|
|
104
|
+
headers: headers,
|
|
105
|
+
path: resolvedPath,
|
|
106
|
+
body: body,
|
|
107
|
+
})];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}); };
|
|
40
111
|
export var serializeAws_restJson1CreateMilestoneCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
112
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
42
113
|
var _c;
|
|
@@ -143,6 +214,82 @@ export var serializeAws_restJson1CreateWorkloadShareCommand = function (input, c
|
|
|
143
214
|
}
|
|
144
215
|
});
|
|
145
216
|
}); };
|
|
217
|
+
export var serializeAws_restJson1DeleteLensCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
218
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
219
|
+
return __generator(this, function (_c) {
|
|
220
|
+
switch (_c.label) {
|
|
221
|
+
case 0: return [4, context.endpoint()];
|
|
222
|
+
case 1:
|
|
223
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
224
|
+
headers = {};
|
|
225
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}";
|
|
226
|
+
if (input.LensAlias !== undefined) {
|
|
227
|
+
labelValue = input.LensAlias;
|
|
228
|
+
if (labelValue.length <= 0) {
|
|
229
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
230
|
+
}
|
|
231
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
235
|
+
}
|
|
236
|
+
query = __assign(__assign({}, (input.ClientRequestToken !== undefined && { ClientRequestToken: input.ClientRequestToken })), (input.LensStatus !== undefined && { LensStatus: input.LensStatus }));
|
|
237
|
+
return [2, new __HttpRequest({
|
|
238
|
+
protocol: protocol,
|
|
239
|
+
hostname: hostname,
|
|
240
|
+
port: port,
|
|
241
|
+
method: "DELETE",
|
|
242
|
+
headers: headers,
|
|
243
|
+
path: resolvedPath,
|
|
244
|
+
query: query,
|
|
245
|
+
body: body,
|
|
246
|
+
})];
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}); };
|
|
250
|
+
export var serializeAws_restJson1DeleteLensShareCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
251
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
252
|
+
return __generator(this, function (_c) {
|
|
253
|
+
switch (_c.label) {
|
|
254
|
+
case 0: return [4, context.endpoint()];
|
|
255
|
+
case 1:
|
|
256
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
257
|
+
headers = {};
|
|
258
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}/shares/{ShareId}";
|
|
259
|
+
if (input.ShareId !== undefined) {
|
|
260
|
+
labelValue = input.ShareId;
|
|
261
|
+
if (labelValue.length <= 0) {
|
|
262
|
+
throw new Error("Empty value provided for input HTTP label: ShareId.");
|
|
263
|
+
}
|
|
264
|
+
resolvedPath = resolvedPath.replace("{ShareId}", __extendedEncodeURIComponent(labelValue));
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
throw new Error("No value provided for input HTTP label: ShareId.");
|
|
268
|
+
}
|
|
269
|
+
if (input.LensAlias !== undefined) {
|
|
270
|
+
labelValue = input.LensAlias;
|
|
271
|
+
if (labelValue.length <= 0) {
|
|
272
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
273
|
+
}
|
|
274
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
278
|
+
}
|
|
279
|
+
query = __assign({}, (input.ClientRequestToken !== undefined && { ClientRequestToken: input.ClientRequestToken }));
|
|
280
|
+
return [2, new __HttpRequest({
|
|
281
|
+
protocol: protocol,
|
|
282
|
+
hostname: hostname,
|
|
283
|
+
port: port,
|
|
284
|
+
method: "DELETE",
|
|
285
|
+
headers: headers,
|
|
286
|
+
path: resolvedPath,
|
|
287
|
+
query: query,
|
|
288
|
+
body: body,
|
|
289
|
+
})];
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}); };
|
|
146
293
|
export var serializeAws_restJson1DeleteWorkloadCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
147
294
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
148
295
|
return __generator(this, function (_c) {
|
|
@@ -255,6 +402,39 @@ export var serializeAws_restJson1DisassociateLensesCommand = function (input, co
|
|
|
255
402
|
}
|
|
256
403
|
});
|
|
257
404
|
}); };
|
|
405
|
+
export var serializeAws_restJson1ExportLensCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
406
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
407
|
+
return __generator(this, function (_c) {
|
|
408
|
+
switch (_c.label) {
|
|
409
|
+
case 0: return [4, context.endpoint()];
|
|
410
|
+
case 1:
|
|
411
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
412
|
+
headers = {};
|
|
413
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}/export";
|
|
414
|
+
if (input.LensAlias !== undefined) {
|
|
415
|
+
labelValue = input.LensAlias;
|
|
416
|
+
if (labelValue.length <= 0) {
|
|
417
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
418
|
+
}
|
|
419
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
423
|
+
}
|
|
424
|
+
query = __assign({}, (input.LensVersion !== undefined && { LensVersion: input.LensVersion }));
|
|
425
|
+
return [2, new __HttpRequest({
|
|
426
|
+
protocol: protocol,
|
|
427
|
+
hostname: hostname,
|
|
428
|
+
port: port,
|
|
429
|
+
method: "GET",
|
|
430
|
+
headers: headers,
|
|
431
|
+
path: resolvedPath,
|
|
432
|
+
query: query,
|
|
433
|
+
body: body,
|
|
434
|
+
})];
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}); };
|
|
258
438
|
export var serializeAws_restJson1GetAnswerCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
259
439
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, query, body;
|
|
260
440
|
return __generator(this, function (_c) {
|
|
@@ -309,6 +489,39 @@ export var serializeAws_restJson1GetAnswerCommand = function (input, context) {
|
|
|
309
489
|
}
|
|
310
490
|
});
|
|
311
491
|
}); };
|
|
492
|
+
export var serializeAws_restJson1GetLensCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
493
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
494
|
+
return __generator(this, function (_c) {
|
|
495
|
+
switch (_c.label) {
|
|
496
|
+
case 0: return [4, context.endpoint()];
|
|
497
|
+
case 1:
|
|
498
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
499
|
+
headers = {};
|
|
500
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}";
|
|
501
|
+
if (input.LensAlias !== undefined) {
|
|
502
|
+
labelValue = input.LensAlias;
|
|
503
|
+
if (labelValue.length <= 0) {
|
|
504
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
505
|
+
}
|
|
506
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
510
|
+
}
|
|
511
|
+
query = __assign({}, (input.LensVersion !== undefined && { LensVersion: input.LensVersion }));
|
|
512
|
+
return [2, new __HttpRequest({
|
|
513
|
+
protocol: protocol,
|
|
514
|
+
hostname: hostname,
|
|
515
|
+
port: port,
|
|
516
|
+
method: "GET",
|
|
517
|
+
headers: headers,
|
|
518
|
+
path: resolvedPath,
|
|
519
|
+
query: query,
|
|
520
|
+
body: body,
|
|
521
|
+
})];
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
}); };
|
|
312
525
|
export var serializeAws_restJson1GetLensReviewCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
313
526
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
314
527
|
return __generator(this, function (_c) {
|
|
@@ -416,7 +629,7 @@ export var serializeAws_restJson1GetLensVersionDifferenceCommand = function (inp
|
|
|
416
629
|
else {
|
|
417
630
|
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
418
631
|
}
|
|
419
|
-
query = __assign({}, (input.BaseLensVersion !== undefined && { BaseLensVersion: input.BaseLensVersion }));
|
|
632
|
+
query = __assign(__assign({}, (input.BaseLensVersion !== undefined && { BaseLensVersion: input.BaseLensVersion })), (input.TargetLensVersion !== undefined && { TargetLensVersion: input.TargetLensVersion }));
|
|
420
633
|
return [2, new __HttpRequest({
|
|
421
634
|
protocol: protocol,
|
|
422
635
|
hostname: hostname,
|
|
@@ -503,6 +716,31 @@ export var serializeAws_restJson1GetWorkloadCommand = function (input, context)
|
|
|
503
716
|
}
|
|
504
717
|
});
|
|
505
718
|
}); };
|
|
719
|
+
export var serializeAws_restJson1ImportLensCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
720
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
721
|
+
var _c;
|
|
722
|
+
return __generator(this, function (_d) {
|
|
723
|
+
switch (_d.label) {
|
|
724
|
+
case 0: return [4, context.endpoint()];
|
|
725
|
+
case 1:
|
|
726
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
727
|
+
headers = {
|
|
728
|
+
"content-type": "application/json",
|
|
729
|
+
};
|
|
730
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/importLens";
|
|
731
|
+
body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.JSONString !== undefined && input.JSONString !== null && { JSONString: input.JSONString })), (input.LensAlias !== undefined && input.LensAlias !== null && { LensAlias: input.LensAlias })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
732
|
+
return [2, new __HttpRequest({
|
|
733
|
+
protocol: protocol,
|
|
734
|
+
hostname: hostname,
|
|
735
|
+
port: port,
|
|
736
|
+
method: "PUT",
|
|
737
|
+
headers: headers,
|
|
738
|
+
path: resolvedPath,
|
|
739
|
+
body: body,
|
|
740
|
+
})];
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
}); };
|
|
506
744
|
export var serializeAws_restJson1ListAnswersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
507
745
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
|
|
508
746
|
return __generator(this, function (_c) {
|
|
@@ -556,7 +794,7 @@ export var serializeAws_restJson1ListLensesCommand = function (input, context) {
|
|
|
556
794
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
557
795
|
headers = {};
|
|
558
796
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses";
|
|
559
|
-
query = __assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
797
|
+
query = __assign(__assign(__assign(__assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() })), (input.LensType !== undefined && { LensType: input.LensType })), (input.LensStatus !== undefined && { LensStatus: input.LensStatus })), (input.LensName !== undefined && { LensName: input.LensName }));
|
|
560
798
|
return [2, new __HttpRequest({
|
|
561
799
|
protocol: protocol,
|
|
562
800
|
hostname: hostname,
|
|
@@ -647,6 +885,39 @@ export var serializeAws_restJson1ListLensReviewsCommand = function (input, conte
|
|
|
647
885
|
}
|
|
648
886
|
});
|
|
649
887
|
}); };
|
|
888
|
+
export var serializeAws_restJson1ListLensSharesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
889
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
890
|
+
return __generator(this, function (_c) {
|
|
891
|
+
switch (_c.label) {
|
|
892
|
+
case 0: return [4, context.endpoint()];
|
|
893
|
+
case 1:
|
|
894
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
895
|
+
headers = {};
|
|
896
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/lenses/{LensAlias}/shares";
|
|
897
|
+
if (input.LensAlias !== undefined) {
|
|
898
|
+
labelValue = input.LensAlias;
|
|
899
|
+
if (labelValue.length <= 0) {
|
|
900
|
+
throw new Error("Empty value provided for input HTTP label: LensAlias.");
|
|
901
|
+
}
|
|
902
|
+
resolvedPath = resolvedPath.replace("{LensAlias}", __extendedEncodeURIComponent(labelValue));
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
throw new Error("No value provided for input HTTP label: LensAlias.");
|
|
906
|
+
}
|
|
907
|
+
query = __assign(__assign(__assign({}, (input.SharedWithPrefix !== undefined && { SharedWithPrefix: input.SharedWithPrefix })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
908
|
+
return [2, new __HttpRequest({
|
|
909
|
+
protocol: protocol,
|
|
910
|
+
hostname: hostname,
|
|
911
|
+
port: port,
|
|
912
|
+
method: "GET",
|
|
913
|
+
headers: headers,
|
|
914
|
+
path: resolvedPath,
|
|
915
|
+
query: query,
|
|
916
|
+
body: body,
|
|
917
|
+
})];
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
}); };
|
|
650
921
|
export var serializeAws_restJson1ListMilestonesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
651
922
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
652
923
|
return __generator(this, function (_c) {
|
|
@@ -715,7 +986,7 @@ export var serializeAws_restJson1ListShareInvitationsCommand = function (input,
|
|
|
715
986
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
716
987
|
headers = {};
|
|
717
988
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/shareInvitations";
|
|
718
|
-
query = __assign(__assign(__assign({}, (input.WorkloadNamePrefix !== undefined && { WorkloadNamePrefix: input.WorkloadNamePrefix })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
989
|
+
query = __assign(__assign(__assign(__assign(__assign({}, (input.WorkloadNamePrefix !== undefined && { WorkloadNamePrefix: input.WorkloadNamePrefix })), (input.LensNamePrefix !== undefined && { LensNamePrefix: input.LensNamePrefix })), (input.ShareResourceType !== undefined && { ShareResourceType: input.ShareResourceType })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
719
990
|
return [2, new __HttpRequest({
|
|
720
991
|
protocol: protocol,
|
|
721
992
|
hostname: hostname,
|
|
@@ -1261,27 +1532,251 @@ var deserializeAws_restJson1AssociateLensesCommandError = function (output, cont
|
|
|
1261
1532
|
}
|
|
1262
1533
|
});
|
|
1263
1534
|
}); };
|
|
1264
|
-
export var
|
|
1535
|
+
export var deserializeAws_restJson1CreateLensShareCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1265
1536
|
var contents, data, _a, _b;
|
|
1266
1537
|
return __generator(this, function (_c) {
|
|
1267
1538
|
switch (_c.label) {
|
|
1268
1539
|
case 0:
|
|
1269
1540
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1270
|
-
return [2,
|
|
1541
|
+
return [2, deserializeAws_restJson1CreateLensShareCommandError(output, context)];
|
|
1271
1542
|
}
|
|
1272
1543
|
contents = {
|
|
1273
1544
|
$metadata: deserializeMetadata(output),
|
|
1274
|
-
|
|
1275
|
-
WorkloadId: undefined,
|
|
1545
|
+
ShareId: undefined,
|
|
1276
1546
|
};
|
|
1277
1547
|
_a = __expectNonNull;
|
|
1278
1548
|
_b = __expectObject;
|
|
1279
1549
|
return [4, parseBody(output.body, context)];
|
|
1280
1550
|
case 1:
|
|
1281
1551
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1282
|
-
if (data.
|
|
1283
|
-
contents.
|
|
1284
|
-
}
|
|
1552
|
+
if (data.ShareId !== undefined && data.ShareId !== null) {
|
|
1553
|
+
contents.ShareId = __expectString(data.ShareId);
|
|
1554
|
+
}
|
|
1555
|
+
return [2, Promise.resolve(contents)];
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1558
|
+
}); };
|
|
1559
|
+
var deserializeAws_restJson1CreateLensShareCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1560
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
1561
|
+
var _k;
|
|
1562
|
+
return __generator(this, function (_l) {
|
|
1563
|
+
switch (_l.label) {
|
|
1564
|
+
case 0:
|
|
1565
|
+
_a = [__assign({}, output)];
|
|
1566
|
+
_k = {};
|
|
1567
|
+
return [4, parseBody(output.body, context)];
|
|
1568
|
+
case 1:
|
|
1569
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
1570
|
+
errorCode = "UnknownError";
|
|
1571
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1572
|
+
_b = errorCode;
|
|
1573
|
+
switch (_b) {
|
|
1574
|
+
case "AccessDeniedException": return [3, 2];
|
|
1575
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
1576
|
+
case "ConflictException": return [3, 4];
|
|
1577
|
+
case "com.amazonaws.wellarchitected#ConflictException": return [3, 4];
|
|
1578
|
+
case "InternalServerException": return [3, 6];
|
|
1579
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 6];
|
|
1580
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1581
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 8];
|
|
1582
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
1583
|
+
case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": return [3, 10];
|
|
1584
|
+
case "ThrottlingException": return [3, 12];
|
|
1585
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 12];
|
|
1586
|
+
case "ValidationException": return [3, 14];
|
|
1587
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 14];
|
|
1588
|
+
}
|
|
1589
|
+
return [3, 16];
|
|
1590
|
+
case 2:
|
|
1591
|
+
_c = [{}];
|
|
1592
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1593
|
+
case 3:
|
|
1594
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1595
|
+
return [3, 17];
|
|
1596
|
+
case 4:
|
|
1597
|
+
_d = [{}];
|
|
1598
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1599
|
+
case 5:
|
|
1600
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1601
|
+
return [3, 17];
|
|
1602
|
+
case 6:
|
|
1603
|
+
_e = [{}];
|
|
1604
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1605
|
+
case 7:
|
|
1606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1607
|
+
return [3, 17];
|
|
1608
|
+
case 8:
|
|
1609
|
+
_f = [{}];
|
|
1610
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1611
|
+
case 9:
|
|
1612
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1613
|
+
return [3, 17];
|
|
1614
|
+
case 10:
|
|
1615
|
+
_g = [{}];
|
|
1616
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1617
|
+
case 11:
|
|
1618
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1619
|
+
return [3, 17];
|
|
1620
|
+
case 12:
|
|
1621
|
+
_h = [{}];
|
|
1622
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1623
|
+
case 13:
|
|
1624
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1625
|
+
return [3, 17];
|
|
1626
|
+
case 14:
|
|
1627
|
+
_j = [{}];
|
|
1628
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1629
|
+
case 15:
|
|
1630
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1631
|
+
return [3, 17];
|
|
1632
|
+
case 16:
|
|
1633
|
+
parsedBody = parsedOutput.body;
|
|
1634
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1635
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1636
|
+
_l.label = 17;
|
|
1637
|
+
case 17:
|
|
1638
|
+
message = response.message || response.Message || errorCode;
|
|
1639
|
+
response.message = message;
|
|
1640
|
+
delete response.Message;
|
|
1641
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
}); };
|
|
1645
|
+
export var deserializeAws_restJson1CreateLensVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1646
|
+
var contents, data, _a, _b;
|
|
1647
|
+
return __generator(this, function (_c) {
|
|
1648
|
+
switch (_c.label) {
|
|
1649
|
+
case 0:
|
|
1650
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1651
|
+
return [2, deserializeAws_restJson1CreateLensVersionCommandError(output, context)];
|
|
1652
|
+
}
|
|
1653
|
+
contents = {
|
|
1654
|
+
$metadata: deserializeMetadata(output),
|
|
1655
|
+
LensArn: undefined,
|
|
1656
|
+
LensVersion: undefined,
|
|
1657
|
+
};
|
|
1658
|
+
_a = __expectNonNull;
|
|
1659
|
+
_b = __expectObject;
|
|
1660
|
+
return [4, parseBody(output.body, context)];
|
|
1661
|
+
case 1:
|
|
1662
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1663
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
1664
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
1665
|
+
}
|
|
1666
|
+
if (data.LensVersion !== undefined && data.LensVersion !== null) {
|
|
1667
|
+
contents.LensVersion = __expectString(data.LensVersion);
|
|
1668
|
+
}
|
|
1669
|
+
return [2, Promise.resolve(contents)];
|
|
1670
|
+
}
|
|
1671
|
+
});
|
|
1672
|
+
}); };
|
|
1673
|
+
var deserializeAws_restJson1CreateLensVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1674
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
1675
|
+
var _k;
|
|
1676
|
+
return __generator(this, function (_l) {
|
|
1677
|
+
switch (_l.label) {
|
|
1678
|
+
case 0:
|
|
1679
|
+
_a = [__assign({}, output)];
|
|
1680
|
+
_k = {};
|
|
1681
|
+
return [4, parseBody(output.body, context)];
|
|
1682
|
+
case 1:
|
|
1683
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
1684
|
+
errorCode = "UnknownError";
|
|
1685
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1686
|
+
_b = errorCode;
|
|
1687
|
+
switch (_b) {
|
|
1688
|
+
case "AccessDeniedException": return [3, 2];
|
|
1689
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
1690
|
+
case "ConflictException": return [3, 4];
|
|
1691
|
+
case "com.amazonaws.wellarchitected#ConflictException": return [3, 4];
|
|
1692
|
+
case "InternalServerException": return [3, 6];
|
|
1693
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 6];
|
|
1694
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1695
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 8];
|
|
1696
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
1697
|
+
case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": return [3, 10];
|
|
1698
|
+
case "ThrottlingException": return [3, 12];
|
|
1699
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 12];
|
|
1700
|
+
case "ValidationException": return [3, 14];
|
|
1701
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 14];
|
|
1702
|
+
}
|
|
1703
|
+
return [3, 16];
|
|
1704
|
+
case 2:
|
|
1705
|
+
_c = [{}];
|
|
1706
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1707
|
+
case 3:
|
|
1708
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1709
|
+
return [3, 17];
|
|
1710
|
+
case 4:
|
|
1711
|
+
_d = [{}];
|
|
1712
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1713
|
+
case 5:
|
|
1714
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1715
|
+
return [3, 17];
|
|
1716
|
+
case 6:
|
|
1717
|
+
_e = [{}];
|
|
1718
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1719
|
+
case 7:
|
|
1720
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1721
|
+
return [3, 17];
|
|
1722
|
+
case 8:
|
|
1723
|
+
_f = [{}];
|
|
1724
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1725
|
+
case 9:
|
|
1726
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1727
|
+
return [3, 17];
|
|
1728
|
+
case 10:
|
|
1729
|
+
_g = [{}];
|
|
1730
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1731
|
+
case 11:
|
|
1732
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1733
|
+
return [3, 17];
|
|
1734
|
+
case 12:
|
|
1735
|
+
_h = [{}];
|
|
1736
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1737
|
+
case 13:
|
|
1738
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1739
|
+
return [3, 17];
|
|
1740
|
+
case 14:
|
|
1741
|
+
_j = [{}];
|
|
1742
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1743
|
+
case 15:
|
|
1744
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1745
|
+
return [3, 17];
|
|
1746
|
+
case 16:
|
|
1747
|
+
parsedBody = parsedOutput.body;
|
|
1748
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1749
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1750
|
+
_l.label = 17;
|
|
1751
|
+
case 17:
|
|
1752
|
+
message = response.message || response.Message || errorCode;
|
|
1753
|
+
response.message = message;
|
|
1754
|
+
delete response.Message;
|
|
1755
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
}); };
|
|
1759
|
+
export var deserializeAws_restJson1CreateMilestoneCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1760
|
+
var contents, data, _a, _b;
|
|
1761
|
+
return __generator(this, function (_c) {
|
|
1762
|
+
switch (_c.label) {
|
|
1763
|
+
case 0:
|
|
1764
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1765
|
+
return [2, deserializeAws_restJson1CreateMilestoneCommandError(output, context)];
|
|
1766
|
+
}
|
|
1767
|
+
contents = {
|
|
1768
|
+
$metadata: deserializeMetadata(output),
|
|
1769
|
+
MilestoneNumber: undefined,
|
|
1770
|
+
WorkloadId: undefined,
|
|
1771
|
+
};
|
|
1772
|
+
_a = __expectNonNull;
|
|
1773
|
+
_b = __expectObject;
|
|
1774
|
+
return [4, parseBody(output.body, context)];
|
|
1775
|
+
case 1:
|
|
1776
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1777
|
+
if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
|
|
1778
|
+
contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
|
|
1779
|
+
}
|
|
1285
1780
|
if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
|
|
1286
1781
|
contents.WorkloadId = __expectString(data.WorkloadId);
|
|
1287
1782
|
}
|
|
@@ -1595,13 +2090,13 @@ var deserializeAws_restJson1CreateWorkloadShareCommandError = function (output,
|
|
|
1595
2090
|
}
|
|
1596
2091
|
});
|
|
1597
2092
|
}); };
|
|
1598
|
-
export var
|
|
2093
|
+
export var deserializeAws_restJson1DeleteLensCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1599
2094
|
var contents;
|
|
1600
2095
|
return __generator(this, function (_a) {
|
|
1601
2096
|
switch (_a.label) {
|
|
1602
2097
|
case 0:
|
|
1603
2098
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1604
|
-
return [2,
|
|
2099
|
+
return [2, deserializeAws_restJson1DeleteLensCommandError(output, context)];
|
|
1605
2100
|
}
|
|
1606
2101
|
contents = {
|
|
1607
2102
|
$metadata: deserializeMetadata(output),
|
|
@@ -1613,7 +2108,7 @@ export var deserializeAws_restJson1DeleteWorkloadCommand = function (output, con
|
|
|
1613
2108
|
}
|
|
1614
2109
|
});
|
|
1615
2110
|
}); };
|
|
1616
|
-
var
|
|
2111
|
+
var deserializeAws_restJson1DeleteLensCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1617
2112
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
1618
2113
|
var _j;
|
|
1619
2114
|
return __generator(this, function (_k) {
|
|
@@ -1691,13 +2186,13 @@ var deserializeAws_restJson1DeleteWorkloadCommandError = function (output, conte
|
|
|
1691
2186
|
}
|
|
1692
2187
|
});
|
|
1693
2188
|
}); };
|
|
1694
|
-
export var
|
|
2189
|
+
export var deserializeAws_restJson1DeleteLensShareCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1695
2190
|
var contents;
|
|
1696
2191
|
return __generator(this, function (_a) {
|
|
1697
2192
|
switch (_a.label) {
|
|
1698
2193
|
case 0:
|
|
1699
2194
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1700
|
-
return [2,
|
|
2195
|
+
return [2, deserializeAws_restJson1DeleteLensShareCommandError(output, context)];
|
|
1701
2196
|
}
|
|
1702
2197
|
contents = {
|
|
1703
2198
|
$metadata: deserializeMetadata(output),
|
|
@@ -1709,7 +2204,7 @@ export var deserializeAws_restJson1DeleteWorkloadShareCommand = function (output
|
|
|
1709
2204
|
}
|
|
1710
2205
|
});
|
|
1711
2206
|
}); };
|
|
1712
|
-
var
|
|
2207
|
+
var deserializeAws_restJson1DeleteLensShareCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1713
2208
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
1714
2209
|
var _j;
|
|
1715
2210
|
return __generator(this, function (_k) {
|
|
@@ -1787,13 +2282,13 @@ var deserializeAws_restJson1DeleteWorkloadShareCommandError = function (output,
|
|
|
1787
2282
|
}
|
|
1788
2283
|
});
|
|
1789
2284
|
}); };
|
|
1790
|
-
export var
|
|
2285
|
+
export var deserializeAws_restJson1DeleteWorkloadCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1791
2286
|
var contents;
|
|
1792
2287
|
return __generator(this, function (_a) {
|
|
1793
2288
|
switch (_a.label) {
|
|
1794
2289
|
case 0:
|
|
1795
2290
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1796
|
-
return [2,
|
|
2291
|
+
return [2, deserializeAws_restJson1DeleteWorkloadCommandError(output, context)];
|
|
1797
2292
|
}
|
|
1798
2293
|
contents = {
|
|
1799
2294
|
$metadata: deserializeMetadata(output),
|
|
@@ -1805,7 +2300,7 @@ export var deserializeAws_restJson1DisassociateLensesCommand = function (output,
|
|
|
1805
2300
|
}
|
|
1806
2301
|
});
|
|
1807
2302
|
}); };
|
|
1808
|
-
var
|
|
2303
|
+
var deserializeAws_restJson1DeleteWorkloadCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1809
2304
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
1810
2305
|
var _j;
|
|
1811
2306
|
return __generator(this, function (_k) {
|
|
@@ -1883,33 +2378,323 @@ var deserializeAws_restJson1DisassociateLensesCommandError = function (output, c
|
|
|
1883
2378
|
}
|
|
1884
2379
|
});
|
|
1885
2380
|
}); };
|
|
1886
|
-
export var
|
|
1887
|
-
var contents
|
|
1888
|
-
return __generator(this, function (
|
|
1889
|
-
switch (
|
|
2381
|
+
export var deserializeAws_restJson1DeleteWorkloadShareCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2382
|
+
var contents;
|
|
2383
|
+
return __generator(this, function (_a) {
|
|
2384
|
+
switch (_a.label) {
|
|
1890
2385
|
case 0:
|
|
1891
2386
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1892
|
-
return [2,
|
|
2387
|
+
return [2, deserializeAws_restJson1DeleteWorkloadShareCommandError(output, context)];
|
|
1893
2388
|
}
|
|
1894
2389
|
contents = {
|
|
1895
2390
|
$metadata: deserializeMetadata(output),
|
|
1896
|
-
Answer: undefined,
|
|
1897
|
-
LensAlias: undefined,
|
|
1898
|
-
MilestoneNumber: undefined,
|
|
1899
|
-
WorkloadId: undefined,
|
|
1900
2391
|
};
|
|
1901
|
-
|
|
1902
|
-
_b = __expectObject;
|
|
1903
|
-
return [4, parseBody(output.body, context)];
|
|
2392
|
+
return [4, collectBody(output.body, context)];
|
|
1904
2393
|
case 1:
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
2394
|
+
_a.sent();
|
|
2395
|
+
return [2, Promise.resolve(contents)];
|
|
2396
|
+
}
|
|
2397
|
+
});
|
|
2398
|
+
}); };
|
|
2399
|
+
var deserializeAws_restJson1DeleteWorkloadShareCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2400
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
2401
|
+
var _j;
|
|
2402
|
+
return __generator(this, function (_k) {
|
|
2403
|
+
switch (_k.label) {
|
|
2404
|
+
case 0:
|
|
2405
|
+
_a = [__assign({}, output)];
|
|
2406
|
+
_j = {};
|
|
2407
|
+
return [4, parseBody(output.body, context)];
|
|
2408
|
+
case 1:
|
|
2409
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
2410
|
+
errorCode = "UnknownError";
|
|
2411
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2412
|
+
_b = errorCode;
|
|
2413
|
+
switch (_b) {
|
|
2414
|
+
case "AccessDeniedException": return [3, 2];
|
|
2415
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
2416
|
+
case "ConflictException": return [3, 4];
|
|
2417
|
+
case "com.amazonaws.wellarchitected#ConflictException": return [3, 4];
|
|
2418
|
+
case "InternalServerException": return [3, 6];
|
|
2419
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 6];
|
|
2420
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
2421
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 8];
|
|
2422
|
+
case "ThrottlingException": return [3, 10];
|
|
2423
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 10];
|
|
2424
|
+
case "ValidationException": return [3, 12];
|
|
2425
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 12];
|
|
2426
|
+
}
|
|
2427
|
+
return [3, 14];
|
|
2428
|
+
case 2:
|
|
2429
|
+
_c = [{}];
|
|
2430
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2431
|
+
case 3:
|
|
2432
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2433
|
+
return [3, 15];
|
|
2434
|
+
case 4:
|
|
2435
|
+
_d = [{}];
|
|
2436
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2437
|
+
case 5:
|
|
2438
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2439
|
+
return [3, 15];
|
|
2440
|
+
case 6:
|
|
2441
|
+
_e = [{}];
|
|
2442
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2443
|
+
case 7:
|
|
2444
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2445
|
+
return [3, 15];
|
|
2446
|
+
case 8:
|
|
2447
|
+
_f = [{}];
|
|
2448
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2449
|
+
case 9:
|
|
2450
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2451
|
+
return [3, 15];
|
|
2452
|
+
case 10:
|
|
2453
|
+
_g = [{}];
|
|
2454
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2455
|
+
case 11:
|
|
2456
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2457
|
+
return [3, 15];
|
|
2458
|
+
case 12:
|
|
2459
|
+
_h = [{}];
|
|
2460
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2461
|
+
case 13:
|
|
2462
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2463
|
+
return [3, 15];
|
|
2464
|
+
case 14:
|
|
2465
|
+
parsedBody = parsedOutput.body;
|
|
2466
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2467
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2468
|
+
_k.label = 15;
|
|
2469
|
+
case 15:
|
|
2470
|
+
message = response.message || response.Message || errorCode;
|
|
2471
|
+
response.message = message;
|
|
2472
|
+
delete response.Message;
|
|
2473
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
}); };
|
|
2477
|
+
export var deserializeAws_restJson1DisassociateLensesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2478
|
+
var contents;
|
|
2479
|
+
return __generator(this, function (_a) {
|
|
2480
|
+
switch (_a.label) {
|
|
2481
|
+
case 0:
|
|
2482
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2483
|
+
return [2, deserializeAws_restJson1DisassociateLensesCommandError(output, context)];
|
|
2484
|
+
}
|
|
2485
|
+
contents = {
|
|
2486
|
+
$metadata: deserializeMetadata(output),
|
|
2487
|
+
};
|
|
2488
|
+
return [4, collectBody(output.body, context)];
|
|
2489
|
+
case 1:
|
|
2490
|
+
_a.sent();
|
|
2491
|
+
return [2, Promise.resolve(contents)];
|
|
2492
|
+
}
|
|
2493
|
+
});
|
|
2494
|
+
}); };
|
|
2495
|
+
var deserializeAws_restJson1DisassociateLensesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2496
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
2497
|
+
var _j;
|
|
2498
|
+
return __generator(this, function (_k) {
|
|
2499
|
+
switch (_k.label) {
|
|
2500
|
+
case 0:
|
|
2501
|
+
_a = [__assign({}, output)];
|
|
2502
|
+
_j = {};
|
|
2503
|
+
return [4, parseBody(output.body, context)];
|
|
2504
|
+
case 1:
|
|
2505
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
2506
|
+
errorCode = "UnknownError";
|
|
2507
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2508
|
+
_b = errorCode;
|
|
2509
|
+
switch (_b) {
|
|
2510
|
+
case "AccessDeniedException": return [3, 2];
|
|
2511
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
2512
|
+
case "ConflictException": return [3, 4];
|
|
2513
|
+
case "com.amazonaws.wellarchitected#ConflictException": return [3, 4];
|
|
2514
|
+
case "InternalServerException": return [3, 6];
|
|
2515
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 6];
|
|
2516
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
2517
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 8];
|
|
2518
|
+
case "ThrottlingException": return [3, 10];
|
|
2519
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 10];
|
|
2520
|
+
case "ValidationException": return [3, 12];
|
|
2521
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 12];
|
|
2522
|
+
}
|
|
2523
|
+
return [3, 14];
|
|
2524
|
+
case 2:
|
|
2525
|
+
_c = [{}];
|
|
2526
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2527
|
+
case 3:
|
|
2528
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2529
|
+
return [3, 15];
|
|
2530
|
+
case 4:
|
|
2531
|
+
_d = [{}];
|
|
2532
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2533
|
+
case 5:
|
|
2534
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2535
|
+
return [3, 15];
|
|
2536
|
+
case 6:
|
|
2537
|
+
_e = [{}];
|
|
2538
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2539
|
+
case 7:
|
|
2540
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2541
|
+
return [3, 15];
|
|
2542
|
+
case 8:
|
|
2543
|
+
_f = [{}];
|
|
2544
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2545
|
+
case 9:
|
|
2546
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2547
|
+
return [3, 15];
|
|
2548
|
+
case 10:
|
|
2549
|
+
_g = [{}];
|
|
2550
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2551
|
+
case 11:
|
|
2552
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2553
|
+
return [3, 15];
|
|
2554
|
+
case 12:
|
|
2555
|
+
_h = [{}];
|
|
2556
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2557
|
+
case 13:
|
|
2558
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2559
|
+
return [3, 15];
|
|
2560
|
+
case 14:
|
|
2561
|
+
parsedBody = parsedOutput.body;
|
|
2562
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2563
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2564
|
+
_k.label = 15;
|
|
2565
|
+
case 15:
|
|
2566
|
+
message = response.message || response.Message || errorCode;
|
|
2567
|
+
response.message = message;
|
|
2568
|
+
delete response.Message;
|
|
2569
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2570
|
+
}
|
|
2571
|
+
});
|
|
2572
|
+
}); };
|
|
2573
|
+
export var deserializeAws_restJson1ExportLensCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2574
|
+
var contents, data, _a, _b;
|
|
2575
|
+
return __generator(this, function (_c) {
|
|
2576
|
+
switch (_c.label) {
|
|
2577
|
+
case 0:
|
|
2578
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2579
|
+
return [2, deserializeAws_restJson1ExportLensCommandError(output, context)];
|
|
2580
|
+
}
|
|
2581
|
+
contents = {
|
|
2582
|
+
$metadata: deserializeMetadata(output),
|
|
2583
|
+
LensJSON: undefined,
|
|
2584
|
+
};
|
|
2585
|
+
_a = __expectNonNull;
|
|
2586
|
+
_b = __expectObject;
|
|
2587
|
+
return [4, parseBody(output.body, context)];
|
|
2588
|
+
case 1:
|
|
2589
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2590
|
+
if (data.LensJSON !== undefined && data.LensJSON !== null) {
|
|
2591
|
+
contents.LensJSON = __expectString(data.LensJSON);
|
|
2592
|
+
}
|
|
2593
|
+
return [2, Promise.resolve(contents)];
|
|
2594
|
+
}
|
|
2595
|
+
});
|
|
2596
|
+
}); };
|
|
2597
|
+
var deserializeAws_restJson1ExportLensCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2598
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2599
|
+
var _h;
|
|
2600
|
+
return __generator(this, function (_j) {
|
|
2601
|
+
switch (_j.label) {
|
|
2602
|
+
case 0:
|
|
2603
|
+
_a = [__assign({}, output)];
|
|
2604
|
+
_h = {};
|
|
2605
|
+
return [4, parseBody(output.body, context)];
|
|
2606
|
+
case 1:
|
|
2607
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2608
|
+
errorCode = "UnknownError";
|
|
2609
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2610
|
+
_b = errorCode;
|
|
2611
|
+
switch (_b) {
|
|
2612
|
+
case "AccessDeniedException": return [3, 2];
|
|
2613
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
2614
|
+
case "InternalServerException": return [3, 4];
|
|
2615
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 4];
|
|
2616
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2617
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 6];
|
|
2618
|
+
case "ThrottlingException": return [3, 8];
|
|
2619
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 8];
|
|
2620
|
+
case "ValidationException": return [3, 10];
|
|
2621
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 10];
|
|
2622
|
+
}
|
|
2623
|
+
return [3, 12];
|
|
2624
|
+
case 2:
|
|
2625
|
+
_c = [{}];
|
|
2626
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2627
|
+
case 3:
|
|
2628
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2629
|
+
return [3, 13];
|
|
2630
|
+
case 4:
|
|
2631
|
+
_d = [{}];
|
|
2632
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2633
|
+
case 5:
|
|
2634
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2635
|
+
return [3, 13];
|
|
2636
|
+
case 6:
|
|
2637
|
+
_e = [{}];
|
|
2638
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2639
|
+
case 7:
|
|
2640
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2641
|
+
return [3, 13];
|
|
2642
|
+
case 8:
|
|
2643
|
+
_f = [{}];
|
|
2644
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2645
|
+
case 9:
|
|
2646
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2647
|
+
return [3, 13];
|
|
2648
|
+
case 10:
|
|
2649
|
+
_g = [{}];
|
|
2650
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2651
|
+
case 11:
|
|
2652
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2653
|
+
return [3, 13];
|
|
2654
|
+
case 12:
|
|
2655
|
+
parsedBody = parsedOutput.body;
|
|
2656
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2657
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2658
|
+
_j.label = 13;
|
|
2659
|
+
case 13:
|
|
2660
|
+
message = response.message || response.Message || errorCode;
|
|
2661
|
+
response.message = message;
|
|
2662
|
+
delete response.Message;
|
|
2663
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2664
|
+
}
|
|
2665
|
+
});
|
|
2666
|
+
}); };
|
|
2667
|
+
export var deserializeAws_restJson1GetAnswerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2668
|
+
var contents, data, _a, _b;
|
|
2669
|
+
return __generator(this, function (_c) {
|
|
2670
|
+
switch (_c.label) {
|
|
2671
|
+
case 0:
|
|
2672
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2673
|
+
return [2, deserializeAws_restJson1GetAnswerCommandError(output, context)];
|
|
2674
|
+
}
|
|
2675
|
+
contents = {
|
|
2676
|
+
$metadata: deserializeMetadata(output),
|
|
2677
|
+
Answer: undefined,
|
|
2678
|
+
LensAlias: undefined,
|
|
2679
|
+
LensArn: undefined,
|
|
2680
|
+
MilestoneNumber: undefined,
|
|
2681
|
+
WorkloadId: undefined,
|
|
2682
|
+
};
|
|
2683
|
+
_a = __expectNonNull;
|
|
2684
|
+
_b = __expectObject;
|
|
2685
|
+
return [4, parseBody(output.body, context)];
|
|
2686
|
+
case 1:
|
|
2687
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2688
|
+
if (data.Answer !== undefined && data.Answer !== null) {
|
|
2689
|
+
contents.Answer = deserializeAws_restJson1Answer(data.Answer, context);
|
|
2690
|
+
}
|
|
2691
|
+
if (data.LensAlias !== undefined && data.LensAlias !== null) {
|
|
2692
|
+
contents.LensAlias = __expectString(data.LensAlias);
|
|
2693
|
+
}
|
|
2694
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
2695
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
2696
|
+
}
|
|
2697
|
+
if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
|
|
1913
2698
|
contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
|
|
1914
2699
|
}
|
|
1915
2700
|
if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
|
|
@@ -1919,7 +2704,101 @@ export var deserializeAws_restJson1GetAnswerCommand = function (output, context)
|
|
|
1919
2704
|
}
|
|
1920
2705
|
});
|
|
1921
2706
|
}); };
|
|
1922
|
-
var deserializeAws_restJson1GetAnswerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2707
|
+
var deserializeAws_restJson1GetAnswerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2708
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2709
|
+
var _h;
|
|
2710
|
+
return __generator(this, function (_j) {
|
|
2711
|
+
switch (_j.label) {
|
|
2712
|
+
case 0:
|
|
2713
|
+
_a = [__assign({}, output)];
|
|
2714
|
+
_h = {};
|
|
2715
|
+
return [4, parseBody(output.body, context)];
|
|
2716
|
+
case 1:
|
|
2717
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2718
|
+
errorCode = "UnknownError";
|
|
2719
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2720
|
+
_b = errorCode;
|
|
2721
|
+
switch (_b) {
|
|
2722
|
+
case "AccessDeniedException": return [3, 2];
|
|
2723
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
2724
|
+
case "InternalServerException": return [3, 4];
|
|
2725
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 4];
|
|
2726
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2727
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 6];
|
|
2728
|
+
case "ThrottlingException": return [3, 8];
|
|
2729
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 8];
|
|
2730
|
+
case "ValidationException": return [3, 10];
|
|
2731
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 10];
|
|
2732
|
+
}
|
|
2733
|
+
return [3, 12];
|
|
2734
|
+
case 2:
|
|
2735
|
+
_c = [{}];
|
|
2736
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2737
|
+
case 3:
|
|
2738
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2739
|
+
return [3, 13];
|
|
2740
|
+
case 4:
|
|
2741
|
+
_d = [{}];
|
|
2742
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2743
|
+
case 5:
|
|
2744
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2745
|
+
return [3, 13];
|
|
2746
|
+
case 6:
|
|
2747
|
+
_e = [{}];
|
|
2748
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2749
|
+
case 7:
|
|
2750
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2751
|
+
return [3, 13];
|
|
2752
|
+
case 8:
|
|
2753
|
+
_f = [{}];
|
|
2754
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2755
|
+
case 9:
|
|
2756
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2757
|
+
return [3, 13];
|
|
2758
|
+
case 10:
|
|
2759
|
+
_g = [{}];
|
|
2760
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2761
|
+
case 11:
|
|
2762
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2763
|
+
return [3, 13];
|
|
2764
|
+
case 12:
|
|
2765
|
+
parsedBody = parsedOutput.body;
|
|
2766
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2767
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2768
|
+
_j.label = 13;
|
|
2769
|
+
case 13:
|
|
2770
|
+
message = response.message || response.Message || errorCode;
|
|
2771
|
+
response.message = message;
|
|
2772
|
+
delete response.Message;
|
|
2773
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2774
|
+
}
|
|
2775
|
+
});
|
|
2776
|
+
}); };
|
|
2777
|
+
export var deserializeAws_restJson1GetLensCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2778
|
+
var contents, data, _a, _b;
|
|
2779
|
+
return __generator(this, function (_c) {
|
|
2780
|
+
switch (_c.label) {
|
|
2781
|
+
case 0:
|
|
2782
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2783
|
+
return [2, deserializeAws_restJson1GetLensCommandError(output, context)];
|
|
2784
|
+
}
|
|
2785
|
+
contents = {
|
|
2786
|
+
$metadata: deserializeMetadata(output),
|
|
2787
|
+
Lens: undefined,
|
|
2788
|
+
};
|
|
2789
|
+
_a = __expectNonNull;
|
|
2790
|
+
_b = __expectObject;
|
|
2791
|
+
return [4, parseBody(output.body, context)];
|
|
2792
|
+
case 1:
|
|
2793
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2794
|
+
if (data.Lens !== undefined && data.Lens !== null) {
|
|
2795
|
+
contents.Lens = deserializeAws_restJson1Lens(data.Lens, context);
|
|
2796
|
+
}
|
|
2797
|
+
return [2, Promise.resolve(contents)];
|
|
2798
|
+
}
|
|
2799
|
+
});
|
|
2800
|
+
}); };
|
|
2801
|
+
var deserializeAws_restJson1GetLensCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1923
2802
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
1924
2803
|
var _h;
|
|
1925
2804
|
return __generator(this, function (_j) {
|
|
@@ -2206,6 +3085,8 @@ export var deserializeAws_restJson1GetLensVersionDifferenceCommand = function (o
|
|
|
2206
3085
|
BaseLensVersion: undefined,
|
|
2207
3086
|
LatestLensVersion: undefined,
|
|
2208
3087
|
LensAlias: undefined,
|
|
3088
|
+
LensArn: undefined,
|
|
3089
|
+
TargetLensVersion: undefined,
|
|
2209
3090
|
VersionDifferences: undefined,
|
|
2210
3091
|
};
|
|
2211
3092
|
_a = __expectNonNull;
|
|
@@ -2222,6 +3103,12 @@ export var deserializeAws_restJson1GetLensVersionDifferenceCommand = function (o
|
|
|
2222
3103
|
if (data.LensAlias !== undefined && data.LensAlias !== null) {
|
|
2223
3104
|
contents.LensAlias = __expectString(data.LensAlias);
|
|
2224
3105
|
}
|
|
3106
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
3107
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
3108
|
+
}
|
|
3109
|
+
if (data.TargetLensVersion !== undefined && data.TargetLensVersion !== null) {
|
|
3110
|
+
contents.TargetLensVersion = __expectString(data.TargetLensVersion);
|
|
3111
|
+
}
|
|
2225
3112
|
if (data.VersionDifferences !== undefined && data.VersionDifferences !== null) {
|
|
2226
3113
|
contents.VersionDifferences = deserializeAws_restJson1VersionDifferences(data.VersionDifferences, context);
|
|
2227
3114
|
}
|
|
@@ -2491,6 +3378,120 @@ var deserializeAws_restJson1GetWorkloadCommandError = function (output, context)
|
|
|
2491
3378
|
}
|
|
2492
3379
|
});
|
|
2493
3380
|
}); };
|
|
3381
|
+
export var deserializeAws_restJson1ImportLensCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3382
|
+
var contents, data, _a, _b;
|
|
3383
|
+
return __generator(this, function (_c) {
|
|
3384
|
+
switch (_c.label) {
|
|
3385
|
+
case 0:
|
|
3386
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3387
|
+
return [2, deserializeAws_restJson1ImportLensCommandError(output, context)];
|
|
3388
|
+
}
|
|
3389
|
+
contents = {
|
|
3390
|
+
$metadata: deserializeMetadata(output),
|
|
3391
|
+
LensArn: undefined,
|
|
3392
|
+
Status: undefined,
|
|
3393
|
+
};
|
|
3394
|
+
_a = __expectNonNull;
|
|
3395
|
+
_b = __expectObject;
|
|
3396
|
+
return [4, parseBody(output.body, context)];
|
|
3397
|
+
case 1:
|
|
3398
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3399
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
3400
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
3401
|
+
}
|
|
3402
|
+
if (data.Status !== undefined && data.Status !== null) {
|
|
3403
|
+
contents.Status = __expectString(data.Status);
|
|
3404
|
+
}
|
|
3405
|
+
return [2, Promise.resolve(contents)];
|
|
3406
|
+
}
|
|
3407
|
+
});
|
|
3408
|
+
}); };
|
|
3409
|
+
var deserializeAws_restJson1ImportLensCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3410
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
3411
|
+
var _k;
|
|
3412
|
+
return __generator(this, function (_l) {
|
|
3413
|
+
switch (_l.label) {
|
|
3414
|
+
case 0:
|
|
3415
|
+
_a = [__assign({}, output)];
|
|
3416
|
+
_k = {};
|
|
3417
|
+
return [4, parseBody(output.body, context)];
|
|
3418
|
+
case 1:
|
|
3419
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
|
|
3420
|
+
errorCode = "UnknownError";
|
|
3421
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3422
|
+
_b = errorCode;
|
|
3423
|
+
switch (_b) {
|
|
3424
|
+
case "AccessDeniedException": return [3, 2];
|
|
3425
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
3426
|
+
case "ConflictException": return [3, 4];
|
|
3427
|
+
case "com.amazonaws.wellarchitected#ConflictException": return [3, 4];
|
|
3428
|
+
case "InternalServerException": return [3, 6];
|
|
3429
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 6];
|
|
3430
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3431
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 8];
|
|
3432
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
3433
|
+
case "com.amazonaws.wellarchitected#ServiceQuotaExceededException": return [3, 10];
|
|
3434
|
+
case "ThrottlingException": return [3, 12];
|
|
3435
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 12];
|
|
3436
|
+
case "ValidationException": return [3, 14];
|
|
3437
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 14];
|
|
3438
|
+
}
|
|
3439
|
+
return [3, 16];
|
|
3440
|
+
case 2:
|
|
3441
|
+
_c = [{}];
|
|
3442
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3443
|
+
case 3:
|
|
3444
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3445
|
+
return [3, 17];
|
|
3446
|
+
case 4:
|
|
3447
|
+
_d = [{}];
|
|
3448
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3449
|
+
case 5:
|
|
3450
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3451
|
+
return [3, 17];
|
|
3452
|
+
case 6:
|
|
3453
|
+
_e = [{}];
|
|
3454
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3455
|
+
case 7:
|
|
3456
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3457
|
+
return [3, 17];
|
|
3458
|
+
case 8:
|
|
3459
|
+
_f = [{}];
|
|
3460
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3461
|
+
case 9:
|
|
3462
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3463
|
+
return [3, 17];
|
|
3464
|
+
case 10:
|
|
3465
|
+
_g = [{}];
|
|
3466
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
3467
|
+
case 11:
|
|
3468
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3469
|
+
return [3, 17];
|
|
3470
|
+
case 12:
|
|
3471
|
+
_h = [{}];
|
|
3472
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3473
|
+
case 13:
|
|
3474
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3475
|
+
return [3, 17];
|
|
3476
|
+
case 14:
|
|
3477
|
+
_j = [{}];
|
|
3478
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3479
|
+
case 15:
|
|
3480
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3481
|
+
return [3, 17];
|
|
3482
|
+
case 16:
|
|
3483
|
+
parsedBody = parsedOutput.body;
|
|
3484
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3485
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3486
|
+
_l.label = 17;
|
|
3487
|
+
case 17:
|
|
3488
|
+
message = response.message || response.Message || errorCode;
|
|
3489
|
+
response.message = message;
|
|
3490
|
+
delete response.Message;
|
|
3491
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
}); };
|
|
2494
3495
|
export var deserializeAws_restJson1ListAnswersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2495
3496
|
var contents, data, _a, _b;
|
|
2496
3497
|
return __generator(this, function (_c) {
|
|
@@ -2503,6 +3504,7 @@ export var deserializeAws_restJson1ListAnswersCommand = function (output, contex
|
|
|
2503
3504
|
$metadata: deserializeMetadata(output),
|
|
2504
3505
|
AnswerSummaries: undefined,
|
|
2505
3506
|
LensAlias: undefined,
|
|
3507
|
+
LensArn: undefined,
|
|
2506
3508
|
MilestoneNumber: undefined,
|
|
2507
3509
|
NextToken: undefined,
|
|
2508
3510
|
WorkloadId: undefined,
|
|
@@ -2518,6 +3520,9 @@ export var deserializeAws_restJson1ListAnswersCommand = function (output, contex
|
|
|
2518
3520
|
if (data.LensAlias !== undefined && data.LensAlias !== null) {
|
|
2519
3521
|
contents.LensAlias = __expectString(data.LensAlias);
|
|
2520
3522
|
}
|
|
3523
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
3524
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
3525
|
+
}
|
|
2521
3526
|
if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
|
|
2522
3527
|
contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
|
|
2523
3528
|
}
|
|
@@ -2703,6 +3708,7 @@ export var deserializeAws_restJson1ListLensReviewImprovementsCommand = function
|
|
|
2703
3708
|
$metadata: deserializeMetadata(output),
|
|
2704
3709
|
ImprovementSummaries: undefined,
|
|
2705
3710
|
LensAlias: undefined,
|
|
3711
|
+
LensArn: undefined,
|
|
2706
3712
|
MilestoneNumber: undefined,
|
|
2707
3713
|
NextToken: undefined,
|
|
2708
3714
|
WorkloadId: undefined,
|
|
@@ -2718,6 +3724,9 @@ export var deserializeAws_restJson1ListLensReviewImprovementsCommand = function
|
|
|
2718
3724
|
if (data.LensAlias !== undefined && data.LensAlias !== null) {
|
|
2719
3725
|
contents.LensAlias = __expectString(data.LensAlias);
|
|
2720
3726
|
}
|
|
3727
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
3728
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
3729
|
+
}
|
|
2721
3730
|
if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
|
|
2722
3731
|
contents.MilestoneNumber = __expectInt32(data.MilestoneNumber);
|
|
2723
3732
|
}
|
|
@@ -2907,6 +3916,104 @@ var deserializeAws_restJson1ListLensReviewsCommandError = function (output, cont
|
|
|
2907
3916
|
}
|
|
2908
3917
|
});
|
|
2909
3918
|
}); };
|
|
3919
|
+
export var deserializeAws_restJson1ListLensSharesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3920
|
+
var contents, data, _a, _b;
|
|
3921
|
+
return __generator(this, function (_c) {
|
|
3922
|
+
switch (_c.label) {
|
|
3923
|
+
case 0:
|
|
3924
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3925
|
+
return [2, deserializeAws_restJson1ListLensSharesCommandError(output, context)];
|
|
3926
|
+
}
|
|
3927
|
+
contents = {
|
|
3928
|
+
$metadata: deserializeMetadata(output),
|
|
3929
|
+
LensShareSummaries: undefined,
|
|
3930
|
+
NextToken: undefined,
|
|
3931
|
+
};
|
|
3932
|
+
_a = __expectNonNull;
|
|
3933
|
+
_b = __expectObject;
|
|
3934
|
+
return [4, parseBody(output.body, context)];
|
|
3935
|
+
case 1:
|
|
3936
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3937
|
+
if (data.LensShareSummaries !== undefined && data.LensShareSummaries !== null) {
|
|
3938
|
+
contents.LensShareSummaries = deserializeAws_restJson1LensShareSummaries(data.LensShareSummaries, context);
|
|
3939
|
+
}
|
|
3940
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
3941
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
3942
|
+
}
|
|
3943
|
+
return [2, Promise.resolve(contents)];
|
|
3944
|
+
}
|
|
3945
|
+
});
|
|
3946
|
+
}); };
|
|
3947
|
+
var deserializeAws_restJson1ListLensSharesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3948
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3949
|
+
var _h;
|
|
3950
|
+
return __generator(this, function (_j) {
|
|
3951
|
+
switch (_j.label) {
|
|
3952
|
+
case 0:
|
|
3953
|
+
_a = [__assign({}, output)];
|
|
3954
|
+
_h = {};
|
|
3955
|
+
return [4, parseBody(output.body, context)];
|
|
3956
|
+
case 1:
|
|
3957
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
3958
|
+
errorCode = "UnknownError";
|
|
3959
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3960
|
+
_b = errorCode;
|
|
3961
|
+
switch (_b) {
|
|
3962
|
+
case "AccessDeniedException": return [3, 2];
|
|
3963
|
+
case "com.amazonaws.wellarchitected#AccessDeniedException": return [3, 2];
|
|
3964
|
+
case "InternalServerException": return [3, 4];
|
|
3965
|
+
case "com.amazonaws.wellarchitected#InternalServerException": return [3, 4];
|
|
3966
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3967
|
+
case "com.amazonaws.wellarchitected#ResourceNotFoundException": return [3, 6];
|
|
3968
|
+
case "ThrottlingException": return [3, 8];
|
|
3969
|
+
case "com.amazonaws.wellarchitected#ThrottlingException": return [3, 8];
|
|
3970
|
+
case "ValidationException": return [3, 10];
|
|
3971
|
+
case "com.amazonaws.wellarchitected#ValidationException": return [3, 10];
|
|
3972
|
+
}
|
|
3973
|
+
return [3, 12];
|
|
3974
|
+
case 2:
|
|
3975
|
+
_c = [{}];
|
|
3976
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3977
|
+
case 3:
|
|
3978
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3979
|
+
return [3, 13];
|
|
3980
|
+
case 4:
|
|
3981
|
+
_d = [{}];
|
|
3982
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3983
|
+
case 5:
|
|
3984
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3985
|
+
return [3, 13];
|
|
3986
|
+
case 6:
|
|
3987
|
+
_e = [{}];
|
|
3988
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3989
|
+
case 7:
|
|
3990
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3991
|
+
return [3, 13];
|
|
3992
|
+
case 8:
|
|
3993
|
+
_f = [{}];
|
|
3994
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3995
|
+
case 9:
|
|
3996
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3997
|
+
return [3, 13];
|
|
3998
|
+
case 10:
|
|
3999
|
+
_g = [{}];
|
|
4000
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
4001
|
+
case 11:
|
|
4002
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4003
|
+
return [3, 13];
|
|
4004
|
+
case 12:
|
|
4005
|
+
parsedBody = parsedOutput.body;
|
|
4006
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4007
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
4008
|
+
_j.label = 13;
|
|
4009
|
+
case 13:
|
|
4010
|
+
message = response.message || response.Message || errorCode;
|
|
4011
|
+
response.message = message;
|
|
4012
|
+
delete response.Message;
|
|
4013
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
4014
|
+
}
|
|
4015
|
+
});
|
|
4016
|
+
}); };
|
|
2910
4017
|
export var deserializeAws_restJson1ListMilestonesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2911
4018
|
var contents, data, _a, _b;
|
|
2912
4019
|
return __generator(this, function (_c) {
|
|
@@ -3591,6 +4698,7 @@ export var deserializeAws_restJson1UpdateAnswerCommand = function (output, conte
|
|
|
3591
4698
|
$metadata: deserializeMetadata(output),
|
|
3592
4699
|
Answer: undefined,
|
|
3593
4700
|
LensAlias: undefined,
|
|
4701
|
+
LensArn: undefined,
|
|
3594
4702
|
WorkloadId: undefined,
|
|
3595
4703
|
};
|
|
3596
4704
|
_a = __expectNonNull;
|
|
@@ -3604,6 +4712,9 @@ export var deserializeAws_restJson1UpdateAnswerCommand = function (output, conte
|
|
|
3604
4712
|
if (data.LensAlias !== undefined && data.LensAlias !== null) {
|
|
3605
4713
|
contents.LensAlias = __expectString(data.LensAlias);
|
|
3606
4714
|
}
|
|
4715
|
+
if (data.LensArn !== undefined && data.LensArn !== null) {
|
|
4716
|
+
contents.LensArn = __expectString(data.LensArn);
|
|
4717
|
+
}
|
|
3607
4718
|
if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
|
|
3608
4719
|
contents.WorkloadId = __expectString(data.WorkloadId);
|
|
3609
4720
|
}
|
|
@@ -4472,6 +5583,7 @@ var deserializeAws_restJson1Answer = function (output, context) {
|
|
|
4472
5583
|
Choices: output.Choices !== undefined && output.Choices !== null
|
|
4473
5584
|
? deserializeAws_restJson1Choices(output.Choices, context)
|
|
4474
5585
|
: undefined,
|
|
5586
|
+
HelpfulResourceDisplayText: __expectString(output.HelpfulResourceDisplayText),
|
|
4475
5587
|
HelpfulResourceUrl: __expectString(output.HelpfulResourceUrl),
|
|
4476
5588
|
ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
|
|
4477
5589
|
IsApplicable: __expectBoolean(output.IsApplicable),
|
|
@@ -4520,6 +5632,12 @@ var deserializeAws_restJson1Choice = function (output, context) {
|
|
|
4520
5632
|
return {
|
|
4521
5633
|
ChoiceId: __expectString(output.ChoiceId),
|
|
4522
5634
|
Description: __expectString(output.Description),
|
|
5635
|
+
HelpfulResource: output.HelpfulResource !== undefined && output.HelpfulResource !== null
|
|
5636
|
+
? deserializeAws_restJson1ChoiceContent(output.HelpfulResource, context)
|
|
5637
|
+
: undefined,
|
|
5638
|
+
ImprovementPlan: output.ImprovementPlan !== undefined && output.ImprovementPlan !== null
|
|
5639
|
+
? deserializeAws_restJson1ChoiceContent(output.ImprovementPlan, context)
|
|
5640
|
+
: undefined,
|
|
4523
5641
|
Title: __expectString(output.Title),
|
|
4524
5642
|
};
|
|
4525
5643
|
};
|
|
@@ -4558,6 +5676,29 @@ var deserializeAws_restJson1ChoiceAnswerSummary = function (output, context) {
|
|
|
4558
5676
|
Status: __expectString(output.Status),
|
|
4559
5677
|
};
|
|
4560
5678
|
};
|
|
5679
|
+
var deserializeAws_restJson1ChoiceContent = function (output, context) {
|
|
5680
|
+
return {
|
|
5681
|
+
DisplayText: __expectString(output.DisplayText),
|
|
5682
|
+
Url: __expectString(output.Url),
|
|
5683
|
+
};
|
|
5684
|
+
};
|
|
5685
|
+
var deserializeAws_restJson1ChoiceImprovementPlan = function (output, context) {
|
|
5686
|
+
return {
|
|
5687
|
+
ChoiceId: __expectString(output.ChoiceId),
|
|
5688
|
+
DisplayText: __expectString(output.DisplayText),
|
|
5689
|
+
ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
|
|
5690
|
+
};
|
|
5691
|
+
};
|
|
5692
|
+
var deserializeAws_restJson1ChoiceImprovementPlans = function (output, context) {
|
|
5693
|
+
return (output || [])
|
|
5694
|
+
.filter(function (e) { return e != null; })
|
|
5695
|
+
.map(function (entry) {
|
|
5696
|
+
if (entry === null) {
|
|
5697
|
+
return null;
|
|
5698
|
+
}
|
|
5699
|
+
return deserializeAws_restJson1ChoiceImprovementPlan(entry, context);
|
|
5700
|
+
});
|
|
5701
|
+
};
|
|
4561
5702
|
var deserializeAws_restJson1Choices = function (output, context) {
|
|
4562
5703
|
return (output || [])
|
|
4563
5704
|
.filter(function (e) { return e != null; })
|
|
@@ -4581,15 +5722,29 @@ var deserializeAws_restJson1ImprovementSummaries = function (output, context) {
|
|
|
4581
5722
|
var deserializeAws_restJson1ImprovementSummary = function (output, context) {
|
|
4582
5723
|
return {
|
|
4583
5724
|
ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl),
|
|
5725
|
+
ImprovementPlans: output.ImprovementPlans !== undefined && output.ImprovementPlans !== null
|
|
5726
|
+
? deserializeAws_restJson1ChoiceImprovementPlans(output.ImprovementPlans, context)
|
|
5727
|
+
: undefined,
|
|
4584
5728
|
PillarId: __expectString(output.PillarId),
|
|
4585
5729
|
QuestionId: __expectString(output.QuestionId),
|
|
4586
5730
|
QuestionTitle: __expectString(output.QuestionTitle),
|
|
4587
5731
|
Risk: __expectString(output.Risk),
|
|
4588
5732
|
};
|
|
4589
5733
|
};
|
|
5734
|
+
var deserializeAws_restJson1Lens = function (output, context) {
|
|
5735
|
+
return {
|
|
5736
|
+
Description: __expectString(output.Description),
|
|
5737
|
+
LensArn: __expectString(output.LensArn),
|
|
5738
|
+
LensVersion: __expectString(output.LensVersion),
|
|
5739
|
+
Name: __expectString(output.Name),
|
|
5740
|
+
Owner: __expectString(output.Owner),
|
|
5741
|
+
ShareInvitationId: __expectString(output.ShareInvitationId),
|
|
5742
|
+
};
|
|
5743
|
+
};
|
|
4590
5744
|
var deserializeAws_restJson1LensReview = function (output, context) {
|
|
4591
5745
|
return {
|
|
4592
5746
|
LensAlias: __expectString(output.LensAlias),
|
|
5747
|
+
LensArn: __expectString(output.LensArn),
|
|
4593
5748
|
LensName: __expectString(output.LensName),
|
|
4594
5749
|
LensStatus: __expectString(output.LensStatus),
|
|
4595
5750
|
LensVersion: __expectString(output.LensVersion),
|
|
@@ -4610,6 +5765,7 @@ var deserializeAws_restJson1LensReviewReport = function (output, context) {
|
|
|
4610
5765
|
return {
|
|
4611
5766
|
Base64String: __expectString(output.Base64String),
|
|
4612
5767
|
LensAlias: __expectString(output.LensAlias),
|
|
5768
|
+
LensArn: __expectString(output.LensArn),
|
|
4613
5769
|
};
|
|
4614
5770
|
};
|
|
4615
5771
|
var deserializeAws_restJson1LensReviewSummaries = function (output, context) {
|
|
@@ -4625,6 +5781,7 @@ var deserializeAws_restJson1LensReviewSummaries = function (output, context) {
|
|
|
4625
5781
|
var deserializeAws_restJson1LensReviewSummary = function (output, context) {
|
|
4626
5782
|
return {
|
|
4627
5783
|
LensAlias: __expectString(output.LensAlias),
|
|
5784
|
+
LensArn: __expectString(output.LensArn),
|
|
4628
5785
|
LensName: __expectString(output.LensName),
|
|
4629
5786
|
LensStatus: __expectString(output.LensStatus),
|
|
4630
5787
|
LensVersion: __expectString(output.LensVersion),
|
|
@@ -4636,6 +5793,23 @@ var deserializeAws_restJson1LensReviewSummary = function (output, context) {
|
|
|
4636
5793
|
: undefined,
|
|
4637
5794
|
};
|
|
4638
5795
|
};
|
|
5796
|
+
var deserializeAws_restJson1LensShareSummaries = function (output, context) {
|
|
5797
|
+
return (output || [])
|
|
5798
|
+
.filter(function (e) { return e != null; })
|
|
5799
|
+
.map(function (entry) {
|
|
5800
|
+
if (entry === null) {
|
|
5801
|
+
return null;
|
|
5802
|
+
}
|
|
5803
|
+
return deserializeAws_restJson1LensShareSummary(entry, context);
|
|
5804
|
+
});
|
|
5805
|
+
};
|
|
5806
|
+
var deserializeAws_restJson1LensShareSummary = function (output, context) {
|
|
5807
|
+
return {
|
|
5808
|
+
ShareId: __expectString(output.ShareId),
|
|
5809
|
+
SharedWith: __expectString(output.SharedWith),
|
|
5810
|
+
Status: __expectString(output.Status),
|
|
5811
|
+
};
|
|
5812
|
+
};
|
|
4639
5813
|
var deserializeAws_restJson1LensSummaries = function (output, context) {
|
|
4640
5814
|
return (output || [])
|
|
4641
5815
|
.filter(function (e) { return e != null; })
|
|
@@ -4648,10 +5822,20 @@ var deserializeAws_restJson1LensSummaries = function (output, context) {
|
|
|
4648
5822
|
};
|
|
4649
5823
|
var deserializeAws_restJson1LensSummary = function (output, context) {
|
|
4650
5824
|
return {
|
|
5825
|
+
CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
5826
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
5827
|
+
: undefined,
|
|
4651
5828
|
Description: __expectString(output.Description),
|
|
4652
5829
|
LensAlias: __expectString(output.LensAlias),
|
|
5830
|
+
LensArn: __expectString(output.LensArn),
|
|
4653
5831
|
LensName: __expectString(output.LensName),
|
|
5832
|
+
LensStatus: __expectString(output.LensStatus),
|
|
5833
|
+
LensType: __expectString(output.LensType),
|
|
4654
5834
|
LensVersion: __expectString(output.LensVersion),
|
|
5835
|
+
Owner: __expectString(output.Owner),
|
|
5836
|
+
UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
5837
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
5838
|
+
: undefined,
|
|
4655
5839
|
};
|
|
4656
5840
|
};
|
|
4657
5841
|
var deserializeAws_restJson1LensUpgradeSummary = function (output, context) {
|
|
@@ -4659,6 +5843,7 @@ var deserializeAws_restJson1LensUpgradeSummary = function (output, context) {
|
|
|
4659
5843
|
CurrentLensVersion: __expectString(output.CurrentLensVersion),
|
|
4660
5844
|
LatestLensVersion: __expectString(output.LatestLensVersion),
|
|
4661
5845
|
LensAlias: __expectString(output.LensAlias),
|
|
5846
|
+
LensArn: __expectString(output.LensArn),
|
|
4662
5847
|
WorkloadId: __expectString(output.WorkloadId),
|
|
4663
5848
|
WorkloadName: __expectString(output.WorkloadName),
|
|
4664
5849
|
};
|
|
@@ -4719,6 +5904,7 @@ var deserializeAws_restJson1PillarDifference = function (output, context) {
|
|
|
4719
5904
|
return {
|
|
4720
5905
|
DifferenceStatus: __expectString(output.DifferenceStatus),
|
|
4721
5906
|
PillarId: __expectString(output.PillarId),
|
|
5907
|
+
PillarName: __expectString(output.PillarName),
|
|
4722
5908
|
QuestionDifferences: output.QuestionDifferences !== undefined && output.QuestionDifferences !== null
|
|
4723
5909
|
? deserializeAws_restJson1QuestionDifferences(output.QuestionDifferences, context)
|
|
4724
5910
|
: undefined,
|
|
@@ -4793,7 +5979,10 @@ var deserializeAws_restJson1SelectedChoices = function (output, context) {
|
|
|
4793
5979
|
};
|
|
4794
5980
|
var deserializeAws_restJson1ShareInvitation = function (output, context) {
|
|
4795
5981
|
return {
|
|
5982
|
+
LensAlias: __expectString(output.LensAlias),
|
|
5983
|
+
LensArn: __expectString(output.LensArn),
|
|
4796
5984
|
ShareInvitationId: __expectString(output.ShareInvitationId),
|
|
5985
|
+
ShareResourceType: __expectString(output.ShareResourceType),
|
|
4797
5986
|
WorkloadId: __expectString(output.WorkloadId),
|
|
4798
5987
|
};
|
|
4799
5988
|
};
|
|
@@ -4809,8 +5998,11 @@ var deserializeAws_restJson1ShareInvitationSummaries = function (output, context
|
|
|
4809
5998
|
};
|
|
4810
5999
|
var deserializeAws_restJson1ShareInvitationSummary = function (output, context) {
|
|
4811
6000
|
return {
|
|
6001
|
+
LensArn: __expectString(output.LensArn),
|
|
6002
|
+
LensName: __expectString(output.LensName),
|
|
4812
6003
|
PermissionType: __expectString(output.PermissionType),
|
|
4813
6004
|
ShareInvitationId: __expectString(output.ShareInvitationId),
|
|
6005
|
+
ShareResourceType: __expectString(output.ShareResourceType),
|
|
4814
6006
|
SharedBy: __expectString(output.SharedBy),
|
|
4815
6007
|
SharedWith: __expectString(output.SharedWith),
|
|
4816
6008
|
WorkloadId: __expectString(output.WorkloadId),
|