@aws-sdk/client-codeguruprofiler 3.310.0 → 3.315.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.
@@ -15,9 +15,9 @@ const se_AddNotificationChannelsCommand = async (input, context) => {
15
15
  "/profilingGroups/{profilingGroupName}/notificationConfiguration";
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
17
17
  let body;
18
- body = JSON.stringify({
19
- ...(input.channels != null && { channels: se_Channels(input.channels, context) }),
20
- });
18
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
19
+ channels: (_) => (0, smithy_client_1._json)(_),
20
+ }));
21
21
  return new protocol_http_1.HttpRequest({
22
22
  protocol,
23
23
  hostname,
@@ -37,7 +37,7 @@ const se_BatchGetFrameMetricDataCommand = async (input, context) => {
37
37
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
38
38
  "/profilingGroups/{profilingGroupName}/frames/-/metrics";
39
39
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
40
- const query = map({
40
+ const query = (0, smithy_client_1.map)({
41
41
  startTime: [
42
42
  () => input.startTime !== void 0,
43
43
  () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
@@ -47,9 +47,9 @@ const se_BatchGetFrameMetricDataCommand = async (input, context) => {
47
47
  targetResolution: [, input.targetResolution],
48
48
  });
49
49
  let body;
50
- body = JSON.stringify({
51
- ...(input.frameMetrics != null && { frameMetrics: se_FrameMetrics(input.frameMetrics, context) }),
52
- });
50
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
51
+ frameMetrics: (_) => (0, smithy_client_1._json)(_),
52
+ }));
53
53
  return new protocol_http_1.HttpRequest({
54
54
  protocol,
55
55
  hostname,
@@ -71,10 +71,10 @@ const se_ConfigureAgentCommand = async (input, context) => {
71
71
  "/profilingGroups/{profilingGroupName}/configureAgent";
72
72
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
73
73
  let body;
74
- body = JSON.stringify({
75
- ...(input.fleetInstanceId != null && { fleetInstanceId: input.fleetInstanceId }),
76
- ...(input.metadata != null && { metadata: se_Metadata(input.metadata, context) }),
77
- });
74
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
75
+ fleetInstanceId: [],
76
+ metadata: (_) => (0, smithy_client_1._json)(_),
77
+ }));
78
78
  return new protocol_http_1.HttpRequest({
79
79
  protocol,
80
80
  hostname,
@@ -92,18 +92,16 @@ const se_CreateProfilingGroupCommand = async (input, context) => {
92
92
  "content-type": "application/json",
93
93
  };
94
94
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
95
- const query = map({
95
+ const query = (0, smithy_client_1.map)({
96
96
  clientToken: [, (0, smithy_client_1.expectNonNull)(input.clientToken, `clientToken`)],
97
97
  });
98
98
  let body;
99
- body = JSON.stringify({
100
- ...(input.agentOrchestrationConfig != null && {
101
- agentOrchestrationConfig: se_AgentOrchestrationConfig(input.agentOrchestrationConfig, context),
102
- }),
103
- ...(input.computePlatform != null && { computePlatform: input.computePlatform }),
104
- ...(input.profilingGroupName != null && { profilingGroupName: input.profilingGroupName }),
105
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
106
- });
99
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
100
+ agentOrchestrationConfig: (_) => (0, smithy_client_1._json)(_),
101
+ computePlatform: [],
102
+ profilingGroupName: [],
103
+ tags: (_) => (0, smithy_client_1._json)(_),
104
+ }));
107
105
  return new protocol_http_1.HttpRequest({
108
106
  protocol,
109
107
  hostname,
@@ -154,7 +152,7 @@ const se_GetFindingsReportAccountSummaryCommand = async (input, context) => {
154
152
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
153
  const headers = {};
156
154
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/internal/findingsReports";
157
- const query = map({
155
+ const query = (0, smithy_client_1.map)({
158
156
  nextToken: [, input.nextToken],
159
157
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
160
158
  dailyReportsOnly: [() => input.dailyReportsOnly !== void 0, () => input.dailyReportsOnly.toString()],
@@ -210,13 +208,13 @@ const se_GetPolicyCommand = async (input, context) => {
210
208
  exports.se_GetPolicyCommand = se_GetPolicyCommand;
211
209
  const se_GetProfileCommand = async (input, context) => {
212
210
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
- const headers = map({}, isSerializableHeaderValue, {
211
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
214
212
  accept: input.accept,
215
213
  });
216
214
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
217
215
  "/profilingGroups/{profilingGroupName}/profile";
218
216
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
219
- const query = map({
217
+ const query = (0, smithy_client_1.map)({
220
218
  startTime: [
221
219
  () => input.startTime !== void 0,
222
220
  () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
@@ -244,7 +242,7 @@ const se_GetRecommendationsCommand = async (input, context) => {
244
242
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
245
243
  "/internal/profilingGroups/{profilingGroupName}/recommendations";
246
244
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
247
- const query = map({
245
+ const query = (0, smithy_client_1.map)({
248
246
  startTime: [
249
247
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
250
248
  () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
@@ -274,7 +272,7 @@ const se_ListFindingsReportsCommand = async (input, context) => {
274
272
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
275
273
  "/internal/profilingGroups/{profilingGroupName}/findingsReports";
276
274
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
277
- const query = map({
275
+ const query = (0, smithy_client_1.map)({
278
276
  startTime: [
279
277
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
280
278
  () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
@@ -306,7 +304,7 @@ const se_ListProfileTimesCommand = async (input, context) => {
306
304
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
307
305
  "/profilingGroups/{profilingGroupName}/profileTimes";
308
306
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
309
- const query = map({
307
+ const query = (0, smithy_client_1.map)({
310
308
  startTime: [
311
309
  (0, smithy_client_1.expectNonNull)(input.startTime, `startTime`) != null,
312
310
  () => (input.startTime.toISOString().split(".")[0] + "Z").toString(),
@@ -337,7 +335,7 @@ const se_ListProfilingGroupsCommand = async (input, context) => {
337
335
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
338
336
  const headers = {};
339
337
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups";
340
- const query = map({
338
+ const query = (0, smithy_client_1.map)({
341
339
  nextToken: [, input.nextToken],
342
340
  maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
343
341
  includeDescription: [() => input.includeDescription !== void 0, () => input.includeDescription.toString()],
@@ -374,13 +372,13 @@ const se_ListTagsForResourceCommand = async (input, context) => {
374
372
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
375
373
  const se_PostAgentProfileCommand = async (input, context) => {
376
374
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
- const headers = map({}, isSerializableHeaderValue, {
375
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
378
376
  "content-type": input.contentType || "application/octet-stream",
379
377
  });
380
378
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
381
379
  "/profilingGroups/{profilingGroupName}/agentProfile";
382
380
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
383
- const query = map({
381
+ const query = (0, smithy_client_1.map)({
384
382
  profileToken: [, input.profileToken ?? (0, uuid_1.v4)()],
385
383
  });
386
384
  let body;
@@ -409,10 +407,10 @@ const se_PutPermissionCommand = async (input, context) => {
409
407
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
410
408
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
411
409
  let body;
412
- body = JSON.stringify({
413
- ...(input.principals != null && { principals: se_Principals(input.principals, context) }),
414
- ...(input.revisionId != null && { revisionId: input.revisionId }),
415
- });
410
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
411
+ principals: (_) => (0, smithy_client_1._json)(_),
412
+ revisionId: [],
413
+ }));
416
414
  return new protocol_http_1.HttpRequest({
417
415
  protocol,
418
416
  hostname,
@@ -450,7 +448,7 @@ const se_RemovePermissionCommand = async (input, context) => {
450
448
  "/profilingGroups/{profilingGroupName}/policy/{actionGroup}";
451
449
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
452
450
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "actionGroup", () => input.actionGroup, "{actionGroup}", false);
453
- const query = map({
451
+ const query = (0, smithy_client_1.map)({
454
452
  revisionId: [, (0, smithy_client_1.expectNonNull)(input.revisionId, `revisionId`)],
455
453
  });
456
454
  let body;
@@ -476,10 +474,10 @@ const se_SubmitFeedbackCommand = async (input, context) => {
476
474
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
477
475
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "anomalyInstanceId", () => input.anomalyInstanceId, "{anomalyInstanceId}", false);
478
476
  let body;
479
- body = JSON.stringify({
480
- ...(input.comment != null && { comment: input.comment }),
481
- ...(input.type != null && { type: input.type }),
482
- });
477
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
478
+ comment: [],
479
+ type: [],
480
+ }));
483
481
  return new protocol_http_1.HttpRequest({
484
482
  protocol,
485
483
  hostname,
@@ -499,9 +497,9 @@ const se_TagResourceCommand = async (input, context) => {
499
497
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
500
498
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
501
499
  let body;
502
- body = JSON.stringify({
503
- ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }),
504
- });
500
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
501
+ tags: (_) => (0, smithy_client_1._json)(_),
502
+ }));
505
503
  return new protocol_http_1.HttpRequest({
506
504
  protocol,
507
505
  hostname,
@@ -518,7 +516,7 @@ const se_UntagResourceCommand = async (input, context) => {
518
516
  const headers = {};
519
517
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
520
518
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
521
- const query = map({
519
+ const query = (0, smithy_client_1.map)({
522
520
  tagKeys: [
523
521
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
524
522
  () => (input.tagKeys || []).map((_entry) => _entry),
@@ -545,11 +543,9 @@ const se_UpdateProfilingGroupCommand = async (input, context) => {
545
543
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profilingGroups/{profilingGroupName}";
546
544
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profilingGroupName", () => input.profilingGroupName, "{profilingGroupName}", false);
547
545
  let body;
548
- body = JSON.stringify({
549
- ...(input.agentOrchestrationConfig != null && {
550
- agentOrchestrationConfig: se_AgentOrchestrationConfig(input.agentOrchestrationConfig, context),
551
- }),
552
- });
546
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
547
+ agentOrchestrationConfig: (_) => (0, smithy_client_1._json)(_),
548
+ }));
553
549
  return new protocol_http_1.HttpRequest({
554
550
  protocol,
555
551
  hostname,
@@ -565,13 +561,14 @@ const de_AddNotificationChannelsCommand = async (output, context) => {
565
561
  if (output.statusCode !== 200 && output.statusCode >= 300) {
566
562
  return de_AddNotificationChannelsCommandError(output, context);
567
563
  }
568
- const contents = map({
564
+ const contents = (0, smithy_client_1.map)({
569
565
  $metadata: deserializeMetadata(output),
570
566
  });
571
567
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
572
- if (data.notificationConfiguration != null) {
573
- contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context);
574
- }
568
+ const doc = (0, smithy_client_1.take)(data, {
569
+ notificationConfiguration: smithy_client_1._json,
570
+ });
571
+ Object.assign(contents, doc);
575
572
  return contents;
576
573
  };
577
574
  exports.de_AddNotificationChannelsCommand = de_AddNotificationChannelsCommand;
@@ -602,10 +599,9 @@ const de_AddNotificationChannelsCommandError = async (output, context) => {
602
599
  throw await de_ValidationExceptionRes(parsedOutput, context);
603
600
  default:
604
601
  const parsedBody = parsedOutput.body;
605
- (0, smithy_client_1.throwDefaultError)({
602
+ return throwDefaultError({
606
603
  output,
607
604
  parsedBody,
608
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
609
605
  errorCode,
610
606
  });
611
607
  }
@@ -614,28 +610,19 @@ const de_BatchGetFrameMetricDataCommand = async (output, context) => {
614
610
  if (output.statusCode !== 200 && output.statusCode >= 300) {
615
611
  return de_BatchGetFrameMetricDataCommandError(output, context);
616
612
  }
617
- const contents = map({
613
+ const contents = (0, smithy_client_1.map)({
618
614
  $metadata: deserializeMetadata(output),
619
615
  });
620
616
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
621
- if (data.endTime != null) {
622
- contents.endTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.endTime));
623
- }
624
- if (data.endTimes != null) {
625
- contents.endTimes = de_ListOfTimestamps(data.endTimes, context);
626
- }
627
- if (data.frameMetricData != null) {
628
- contents.frameMetricData = de_FrameMetricData(data.frameMetricData, context);
629
- }
630
- if (data.resolution != null) {
631
- contents.resolution = (0, smithy_client_1.expectString)(data.resolution);
632
- }
633
- if (data.startTime != null) {
634
- contents.startTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.startTime));
635
- }
636
- if (data.unprocessedEndTimes != null) {
637
- contents.unprocessedEndTimes = de_UnprocessedEndTimeMap(data.unprocessedEndTimes, context);
638
- }
617
+ const doc = (0, smithy_client_1.take)(data, {
618
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
619
+ endTimes: (_) => de_ListOfTimestamps(_, context),
620
+ frameMetricData: (_) => de_FrameMetricData(_, context),
621
+ resolution: smithy_client_1.expectString,
622
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
623
+ unprocessedEndTimes: (_) => de_UnprocessedEndTimeMap(_, context),
624
+ });
625
+ Object.assign(contents, doc);
639
626
  return contents;
640
627
  };
641
628
  exports.de_BatchGetFrameMetricDataCommand = de_BatchGetFrameMetricDataCommand;
@@ -660,10 +647,9 @@ const de_BatchGetFrameMetricDataCommandError = async (output, context) => {
660
647
  throw await de_ValidationExceptionRes(parsedOutput, context);
661
648
  default:
662
649
  const parsedBody = parsedOutput.body;
663
- (0, smithy_client_1.throwDefaultError)({
650
+ return throwDefaultError({
664
651
  output,
665
652
  parsedBody,
666
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
667
653
  errorCode,
668
654
  });
669
655
  }
@@ -672,11 +658,11 @@ const de_ConfigureAgentCommand = async (output, context) => {
672
658
  if (output.statusCode !== 200 && output.statusCode >= 300) {
673
659
  return de_ConfigureAgentCommandError(output, context);
674
660
  }
675
- const contents = map({
661
+ const contents = (0, smithy_client_1.map)({
676
662
  $metadata: deserializeMetadata(output),
677
663
  });
678
664
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
679
- contents.configuration = de_AgentConfiguration(data, context);
665
+ contents.configuration = (0, smithy_client_1._json)(data);
680
666
  return contents;
681
667
  };
682
668
  exports.de_ConfigureAgentCommand = de_ConfigureAgentCommand;
@@ -701,10 +687,9 @@ const de_ConfigureAgentCommandError = async (output, context) => {
701
687
  throw await de_ValidationExceptionRes(parsedOutput, context);
702
688
  default:
703
689
  const parsedBody = parsedOutput.body;
704
- (0, smithy_client_1.throwDefaultError)({
690
+ return throwDefaultError({
705
691
  output,
706
692
  parsedBody,
707
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
708
693
  errorCode,
709
694
  });
710
695
  }
@@ -713,7 +698,7 @@ const de_CreateProfilingGroupCommand = async (output, context) => {
713
698
  if (output.statusCode !== 201 && output.statusCode >= 300) {
714
699
  return de_CreateProfilingGroupCommandError(output, context);
715
700
  }
716
- const contents = map({
701
+ const contents = (0, smithy_client_1.map)({
717
702
  $metadata: deserializeMetadata(output),
718
703
  });
719
704
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -745,10 +730,9 @@ const de_CreateProfilingGroupCommandError = async (output, context) => {
745
730
  throw await de_ValidationExceptionRes(parsedOutput, context);
746
731
  default:
747
732
  const parsedBody = parsedOutput.body;
748
- (0, smithy_client_1.throwDefaultError)({
733
+ return throwDefaultError({
749
734
  output,
750
735
  parsedBody,
751
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
752
736
  errorCode,
753
737
  });
754
738
  }
@@ -757,7 +741,7 @@ const de_DeleteProfilingGroupCommand = async (output, context) => {
757
741
  if (output.statusCode !== 204 && output.statusCode >= 300) {
758
742
  return de_DeleteProfilingGroupCommandError(output, context);
759
743
  }
760
- const contents = map({
744
+ const contents = (0, smithy_client_1.map)({
761
745
  $metadata: deserializeMetadata(output),
762
746
  });
763
747
  await collectBody(output.body, context);
@@ -788,10 +772,9 @@ const de_DeleteProfilingGroupCommandError = async (output, context) => {
788
772
  throw await de_ValidationExceptionRes(parsedOutput, context);
789
773
  default:
790
774
  const parsedBody = parsedOutput.body;
791
- (0, smithy_client_1.throwDefaultError)({
775
+ return throwDefaultError({
792
776
  output,
793
777
  parsedBody,
794
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
795
778
  errorCode,
796
779
  });
797
780
  }
@@ -800,7 +783,7 @@ const de_DescribeProfilingGroupCommand = async (output, context) => {
800
783
  if (output.statusCode !== 200 && output.statusCode >= 300) {
801
784
  return de_DescribeProfilingGroupCommandError(output, context);
802
785
  }
803
- const contents = map({
786
+ const contents = (0, smithy_client_1.map)({
804
787
  $metadata: deserializeMetadata(output),
805
788
  });
806
789
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -829,10 +812,9 @@ const de_DescribeProfilingGroupCommandError = async (output, context) => {
829
812
  throw await de_ValidationExceptionRes(parsedOutput, context);
830
813
  default:
831
814
  const parsedBody = parsedOutput.body;
832
- (0, smithy_client_1.throwDefaultError)({
815
+ return throwDefaultError({
833
816
  output,
834
817
  parsedBody,
835
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
836
818
  errorCode,
837
819
  });
838
820
  }
@@ -841,16 +823,15 @@ const de_GetFindingsReportAccountSummaryCommand = async (output, context) => {
841
823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
842
824
  return de_GetFindingsReportAccountSummaryCommandError(output, context);
843
825
  }
844
- const contents = map({
826
+ const contents = (0, smithy_client_1.map)({
845
827
  $metadata: deserializeMetadata(output),
846
828
  });
847
829
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
848
- if (data.nextToken != null) {
849
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
850
- }
851
- if (data.reportSummaries != null) {
852
- contents.reportSummaries = de_FindingsReportSummaries(data.reportSummaries, context);
853
- }
830
+ const doc = (0, smithy_client_1.take)(data, {
831
+ nextToken: smithy_client_1.expectString,
832
+ reportSummaries: (_) => de_FindingsReportSummaries(_, context),
833
+ });
834
+ Object.assign(contents, doc);
854
835
  return contents;
855
836
  };
856
837
  exports.de_GetFindingsReportAccountSummaryCommand = de_GetFindingsReportAccountSummaryCommand;
@@ -872,10 +853,9 @@ const de_GetFindingsReportAccountSummaryCommandError = async (output, context) =
872
853
  throw await de_ValidationExceptionRes(parsedOutput, context);
873
854
  default:
874
855
  const parsedBody = parsedOutput.body;
875
- (0, smithy_client_1.throwDefaultError)({
856
+ return throwDefaultError({
876
857
  output,
877
858
  parsedBody,
878
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
879
859
  errorCode,
880
860
  });
881
861
  }
@@ -884,13 +864,14 @@ const de_GetNotificationConfigurationCommand = async (output, context) => {
884
864
  if (output.statusCode !== 200 && output.statusCode >= 300) {
885
865
  return de_GetNotificationConfigurationCommandError(output, context);
886
866
  }
887
- const contents = map({
867
+ const contents = (0, smithy_client_1.map)({
888
868
  $metadata: deserializeMetadata(output),
889
869
  });
890
870
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
891
- if (data.notificationConfiguration != null) {
892
- contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context);
893
- }
871
+ const doc = (0, smithy_client_1.take)(data, {
872
+ notificationConfiguration: smithy_client_1._json,
873
+ });
874
+ Object.assign(contents, doc);
894
875
  return contents;
895
876
  };
896
877
  exports.de_GetNotificationConfigurationCommand = de_GetNotificationConfigurationCommand;
@@ -915,10 +896,9 @@ const de_GetNotificationConfigurationCommandError = async (output, context) => {
915
896
  throw await de_ValidationExceptionRes(parsedOutput, context);
916
897
  default:
917
898
  const parsedBody = parsedOutput.body;
918
- (0, smithy_client_1.throwDefaultError)({
899
+ return throwDefaultError({
919
900
  output,
920
901
  parsedBody,
921
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
922
902
  errorCode,
923
903
  });
924
904
  }
@@ -927,16 +907,15 @@ const de_GetPolicyCommand = async (output, context) => {
927
907
  if (output.statusCode !== 200 && output.statusCode >= 300) {
928
908
  return de_GetPolicyCommandError(output, context);
929
909
  }
930
- const contents = map({
910
+ const contents = (0, smithy_client_1.map)({
931
911
  $metadata: deserializeMetadata(output),
932
912
  });
933
913
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
934
- if (data.policy != null) {
935
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
936
- }
937
- if (data.revisionId != null) {
938
- contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
939
- }
914
+ const doc = (0, smithy_client_1.take)(data, {
915
+ policy: smithy_client_1.expectString,
916
+ revisionId: smithy_client_1.expectString,
917
+ });
918
+ Object.assign(contents, doc);
940
919
  return contents;
941
920
  };
942
921
  exports.de_GetPolicyCommand = de_GetPolicyCommand;
@@ -958,10 +937,9 @@ const de_GetPolicyCommandError = async (output, context) => {
958
937
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
959
938
  default:
960
939
  const parsedBody = parsedOutput.body;
961
- (0, smithy_client_1.throwDefaultError)({
940
+ return throwDefaultError({
962
941
  output,
963
942
  parsedBody,
964
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
965
943
  errorCode,
966
944
  });
967
945
  }
@@ -970,7 +948,7 @@ const de_GetProfileCommand = async (output, context) => {
970
948
  if (output.statusCode !== 200 && output.statusCode >= 300) {
971
949
  return de_GetProfileCommandError(output, context);
972
950
  }
973
- const contents = map({
951
+ const contents = (0, smithy_client_1.map)({
974
952
  $metadata: deserializeMetadata(output),
975
953
  contentType: [, output.headers["content-type"]],
976
954
  contentEncoding: [, output.headers["content-encoding"]],
@@ -1001,10 +979,9 @@ const de_GetProfileCommandError = async (output, context) => {
1001
979
  throw await de_ValidationExceptionRes(parsedOutput, context);
1002
980
  default:
1003
981
  const parsedBody = parsedOutput.body;
1004
- (0, smithy_client_1.throwDefaultError)({
982
+ return throwDefaultError({
1005
983
  output,
1006
984
  parsedBody,
1007
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1008
985
  errorCode,
1009
986
  });
1010
987
  }
@@ -1013,25 +990,18 @@ const de_GetRecommendationsCommand = async (output, context) => {
1013
990
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1014
991
  return de_GetRecommendationsCommandError(output, context);
1015
992
  }
1016
- const contents = map({
993
+ const contents = (0, smithy_client_1.map)({
1017
994
  $metadata: deserializeMetadata(output),
1018
995
  });
1019
996
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1020
- if (data.anomalies != null) {
1021
- contents.anomalies = de_Anomalies(data.anomalies, context);
1022
- }
1023
- if (data.profileEndTime != null) {
1024
- contents.profileEndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.profileEndTime));
1025
- }
1026
- if (data.profileStartTime != null) {
1027
- contents.profileStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.profileStartTime));
1028
- }
1029
- if (data.profilingGroupName != null) {
1030
- contents.profilingGroupName = (0, smithy_client_1.expectString)(data.profilingGroupName);
1031
- }
1032
- if (data.recommendations != null) {
1033
- contents.recommendations = de_Recommendations(data.recommendations, context);
1034
- }
997
+ const doc = (0, smithy_client_1.take)(data, {
998
+ anomalies: (_) => de_Anomalies(_, context),
999
+ profileEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1000
+ profileStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1001
+ profilingGroupName: smithy_client_1.expectString,
1002
+ recommendations: (_) => de_Recommendations(_, context),
1003
+ });
1004
+ Object.assign(contents, doc);
1035
1005
  return contents;
1036
1006
  };
1037
1007
  exports.de_GetRecommendationsCommand = de_GetRecommendationsCommand;
@@ -1056,10 +1026,9 @@ const de_GetRecommendationsCommandError = async (output, context) => {
1056
1026
  throw await de_ValidationExceptionRes(parsedOutput, context);
1057
1027
  default:
1058
1028
  const parsedBody = parsedOutput.body;
1059
- (0, smithy_client_1.throwDefaultError)({
1029
+ return throwDefaultError({
1060
1030
  output,
1061
1031
  parsedBody,
1062
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1063
1032
  errorCode,
1064
1033
  });
1065
1034
  }
@@ -1068,16 +1037,15 @@ const de_ListFindingsReportsCommand = async (output, context) => {
1068
1037
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1069
1038
  return de_ListFindingsReportsCommandError(output, context);
1070
1039
  }
1071
- const contents = map({
1040
+ const contents = (0, smithy_client_1.map)({
1072
1041
  $metadata: deserializeMetadata(output),
1073
1042
  });
1074
1043
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1075
- if (data.findingsReportSummaries != null) {
1076
- contents.findingsReportSummaries = de_FindingsReportSummaries(data.findingsReportSummaries, context);
1077
- }
1078
- if (data.nextToken != null) {
1079
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1080
- }
1044
+ const doc = (0, smithy_client_1.take)(data, {
1045
+ findingsReportSummaries: (_) => de_FindingsReportSummaries(_, context),
1046
+ nextToken: smithy_client_1.expectString,
1047
+ });
1048
+ Object.assign(contents, doc);
1081
1049
  return contents;
1082
1050
  };
1083
1051
  exports.de_ListFindingsReportsCommand = de_ListFindingsReportsCommand;
@@ -1102,10 +1070,9 @@ const de_ListFindingsReportsCommandError = async (output, context) => {
1102
1070
  throw await de_ValidationExceptionRes(parsedOutput, context);
1103
1071
  default:
1104
1072
  const parsedBody = parsedOutput.body;
1105
- (0, smithy_client_1.throwDefaultError)({
1073
+ return throwDefaultError({
1106
1074
  output,
1107
1075
  parsedBody,
1108
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1109
1076
  errorCode,
1110
1077
  });
1111
1078
  }
@@ -1114,16 +1081,15 @@ const de_ListProfileTimesCommand = async (output, context) => {
1114
1081
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1115
1082
  return de_ListProfileTimesCommandError(output, context);
1116
1083
  }
1117
- const contents = map({
1084
+ const contents = (0, smithy_client_1.map)({
1118
1085
  $metadata: deserializeMetadata(output),
1119
1086
  });
1120
1087
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1121
- if (data.nextToken != null) {
1122
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1123
- }
1124
- if (data.profileTimes != null) {
1125
- contents.profileTimes = de_ProfileTimes(data.profileTimes, context);
1126
- }
1088
+ const doc = (0, smithy_client_1.take)(data, {
1089
+ nextToken: smithy_client_1.expectString,
1090
+ profileTimes: (_) => de_ProfileTimes(_, context),
1091
+ });
1092
+ Object.assign(contents, doc);
1127
1093
  return contents;
1128
1094
  };
1129
1095
  exports.de_ListProfileTimesCommand = de_ListProfileTimesCommand;
@@ -1148,10 +1114,9 @@ const de_ListProfileTimesCommandError = async (output, context) => {
1148
1114
  throw await de_ValidationExceptionRes(parsedOutput, context);
1149
1115
  default:
1150
1116
  const parsedBody = parsedOutput.body;
1151
- (0, smithy_client_1.throwDefaultError)({
1117
+ return throwDefaultError({
1152
1118
  output,
1153
1119
  parsedBody,
1154
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1155
1120
  errorCode,
1156
1121
  });
1157
1122
  }
@@ -1160,19 +1125,16 @@ const de_ListProfilingGroupsCommand = async (output, context) => {
1160
1125
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1161
1126
  return de_ListProfilingGroupsCommandError(output, context);
1162
1127
  }
1163
- const contents = map({
1128
+ const contents = (0, smithy_client_1.map)({
1164
1129
  $metadata: deserializeMetadata(output),
1165
1130
  });
1166
1131
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1167
- if (data.nextToken != null) {
1168
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1169
- }
1170
- if (data.profilingGroupNames != null) {
1171
- contents.profilingGroupNames = de_ProfilingGroupNames(data.profilingGroupNames, context);
1172
- }
1173
- if (data.profilingGroups != null) {
1174
- contents.profilingGroups = de_ProfilingGroupDescriptions(data.profilingGroups, context);
1175
- }
1132
+ const doc = (0, smithy_client_1.take)(data, {
1133
+ nextToken: smithy_client_1.expectString,
1134
+ profilingGroupNames: smithy_client_1._json,
1135
+ profilingGroups: (_) => de_ProfilingGroupDescriptions(_, context),
1136
+ });
1137
+ Object.assign(contents, doc);
1176
1138
  return contents;
1177
1139
  };
1178
1140
  exports.de_ListProfilingGroupsCommand = de_ListProfilingGroupsCommand;
@@ -1191,10 +1153,9 @@ const de_ListProfilingGroupsCommandError = async (output, context) => {
1191
1153
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1192
1154
  default:
1193
1155
  const parsedBody = parsedOutput.body;
1194
- (0, smithy_client_1.throwDefaultError)({
1156
+ return throwDefaultError({
1195
1157
  output,
1196
1158
  parsedBody,
1197
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1198
1159
  errorCode,
1199
1160
  });
1200
1161
  }
@@ -1203,13 +1164,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1203
1164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1204
1165
  return de_ListTagsForResourceCommandError(output, context);
1205
1166
  }
1206
- const contents = map({
1167
+ const contents = (0, smithy_client_1.map)({
1207
1168
  $metadata: deserializeMetadata(output),
1208
1169
  });
1209
1170
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1210
- if (data.tags != null) {
1211
- contents.tags = de_TagsMap(data.tags, context);
1212
- }
1171
+ const doc = (0, smithy_client_1.take)(data, {
1172
+ tags: smithy_client_1._json,
1173
+ });
1174
+ Object.assign(contents, doc);
1213
1175
  return contents;
1214
1176
  };
1215
1177
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1231,10 +1193,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1231
1193
  throw await de_ValidationExceptionRes(parsedOutput, context);
1232
1194
  default:
1233
1195
  const parsedBody = parsedOutput.body;
1234
- (0, smithy_client_1.throwDefaultError)({
1196
+ return throwDefaultError({
1235
1197
  output,
1236
1198
  parsedBody,
1237
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1238
1199
  errorCode,
1239
1200
  });
1240
1201
  }
@@ -1243,7 +1204,7 @@ const de_PostAgentProfileCommand = async (output, context) => {
1243
1204
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1244
1205
  return de_PostAgentProfileCommandError(output, context);
1245
1206
  }
1246
- const contents = map({
1207
+ const contents = (0, smithy_client_1.map)({
1247
1208
  $metadata: deserializeMetadata(output),
1248
1209
  });
1249
1210
  await collectBody(output.body, context);
@@ -1271,10 +1232,9 @@ const de_PostAgentProfileCommandError = async (output, context) => {
1271
1232
  throw await de_ValidationExceptionRes(parsedOutput, context);
1272
1233
  default:
1273
1234
  const parsedBody = parsedOutput.body;
1274
- (0, smithy_client_1.throwDefaultError)({
1235
+ return throwDefaultError({
1275
1236
  output,
1276
1237
  parsedBody,
1277
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1278
1238
  errorCode,
1279
1239
  });
1280
1240
  }
@@ -1283,16 +1243,15 @@ const de_PutPermissionCommand = async (output, context) => {
1283
1243
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1284
1244
  return de_PutPermissionCommandError(output, context);
1285
1245
  }
1286
- const contents = map({
1246
+ const contents = (0, smithy_client_1.map)({
1287
1247
  $metadata: deserializeMetadata(output),
1288
1248
  });
1289
1249
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1290
- if (data.policy != null) {
1291
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
1292
- }
1293
- if (data.revisionId != null) {
1294
- contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
1295
- }
1250
+ const doc = (0, smithy_client_1.take)(data, {
1251
+ policy: smithy_client_1.expectString,
1252
+ revisionId: smithy_client_1.expectString,
1253
+ });
1254
+ Object.assign(contents, doc);
1296
1255
  return contents;
1297
1256
  };
1298
1257
  exports.de_PutPermissionCommand = de_PutPermissionCommand;
@@ -1320,10 +1279,9 @@ const de_PutPermissionCommandError = async (output, context) => {
1320
1279
  throw await de_ValidationExceptionRes(parsedOutput, context);
1321
1280
  default:
1322
1281
  const parsedBody = parsedOutput.body;
1323
- (0, smithy_client_1.throwDefaultError)({
1282
+ return throwDefaultError({
1324
1283
  output,
1325
1284
  parsedBody,
1326
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1327
1285
  errorCode,
1328
1286
  });
1329
1287
  }
@@ -1332,13 +1290,14 @@ const de_RemoveNotificationChannelCommand = async (output, context) => {
1332
1290
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1333
1291
  return de_RemoveNotificationChannelCommandError(output, context);
1334
1292
  }
1335
- const contents = map({
1293
+ const contents = (0, smithy_client_1.map)({
1336
1294
  $metadata: deserializeMetadata(output),
1337
1295
  });
1338
1296
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1339
- if (data.notificationConfiguration != null) {
1340
- contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context);
1341
- }
1297
+ const doc = (0, smithy_client_1.take)(data, {
1298
+ notificationConfiguration: smithy_client_1._json,
1299
+ });
1300
+ Object.assign(contents, doc);
1342
1301
  return contents;
1343
1302
  };
1344
1303
  exports.de_RemoveNotificationChannelCommand = de_RemoveNotificationChannelCommand;
@@ -1363,10 +1322,9 @@ const de_RemoveNotificationChannelCommandError = async (output, context) => {
1363
1322
  throw await de_ValidationExceptionRes(parsedOutput, context);
1364
1323
  default:
1365
1324
  const parsedBody = parsedOutput.body;
1366
- (0, smithy_client_1.throwDefaultError)({
1325
+ return throwDefaultError({
1367
1326
  output,
1368
1327
  parsedBody,
1369
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1370
1328
  errorCode,
1371
1329
  });
1372
1330
  }
@@ -1375,16 +1333,15 @@ const de_RemovePermissionCommand = async (output, context) => {
1375
1333
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1376
1334
  return de_RemovePermissionCommandError(output, context);
1377
1335
  }
1378
- const contents = map({
1336
+ const contents = (0, smithy_client_1.map)({
1379
1337
  $metadata: deserializeMetadata(output),
1380
1338
  });
1381
1339
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1382
- if (data.policy != null) {
1383
- contents.policy = (0, smithy_client_1.expectString)(data.policy);
1384
- }
1385
- if (data.revisionId != null) {
1386
- contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
1387
- }
1340
+ const doc = (0, smithy_client_1.take)(data, {
1341
+ policy: smithy_client_1.expectString,
1342
+ revisionId: smithy_client_1.expectString,
1343
+ });
1344
+ Object.assign(contents, doc);
1388
1345
  return contents;
1389
1346
  };
1390
1347
  exports.de_RemovePermissionCommand = de_RemovePermissionCommand;
@@ -1412,10 +1369,9 @@ const de_RemovePermissionCommandError = async (output, context) => {
1412
1369
  throw await de_ValidationExceptionRes(parsedOutput, context);
1413
1370
  default:
1414
1371
  const parsedBody = parsedOutput.body;
1415
- (0, smithy_client_1.throwDefaultError)({
1372
+ return throwDefaultError({
1416
1373
  output,
1417
1374
  parsedBody,
1418
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1419
1375
  errorCode,
1420
1376
  });
1421
1377
  }
@@ -1424,7 +1380,7 @@ const de_SubmitFeedbackCommand = async (output, context) => {
1424
1380
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1425
1381
  return de_SubmitFeedbackCommandError(output, context);
1426
1382
  }
1427
- const contents = map({
1383
+ const contents = (0, smithy_client_1.map)({
1428
1384
  $metadata: deserializeMetadata(output),
1429
1385
  });
1430
1386
  await collectBody(output.body, context);
@@ -1452,10 +1408,9 @@ const de_SubmitFeedbackCommandError = async (output, context) => {
1452
1408
  throw await de_ValidationExceptionRes(parsedOutput, context);
1453
1409
  default:
1454
1410
  const parsedBody = parsedOutput.body;
1455
- (0, smithy_client_1.throwDefaultError)({
1411
+ return throwDefaultError({
1456
1412
  output,
1457
1413
  parsedBody,
1458
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1459
1414
  errorCode,
1460
1415
  });
1461
1416
  }
@@ -1464,7 +1419,7 @@ const de_TagResourceCommand = async (output, context) => {
1464
1419
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1465
1420
  return de_TagResourceCommandError(output, context);
1466
1421
  }
1467
- const contents = map({
1422
+ const contents = (0, smithy_client_1.map)({
1468
1423
  $metadata: deserializeMetadata(output),
1469
1424
  });
1470
1425
  await collectBody(output.body, context);
@@ -1489,10 +1444,9 @@ const de_TagResourceCommandError = async (output, context) => {
1489
1444
  throw await de_ValidationExceptionRes(parsedOutput, context);
1490
1445
  default:
1491
1446
  const parsedBody = parsedOutput.body;
1492
- (0, smithy_client_1.throwDefaultError)({
1447
+ return throwDefaultError({
1493
1448
  output,
1494
1449
  parsedBody,
1495
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1496
1450
  errorCode,
1497
1451
  });
1498
1452
  }
@@ -1501,7 +1455,7 @@ const de_UntagResourceCommand = async (output, context) => {
1501
1455
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1502
1456
  return de_UntagResourceCommandError(output, context);
1503
1457
  }
1504
- const contents = map({
1458
+ const contents = (0, smithy_client_1.map)({
1505
1459
  $metadata: deserializeMetadata(output),
1506
1460
  });
1507
1461
  await collectBody(output.body, context);
@@ -1526,10 +1480,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1526
1480
  throw await de_ValidationExceptionRes(parsedOutput, context);
1527
1481
  default:
1528
1482
  const parsedBody = parsedOutput.body;
1529
- (0, smithy_client_1.throwDefaultError)({
1483
+ return throwDefaultError({
1530
1484
  output,
1531
1485
  parsedBody,
1532
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1533
1486
  errorCode,
1534
1487
  });
1535
1488
  }
@@ -1538,7 +1491,7 @@ const de_UpdateProfilingGroupCommand = async (output, context) => {
1538
1491
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1539
1492
  return de_UpdateProfilingGroupCommandError(output, context);
1540
1493
  }
1541
- const contents = map({
1494
+ const contents = (0, smithy_client_1.map)({
1542
1495
  $metadata: deserializeMetadata(output),
1543
1496
  });
1544
1497
  const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
@@ -1570,21 +1523,21 @@ const de_UpdateProfilingGroupCommandError = async (output, context) => {
1570
1523
  throw await de_ValidationExceptionRes(parsedOutput, context);
1571
1524
  default:
1572
1525
  const parsedBody = parsedOutput.body;
1573
- (0, smithy_client_1.throwDefaultError)({
1526
+ return throwDefaultError({
1574
1527
  output,
1575
1528
  parsedBody,
1576
- exceptionCtor: CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException,
1577
1529
  errorCode,
1578
1530
  });
1579
1531
  }
1580
1532
  };
1581
- const map = smithy_client_1.map;
1533
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CodeGuruProfilerServiceException_1.CodeGuruProfilerServiceException);
1582
1534
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1583
- const contents = map({});
1535
+ const contents = (0, smithy_client_1.map)({});
1584
1536
  const data = parsedOutput.body;
1585
- if (data.message != null) {
1586
- contents.message = (0, smithy_client_1.expectString)(data.message);
1587
- }
1537
+ const doc = (0, smithy_client_1.take)(data, {
1538
+ message: smithy_client_1.expectString,
1539
+ });
1540
+ Object.assign(contents, doc);
1588
1541
  const exception = new models_0_1.ConflictException({
1589
1542
  $metadata: deserializeMetadata(parsedOutput),
1590
1543
  ...contents,
@@ -1592,11 +1545,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1592
1545
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1593
1546
  };
1594
1547
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1595
- const contents = map({});
1548
+ const contents = (0, smithy_client_1.map)({});
1596
1549
  const data = parsedOutput.body;
1597
- if (data.message != null) {
1598
- contents.message = (0, smithy_client_1.expectString)(data.message);
1599
- }
1550
+ const doc = (0, smithy_client_1.take)(data, {
1551
+ message: smithy_client_1.expectString,
1552
+ });
1553
+ Object.assign(contents, doc);
1600
1554
  const exception = new models_0_1.InternalServerException({
1601
1555
  $metadata: deserializeMetadata(parsedOutput),
1602
1556
  ...contents,
@@ -1604,11 +1558,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1604
1558
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1605
1559
  };
1606
1560
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1607
- const contents = map({});
1561
+ const contents = (0, smithy_client_1.map)({});
1608
1562
  const data = parsedOutput.body;
1609
- if (data.message != null) {
1610
- contents.message = (0, smithy_client_1.expectString)(data.message);
1611
- }
1563
+ const doc = (0, smithy_client_1.take)(data, {
1564
+ message: smithy_client_1.expectString,
1565
+ });
1566
+ Object.assign(contents, doc);
1612
1567
  const exception = new models_0_1.ResourceNotFoundException({
1613
1568
  $metadata: deserializeMetadata(parsedOutput),
1614
1569
  ...contents,
@@ -1616,11 +1571,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1616
1571
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1617
1572
  };
1618
1573
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1619
- const contents = map({});
1574
+ const contents = (0, smithy_client_1.map)({});
1620
1575
  const data = parsedOutput.body;
1621
- if (data.message != null) {
1622
- contents.message = (0, smithy_client_1.expectString)(data.message);
1623
- }
1576
+ const doc = (0, smithy_client_1.take)(data, {
1577
+ message: smithy_client_1.expectString,
1578
+ });
1579
+ Object.assign(contents, doc);
1624
1580
  const exception = new models_0_1.ServiceQuotaExceededException({
1625
1581
  $metadata: deserializeMetadata(parsedOutput),
1626
1582
  ...contents,
@@ -1628,11 +1584,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1628
1584
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1629
1585
  };
1630
1586
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1631
- const contents = map({});
1587
+ const contents = (0, smithy_client_1.map)({});
1632
1588
  const data = parsedOutput.body;
1633
- if (data.message != null) {
1634
- contents.message = (0, smithy_client_1.expectString)(data.message);
1635
- }
1589
+ const doc = (0, smithy_client_1.take)(data, {
1590
+ message: smithy_client_1.expectString,
1591
+ });
1592
+ Object.assign(contents, doc);
1636
1593
  const exception = new models_0_1.ThrottlingException({
1637
1594
  $metadata: deserializeMetadata(parsedOutput),
1638
1595
  ...contents,
@@ -1640,237 +1597,90 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1640
1597
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1641
1598
  };
1642
1599
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1643
- const contents = map({});
1600
+ const contents = (0, smithy_client_1.map)({});
1644
1601
  const data = parsedOutput.body;
1645
- if (data.message != null) {
1646
- contents.message = (0, smithy_client_1.expectString)(data.message);
1647
- }
1602
+ const doc = (0, smithy_client_1.take)(data, {
1603
+ message: smithy_client_1.expectString,
1604
+ });
1605
+ Object.assign(contents, doc);
1648
1606
  const exception = new models_0_1.ValidationException({
1649
1607
  $metadata: deserializeMetadata(parsedOutput),
1650
1608
  ...contents,
1651
1609
  });
1652
1610
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1653
1611
  };
1654
- const se_AgentOrchestrationConfig = (input, context) => {
1655
- return {
1656
- ...(input.profilingEnabled != null && { profilingEnabled: input.profilingEnabled }),
1657
- };
1658
- };
1659
- const se_Channel = (input, context) => {
1660
- return {
1661
- ...(input.eventPublishers != null && { eventPublishers: se_EventPublishers(input.eventPublishers, context) }),
1662
- ...(input.id != null && { id: input.id }),
1663
- ...(input.uri != null && { uri: input.uri }),
1664
- };
1665
- };
1666
- const se_Channels = (input, context) => {
1667
- return input
1668
- .filter((e) => e != null)
1669
- .map((entry) => {
1670
- return se_Channel(entry, context);
1671
- });
1672
- };
1673
- const se_EventPublishers = (input, context) => {
1674
- return input
1675
- .filter((e) => e != null)
1676
- .map((entry) => {
1677
- return entry;
1678
- });
1679
- };
1680
- const se_FrameMetric = (input, context) => {
1681
- return {
1682
- ...(input.frameName != null && { frameName: input.frameName }),
1683
- ...(input.threadStates != null && { threadStates: se_ThreadStates(input.threadStates, context) }),
1684
- ...(input.type != null && { type: input.type }),
1685
- };
1686
- };
1687
- const se_FrameMetrics = (input, context) => {
1688
- return input
1689
- .filter((e) => e != null)
1690
- .map((entry) => {
1691
- return se_FrameMetric(entry, context);
1692
- });
1693
- };
1694
- const se_Metadata = (input, context) => {
1695
- return Object.entries(input).reduce((acc, [key, value]) => {
1696
- if (value === null) {
1697
- return acc;
1698
- }
1699
- acc[key] = value;
1700
- return acc;
1701
- }, {});
1702
- };
1703
- const se_Principals = (input, context) => {
1704
- return input
1705
- .filter((e) => e != null)
1706
- .map((entry) => {
1707
- return entry;
1708
- });
1709
- };
1710
- const se_TagsMap = (input, context) => {
1711
- return Object.entries(input).reduce((acc, [key, value]) => {
1712
- if (value === null) {
1713
- return acc;
1714
- }
1715
- acc[key] = value;
1716
- return acc;
1717
- }, {});
1718
- };
1719
- const se_ThreadStates = (input, context) => {
1720
- return input
1721
- .filter((e) => e != null)
1722
- .map((entry) => {
1723
- return entry;
1724
- });
1725
- };
1726
- const de_AgentConfiguration = (output, context) => {
1727
- return {
1728
- agentParameters: output.agentParameters != null ? de_AgentParameters(output.agentParameters, context) : undefined,
1729
- periodInSeconds: (0, smithy_client_1.expectInt32)(output.periodInSeconds),
1730
- shouldProfile: (0, smithy_client_1.expectBoolean)(output.shouldProfile),
1731
- };
1732
- };
1733
- const de_AgentOrchestrationConfig = (output, context) => {
1734
- return {
1735
- profilingEnabled: (0, smithy_client_1.expectBoolean)(output.profilingEnabled),
1736
- };
1737
- };
1738
- const de_AgentParameters = (output, context) => {
1739
- return Object.entries(output).reduce((acc, [key, value]) => {
1740
- if (value === null) {
1741
- return acc;
1742
- }
1743
- acc[key] = (0, smithy_client_1.expectString)(value);
1744
- return acc;
1745
- }, {});
1746
- };
1747
1612
  const de_AggregatedProfileTime = (output, context) => {
1748
- return {
1749
- period: (0, smithy_client_1.expectString)(output.period),
1750
- start: output.start != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.start)) : undefined,
1751
- };
1613
+ return (0, smithy_client_1.take)(output, {
1614
+ period: smithy_client_1.expectString,
1615
+ start: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1616
+ });
1752
1617
  };
1753
1618
  const de_Anomalies = (output, context) => {
1754
1619
  const retVal = (output || [])
1755
1620
  .filter((e) => e != null)
1756
1621
  .map((entry) => {
1757
- if (entry === null) {
1758
- return null;
1759
- }
1760
1622
  return de_Anomaly(entry, context);
1761
1623
  });
1762
1624
  return retVal;
1763
1625
  };
1764
1626
  const de_Anomaly = (output, context) => {
1765
- return {
1766
- instances: output.instances != null ? de_AnomalyInstances(output.instances, context) : undefined,
1767
- metric: output.metric != null ? de_Metric(output.metric, context) : undefined,
1768
- reason: (0, smithy_client_1.expectString)(output.reason),
1769
- };
1627
+ return (0, smithy_client_1.take)(output, {
1628
+ instances: (_) => de_AnomalyInstances(_, context),
1629
+ metric: smithy_client_1._json,
1630
+ reason: smithy_client_1.expectString,
1631
+ });
1770
1632
  };
1771
1633
  const de_AnomalyInstance = (output, context) => {
1772
- return {
1773
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.endTime)) : undefined,
1774
- id: (0, smithy_client_1.expectString)(output.id),
1775
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.startTime)) : undefined,
1776
- userFeedback: output.userFeedback != null ? de_UserFeedback(output.userFeedback, context) : undefined,
1777
- };
1634
+ return (0, smithy_client_1.take)(output, {
1635
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1636
+ id: smithy_client_1.expectString,
1637
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1638
+ userFeedback: smithy_client_1._json,
1639
+ });
1778
1640
  };
1779
1641
  const de_AnomalyInstances = (output, context) => {
1780
1642
  const retVal = (output || [])
1781
1643
  .filter((e) => e != null)
1782
1644
  .map((entry) => {
1783
- if (entry === null) {
1784
- return null;
1785
- }
1786
1645
  return de_AnomalyInstance(entry, context);
1787
1646
  });
1788
1647
  return retVal;
1789
1648
  };
1790
- const de_Channel = (output, context) => {
1791
- return {
1792
- eventPublishers: output.eventPublishers != null ? de_EventPublishers(output.eventPublishers, context) : undefined,
1793
- id: (0, smithy_client_1.expectString)(output.id),
1794
- uri: (0, smithy_client_1.expectString)(output.uri),
1795
- };
1796
- };
1797
- const de_Channels = (output, context) => {
1798
- const retVal = (output || [])
1799
- .filter((e) => e != null)
1800
- .map((entry) => {
1801
- if (entry === null) {
1802
- return null;
1803
- }
1804
- return de_Channel(entry, context);
1805
- });
1806
- return retVal;
1807
- };
1808
- const de_EventPublishers = (output, context) => {
1809
- const retVal = (output || [])
1810
- .filter((e) => e != null)
1811
- .map((entry) => {
1812
- if (entry === null) {
1813
- return null;
1814
- }
1815
- return (0, smithy_client_1.expectString)(entry);
1816
- });
1817
- return retVal;
1818
- };
1819
1649
  const de_FindingsReportSummaries = (output, context) => {
1820
1650
  const retVal = (output || [])
1821
1651
  .filter((e) => e != null)
1822
1652
  .map((entry) => {
1823
- if (entry === null) {
1824
- return null;
1825
- }
1826
1653
  return de_FindingsReportSummary(entry, context);
1827
1654
  });
1828
1655
  return retVal;
1829
1656
  };
1830
1657
  const de_FindingsReportSummary = (output, context) => {
1831
- return {
1832
- id: (0, smithy_client_1.expectString)(output.id),
1833
- profileEndTime: output.profileEndTime != null
1834
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.profileEndTime))
1835
- : undefined,
1836
- profileStartTime: output.profileStartTime != null
1837
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.profileStartTime))
1838
- : undefined,
1839
- profilingGroupName: (0, smithy_client_1.expectString)(output.profilingGroupName),
1840
- totalNumberOfFindings: (0, smithy_client_1.expectInt32)(output.totalNumberOfFindings),
1841
- };
1842
- };
1843
- const de_FrameMetric = (output, context) => {
1844
- return {
1845
- frameName: (0, smithy_client_1.expectString)(output.frameName),
1846
- threadStates: output.threadStates != null ? de_ThreadStates(output.threadStates, context) : undefined,
1847
- type: (0, smithy_client_1.expectString)(output.type),
1848
- };
1658
+ return (0, smithy_client_1.take)(output, {
1659
+ id: smithy_client_1.expectString,
1660
+ profileEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1661
+ profileStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1662
+ profilingGroupName: smithy_client_1.expectString,
1663
+ totalNumberOfFindings: smithy_client_1.expectInt32,
1664
+ });
1849
1665
  };
1850
1666
  const de_FrameMetricData = (output, context) => {
1851
1667
  const retVal = (output || [])
1852
1668
  .filter((e) => e != null)
1853
1669
  .map((entry) => {
1854
- if (entry === null) {
1855
- return null;
1856
- }
1857
1670
  return de_FrameMetricDatum(entry, context);
1858
1671
  });
1859
1672
  return retVal;
1860
1673
  };
1861
1674
  const de_FrameMetricDatum = (output, context) => {
1862
- return {
1863
- frameMetric: output.frameMetric != null ? de_FrameMetric(output.frameMetric, context) : undefined,
1864
- values: output.values != null ? de_FrameMetricValues(output.values, context) : undefined,
1865
- };
1675
+ return (0, smithy_client_1.take)(output, {
1676
+ frameMetric: smithy_client_1._json,
1677
+ values: (_) => de_FrameMetricValues(_, context),
1678
+ });
1866
1679
  };
1867
1680
  const de_FrameMetricValues = (output, context) => {
1868
1681
  const retVal = (output || [])
1869
1682
  .filter((e) => e != null)
1870
1683
  .map((entry) => {
1871
- if (entry === null) {
1872
- return null;
1873
- }
1874
1684
  return (0, smithy_client_1.limitedParseDouble)(entry);
1875
1685
  });
1876
1686
  return retVal;
@@ -1879,197 +1689,98 @@ const de_ListOfTimestamps = (output, context) => {
1879
1689
  const retVal = (output || [])
1880
1690
  .filter((e) => e != null)
1881
1691
  .map((entry) => {
1882
- if (entry === null) {
1883
- return null;
1884
- }
1885
1692
  return de_TimestampStructure(entry, context);
1886
1693
  });
1887
1694
  return retVal;
1888
1695
  };
1889
1696
  const de_Match = (output, context) => {
1890
- return {
1891
- frameAddress: (0, smithy_client_1.expectString)(output.frameAddress),
1892
- targetFramesIndex: (0, smithy_client_1.expectInt32)(output.targetFramesIndex),
1893
- thresholdBreachValue: (0, smithy_client_1.limitedParseDouble)(output.thresholdBreachValue),
1894
- };
1697
+ return (0, smithy_client_1.take)(output, {
1698
+ frameAddress: smithy_client_1.expectString,
1699
+ targetFramesIndex: smithy_client_1.expectInt32,
1700
+ thresholdBreachValue: smithy_client_1.limitedParseDouble,
1701
+ });
1895
1702
  };
1896
1703
  const de_Matches = (output, context) => {
1897
1704
  const retVal = (output || [])
1898
1705
  .filter((e) => e != null)
1899
1706
  .map((entry) => {
1900
- if (entry === null) {
1901
- return null;
1902
- }
1903
1707
  return de_Match(entry, context);
1904
1708
  });
1905
1709
  return retVal;
1906
1710
  };
1907
- const de_Metric = (output, context) => {
1908
- return {
1909
- frameName: (0, smithy_client_1.expectString)(output.frameName),
1910
- threadStates: output.threadStates != null ? de_Strings(output.threadStates, context) : undefined,
1911
- type: (0, smithy_client_1.expectString)(output.type),
1912
- };
1913
- };
1914
- const de_NotificationConfiguration = (output, context) => {
1915
- return {
1916
- channels: output.channels != null ? de_Channels(output.channels, context) : undefined,
1917
- };
1918
- };
1919
1711
  const de_Pattern = (output, context) => {
1920
- return {
1921
- countersToAggregate: output.countersToAggregate != null ? de_Strings(output.countersToAggregate, context) : undefined,
1922
- description: (0, smithy_client_1.expectString)(output.description),
1923
- id: (0, smithy_client_1.expectString)(output.id),
1924
- name: (0, smithy_client_1.expectString)(output.name),
1925
- resolutionSteps: (0, smithy_client_1.expectString)(output.resolutionSteps),
1926
- targetFrames: output.targetFrames != null ? de_TargetFrames(output.targetFrames, context) : undefined,
1927
- thresholdPercent: (0, smithy_client_1.limitedParseDouble)(output.thresholdPercent),
1928
- };
1712
+ return (0, smithy_client_1.take)(output, {
1713
+ countersToAggregate: smithy_client_1._json,
1714
+ description: smithy_client_1.expectString,
1715
+ id: smithy_client_1.expectString,
1716
+ name: smithy_client_1.expectString,
1717
+ resolutionSteps: smithy_client_1.expectString,
1718
+ targetFrames: smithy_client_1._json,
1719
+ thresholdPercent: smithy_client_1.limitedParseDouble,
1720
+ });
1929
1721
  };
1930
1722
  const de_ProfileTime = (output, context) => {
1931
- return {
1932
- start: output.start != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.start)) : undefined,
1933
- };
1723
+ return (0, smithy_client_1.take)(output, {
1724
+ start: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1725
+ });
1934
1726
  };
1935
1727
  const de_ProfileTimes = (output, context) => {
1936
1728
  const retVal = (output || [])
1937
1729
  .filter((e) => e != null)
1938
1730
  .map((entry) => {
1939
- if (entry === null) {
1940
- return null;
1941
- }
1942
1731
  return de_ProfileTime(entry, context);
1943
1732
  });
1944
1733
  return retVal;
1945
1734
  };
1946
1735
  const de_ProfilingGroupDescription = (output, context) => {
1947
- return {
1948
- agentOrchestrationConfig: output.agentOrchestrationConfig != null
1949
- ? de_AgentOrchestrationConfig(output.agentOrchestrationConfig, context)
1950
- : undefined,
1951
- arn: (0, smithy_client_1.expectString)(output.arn),
1952
- computePlatform: (0, smithy_client_1.expectString)(output.computePlatform),
1953
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.createdAt)) : undefined,
1954
- name: (0, smithy_client_1.expectString)(output.name),
1955
- profilingStatus: output.profilingStatus != null ? de_ProfilingStatus(output.profilingStatus, context) : undefined,
1956
- tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined,
1957
- updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.updatedAt)) : undefined,
1958
- };
1736
+ return (0, smithy_client_1.take)(output, {
1737
+ agentOrchestrationConfig: smithy_client_1._json,
1738
+ arn: smithy_client_1.expectString,
1739
+ computePlatform: smithy_client_1.expectString,
1740
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1741
+ name: smithy_client_1.expectString,
1742
+ profilingStatus: (_) => de_ProfilingStatus(_, context),
1743
+ tags: smithy_client_1._json,
1744
+ updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1745
+ });
1959
1746
  };
1960
1747
  const de_ProfilingGroupDescriptions = (output, context) => {
1961
1748
  const retVal = (output || [])
1962
1749
  .filter((e) => e != null)
1963
1750
  .map((entry) => {
1964
- if (entry === null) {
1965
- return null;
1966
- }
1967
1751
  return de_ProfilingGroupDescription(entry, context);
1968
1752
  });
1969
1753
  return retVal;
1970
1754
  };
1971
- const de_ProfilingGroupNames = (output, context) => {
1972
- const retVal = (output || [])
1973
- .filter((e) => e != null)
1974
- .map((entry) => {
1975
- if (entry === null) {
1976
- return null;
1977
- }
1978
- return (0, smithy_client_1.expectString)(entry);
1979
- });
1980
- return retVal;
1981
- };
1982
1755
  const de_ProfilingStatus = (output, context) => {
1983
- return {
1984
- latestAgentOrchestratedAt: output.latestAgentOrchestratedAt != null
1985
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.latestAgentOrchestratedAt))
1986
- : undefined,
1987
- latestAgentProfileReportedAt: output.latestAgentProfileReportedAt != null
1988
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.latestAgentProfileReportedAt))
1989
- : undefined,
1990
- latestAggregatedProfile: output.latestAggregatedProfile != null
1991
- ? de_AggregatedProfileTime(output.latestAggregatedProfile, context)
1992
- : undefined,
1993
- };
1756
+ return (0, smithy_client_1.take)(output, {
1757
+ latestAgentOrchestratedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1758
+ latestAgentProfileReportedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1759
+ latestAggregatedProfile: (_) => de_AggregatedProfileTime(_, context),
1760
+ });
1994
1761
  };
1995
1762
  const de_Recommendation = (output, context) => {
1996
- return {
1997
- allMatchesCount: (0, smithy_client_1.expectInt32)(output.allMatchesCount),
1998
- allMatchesSum: (0, smithy_client_1.limitedParseDouble)(output.allMatchesSum),
1999
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.endTime)) : undefined,
2000
- pattern: output.pattern != null ? de_Pattern(output.pattern, context) : undefined,
2001
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.startTime)) : undefined,
2002
- topMatches: output.topMatches != null ? de_Matches(output.topMatches, context) : undefined,
2003
- };
1763
+ return (0, smithy_client_1.take)(output, {
1764
+ allMatchesCount: smithy_client_1.expectInt32,
1765
+ allMatchesSum: smithy_client_1.limitedParseDouble,
1766
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1767
+ pattern: (_) => de_Pattern(_, context),
1768
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1769
+ topMatches: (_) => de_Matches(_, context),
1770
+ });
2004
1771
  };
2005
1772
  const de_Recommendations = (output, context) => {
2006
1773
  const retVal = (output || [])
2007
1774
  .filter((e) => e != null)
2008
1775
  .map((entry) => {
2009
- if (entry === null) {
2010
- return null;
2011
- }
2012
1776
  return de_Recommendation(entry, context);
2013
1777
  });
2014
1778
  return retVal;
2015
1779
  };
2016
- const de_Strings = (output, context) => {
2017
- const retVal = (output || [])
2018
- .filter((e) => e != null)
2019
- .map((entry) => {
2020
- if (entry === null) {
2021
- return null;
2022
- }
2023
- return (0, smithy_client_1.expectString)(entry);
2024
- });
2025
- return retVal;
2026
- };
2027
- const de_TagsMap = (output, context) => {
2028
- return Object.entries(output).reduce((acc, [key, value]) => {
2029
- if (value === null) {
2030
- return acc;
2031
- }
2032
- acc[key] = (0, smithy_client_1.expectString)(value);
2033
- return acc;
2034
- }, {});
2035
- };
2036
- const de_TargetFrame = (output, context) => {
2037
- const retVal = (output || [])
2038
- .filter((e) => e != null)
2039
- .map((entry) => {
2040
- if (entry === null) {
2041
- return null;
2042
- }
2043
- return (0, smithy_client_1.expectString)(entry);
2044
- });
2045
- return retVal;
2046
- };
2047
- const de_TargetFrames = (output, context) => {
2048
- const retVal = (output || [])
2049
- .filter((e) => e != null)
2050
- .map((entry) => {
2051
- if (entry === null) {
2052
- return null;
2053
- }
2054
- return de_TargetFrame(entry, context);
2055
- });
2056
- return retVal;
2057
- };
2058
- const de_ThreadStates = (output, context) => {
2059
- const retVal = (output || [])
2060
- .filter((e) => e != null)
2061
- .map((entry) => {
2062
- if (entry === null) {
2063
- return null;
2064
- }
2065
- return (0, smithy_client_1.expectString)(entry);
2066
- });
2067
- return retVal;
2068
- };
2069
1780
  const de_TimestampStructure = (output, context) => {
2070
- return {
2071
- value: output.value != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.value)) : undefined,
2072
- };
1781
+ return (0, smithy_client_1.take)(output, {
1782
+ value: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1783
+ });
2073
1784
  };
2074
1785
  const de_UnprocessedEndTimeMap = (output, context) => {
2075
1786
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2080,11 +1791,6 @@ const de_UnprocessedEndTimeMap = (output, context) => {
2080
1791
  return acc;
2081
1792
  }, {});
2082
1793
  };
2083
- const de_UserFeedback = (output, context) => {
2084
- return {
2085
- type: (0, smithy_client_1.expectString)(output.type),
2086
- };
2087
- };
2088
1794
  const deserializeMetadata = (output) => ({
2089
1795
  httpStatusCode: output.statusCode,
2090
1796
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],