@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.
Files changed (65) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +6 -6
  3. package/dist-cjs/WellArchitected.js +120 -0
  4. package/dist-cjs/commands/CreateLensShareCommand.js +36 -0
  5. package/dist-cjs/commands/CreateLensVersionCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteLensCommand.js +36 -0
  7. package/dist-cjs/commands/DeleteLensShareCommand.js +36 -0
  8. package/dist-cjs/commands/ExportLensCommand.js +36 -0
  9. package/dist-cjs/commands/GetLensCommand.js +36 -0
  10. package/dist-cjs/commands/ImportLensCommand.js +36 -0
  11. package/dist-cjs/commands/ListLensSharesCommand.js +36 -0
  12. package/dist-cjs/commands/index.js +8 -0
  13. package/dist-cjs/models/models_0.js +150 -17
  14. package/dist-cjs/pagination/ListLensSharesPaginator.js +35 -0
  15. package/dist-cjs/pagination/index.js +1 -0
  16. package/dist-cjs/protocols/Aws_restJson1.js +1137 -62
  17. package/dist-es/WellArchitected.js +120 -0
  18. package/dist-es/commands/CreateLensShareCommand.js +39 -0
  19. package/dist-es/commands/CreateLensVersionCommand.js +39 -0
  20. package/dist-es/commands/DeleteLensCommand.js +39 -0
  21. package/dist-es/commands/DeleteLensShareCommand.js +39 -0
  22. package/dist-es/commands/ExportLensCommand.js +39 -0
  23. package/dist-es/commands/GetLensCommand.js +39 -0
  24. package/dist-es/commands/ImportLensCommand.js +39 -0
  25. package/dist-es/commands/ListLensSharesCommand.js +39 -0
  26. package/dist-es/commands/index.js +8 -0
  27. package/dist-es/models/models_0.js +109 -12
  28. package/dist-es/pagination/ListLensSharesPaginator.js +74 -0
  29. package/dist-es/pagination/index.js +1 -0
  30. package/dist-es/protocols/Aws_restJson1.js +1232 -40
  31. package/dist-types/WellArchitected.d.ts +156 -13
  32. package/dist-types/WellArchitectedClient.d.ts +16 -8
  33. package/dist-types/commands/AssociateLensesCommand.d.ts +10 -0
  34. package/dist-types/commands/CreateLensShareCommand.d.ts +48 -0
  35. package/dist-types/commands/CreateLensVersionCommand.d.ts +39 -0
  36. package/dist-types/commands/CreateWorkloadCommand.d.ts +3 -3
  37. package/dist-types/commands/CreateWorkloadShareCommand.d.ts +3 -3
  38. package/dist-types/commands/DeleteLensCommand.d.ts +49 -0
  39. package/dist-types/commands/DeleteLensShareCommand.d.ts +48 -0
  40. package/dist-types/commands/DisassociateLensesCommand.d.ts +2 -1
  41. package/dist-types/commands/ExportLensCommand.d.ts +49 -0
  42. package/dist-types/commands/GetLensCommand.d.ts +35 -0
  43. package/dist-types/commands/ImportLensCommand.d.ts +53 -0
  44. package/dist-types/commands/ListLensSharesCommand.d.ts +35 -0
  45. package/dist-types/commands/index.d.ts +8 -0
  46. package/dist-types/models/models_0.d.ts +676 -118
  47. package/dist-types/pagination/ListLensSharesPaginator.d.ts +4 -0
  48. package/dist-types/pagination/index.d.ts +1 -0
  49. package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
  50. package/dist-types/ts3.4/WellArchitected.d.ts +40 -0
  51. package/dist-types/ts3.4/WellArchitectedClient.d.ts +10 -2
  52. package/dist-types/ts3.4/commands/CreateLensShareCommand.d.ts +17 -0
  53. package/dist-types/ts3.4/commands/CreateLensVersionCommand.d.ts +17 -0
  54. package/dist-types/ts3.4/commands/DeleteLensCommand.d.ts +17 -0
  55. package/dist-types/ts3.4/commands/DeleteLensShareCommand.d.ts +17 -0
  56. package/dist-types/ts3.4/commands/ExportLensCommand.d.ts +17 -0
  57. package/dist-types/ts3.4/commands/GetLensCommand.d.ts +17 -0
  58. package/dist-types/ts3.4/commands/ImportLensCommand.d.ts +17 -0
  59. package/dist-types/ts3.4/commands/ListLensSharesCommand.d.ts +17 -0
  60. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  61. package/dist-types/ts3.4/models/models_0.d.ts +321 -24
  62. package/dist-types/ts3.4/pagination/ListLensSharesPaginator.d.ts +4 -0
  63. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  64. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  65. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1ListNotificationsCommand = exports.deserializeAws_restJson1ListMilestonesCommand = exports.deserializeAws_restJson1ListLensReviewsCommand = exports.deserializeAws_restJson1ListLensReviewImprovementsCommand = exports.deserializeAws_restJson1ListLensesCommand = exports.deserializeAws_restJson1ListAnswersCommand = exports.deserializeAws_restJson1GetWorkloadCommand = exports.deserializeAws_restJson1GetMilestoneCommand = exports.deserializeAws_restJson1GetLensVersionDifferenceCommand = exports.deserializeAws_restJson1GetLensReviewReportCommand = exports.deserializeAws_restJson1GetLensReviewCommand = exports.deserializeAws_restJson1GetAnswerCommand = exports.deserializeAws_restJson1DisassociateLensesCommand = exports.deserializeAws_restJson1DeleteWorkloadShareCommand = exports.deserializeAws_restJson1DeleteWorkloadCommand = exports.deserializeAws_restJson1CreateWorkloadShareCommand = exports.deserializeAws_restJson1CreateWorkloadCommand = exports.deserializeAws_restJson1CreateMilestoneCommand = exports.deserializeAws_restJson1AssociateLensesCommand = exports.serializeAws_restJson1UpgradeLensReviewCommand = exports.serializeAws_restJson1UpdateWorkloadShareCommand = exports.serializeAws_restJson1UpdateWorkloadCommand = exports.serializeAws_restJson1UpdateShareInvitationCommand = exports.serializeAws_restJson1UpdateLensReviewCommand = exports.serializeAws_restJson1UpdateAnswerCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListWorkloadSharesCommand = exports.serializeAws_restJson1ListWorkloadsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListShareInvitationsCommand = exports.serializeAws_restJson1ListNotificationsCommand = exports.serializeAws_restJson1ListMilestonesCommand = exports.serializeAws_restJson1ListLensReviewsCommand = exports.serializeAws_restJson1ListLensReviewImprovementsCommand = exports.serializeAws_restJson1ListLensesCommand = exports.serializeAws_restJson1ListAnswersCommand = exports.serializeAws_restJson1GetWorkloadCommand = exports.serializeAws_restJson1GetMilestoneCommand = exports.serializeAws_restJson1GetLensVersionDifferenceCommand = exports.serializeAws_restJson1GetLensReviewReportCommand = exports.serializeAws_restJson1GetLensReviewCommand = exports.serializeAws_restJson1GetAnswerCommand = exports.serializeAws_restJson1DisassociateLensesCommand = exports.serializeAws_restJson1DeleteWorkloadShareCommand = exports.serializeAws_restJson1DeleteWorkloadCommand = exports.serializeAws_restJson1CreateWorkloadShareCommand = exports.serializeAws_restJson1CreateWorkloadCommand = exports.serializeAws_restJson1CreateMilestoneCommand = exports.serializeAws_restJson1AssociateLensesCommand = void 0;
4
- exports.deserializeAws_restJson1UpgradeLensReviewCommand = exports.deserializeAws_restJson1UpdateWorkloadShareCommand = exports.deserializeAws_restJson1UpdateWorkloadCommand = exports.deserializeAws_restJson1UpdateShareInvitationCommand = exports.deserializeAws_restJson1UpdateLensReviewCommand = exports.deserializeAws_restJson1UpdateAnswerCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListWorkloadSharesCommand = exports.deserializeAws_restJson1ListWorkloadsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListShareInvitationsCommand = void 0;
3
+ exports.deserializeAws_restJson1DisassociateLensesCommand = exports.deserializeAws_restJson1DeleteWorkloadShareCommand = exports.deserializeAws_restJson1DeleteWorkloadCommand = exports.deserializeAws_restJson1DeleteLensShareCommand = exports.deserializeAws_restJson1DeleteLensCommand = exports.deserializeAws_restJson1CreateWorkloadShareCommand = exports.deserializeAws_restJson1CreateWorkloadCommand = exports.deserializeAws_restJson1CreateMilestoneCommand = exports.deserializeAws_restJson1CreateLensVersionCommand = exports.deserializeAws_restJson1CreateLensShareCommand = exports.deserializeAws_restJson1AssociateLensesCommand = exports.serializeAws_restJson1UpgradeLensReviewCommand = exports.serializeAws_restJson1UpdateWorkloadShareCommand = exports.serializeAws_restJson1UpdateWorkloadCommand = exports.serializeAws_restJson1UpdateShareInvitationCommand = exports.serializeAws_restJson1UpdateLensReviewCommand = exports.serializeAws_restJson1UpdateAnswerCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListWorkloadSharesCommand = exports.serializeAws_restJson1ListWorkloadsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListShareInvitationsCommand = exports.serializeAws_restJson1ListNotificationsCommand = exports.serializeAws_restJson1ListMilestonesCommand = exports.serializeAws_restJson1ListLensSharesCommand = exports.serializeAws_restJson1ListLensReviewsCommand = exports.serializeAws_restJson1ListLensReviewImprovementsCommand = exports.serializeAws_restJson1ListLensesCommand = exports.serializeAws_restJson1ListAnswersCommand = exports.serializeAws_restJson1ImportLensCommand = exports.serializeAws_restJson1GetWorkloadCommand = exports.serializeAws_restJson1GetMilestoneCommand = exports.serializeAws_restJson1GetLensVersionDifferenceCommand = exports.serializeAws_restJson1GetLensReviewReportCommand = exports.serializeAws_restJson1GetLensReviewCommand = exports.serializeAws_restJson1GetLensCommand = exports.serializeAws_restJson1GetAnswerCommand = exports.serializeAws_restJson1ExportLensCommand = exports.serializeAws_restJson1DisassociateLensesCommand = exports.serializeAws_restJson1DeleteWorkloadShareCommand = exports.serializeAws_restJson1DeleteWorkloadCommand = exports.serializeAws_restJson1DeleteLensShareCommand = exports.serializeAws_restJson1DeleteLensCommand = exports.serializeAws_restJson1CreateWorkloadShareCommand = exports.serializeAws_restJson1CreateWorkloadCommand = exports.serializeAws_restJson1CreateMilestoneCommand = exports.serializeAws_restJson1CreateLensVersionCommand = exports.serializeAws_restJson1CreateLensShareCommand = exports.serializeAws_restJson1AssociateLensesCommand = void 0;
4
+ exports.deserializeAws_restJson1UpgradeLensReviewCommand = exports.deserializeAws_restJson1UpdateWorkloadShareCommand = exports.deserializeAws_restJson1UpdateWorkloadCommand = exports.deserializeAws_restJson1UpdateShareInvitationCommand = exports.deserializeAws_restJson1UpdateLensReviewCommand = exports.deserializeAws_restJson1UpdateAnswerCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListWorkloadSharesCommand = exports.deserializeAws_restJson1ListWorkloadsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListShareInvitationsCommand = exports.deserializeAws_restJson1ListNotificationsCommand = exports.deserializeAws_restJson1ListMilestonesCommand = exports.deserializeAws_restJson1ListLensSharesCommand = exports.deserializeAws_restJson1ListLensReviewsCommand = exports.deserializeAws_restJson1ListLensReviewImprovementsCommand = exports.deserializeAws_restJson1ListLensesCommand = exports.deserializeAws_restJson1ListAnswersCommand = exports.deserializeAws_restJson1ImportLensCommand = exports.deserializeAws_restJson1GetWorkloadCommand = exports.deserializeAws_restJson1GetMilestoneCommand = exports.deserializeAws_restJson1GetLensVersionDifferenceCommand = exports.deserializeAws_restJson1GetLensReviewReportCommand = exports.deserializeAws_restJson1GetLensReviewCommand = exports.deserializeAws_restJson1GetLensCommand = exports.deserializeAws_restJson1GetAnswerCommand = exports.deserializeAws_restJson1ExportLensCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const uuid_1 = require("uuid");
@@ -37,6 +37,74 @@ const serializeAws_restJson1AssociateLensesCommand = async (input, context) => {
37
37
  });
38
38
  };
39
39
  exports.serializeAws_restJson1AssociateLensesCommand = serializeAws_restJson1AssociateLensesCommand;
40
+ const serializeAws_restJson1CreateLensShareCommand = async (input, context) => {
41
+ var _a;
42
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const headers = {
44
+ "content-type": "application/json",
45
+ };
46
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
47
+ if (input.LensAlias !== undefined) {
48
+ const labelValue = input.LensAlias;
49
+ if (labelValue.length <= 0) {
50
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
51
+ }
52
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
53
+ }
54
+ else {
55
+ throw new Error("No value provided for input HTTP label: LensAlias.");
56
+ }
57
+ let body;
58
+ body = JSON.stringify({
59
+ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
60
+ ...(input.SharedWith !== undefined && input.SharedWith !== null && { SharedWith: input.SharedWith }),
61
+ });
62
+ return new protocol_http_1.HttpRequest({
63
+ protocol,
64
+ hostname,
65
+ port,
66
+ method: "POST",
67
+ headers,
68
+ path: resolvedPath,
69
+ body,
70
+ });
71
+ };
72
+ exports.serializeAws_restJson1CreateLensShareCommand = serializeAws_restJson1CreateLensShareCommand;
73
+ const serializeAws_restJson1CreateLensVersionCommand = async (input, context) => {
74
+ var _a;
75
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
76
+ const headers = {
77
+ "content-type": "application/json",
78
+ };
79
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions";
80
+ if (input.LensAlias !== undefined) {
81
+ const labelValue = input.LensAlias;
82
+ if (labelValue.length <= 0) {
83
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
84
+ }
85
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
86
+ }
87
+ else {
88
+ throw new Error("No value provided for input HTTP label: LensAlias.");
89
+ }
90
+ let body;
91
+ body = JSON.stringify({
92
+ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
93
+ ...(input.IsMajorVersion !== undefined &&
94
+ input.IsMajorVersion !== null && { IsMajorVersion: input.IsMajorVersion }),
95
+ ...(input.LensVersion !== undefined && input.LensVersion !== null && { LensVersion: input.LensVersion }),
96
+ });
97
+ return new protocol_http_1.HttpRequest({
98
+ protocol,
99
+ hostname,
100
+ port,
101
+ method: "POST",
102
+ headers,
103
+ path: resolvedPath,
104
+ body,
105
+ });
106
+ };
107
+ exports.serializeAws_restJson1CreateLensVersionCommand = serializeAws_restJson1CreateLensVersionCommand;
40
108
  const serializeAws_restJson1CreateMilestoneCommand = async (input, context) => {
41
109
  var _a;
42
110
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -151,6 +219,77 @@ const serializeAws_restJson1CreateWorkloadShareCommand = async (input, context)
151
219
  });
152
220
  };
153
221
  exports.serializeAws_restJson1CreateWorkloadShareCommand = serializeAws_restJson1CreateWorkloadShareCommand;
222
+ const serializeAws_restJson1DeleteLensCommand = async (input, context) => {
223
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
224
+ const headers = {};
225
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
226
+ if (input.LensAlias !== undefined) {
227
+ const 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}", smithy_client_1.extendedEncodeURIComponent(labelValue));
232
+ }
233
+ else {
234
+ throw new Error("No value provided for input HTTP label: LensAlias.");
235
+ }
236
+ const query = {
237
+ ...(input.ClientRequestToken !== undefined && { ClientRequestToken: input.ClientRequestToken }),
238
+ ...(input.LensStatus !== undefined && { LensStatus: input.LensStatus }),
239
+ };
240
+ let body;
241
+ return new protocol_http_1.HttpRequest({
242
+ protocol,
243
+ hostname,
244
+ port,
245
+ method: "DELETE",
246
+ headers,
247
+ path: resolvedPath,
248
+ query,
249
+ body,
250
+ });
251
+ };
252
+ exports.serializeAws_restJson1DeleteLensCommand = serializeAws_restJson1DeleteLensCommand;
253
+ const serializeAws_restJson1DeleteLensShareCommand = async (input, context) => {
254
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const headers = {};
256
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares/{ShareId}";
257
+ if (input.ShareId !== undefined) {
258
+ const labelValue = input.ShareId;
259
+ if (labelValue.length <= 0) {
260
+ throw new Error("Empty value provided for input HTTP label: ShareId.");
261
+ }
262
+ resolvedPath = resolvedPath.replace("{ShareId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
263
+ }
264
+ else {
265
+ throw new Error("No value provided for input HTTP label: ShareId.");
266
+ }
267
+ if (input.LensAlias !== undefined) {
268
+ const labelValue = input.LensAlias;
269
+ if (labelValue.length <= 0) {
270
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
271
+ }
272
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
273
+ }
274
+ else {
275
+ throw new Error("No value provided for input HTTP label: LensAlias.");
276
+ }
277
+ const query = {
278
+ ...(input.ClientRequestToken !== undefined && { ClientRequestToken: input.ClientRequestToken }),
279
+ };
280
+ let body;
281
+ return new protocol_http_1.HttpRequest({
282
+ protocol,
283
+ hostname,
284
+ port,
285
+ method: "DELETE",
286
+ headers,
287
+ path: resolvedPath,
288
+ query,
289
+ body,
290
+ });
291
+ };
292
+ exports.serializeAws_restJson1DeleteLensShareCommand = serializeAws_restJson1DeleteLensShareCommand;
154
293
  const serializeAws_restJson1DeleteWorkloadCommand = async (input, context) => {
155
294
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
295
  const headers = {};
@@ -254,6 +393,36 @@ const serializeAws_restJson1DisassociateLensesCommand = async (input, context) =
254
393
  });
255
394
  };
256
395
  exports.serializeAws_restJson1DisassociateLensesCommand = serializeAws_restJson1DisassociateLensesCommand;
396
+ const serializeAws_restJson1ExportLensCommand = async (input, context) => {
397
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
398
+ const headers = {};
399
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/export";
400
+ if (input.LensAlias !== undefined) {
401
+ const labelValue = input.LensAlias;
402
+ if (labelValue.length <= 0) {
403
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
404
+ }
405
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
406
+ }
407
+ else {
408
+ throw new Error("No value provided for input HTTP label: LensAlias.");
409
+ }
410
+ const query = {
411
+ ...(input.LensVersion !== undefined && { LensVersion: input.LensVersion }),
412
+ };
413
+ let body;
414
+ return new protocol_http_1.HttpRequest({
415
+ protocol,
416
+ hostname,
417
+ port,
418
+ method: "GET",
419
+ headers,
420
+ path: resolvedPath,
421
+ query,
422
+ body,
423
+ });
424
+ };
425
+ exports.serializeAws_restJson1ExportLensCommand = serializeAws_restJson1ExportLensCommand;
257
426
  const serializeAws_restJson1GetAnswerCommand = async (input, context) => {
258
427
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
428
  const headers = {};
@@ -305,6 +474,36 @@ const serializeAws_restJson1GetAnswerCommand = async (input, context) => {
305
474
  });
306
475
  };
307
476
  exports.serializeAws_restJson1GetAnswerCommand = serializeAws_restJson1GetAnswerCommand;
477
+ const serializeAws_restJson1GetLensCommand = async (input, context) => {
478
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
479
+ const headers = {};
480
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
481
+ if (input.LensAlias !== undefined) {
482
+ const labelValue = input.LensAlias;
483
+ if (labelValue.length <= 0) {
484
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
485
+ }
486
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
487
+ }
488
+ else {
489
+ throw new Error("No value provided for input HTTP label: LensAlias.");
490
+ }
491
+ const query = {
492
+ ...(input.LensVersion !== undefined && { LensVersion: input.LensVersion }),
493
+ };
494
+ let body;
495
+ return new protocol_http_1.HttpRequest({
496
+ protocol,
497
+ hostname,
498
+ port,
499
+ method: "GET",
500
+ headers,
501
+ path: resolvedPath,
502
+ query,
503
+ body,
504
+ });
505
+ };
506
+ exports.serializeAws_restJson1GetLensCommand = serializeAws_restJson1GetLensCommand;
308
507
  const serializeAws_restJson1GetLensReviewCommand = async (input, context) => {
309
508
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
310
509
  const headers = {};
@@ -403,6 +602,7 @@ const serializeAws_restJson1GetLensVersionDifferenceCommand = async (input, cont
403
602
  }
404
603
  const query = {
405
604
  ...(input.BaseLensVersion !== undefined && { BaseLensVersion: input.BaseLensVersion }),
605
+ ...(input.TargetLensVersion !== undefined && { TargetLensVersion: input.TargetLensVersion }),
406
606
  };
407
607
  let body;
408
608
  return new protocol_http_1.HttpRequest({
@@ -480,6 +680,31 @@ const serializeAws_restJson1GetWorkloadCommand = async (input, context) => {
480
680
  });
481
681
  };
482
682
  exports.serializeAws_restJson1GetWorkloadCommand = serializeAws_restJson1GetWorkloadCommand;
683
+ const serializeAws_restJson1ImportLensCommand = async (input, context) => {
684
+ var _a;
685
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
686
+ const headers = {
687
+ "content-type": "application/json",
688
+ };
689
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/importLens";
690
+ let body;
691
+ body = JSON.stringify({
692
+ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
693
+ ...(input.JSONString !== undefined && input.JSONString !== null && { JSONString: input.JSONString }),
694
+ ...(input.LensAlias !== undefined && input.LensAlias !== null && { LensAlias: input.LensAlias }),
695
+ ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
696
+ });
697
+ return new protocol_http_1.HttpRequest({
698
+ protocol,
699
+ hostname,
700
+ port,
701
+ method: "PUT",
702
+ headers,
703
+ path: resolvedPath,
704
+ body,
705
+ });
706
+ };
707
+ exports.serializeAws_restJson1ImportLensCommand = serializeAws_restJson1ImportLensCommand;
483
708
  const serializeAws_restJson1ListAnswersCommand = async (input, context) => {
484
709
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
485
710
  const headers = {};
@@ -531,6 +756,9 @@ const serializeAws_restJson1ListLensesCommand = async (input, context) => {
531
756
  const query = {
532
757
  ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
533
758
  ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
759
+ ...(input.LensType !== undefined && { LensType: input.LensType }),
760
+ ...(input.LensStatus !== undefined && { LensStatus: input.LensStatus }),
761
+ ...(input.LensName !== undefined && { LensName: input.LensName }),
534
762
  };
535
763
  let body;
536
764
  return new protocol_http_1.HttpRequest({
@@ -621,6 +849,38 @@ const serializeAws_restJson1ListLensReviewsCommand = async (input, context) => {
621
849
  });
622
850
  };
623
851
  exports.serializeAws_restJson1ListLensReviewsCommand = serializeAws_restJson1ListLensReviewsCommand;
852
+ const serializeAws_restJson1ListLensSharesCommand = async (input, context) => {
853
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
854
+ const headers = {};
855
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
856
+ if (input.LensAlias !== undefined) {
857
+ const labelValue = input.LensAlias;
858
+ if (labelValue.length <= 0) {
859
+ throw new Error("Empty value provided for input HTTP label: LensAlias.");
860
+ }
861
+ resolvedPath = resolvedPath.replace("{LensAlias}", smithy_client_1.extendedEncodeURIComponent(labelValue));
862
+ }
863
+ else {
864
+ throw new Error("No value provided for input HTTP label: LensAlias.");
865
+ }
866
+ const query = {
867
+ ...(input.SharedWithPrefix !== undefined && { SharedWithPrefix: input.SharedWithPrefix }),
868
+ ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
869
+ ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
870
+ };
871
+ let body;
872
+ return new protocol_http_1.HttpRequest({
873
+ protocol,
874
+ hostname,
875
+ port,
876
+ method: "GET",
877
+ headers,
878
+ path: resolvedPath,
879
+ query,
880
+ body,
881
+ });
882
+ };
883
+ exports.serializeAws_restJson1ListLensSharesCommand = serializeAws_restJson1ListLensSharesCommand;
624
884
  const serializeAws_restJson1ListMilestonesCommand = async (input, context) => {
625
885
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
626
886
  const headers = {
@@ -683,6 +943,8 @@ const serializeAws_restJson1ListShareInvitationsCommand = async (input, context)
683
943
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations";
684
944
  const query = {
685
945
  ...(input.WorkloadNamePrefix !== undefined && { WorkloadNamePrefix: input.WorkloadNamePrefix }),
946
+ ...(input.LensNamePrefix !== undefined && { LensNamePrefix: input.LensNamePrefix }),
947
+ ...(input.ShareResourceType !== undefined && { ShareResourceType: input.ShareResourceType }),
686
948
  ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
687
949
  ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
688
950
  };
@@ -1207,26 +1469,22 @@ const deserializeAws_restJson1AssociateLensesCommandError = async (output, conte
1207
1469
  delete response.Message;
1208
1470
  return Promise.reject(Object.assign(new Error(message), response));
1209
1471
  };
1210
- const deserializeAws_restJson1CreateMilestoneCommand = async (output, context) => {
1472
+ const deserializeAws_restJson1CreateLensShareCommand = async (output, context) => {
1211
1473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1212
- return deserializeAws_restJson1CreateMilestoneCommandError(output, context);
1474
+ return deserializeAws_restJson1CreateLensShareCommandError(output, context);
1213
1475
  }
1214
1476
  const contents = {
1215
1477
  $metadata: deserializeMetadata(output),
1216
- MilestoneNumber: undefined,
1217
- WorkloadId: undefined,
1478
+ ShareId: undefined,
1218
1479
  };
1219
1480
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1220
- if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
1221
- contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
1222
- }
1223
- if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
1224
- contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
1481
+ if (data.ShareId !== undefined && data.ShareId !== null) {
1482
+ contents.ShareId = smithy_client_1.expectString(data.ShareId);
1225
1483
  }
1226
1484
  return Promise.resolve(contents);
1227
1485
  };
1228
- exports.deserializeAws_restJson1CreateMilestoneCommand = deserializeAws_restJson1CreateMilestoneCommand;
1229
- const deserializeAws_restJson1CreateMilestoneCommandError = async (output, context) => {
1486
+ exports.deserializeAws_restJson1CreateLensShareCommand = deserializeAws_restJson1CreateLensShareCommand;
1487
+ const deserializeAws_restJson1CreateLensShareCommandError = async (output, context) => {
1230
1488
  const parsedOutput = {
1231
1489
  ...output,
1232
1490
  body: await parseBody(output.body, context),
@@ -1307,26 +1565,226 @@ const deserializeAws_restJson1CreateMilestoneCommandError = async (output, conte
1307
1565
  delete response.Message;
1308
1566
  return Promise.reject(Object.assign(new Error(message), response));
1309
1567
  };
1310
- const deserializeAws_restJson1CreateWorkloadCommand = async (output, context) => {
1568
+ const deserializeAws_restJson1CreateLensVersionCommand = async (output, context) => {
1311
1569
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1312
- return deserializeAws_restJson1CreateWorkloadCommandError(output, context);
1570
+ return deserializeAws_restJson1CreateLensVersionCommandError(output, context);
1313
1571
  }
1314
1572
  const contents = {
1315
1573
  $metadata: deserializeMetadata(output),
1316
- WorkloadArn: undefined,
1317
- WorkloadId: undefined,
1574
+ LensArn: undefined,
1575
+ LensVersion: undefined,
1318
1576
  };
1319
1577
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1320
- if (data.WorkloadArn !== undefined && data.WorkloadArn !== null) {
1321
- contents.WorkloadArn = smithy_client_1.expectString(data.WorkloadArn);
1578
+ if (data.LensArn !== undefined && data.LensArn !== null) {
1579
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
1322
1580
  }
1323
- if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
1324
- contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
1581
+ if (data.LensVersion !== undefined && data.LensVersion !== null) {
1582
+ contents.LensVersion = smithy_client_1.expectString(data.LensVersion);
1325
1583
  }
1326
1584
  return Promise.resolve(contents);
1327
1585
  };
1328
- exports.deserializeAws_restJson1CreateWorkloadCommand = deserializeAws_restJson1CreateWorkloadCommand;
1329
- const deserializeAws_restJson1CreateWorkloadCommandError = async (output, context) => {
1586
+ exports.deserializeAws_restJson1CreateLensVersionCommand = deserializeAws_restJson1CreateLensVersionCommand;
1587
+ const deserializeAws_restJson1CreateLensVersionCommandError = async (output, context) => {
1588
+ const parsedOutput = {
1589
+ ...output,
1590
+ body: await parseBody(output.body, context),
1591
+ };
1592
+ let response;
1593
+ let errorCode = "UnknownError";
1594
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1595
+ switch (errorCode) {
1596
+ case "AccessDeniedException":
1597
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
1598
+ response = {
1599
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1600
+ name: errorCode,
1601
+ $metadata: deserializeMetadata(output),
1602
+ };
1603
+ break;
1604
+ case "ConflictException":
1605
+ case "com.amazonaws.wellarchitected#ConflictException":
1606
+ response = {
1607
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1608
+ name: errorCode,
1609
+ $metadata: deserializeMetadata(output),
1610
+ };
1611
+ break;
1612
+ case "InternalServerException":
1613
+ case "com.amazonaws.wellarchitected#InternalServerException":
1614
+ response = {
1615
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1616
+ name: errorCode,
1617
+ $metadata: deserializeMetadata(output),
1618
+ };
1619
+ break;
1620
+ case "ResourceNotFoundException":
1621
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1622
+ response = {
1623
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1624
+ name: errorCode,
1625
+ $metadata: deserializeMetadata(output),
1626
+ };
1627
+ break;
1628
+ case "ServiceQuotaExceededException":
1629
+ case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1630
+ response = {
1631
+ ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
1632
+ name: errorCode,
1633
+ $metadata: deserializeMetadata(output),
1634
+ };
1635
+ break;
1636
+ case "ThrottlingException":
1637
+ case "com.amazonaws.wellarchitected#ThrottlingException":
1638
+ response = {
1639
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1640
+ name: errorCode,
1641
+ $metadata: deserializeMetadata(output),
1642
+ };
1643
+ break;
1644
+ case "ValidationException":
1645
+ case "com.amazonaws.wellarchitected#ValidationException":
1646
+ response = {
1647
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1648
+ name: errorCode,
1649
+ $metadata: deserializeMetadata(output),
1650
+ };
1651
+ break;
1652
+ default:
1653
+ const parsedBody = parsedOutput.body;
1654
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1655
+ response = {
1656
+ ...parsedBody,
1657
+ name: `${errorCode}`,
1658
+ message: parsedBody.message || parsedBody.Message || errorCode,
1659
+ $fault: "client",
1660
+ $metadata: deserializeMetadata(output),
1661
+ };
1662
+ }
1663
+ const message = response.message || response.Message || errorCode;
1664
+ response.message = message;
1665
+ delete response.Message;
1666
+ return Promise.reject(Object.assign(new Error(message), response));
1667
+ };
1668
+ const deserializeAws_restJson1CreateMilestoneCommand = async (output, context) => {
1669
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1670
+ return deserializeAws_restJson1CreateMilestoneCommandError(output, context);
1671
+ }
1672
+ const contents = {
1673
+ $metadata: deserializeMetadata(output),
1674
+ MilestoneNumber: undefined,
1675
+ WorkloadId: undefined,
1676
+ };
1677
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1678
+ if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
1679
+ contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
1680
+ }
1681
+ if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
1682
+ contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
1683
+ }
1684
+ return Promise.resolve(contents);
1685
+ };
1686
+ exports.deserializeAws_restJson1CreateMilestoneCommand = deserializeAws_restJson1CreateMilestoneCommand;
1687
+ const deserializeAws_restJson1CreateMilestoneCommandError = async (output, context) => {
1688
+ const parsedOutput = {
1689
+ ...output,
1690
+ body: await parseBody(output.body, context),
1691
+ };
1692
+ let response;
1693
+ let errorCode = "UnknownError";
1694
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1695
+ switch (errorCode) {
1696
+ case "AccessDeniedException":
1697
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
1698
+ response = {
1699
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1700
+ name: errorCode,
1701
+ $metadata: deserializeMetadata(output),
1702
+ };
1703
+ break;
1704
+ case "ConflictException":
1705
+ case "com.amazonaws.wellarchitected#ConflictException":
1706
+ response = {
1707
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1708
+ name: errorCode,
1709
+ $metadata: deserializeMetadata(output),
1710
+ };
1711
+ break;
1712
+ case "InternalServerException":
1713
+ case "com.amazonaws.wellarchitected#InternalServerException":
1714
+ response = {
1715
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1716
+ name: errorCode,
1717
+ $metadata: deserializeMetadata(output),
1718
+ };
1719
+ break;
1720
+ case "ResourceNotFoundException":
1721
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
1722
+ response = {
1723
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1724
+ name: errorCode,
1725
+ $metadata: deserializeMetadata(output),
1726
+ };
1727
+ break;
1728
+ case "ServiceQuotaExceededException":
1729
+ case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
1730
+ response = {
1731
+ ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
1732
+ name: errorCode,
1733
+ $metadata: deserializeMetadata(output),
1734
+ };
1735
+ break;
1736
+ case "ThrottlingException":
1737
+ case "com.amazonaws.wellarchitected#ThrottlingException":
1738
+ response = {
1739
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
1740
+ name: errorCode,
1741
+ $metadata: deserializeMetadata(output),
1742
+ };
1743
+ break;
1744
+ case "ValidationException":
1745
+ case "com.amazonaws.wellarchitected#ValidationException":
1746
+ response = {
1747
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1748
+ name: errorCode,
1749
+ $metadata: deserializeMetadata(output),
1750
+ };
1751
+ break;
1752
+ default:
1753
+ const parsedBody = parsedOutput.body;
1754
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1755
+ response = {
1756
+ ...parsedBody,
1757
+ name: `${errorCode}`,
1758
+ message: parsedBody.message || parsedBody.Message || errorCode,
1759
+ $fault: "client",
1760
+ $metadata: deserializeMetadata(output),
1761
+ };
1762
+ }
1763
+ const message = response.message || response.Message || errorCode;
1764
+ response.message = message;
1765
+ delete response.Message;
1766
+ return Promise.reject(Object.assign(new Error(message), response));
1767
+ };
1768
+ const deserializeAws_restJson1CreateWorkloadCommand = async (output, context) => {
1769
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1770
+ return deserializeAws_restJson1CreateWorkloadCommandError(output, context);
1771
+ }
1772
+ const contents = {
1773
+ $metadata: deserializeMetadata(output),
1774
+ WorkloadArn: undefined,
1775
+ WorkloadId: undefined,
1776
+ };
1777
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1778
+ if (data.WorkloadArn !== undefined && data.WorkloadArn !== null) {
1779
+ contents.WorkloadArn = smithy_client_1.expectString(data.WorkloadArn);
1780
+ }
1781
+ if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
1782
+ contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
1783
+ }
1784
+ return Promise.resolve(contents);
1785
+ };
1786
+ exports.deserializeAws_restJson1CreateWorkloadCommand = deserializeAws_restJson1CreateWorkloadCommand;
1787
+ const deserializeAws_restJson1CreateWorkloadCommandError = async (output, context) => {
1330
1788
  const parsedOutput = {
1331
1789
  ...output,
1332
1790
  body: await parseBody(output.body, context),
@@ -1499,9 +1957,9 @@ const deserializeAws_restJson1CreateWorkloadShareCommandError = async (output, c
1499
1957
  delete response.Message;
1500
1958
  return Promise.reject(Object.assign(new Error(message), response));
1501
1959
  };
1502
- const deserializeAws_restJson1DeleteWorkloadCommand = async (output, context) => {
1960
+ const deserializeAws_restJson1DeleteLensCommand = async (output, context) => {
1503
1961
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1504
- return deserializeAws_restJson1DeleteWorkloadCommandError(output, context);
1962
+ return deserializeAws_restJson1DeleteLensCommandError(output, context);
1505
1963
  }
1506
1964
  const contents = {
1507
1965
  $metadata: deserializeMetadata(output),
@@ -1509,8 +1967,8 @@ const deserializeAws_restJson1DeleteWorkloadCommand = async (output, context) =>
1509
1967
  await collectBody(output.body, context);
1510
1968
  return Promise.resolve(contents);
1511
1969
  };
1512
- exports.deserializeAws_restJson1DeleteWorkloadCommand = deserializeAws_restJson1DeleteWorkloadCommand;
1513
- const deserializeAws_restJson1DeleteWorkloadCommandError = async (output, context) => {
1970
+ exports.deserializeAws_restJson1DeleteLensCommand = deserializeAws_restJson1DeleteLensCommand;
1971
+ const deserializeAws_restJson1DeleteLensCommandError = async (output, context) => {
1514
1972
  const parsedOutput = {
1515
1973
  ...output,
1516
1974
  body: await parseBody(output.body, context),
@@ -1583,9 +2041,9 @@ const deserializeAws_restJson1DeleteWorkloadCommandError = async (output, contex
1583
2041
  delete response.Message;
1584
2042
  return Promise.reject(Object.assign(new Error(message), response));
1585
2043
  };
1586
- const deserializeAws_restJson1DeleteWorkloadShareCommand = async (output, context) => {
2044
+ const deserializeAws_restJson1DeleteLensShareCommand = async (output, context) => {
1587
2045
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1588
- return deserializeAws_restJson1DeleteWorkloadShareCommandError(output, context);
2046
+ return deserializeAws_restJson1DeleteLensShareCommandError(output, context);
1589
2047
  }
1590
2048
  const contents = {
1591
2049
  $metadata: deserializeMetadata(output),
@@ -1593,8 +2051,8 @@ const deserializeAws_restJson1DeleteWorkloadShareCommand = async (output, contex
1593
2051
  await collectBody(output.body, context);
1594
2052
  return Promise.resolve(contents);
1595
2053
  };
1596
- exports.deserializeAws_restJson1DeleteWorkloadShareCommand = deserializeAws_restJson1DeleteWorkloadShareCommand;
1597
- const deserializeAws_restJson1DeleteWorkloadShareCommandError = async (output, context) => {
2054
+ exports.deserializeAws_restJson1DeleteLensShareCommand = deserializeAws_restJson1DeleteLensShareCommand;
2055
+ const deserializeAws_restJson1DeleteLensShareCommandError = async (output, context) => {
1598
2056
  const parsedOutput = {
1599
2057
  ...output,
1600
2058
  body: await parseBody(output.body, context),
@@ -1667,9 +2125,9 @@ const deserializeAws_restJson1DeleteWorkloadShareCommandError = async (output, c
1667
2125
  delete response.Message;
1668
2126
  return Promise.reject(Object.assign(new Error(message), response));
1669
2127
  };
1670
- const deserializeAws_restJson1DisassociateLensesCommand = async (output, context) => {
2128
+ const deserializeAws_restJson1DeleteWorkloadCommand = async (output, context) => {
1671
2129
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1672
- return deserializeAws_restJson1DisassociateLensesCommandError(output, context);
2130
+ return deserializeAws_restJson1DeleteWorkloadCommandError(output, context);
1673
2131
  }
1674
2132
  const contents = {
1675
2133
  $metadata: deserializeMetadata(output),
@@ -1677,8 +2135,360 @@ const deserializeAws_restJson1DisassociateLensesCommand = async (output, context
1677
2135
  await collectBody(output.body, context);
1678
2136
  return Promise.resolve(contents);
1679
2137
  };
1680
- exports.deserializeAws_restJson1DisassociateLensesCommand = deserializeAws_restJson1DisassociateLensesCommand;
1681
- const deserializeAws_restJson1DisassociateLensesCommandError = async (output, context) => {
2138
+ exports.deserializeAws_restJson1DeleteWorkloadCommand = deserializeAws_restJson1DeleteWorkloadCommand;
2139
+ const deserializeAws_restJson1DeleteWorkloadCommandError = async (output, context) => {
2140
+ const parsedOutput = {
2141
+ ...output,
2142
+ body: await parseBody(output.body, context),
2143
+ };
2144
+ let response;
2145
+ let errorCode = "UnknownError";
2146
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2147
+ switch (errorCode) {
2148
+ case "AccessDeniedException":
2149
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
2150
+ response = {
2151
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2152
+ name: errorCode,
2153
+ $metadata: deserializeMetadata(output),
2154
+ };
2155
+ break;
2156
+ case "ConflictException":
2157
+ case "com.amazonaws.wellarchitected#ConflictException":
2158
+ response = {
2159
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2160
+ name: errorCode,
2161
+ $metadata: deserializeMetadata(output),
2162
+ };
2163
+ break;
2164
+ case "InternalServerException":
2165
+ case "com.amazonaws.wellarchitected#InternalServerException":
2166
+ response = {
2167
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2168
+ name: errorCode,
2169
+ $metadata: deserializeMetadata(output),
2170
+ };
2171
+ break;
2172
+ case "ResourceNotFoundException":
2173
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2174
+ response = {
2175
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2176
+ name: errorCode,
2177
+ $metadata: deserializeMetadata(output),
2178
+ };
2179
+ break;
2180
+ case "ThrottlingException":
2181
+ case "com.amazonaws.wellarchitected#ThrottlingException":
2182
+ response = {
2183
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2184
+ name: errorCode,
2185
+ $metadata: deserializeMetadata(output),
2186
+ };
2187
+ break;
2188
+ case "ValidationException":
2189
+ case "com.amazonaws.wellarchitected#ValidationException":
2190
+ response = {
2191
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2192
+ name: errorCode,
2193
+ $metadata: deserializeMetadata(output),
2194
+ };
2195
+ break;
2196
+ default:
2197
+ const parsedBody = parsedOutput.body;
2198
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2199
+ response = {
2200
+ ...parsedBody,
2201
+ name: `${errorCode}`,
2202
+ message: parsedBody.message || parsedBody.Message || errorCode,
2203
+ $fault: "client",
2204
+ $metadata: deserializeMetadata(output),
2205
+ };
2206
+ }
2207
+ const message = response.message || response.Message || errorCode;
2208
+ response.message = message;
2209
+ delete response.Message;
2210
+ return Promise.reject(Object.assign(new Error(message), response));
2211
+ };
2212
+ const deserializeAws_restJson1DeleteWorkloadShareCommand = async (output, context) => {
2213
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2214
+ return deserializeAws_restJson1DeleteWorkloadShareCommandError(output, context);
2215
+ }
2216
+ const contents = {
2217
+ $metadata: deserializeMetadata(output),
2218
+ };
2219
+ await collectBody(output.body, context);
2220
+ return Promise.resolve(contents);
2221
+ };
2222
+ exports.deserializeAws_restJson1DeleteWorkloadShareCommand = deserializeAws_restJson1DeleteWorkloadShareCommand;
2223
+ const deserializeAws_restJson1DeleteWorkloadShareCommandError = async (output, context) => {
2224
+ const parsedOutput = {
2225
+ ...output,
2226
+ body: await parseBody(output.body, context),
2227
+ };
2228
+ let response;
2229
+ let errorCode = "UnknownError";
2230
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2231
+ switch (errorCode) {
2232
+ case "AccessDeniedException":
2233
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
2234
+ response = {
2235
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2236
+ name: errorCode,
2237
+ $metadata: deserializeMetadata(output),
2238
+ };
2239
+ break;
2240
+ case "ConflictException":
2241
+ case "com.amazonaws.wellarchitected#ConflictException":
2242
+ response = {
2243
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2244
+ name: errorCode,
2245
+ $metadata: deserializeMetadata(output),
2246
+ };
2247
+ break;
2248
+ case "InternalServerException":
2249
+ case "com.amazonaws.wellarchitected#InternalServerException":
2250
+ response = {
2251
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2252
+ name: errorCode,
2253
+ $metadata: deserializeMetadata(output),
2254
+ };
2255
+ break;
2256
+ case "ResourceNotFoundException":
2257
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2258
+ response = {
2259
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2260
+ name: errorCode,
2261
+ $metadata: deserializeMetadata(output),
2262
+ };
2263
+ break;
2264
+ case "ThrottlingException":
2265
+ case "com.amazonaws.wellarchitected#ThrottlingException":
2266
+ response = {
2267
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2268
+ name: errorCode,
2269
+ $metadata: deserializeMetadata(output),
2270
+ };
2271
+ break;
2272
+ case "ValidationException":
2273
+ case "com.amazonaws.wellarchitected#ValidationException":
2274
+ response = {
2275
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2276
+ name: errorCode,
2277
+ $metadata: deserializeMetadata(output),
2278
+ };
2279
+ break;
2280
+ default:
2281
+ const parsedBody = parsedOutput.body;
2282
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2283
+ response = {
2284
+ ...parsedBody,
2285
+ name: `${errorCode}`,
2286
+ message: parsedBody.message || parsedBody.Message || errorCode,
2287
+ $fault: "client",
2288
+ $metadata: deserializeMetadata(output),
2289
+ };
2290
+ }
2291
+ const message = response.message || response.Message || errorCode;
2292
+ response.message = message;
2293
+ delete response.Message;
2294
+ return Promise.reject(Object.assign(new Error(message), response));
2295
+ };
2296
+ const deserializeAws_restJson1DisassociateLensesCommand = async (output, context) => {
2297
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2298
+ return deserializeAws_restJson1DisassociateLensesCommandError(output, context);
2299
+ }
2300
+ const contents = {
2301
+ $metadata: deserializeMetadata(output),
2302
+ };
2303
+ await collectBody(output.body, context);
2304
+ return Promise.resolve(contents);
2305
+ };
2306
+ exports.deserializeAws_restJson1DisassociateLensesCommand = deserializeAws_restJson1DisassociateLensesCommand;
2307
+ const deserializeAws_restJson1DisassociateLensesCommandError = async (output, context) => {
2308
+ const parsedOutput = {
2309
+ ...output,
2310
+ body: await parseBody(output.body, context),
2311
+ };
2312
+ let response;
2313
+ let errorCode = "UnknownError";
2314
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2315
+ switch (errorCode) {
2316
+ case "AccessDeniedException":
2317
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
2318
+ response = {
2319
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2320
+ name: errorCode,
2321
+ $metadata: deserializeMetadata(output),
2322
+ };
2323
+ break;
2324
+ case "ConflictException":
2325
+ case "com.amazonaws.wellarchitected#ConflictException":
2326
+ response = {
2327
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2328
+ name: errorCode,
2329
+ $metadata: deserializeMetadata(output),
2330
+ };
2331
+ break;
2332
+ case "InternalServerException":
2333
+ case "com.amazonaws.wellarchitected#InternalServerException":
2334
+ response = {
2335
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2336
+ name: errorCode,
2337
+ $metadata: deserializeMetadata(output),
2338
+ };
2339
+ break;
2340
+ case "ResourceNotFoundException":
2341
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2342
+ response = {
2343
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2344
+ name: errorCode,
2345
+ $metadata: deserializeMetadata(output),
2346
+ };
2347
+ break;
2348
+ case "ThrottlingException":
2349
+ case "com.amazonaws.wellarchitected#ThrottlingException":
2350
+ response = {
2351
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2352
+ name: errorCode,
2353
+ $metadata: deserializeMetadata(output),
2354
+ };
2355
+ break;
2356
+ case "ValidationException":
2357
+ case "com.amazonaws.wellarchitected#ValidationException":
2358
+ response = {
2359
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2360
+ name: errorCode,
2361
+ $metadata: deserializeMetadata(output),
2362
+ };
2363
+ break;
2364
+ default:
2365
+ const parsedBody = parsedOutput.body;
2366
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2367
+ response = {
2368
+ ...parsedBody,
2369
+ name: `${errorCode}`,
2370
+ message: parsedBody.message || parsedBody.Message || errorCode,
2371
+ $fault: "client",
2372
+ $metadata: deserializeMetadata(output),
2373
+ };
2374
+ }
2375
+ const message = response.message || response.Message || errorCode;
2376
+ response.message = message;
2377
+ delete response.Message;
2378
+ return Promise.reject(Object.assign(new Error(message), response));
2379
+ };
2380
+ const deserializeAws_restJson1ExportLensCommand = async (output, context) => {
2381
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2382
+ return deserializeAws_restJson1ExportLensCommandError(output, context);
2383
+ }
2384
+ const contents = {
2385
+ $metadata: deserializeMetadata(output),
2386
+ LensJSON: undefined,
2387
+ };
2388
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2389
+ if (data.LensJSON !== undefined && data.LensJSON !== null) {
2390
+ contents.LensJSON = smithy_client_1.expectString(data.LensJSON);
2391
+ }
2392
+ return Promise.resolve(contents);
2393
+ };
2394
+ exports.deserializeAws_restJson1ExportLensCommand = deserializeAws_restJson1ExportLensCommand;
2395
+ const deserializeAws_restJson1ExportLensCommandError = async (output, context) => {
2396
+ const parsedOutput = {
2397
+ ...output,
2398
+ body: await parseBody(output.body, context),
2399
+ };
2400
+ let response;
2401
+ let errorCode = "UnknownError";
2402
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2403
+ switch (errorCode) {
2404
+ case "AccessDeniedException":
2405
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
2406
+ response = {
2407
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2408
+ name: errorCode,
2409
+ $metadata: deserializeMetadata(output),
2410
+ };
2411
+ break;
2412
+ case "InternalServerException":
2413
+ case "com.amazonaws.wellarchitected#InternalServerException":
2414
+ response = {
2415
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2416
+ name: errorCode,
2417
+ $metadata: deserializeMetadata(output),
2418
+ };
2419
+ break;
2420
+ case "ResourceNotFoundException":
2421
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
2422
+ response = {
2423
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2424
+ name: errorCode,
2425
+ $metadata: deserializeMetadata(output),
2426
+ };
2427
+ break;
2428
+ case "ThrottlingException":
2429
+ case "com.amazonaws.wellarchitected#ThrottlingException":
2430
+ response = {
2431
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2432
+ name: errorCode,
2433
+ $metadata: deserializeMetadata(output),
2434
+ };
2435
+ break;
2436
+ case "ValidationException":
2437
+ case "com.amazonaws.wellarchitected#ValidationException":
2438
+ response = {
2439
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2440
+ name: errorCode,
2441
+ $metadata: deserializeMetadata(output),
2442
+ };
2443
+ break;
2444
+ default:
2445
+ const parsedBody = parsedOutput.body;
2446
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2447
+ response = {
2448
+ ...parsedBody,
2449
+ name: `${errorCode}`,
2450
+ message: parsedBody.message || parsedBody.Message || errorCode,
2451
+ $fault: "client",
2452
+ $metadata: deserializeMetadata(output),
2453
+ };
2454
+ }
2455
+ const message = response.message || response.Message || errorCode;
2456
+ response.message = message;
2457
+ delete response.Message;
2458
+ return Promise.reject(Object.assign(new Error(message), response));
2459
+ };
2460
+ const deserializeAws_restJson1GetAnswerCommand = async (output, context) => {
2461
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2462
+ return deserializeAws_restJson1GetAnswerCommandError(output, context);
2463
+ }
2464
+ const contents = {
2465
+ $metadata: deserializeMetadata(output),
2466
+ Answer: undefined,
2467
+ LensAlias: undefined,
2468
+ LensArn: undefined,
2469
+ MilestoneNumber: undefined,
2470
+ WorkloadId: undefined,
2471
+ };
2472
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2473
+ if (data.Answer !== undefined && data.Answer !== null) {
2474
+ contents.Answer = deserializeAws_restJson1Answer(data.Answer, context);
2475
+ }
2476
+ if (data.LensAlias !== undefined && data.LensAlias !== null) {
2477
+ contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
2478
+ }
2479
+ if (data.LensArn !== undefined && data.LensArn !== null) {
2480
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
2481
+ }
2482
+ if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
2483
+ contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
2484
+ }
2485
+ if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
2486
+ contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
2487
+ }
2488
+ return Promise.resolve(contents);
2489
+ };
2490
+ exports.deserializeAws_restJson1GetAnswerCommand = deserializeAws_restJson1GetAnswerCommand;
2491
+ const deserializeAws_restJson1GetAnswerCommandError = async (output, context) => {
1682
2492
  const parsedOutput = {
1683
2493
  ...output,
1684
2494
  body: await parseBody(output.body, context),
@@ -1695,14 +2505,6 @@ const deserializeAws_restJson1DisassociateLensesCommandError = async (output, co
1695
2505
  $metadata: deserializeMetadata(output),
1696
2506
  };
1697
2507
  break;
1698
- case "ConflictException":
1699
- case "com.amazonaws.wellarchitected#ConflictException":
1700
- response = {
1701
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1702
- name: errorCode,
1703
- $metadata: deserializeMetadata(output),
1704
- };
1705
- break;
1706
2508
  case "InternalServerException":
1707
2509
  case "com.amazonaws.wellarchitected#InternalServerException":
1708
2510
  response = {
@@ -1751,34 +2553,22 @@ const deserializeAws_restJson1DisassociateLensesCommandError = async (output, co
1751
2553
  delete response.Message;
1752
2554
  return Promise.reject(Object.assign(new Error(message), response));
1753
2555
  };
1754
- const deserializeAws_restJson1GetAnswerCommand = async (output, context) => {
2556
+ const deserializeAws_restJson1GetLensCommand = async (output, context) => {
1755
2557
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1756
- return deserializeAws_restJson1GetAnswerCommandError(output, context);
2558
+ return deserializeAws_restJson1GetLensCommandError(output, context);
1757
2559
  }
1758
2560
  const contents = {
1759
2561
  $metadata: deserializeMetadata(output),
1760
- Answer: undefined,
1761
- LensAlias: undefined,
1762
- MilestoneNumber: undefined,
1763
- WorkloadId: undefined,
2562
+ Lens: undefined,
1764
2563
  };
1765
2564
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1766
- if (data.Answer !== undefined && data.Answer !== null) {
1767
- contents.Answer = deserializeAws_restJson1Answer(data.Answer, context);
1768
- }
1769
- if (data.LensAlias !== undefined && data.LensAlias !== null) {
1770
- contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
1771
- }
1772
- if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
1773
- contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
1774
- }
1775
- if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
1776
- contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
2565
+ if (data.Lens !== undefined && data.Lens !== null) {
2566
+ contents.Lens = deserializeAws_restJson1Lens(data.Lens, context);
1777
2567
  }
1778
2568
  return Promise.resolve(contents);
1779
2569
  };
1780
- exports.deserializeAws_restJson1GetAnswerCommand = deserializeAws_restJson1GetAnswerCommand;
1781
- const deserializeAws_restJson1GetAnswerCommandError = async (output, context) => {
2570
+ exports.deserializeAws_restJson1GetLensCommand = deserializeAws_restJson1GetLensCommand;
2571
+ const deserializeAws_restJson1GetLensCommandError = async (output, context) => {
1782
2572
  const parsedOutput = {
1783
2573
  ...output,
1784
2574
  body: await parseBody(output.body, context),
@@ -2028,6 +2818,8 @@ const deserializeAws_restJson1GetLensVersionDifferenceCommand = async (output, c
2028
2818
  BaseLensVersion: undefined,
2029
2819
  LatestLensVersion: undefined,
2030
2820
  LensAlias: undefined,
2821
+ LensArn: undefined,
2822
+ TargetLensVersion: undefined,
2031
2823
  VersionDifferences: undefined,
2032
2824
  };
2033
2825
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
@@ -2040,6 +2832,12 @@ const deserializeAws_restJson1GetLensVersionDifferenceCommand = async (output, c
2040
2832
  if (data.LensAlias !== undefined && data.LensAlias !== null) {
2041
2833
  contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
2042
2834
  }
2835
+ if (data.LensArn !== undefined && data.LensArn !== null) {
2836
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
2837
+ }
2838
+ if (data.TargetLensVersion !== undefined && data.TargetLensVersion !== null) {
2839
+ contents.TargetLensVersion = smithy_client_1.expectString(data.TargetLensVersion);
2840
+ }
2043
2841
  if (data.VersionDifferences !== undefined && data.VersionDifferences !== null) {
2044
2842
  contents.VersionDifferences = deserializeAws_restJson1VersionDifferences(data.VersionDifferences, context);
2045
2843
  }
@@ -2275,6 +3073,106 @@ const deserializeAws_restJson1GetWorkloadCommandError = async (output, context)
2275
3073
  delete response.Message;
2276
3074
  return Promise.reject(Object.assign(new Error(message), response));
2277
3075
  };
3076
+ const deserializeAws_restJson1ImportLensCommand = async (output, context) => {
3077
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3078
+ return deserializeAws_restJson1ImportLensCommandError(output, context);
3079
+ }
3080
+ const contents = {
3081
+ $metadata: deserializeMetadata(output),
3082
+ LensArn: undefined,
3083
+ Status: undefined,
3084
+ };
3085
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3086
+ if (data.LensArn !== undefined && data.LensArn !== null) {
3087
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
3088
+ }
3089
+ if (data.Status !== undefined && data.Status !== null) {
3090
+ contents.Status = smithy_client_1.expectString(data.Status);
3091
+ }
3092
+ return Promise.resolve(contents);
3093
+ };
3094
+ exports.deserializeAws_restJson1ImportLensCommand = deserializeAws_restJson1ImportLensCommand;
3095
+ const deserializeAws_restJson1ImportLensCommandError = async (output, context) => {
3096
+ const parsedOutput = {
3097
+ ...output,
3098
+ body: await parseBody(output.body, context),
3099
+ };
3100
+ let response;
3101
+ let errorCode = "UnknownError";
3102
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3103
+ switch (errorCode) {
3104
+ case "AccessDeniedException":
3105
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
3106
+ response = {
3107
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3108
+ name: errorCode,
3109
+ $metadata: deserializeMetadata(output),
3110
+ };
3111
+ break;
3112
+ case "ConflictException":
3113
+ case "com.amazonaws.wellarchitected#ConflictException":
3114
+ response = {
3115
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
3116
+ name: errorCode,
3117
+ $metadata: deserializeMetadata(output),
3118
+ };
3119
+ break;
3120
+ case "InternalServerException":
3121
+ case "com.amazonaws.wellarchitected#InternalServerException":
3122
+ response = {
3123
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3124
+ name: errorCode,
3125
+ $metadata: deserializeMetadata(output),
3126
+ };
3127
+ break;
3128
+ case "ResourceNotFoundException":
3129
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3130
+ response = {
3131
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3132
+ name: errorCode,
3133
+ $metadata: deserializeMetadata(output),
3134
+ };
3135
+ break;
3136
+ case "ServiceQuotaExceededException":
3137
+ case "com.amazonaws.wellarchitected#ServiceQuotaExceededException":
3138
+ response = {
3139
+ ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
3140
+ name: errorCode,
3141
+ $metadata: deserializeMetadata(output),
3142
+ };
3143
+ break;
3144
+ case "ThrottlingException":
3145
+ case "com.amazonaws.wellarchitected#ThrottlingException":
3146
+ response = {
3147
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3148
+ name: errorCode,
3149
+ $metadata: deserializeMetadata(output),
3150
+ };
3151
+ break;
3152
+ case "ValidationException":
3153
+ case "com.amazonaws.wellarchitected#ValidationException":
3154
+ response = {
3155
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3156
+ name: errorCode,
3157
+ $metadata: deserializeMetadata(output),
3158
+ };
3159
+ break;
3160
+ default:
3161
+ const parsedBody = parsedOutput.body;
3162
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3163
+ response = {
3164
+ ...parsedBody,
3165
+ name: `${errorCode}`,
3166
+ message: parsedBody.message || parsedBody.Message || errorCode,
3167
+ $fault: "client",
3168
+ $metadata: deserializeMetadata(output),
3169
+ };
3170
+ }
3171
+ const message = response.message || response.Message || errorCode;
3172
+ response.message = message;
3173
+ delete response.Message;
3174
+ return Promise.reject(Object.assign(new Error(message), response));
3175
+ };
2278
3176
  const deserializeAws_restJson1ListAnswersCommand = async (output, context) => {
2279
3177
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2280
3178
  return deserializeAws_restJson1ListAnswersCommandError(output, context);
@@ -2283,6 +3181,7 @@ const deserializeAws_restJson1ListAnswersCommand = async (output, context) => {
2283
3181
  $metadata: deserializeMetadata(output),
2284
3182
  AnswerSummaries: undefined,
2285
3183
  LensAlias: undefined,
3184
+ LensArn: undefined,
2286
3185
  MilestoneNumber: undefined,
2287
3186
  NextToken: undefined,
2288
3187
  WorkloadId: undefined,
@@ -2294,6 +3193,9 @@ const deserializeAws_restJson1ListAnswersCommand = async (output, context) => {
2294
3193
  if (data.LensAlias !== undefined && data.LensAlias !== null) {
2295
3194
  contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
2296
3195
  }
3196
+ if (data.LensArn !== undefined && data.LensArn !== null) {
3197
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
3198
+ }
2297
3199
  if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
2298
3200
  contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
2299
3201
  }
@@ -2455,6 +3357,7 @@ const deserializeAws_restJson1ListLensReviewImprovementsCommand = async (output,
2455
3357
  $metadata: deserializeMetadata(output),
2456
3358
  ImprovementSummaries: undefined,
2457
3359
  LensAlias: undefined,
3360
+ LensArn: undefined,
2458
3361
  MilestoneNumber: undefined,
2459
3362
  NextToken: undefined,
2460
3363
  WorkloadId: undefined,
@@ -2466,6 +3369,9 @@ const deserializeAws_restJson1ListLensReviewImprovementsCommand = async (output,
2466
3369
  if (data.LensAlias !== undefined && data.LensAlias !== null) {
2467
3370
  contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
2468
3371
  }
3372
+ if (data.LensArn !== undefined && data.LensArn !== null) {
3373
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
3374
+ }
2469
3375
  if (data.MilestoneNumber !== undefined && data.MilestoneNumber !== null) {
2470
3376
  contents.MilestoneNumber = smithy_client_1.expectInt32(data.MilestoneNumber);
2471
3377
  }
@@ -2635,6 +3541,90 @@ const deserializeAws_restJson1ListLensReviewsCommandError = async (output, conte
2635
3541
  delete response.Message;
2636
3542
  return Promise.reject(Object.assign(new Error(message), response));
2637
3543
  };
3544
+ const deserializeAws_restJson1ListLensSharesCommand = async (output, context) => {
3545
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3546
+ return deserializeAws_restJson1ListLensSharesCommandError(output, context);
3547
+ }
3548
+ const contents = {
3549
+ $metadata: deserializeMetadata(output),
3550
+ LensShareSummaries: undefined,
3551
+ NextToken: undefined,
3552
+ };
3553
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3554
+ if (data.LensShareSummaries !== undefined && data.LensShareSummaries !== null) {
3555
+ contents.LensShareSummaries = deserializeAws_restJson1LensShareSummaries(data.LensShareSummaries, context);
3556
+ }
3557
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3558
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
3559
+ }
3560
+ return Promise.resolve(contents);
3561
+ };
3562
+ exports.deserializeAws_restJson1ListLensSharesCommand = deserializeAws_restJson1ListLensSharesCommand;
3563
+ const deserializeAws_restJson1ListLensSharesCommandError = async (output, context) => {
3564
+ const parsedOutput = {
3565
+ ...output,
3566
+ body: await parseBody(output.body, context),
3567
+ };
3568
+ let response;
3569
+ let errorCode = "UnknownError";
3570
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3571
+ switch (errorCode) {
3572
+ case "AccessDeniedException":
3573
+ case "com.amazonaws.wellarchitected#AccessDeniedException":
3574
+ response = {
3575
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3576
+ name: errorCode,
3577
+ $metadata: deserializeMetadata(output),
3578
+ };
3579
+ break;
3580
+ case "InternalServerException":
3581
+ case "com.amazonaws.wellarchitected#InternalServerException":
3582
+ response = {
3583
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3584
+ name: errorCode,
3585
+ $metadata: deserializeMetadata(output),
3586
+ };
3587
+ break;
3588
+ case "ResourceNotFoundException":
3589
+ case "com.amazonaws.wellarchitected#ResourceNotFoundException":
3590
+ response = {
3591
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3592
+ name: errorCode,
3593
+ $metadata: deserializeMetadata(output),
3594
+ };
3595
+ break;
3596
+ case "ThrottlingException":
3597
+ case "com.amazonaws.wellarchitected#ThrottlingException":
3598
+ response = {
3599
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3600
+ name: errorCode,
3601
+ $metadata: deserializeMetadata(output),
3602
+ };
3603
+ break;
3604
+ case "ValidationException":
3605
+ case "com.amazonaws.wellarchitected#ValidationException":
3606
+ response = {
3607
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3608
+ name: errorCode,
3609
+ $metadata: deserializeMetadata(output),
3610
+ };
3611
+ break;
3612
+ default:
3613
+ const parsedBody = parsedOutput.body;
3614
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3615
+ response = {
3616
+ ...parsedBody,
3617
+ name: `${errorCode}`,
3618
+ message: parsedBody.message || parsedBody.Message || errorCode,
3619
+ $fault: "client",
3620
+ $metadata: deserializeMetadata(output),
3621
+ };
3622
+ }
3623
+ const message = response.message || response.Message || errorCode;
3624
+ response.message = message;
3625
+ delete response.Message;
3626
+ return Promise.reject(Object.assign(new Error(message), response));
3627
+ };
2638
3628
  const deserializeAws_restJson1ListMilestonesCommand = async (output, context) => {
2639
3629
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2640
3630
  return deserializeAws_restJson1ListMilestonesCommandError(output, context);
@@ -3207,6 +4197,7 @@ const deserializeAws_restJson1UpdateAnswerCommand = async (output, context) => {
3207
4197
  $metadata: deserializeMetadata(output),
3208
4198
  Answer: undefined,
3209
4199
  LensAlias: undefined,
4200
+ LensArn: undefined,
3210
4201
  WorkloadId: undefined,
3211
4202
  };
3212
4203
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
@@ -3216,6 +4207,9 @@ const deserializeAws_restJson1UpdateAnswerCommand = async (output, context) => {
3216
4207
  if (data.LensAlias !== undefined && data.LensAlias !== null) {
3217
4208
  contents.LensAlias = smithy_client_1.expectString(data.LensAlias);
3218
4209
  }
4210
+ if (data.LensArn !== undefined && data.LensArn !== null) {
4211
+ contents.LensArn = smithy_client_1.expectString(data.LensArn);
4212
+ }
3219
4213
  if (data.WorkloadId !== undefined && data.WorkloadId !== null) {
3220
4214
  contents.WorkloadId = smithy_client_1.expectString(data.WorkloadId);
3221
4215
  }
@@ -3996,6 +4990,7 @@ const deserializeAws_restJson1Answer = (output, context) => {
3996
4990
  Choices: output.Choices !== undefined && output.Choices !== null
3997
4991
  ? deserializeAws_restJson1Choices(output.Choices, context)
3998
4992
  : undefined,
4993
+ HelpfulResourceDisplayText: smithy_client_1.expectString(output.HelpfulResourceDisplayText),
3999
4994
  HelpfulResourceUrl: smithy_client_1.expectString(output.HelpfulResourceUrl),
4000
4995
  ImprovementPlanUrl: smithy_client_1.expectString(output.ImprovementPlanUrl),
4001
4996
  IsApplicable: smithy_client_1.expectBoolean(output.IsApplicable),
@@ -4044,6 +5039,12 @@ const deserializeAws_restJson1Choice = (output, context) => {
4044
5039
  return {
4045
5040
  ChoiceId: smithy_client_1.expectString(output.ChoiceId),
4046
5041
  Description: smithy_client_1.expectString(output.Description),
5042
+ HelpfulResource: output.HelpfulResource !== undefined && output.HelpfulResource !== null
5043
+ ? deserializeAws_restJson1ChoiceContent(output.HelpfulResource, context)
5044
+ : undefined,
5045
+ ImprovementPlan: output.ImprovementPlan !== undefined && output.ImprovementPlan !== null
5046
+ ? deserializeAws_restJson1ChoiceContent(output.ImprovementPlan, context)
5047
+ : undefined,
4047
5048
  Title: smithy_client_1.expectString(output.Title),
4048
5049
  };
4049
5050
  };
@@ -4082,6 +5083,29 @@ const deserializeAws_restJson1ChoiceAnswerSummary = (output, context) => {
4082
5083
  Status: smithy_client_1.expectString(output.Status),
4083
5084
  };
4084
5085
  };
5086
+ const deserializeAws_restJson1ChoiceContent = (output, context) => {
5087
+ return {
5088
+ DisplayText: smithy_client_1.expectString(output.DisplayText),
5089
+ Url: smithy_client_1.expectString(output.Url),
5090
+ };
5091
+ };
5092
+ const deserializeAws_restJson1ChoiceImprovementPlan = (output, context) => {
5093
+ return {
5094
+ ChoiceId: smithy_client_1.expectString(output.ChoiceId),
5095
+ DisplayText: smithy_client_1.expectString(output.DisplayText),
5096
+ ImprovementPlanUrl: smithy_client_1.expectString(output.ImprovementPlanUrl),
5097
+ };
5098
+ };
5099
+ const deserializeAws_restJson1ChoiceImprovementPlans = (output, context) => {
5100
+ return (output || [])
5101
+ .filter((e) => e != null)
5102
+ .map((entry) => {
5103
+ if (entry === null) {
5104
+ return null;
5105
+ }
5106
+ return deserializeAws_restJson1ChoiceImprovementPlan(entry, context);
5107
+ });
5108
+ };
4085
5109
  const deserializeAws_restJson1Choices = (output, context) => {
4086
5110
  return (output || [])
4087
5111
  .filter((e) => e != null)
@@ -4105,15 +5129,29 @@ const deserializeAws_restJson1ImprovementSummaries = (output, context) => {
4105
5129
  const deserializeAws_restJson1ImprovementSummary = (output, context) => {
4106
5130
  return {
4107
5131
  ImprovementPlanUrl: smithy_client_1.expectString(output.ImprovementPlanUrl),
5132
+ ImprovementPlans: output.ImprovementPlans !== undefined && output.ImprovementPlans !== null
5133
+ ? deserializeAws_restJson1ChoiceImprovementPlans(output.ImprovementPlans, context)
5134
+ : undefined,
4108
5135
  PillarId: smithy_client_1.expectString(output.PillarId),
4109
5136
  QuestionId: smithy_client_1.expectString(output.QuestionId),
4110
5137
  QuestionTitle: smithy_client_1.expectString(output.QuestionTitle),
4111
5138
  Risk: smithy_client_1.expectString(output.Risk),
4112
5139
  };
4113
5140
  };
5141
+ const deserializeAws_restJson1Lens = (output, context) => {
5142
+ return {
5143
+ Description: smithy_client_1.expectString(output.Description),
5144
+ LensArn: smithy_client_1.expectString(output.LensArn),
5145
+ LensVersion: smithy_client_1.expectString(output.LensVersion),
5146
+ Name: smithy_client_1.expectString(output.Name),
5147
+ Owner: smithy_client_1.expectString(output.Owner),
5148
+ ShareInvitationId: smithy_client_1.expectString(output.ShareInvitationId),
5149
+ };
5150
+ };
4114
5151
  const deserializeAws_restJson1LensReview = (output, context) => {
4115
5152
  return {
4116
5153
  LensAlias: smithy_client_1.expectString(output.LensAlias),
5154
+ LensArn: smithy_client_1.expectString(output.LensArn),
4117
5155
  LensName: smithy_client_1.expectString(output.LensName),
4118
5156
  LensStatus: smithy_client_1.expectString(output.LensStatus),
4119
5157
  LensVersion: smithy_client_1.expectString(output.LensVersion),
@@ -4134,6 +5172,7 @@ const deserializeAws_restJson1LensReviewReport = (output, context) => {
4134
5172
  return {
4135
5173
  Base64String: smithy_client_1.expectString(output.Base64String),
4136
5174
  LensAlias: smithy_client_1.expectString(output.LensAlias),
5175
+ LensArn: smithy_client_1.expectString(output.LensArn),
4137
5176
  };
4138
5177
  };
4139
5178
  const deserializeAws_restJson1LensReviewSummaries = (output, context) => {
@@ -4149,6 +5188,7 @@ const deserializeAws_restJson1LensReviewSummaries = (output, context) => {
4149
5188
  const deserializeAws_restJson1LensReviewSummary = (output, context) => {
4150
5189
  return {
4151
5190
  LensAlias: smithy_client_1.expectString(output.LensAlias),
5191
+ LensArn: smithy_client_1.expectString(output.LensArn),
4152
5192
  LensName: smithy_client_1.expectString(output.LensName),
4153
5193
  LensStatus: smithy_client_1.expectString(output.LensStatus),
4154
5194
  LensVersion: smithy_client_1.expectString(output.LensVersion),
@@ -4160,6 +5200,23 @@ const deserializeAws_restJson1LensReviewSummary = (output, context) => {
4160
5200
  : undefined,
4161
5201
  };
4162
5202
  };
5203
+ const deserializeAws_restJson1LensShareSummaries = (output, context) => {
5204
+ return (output || [])
5205
+ .filter((e) => e != null)
5206
+ .map((entry) => {
5207
+ if (entry === null) {
5208
+ return null;
5209
+ }
5210
+ return deserializeAws_restJson1LensShareSummary(entry, context);
5211
+ });
5212
+ };
5213
+ const deserializeAws_restJson1LensShareSummary = (output, context) => {
5214
+ return {
5215
+ ShareId: smithy_client_1.expectString(output.ShareId),
5216
+ SharedWith: smithy_client_1.expectString(output.SharedWith),
5217
+ Status: smithy_client_1.expectString(output.Status),
5218
+ };
5219
+ };
4163
5220
  const deserializeAws_restJson1LensSummaries = (output, context) => {
4164
5221
  return (output || [])
4165
5222
  .filter((e) => e != null)
@@ -4172,10 +5229,20 @@ const deserializeAws_restJson1LensSummaries = (output, context) => {
4172
5229
  };
4173
5230
  const deserializeAws_restJson1LensSummary = (output, context) => {
4174
5231
  return {
5232
+ CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5233
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreatedAt)))
5234
+ : undefined,
4175
5235
  Description: smithy_client_1.expectString(output.Description),
4176
5236
  LensAlias: smithy_client_1.expectString(output.LensAlias),
5237
+ LensArn: smithy_client_1.expectString(output.LensArn),
4177
5238
  LensName: smithy_client_1.expectString(output.LensName),
5239
+ LensStatus: smithy_client_1.expectString(output.LensStatus),
5240
+ LensType: smithy_client_1.expectString(output.LensType),
4178
5241
  LensVersion: smithy_client_1.expectString(output.LensVersion),
5242
+ Owner: smithy_client_1.expectString(output.Owner),
5243
+ UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
5244
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.UpdatedAt)))
5245
+ : undefined,
4179
5246
  };
4180
5247
  };
4181
5248
  const deserializeAws_restJson1LensUpgradeSummary = (output, context) => {
@@ -4183,6 +5250,7 @@ const deserializeAws_restJson1LensUpgradeSummary = (output, context) => {
4183
5250
  CurrentLensVersion: smithy_client_1.expectString(output.CurrentLensVersion),
4184
5251
  LatestLensVersion: smithy_client_1.expectString(output.LatestLensVersion),
4185
5252
  LensAlias: smithy_client_1.expectString(output.LensAlias),
5253
+ LensArn: smithy_client_1.expectString(output.LensArn),
4186
5254
  WorkloadId: smithy_client_1.expectString(output.WorkloadId),
4187
5255
  WorkloadName: smithy_client_1.expectString(output.WorkloadName),
4188
5256
  };
@@ -4243,6 +5311,7 @@ const deserializeAws_restJson1PillarDifference = (output, context) => {
4243
5311
  return {
4244
5312
  DifferenceStatus: smithy_client_1.expectString(output.DifferenceStatus),
4245
5313
  PillarId: smithy_client_1.expectString(output.PillarId),
5314
+ PillarName: smithy_client_1.expectString(output.PillarName),
4246
5315
  QuestionDifferences: output.QuestionDifferences !== undefined && output.QuestionDifferences !== null
4247
5316
  ? deserializeAws_restJson1QuestionDifferences(output.QuestionDifferences, context)
4248
5317
  : undefined,
@@ -4318,7 +5387,10 @@ const deserializeAws_restJson1SelectedChoices = (output, context) => {
4318
5387
  };
4319
5388
  const deserializeAws_restJson1ShareInvitation = (output, context) => {
4320
5389
  return {
5390
+ LensAlias: smithy_client_1.expectString(output.LensAlias),
5391
+ LensArn: smithy_client_1.expectString(output.LensArn),
4321
5392
  ShareInvitationId: smithy_client_1.expectString(output.ShareInvitationId),
5393
+ ShareResourceType: smithy_client_1.expectString(output.ShareResourceType),
4322
5394
  WorkloadId: smithy_client_1.expectString(output.WorkloadId),
4323
5395
  };
4324
5396
  };
@@ -4334,8 +5406,11 @@ const deserializeAws_restJson1ShareInvitationSummaries = (output, context) => {
4334
5406
  };
4335
5407
  const deserializeAws_restJson1ShareInvitationSummary = (output, context) => {
4336
5408
  return {
5409
+ LensArn: smithy_client_1.expectString(output.LensArn),
5410
+ LensName: smithy_client_1.expectString(output.LensName),
4337
5411
  PermissionType: smithy_client_1.expectString(output.PermissionType),
4338
5412
  ShareInvitationId: smithy_client_1.expectString(output.ShareInvitationId),
5413
+ ShareResourceType: smithy_client_1.expectString(output.ShareResourceType),
4339
5414
  SharedBy: smithy_client_1.expectString(output.SharedBy),
4340
5415
  SharedWith: smithy_client_1.expectString(output.SharedWith),
4341
5416
  WorkloadId: smithy_client_1.expectString(output.WorkloadId),