@aws-sdk/client-devops-guru 3.312.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { DevOpsGuruServiceException as __BaseException } from "../models/DevOpsGuruServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
@@ -10,9 +10,9 @@ export const se_AddNotificationChannelCommand = async (input, context) => {
10
10
  };
11
11
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.Config != null && { Config: se_NotificationChannelConfig(input.Config, context) }),
15
- });
13
+ body = JSON.stringify(take(input, {
14
+ Config: (_) => _json(_),
15
+ }));
16
16
  return new __HttpRequest({
17
17
  protocol,
18
18
  hostname,
@@ -64,10 +64,10 @@ export const se_DescribeAccountOverviewCommand = async (input, context) => {
64
64
  };
65
65
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/overview";
66
66
  let body;
67
- body = JSON.stringify({
68
- ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
69
- ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
70
- });
67
+ body = JSON.stringify(take(input, {
68
+ FromTime: (_) => Math.round(_.getTime() / 1000),
69
+ ToTime: (_) => Math.round(_.getTime() / 1000),
70
+ }));
71
71
  return new __HttpRequest({
72
72
  protocol,
73
73
  hostname,
@@ -123,9 +123,9 @@ export const se_DescribeFeedbackCommand = async (input, context) => {
123
123
  };
124
124
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback";
125
125
  let body;
126
- body = JSON.stringify({
127
- ...(input.InsightId != null && { InsightId: input.InsightId }),
128
- });
126
+ body = JSON.stringify(take(input, {
127
+ InsightId: [],
128
+ }));
129
129
  return new __HttpRequest({
130
130
  protocol,
131
131
  hostname,
@@ -163,12 +163,10 @@ export const se_DescribeOrganizationHealthCommand = async (input, context) => {
163
163
  };
164
164
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health";
165
165
  let body;
166
- body = JSON.stringify({
167
- ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }),
168
- ...(input.OrganizationalUnitIds != null && {
169
- OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
170
- }),
171
- });
166
+ body = JSON.stringify(take(input, {
167
+ AccountIds: (_) => _json(_),
168
+ OrganizationalUnitIds: (_) => _json(_),
169
+ }));
172
170
  return new __HttpRequest({
173
171
  protocol,
174
172
  hostname,
@@ -186,14 +184,12 @@ export const se_DescribeOrganizationOverviewCommand = async (input, context) =>
186
184
  };
187
185
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/overview";
188
186
  let body;
189
- body = JSON.stringify({
190
- ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }),
191
- ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
192
- ...(input.OrganizationalUnitIds != null && {
193
- OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
194
- }),
195
- ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
196
- });
187
+ body = JSON.stringify(take(input, {
188
+ AccountIds: (_) => _json(_),
189
+ FromTime: (_) => Math.round(_.getTime() / 1000),
190
+ OrganizationalUnitIds: (_) => _json(_),
191
+ ToTime: (_) => Math.round(_.getTime() / 1000),
192
+ }));
197
193
  return new __HttpRequest({
198
194
  protocol,
199
195
  hostname,
@@ -211,17 +207,13 @@ export const se_DescribeOrganizationResourceCollectionHealthCommand = async (inp
211
207
  };
212
208
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health/resource-collection";
213
209
  let body;
214
- body = JSON.stringify({
215
- ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }),
216
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
217
- ...(input.NextToken != null && { NextToken: input.NextToken }),
218
- ...(input.OrganizationResourceCollectionType != null && {
219
- OrganizationResourceCollectionType: input.OrganizationResourceCollectionType,
220
- }),
221
- ...(input.OrganizationalUnitIds != null && {
222
- OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context),
223
- }),
224
- });
210
+ body = JSON.stringify(take(input, {
211
+ AccountIds: (_) => _json(_),
212
+ MaxResults: [],
213
+ NextToken: [],
214
+ OrganizationResourceCollectionType: [],
215
+ OrganizationalUnitIds: (_) => _json(_),
216
+ }));
225
217
  return new __HttpRequest({
226
218
  protocol,
227
219
  hostname,
@@ -319,13 +311,13 @@ export const se_ListAnomaliesForInsightCommand = async (input, context) => {
319
311
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/insight/{InsightId}";
320
312
  resolvedPath = __resolvedPath(resolvedPath, input, "InsightId", () => input.InsightId, "{InsightId}", false);
321
313
  let body;
322
- body = JSON.stringify({
323
- ...(input.AccountId != null && { AccountId: input.AccountId }),
324
- ...(input.Filters != null && { Filters: se_ListAnomaliesForInsightFilters(input.Filters, context) }),
325
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
326
- ...(input.NextToken != null && { NextToken: input.NextToken }),
327
- ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }),
328
- });
314
+ body = JSON.stringify(take(input, {
315
+ AccountId: [],
316
+ Filters: (_) => _json(_),
317
+ MaxResults: [],
318
+ NextToken: [],
319
+ StartTimeRange: (_) => se_StartTimeRange(_, context),
320
+ }));
329
321
  return new __HttpRequest({
330
322
  protocol,
331
323
  hostname,
@@ -343,11 +335,11 @@ export const se_ListAnomalousLogGroupsCommand = async (input, context) => {
343
335
  };
344
336
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-log-anomalies";
345
337
  let body;
346
- body = JSON.stringify({
347
- ...(input.InsightId != null && { InsightId: input.InsightId }),
348
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
349
- ...(input.NextToken != null && { NextToken: input.NextToken }),
350
- });
338
+ body = JSON.stringify(take(input, {
339
+ InsightId: [],
340
+ MaxResults: [],
341
+ NextToken: [],
342
+ }));
351
343
  return new __HttpRequest({
352
344
  protocol,
353
345
  hostname,
@@ -365,12 +357,12 @@ export const se_ListEventsCommand = async (input, context) => {
365
357
  };
366
358
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events";
367
359
  let body;
368
- body = JSON.stringify({
369
- ...(input.AccountId != null && { AccountId: input.AccountId }),
370
- ...(input.Filters != null && { Filters: se_ListEventsFilters(input.Filters, context) }),
371
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
372
- ...(input.NextToken != null && { NextToken: input.NextToken }),
373
- });
360
+ body = JSON.stringify(take(input, {
361
+ AccountId: [],
362
+ Filters: (_) => se_ListEventsFilters(_, context),
363
+ MaxResults: [],
364
+ NextToken: [],
365
+ }));
374
366
  return new __HttpRequest({
375
367
  protocol,
376
368
  hostname,
@@ -388,11 +380,11 @@ export const se_ListInsightsCommand = async (input, context) => {
388
380
  };
389
381
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights";
390
382
  let body;
391
- body = JSON.stringify({
392
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
393
- ...(input.NextToken != null && { NextToken: input.NextToken }),
394
- ...(input.StatusFilter != null && { StatusFilter: se_ListInsightsStatusFilter(input.StatusFilter, context) }),
395
- });
383
+ body = JSON.stringify(take(input, {
384
+ MaxResults: [],
385
+ NextToken: [],
386
+ StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
387
+ }));
396
388
  return new __HttpRequest({
397
389
  protocol,
398
390
  hostname,
@@ -410,11 +402,11 @@ export const se_ListMonitoredResourcesCommand = async (input, context) => {
410
402
  };
411
403
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/monitoredResources";
412
404
  let body;
413
- body = JSON.stringify({
414
- ...(input.Filters != null && { Filters: se_ListMonitoredResourcesFilters(input.Filters, context) }),
415
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
416
- ...(input.NextToken != null && { NextToken: input.NextToken }),
417
- });
405
+ body = JSON.stringify(take(input, {
406
+ Filters: (_) => _json(_),
407
+ MaxResults: [],
408
+ NextToken: [],
409
+ }));
418
410
  return new __HttpRequest({
419
411
  protocol,
420
412
  hostname,
@@ -432,9 +424,9 @@ export const se_ListNotificationChannelsCommand = async (input, context) => {
432
424
  };
433
425
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
434
426
  let body;
435
- body = JSON.stringify({
436
- ...(input.NextToken != null && { NextToken: input.NextToken }),
437
- });
427
+ body = JSON.stringify(take(input, {
428
+ NextToken: [],
429
+ }));
438
430
  return new __HttpRequest({
439
431
  protocol,
440
432
  hostname,
@@ -452,15 +444,13 @@ export const se_ListOrganizationInsightsCommand = async (input, context) => {
452
444
  };
453
445
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights";
454
446
  let body;
455
- body = JSON.stringify({
456
- ...(input.AccountIds != null && { AccountIds: se_ListInsightsAccountIdList(input.AccountIds, context) }),
457
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
458
- ...(input.NextToken != null && { NextToken: input.NextToken }),
459
- ...(input.OrganizationalUnitIds != null && {
460
- OrganizationalUnitIds: se_ListInsightsOrganizationalUnitIdList(input.OrganizationalUnitIds, context),
461
- }),
462
- ...(input.StatusFilter != null && { StatusFilter: se_ListInsightsStatusFilter(input.StatusFilter, context) }),
463
- });
447
+ body = JSON.stringify(take(input, {
448
+ AccountIds: (_) => _json(_),
449
+ MaxResults: [],
450
+ NextToken: [],
451
+ OrganizationalUnitIds: (_) => _json(_),
452
+ StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
453
+ }));
464
454
  return new __HttpRequest({
465
455
  protocol,
466
456
  hostname,
@@ -478,12 +468,12 @@ export const se_ListRecommendationsCommand = async (input, context) => {
478
468
  };
479
469
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations";
480
470
  let body;
481
- body = JSON.stringify({
482
- ...(input.AccountId != null && { AccountId: input.AccountId }),
483
- ...(input.InsightId != null && { InsightId: input.InsightId }),
484
- ...(input.Locale != null && { Locale: input.Locale }),
485
- ...(input.NextToken != null && { NextToken: input.NextToken }),
486
- });
471
+ body = JSON.stringify(take(input, {
472
+ AccountId: [],
473
+ InsightId: [],
474
+ Locale: [],
475
+ NextToken: [],
476
+ }));
487
477
  return new __HttpRequest({
488
478
  protocol,
489
479
  hostname,
@@ -501,9 +491,9 @@ export const se_PutFeedbackCommand = async (input, context) => {
501
491
  };
502
492
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback";
503
493
  let body;
504
- body = JSON.stringify({
505
- ...(input.InsightFeedback != null && { InsightFeedback: se_InsightFeedback(input.InsightFeedback, context) }),
506
- });
494
+ body = JSON.stringify(take(input, {
495
+ InsightFeedback: (_) => _json(_),
496
+ }));
507
497
  return new __HttpRequest({
508
498
  protocol,
509
499
  hostname,
@@ -537,13 +527,13 @@ export const se_SearchInsightsCommand = async (input, context) => {
537
527
  };
538
528
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/search";
539
529
  let body;
540
- body = JSON.stringify({
541
- ...(input.Filters != null && { Filters: se_SearchInsightsFilters(input.Filters, context) }),
542
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
543
- ...(input.NextToken != null && { NextToken: input.NextToken }),
544
- ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }),
545
- ...(input.Type != null && { Type: input.Type }),
546
- });
530
+ body = JSON.stringify(take(input, {
531
+ Filters: (_) => _json(_),
532
+ MaxResults: [],
533
+ NextToken: [],
534
+ StartTimeRange: (_) => se_StartTimeRange(_, context),
535
+ Type: [],
536
+ }));
547
537
  return new __HttpRequest({
548
538
  protocol,
549
539
  hostname,
@@ -561,14 +551,14 @@ export const se_SearchOrganizationInsightsCommand = async (input, context) => {
561
551
  };
562
552
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights/search";
563
553
  let body;
564
- body = JSON.stringify({
565
- ...(input.AccountIds != null && { AccountIds: se_SearchInsightsAccountIdList(input.AccountIds, context) }),
566
- ...(input.Filters != null && { Filters: se_SearchOrganizationInsightsFilters(input.Filters, context) }),
567
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
568
- ...(input.NextToken != null && { NextToken: input.NextToken }),
569
- ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }),
570
- ...(input.Type != null && { Type: input.Type }),
571
- });
554
+ body = JSON.stringify(take(input, {
555
+ AccountIds: (_) => _json(_),
556
+ Filters: (_) => _json(_),
557
+ MaxResults: [],
558
+ NextToken: [],
559
+ StartTimeRange: (_) => se_StartTimeRange(_, context),
560
+ Type: [],
561
+ }));
572
562
  return new __HttpRequest({
573
563
  protocol,
574
564
  hostname,
@@ -586,12 +576,10 @@ export const se_StartCostEstimationCommand = async (input, context) => {
586
576
  };
587
577
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cost-estimation";
588
578
  let body;
589
- body = JSON.stringify({
590
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
591
- ...(input.ResourceCollection != null && {
592
- ResourceCollection: se_CostEstimationResourceCollectionFilter(input.ResourceCollection, context),
593
- }),
594
- });
579
+ body = JSON.stringify(take(input, {
580
+ ClientToken: (_) => _ ?? generateIdempotencyToken(),
581
+ ResourceCollection: (_) => _json(_),
582
+ }));
595
583
  return new __HttpRequest({
596
584
  protocol,
597
585
  hostname,
@@ -609,9 +597,9 @@ export const se_UpdateEventSourcesConfigCommand = async (input, context) => {
609
597
  };
610
598
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources";
611
599
  let body;
612
- body = JSON.stringify({
613
- ...(input.EventSources != null && { EventSources: se_EventSourcesConfig(input.EventSources, context) }),
614
- });
600
+ body = JSON.stringify(take(input, {
601
+ EventSources: (_) => _json(_),
602
+ }));
615
603
  return new __HttpRequest({
616
604
  protocol,
617
605
  hostname,
@@ -629,12 +617,10 @@ export const se_UpdateResourceCollectionCommand = async (input, context) => {
629
617
  };
630
618
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource-collections";
631
619
  let body;
632
- body = JSON.stringify({
633
- ...(input.Action != null && { Action: input.Action }),
634
- ...(input.ResourceCollection != null && {
635
- ResourceCollection: se_UpdateResourceCollectionFilter(input.ResourceCollection, context),
636
- }),
637
- });
620
+ body = JSON.stringify(take(input, {
621
+ Action: [],
622
+ ResourceCollection: (_) => _json(_),
623
+ }));
638
624
  return new __HttpRequest({
639
625
  protocol,
640
626
  hostname,
@@ -652,11 +638,9 @@ export const se_UpdateServiceIntegrationCommand = async (input, context) => {
652
638
  };
653
639
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-integrations";
654
640
  let body;
655
- body = JSON.stringify({
656
- ...(input.ServiceIntegration != null && {
657
- ServiceIntegration: se_UpdateServiceIntegrationConfig(input.ServiceIntegration, context),
658
- }),
659
- });
641
+ body = JSON.stringify(take(input, {
642
+ ServiceIntegration: (_) => _json(_),
643
+ }));
660
644
  return new __HttpRequest({
661
645
  protocol,
662
646
  hostname,
@@ -675,9 +659,10 @@ export const de_AddNotificationChannelCommand = async (output, context) => {
675
659
  $metadata: deserializeMetadata(output),
676
660
  });
677
661
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
678
- if (data.Id != null) {
679
- contents.Id = __expectString(data.Id);
680
- }
662
+ const doc = take(data, {
663
+ Id: __expectString,
664
+ });
665
+ Object.assign(contents, doc);
681
666
  return contents;
682
667
  };
683
668
  const de_AddNotificationChannelCommandError = async (output, context) => {
@@ -710,10 +695,9 @@ const de_AddNotificationChannelCommandError = async (output, context) => {
710
695
  throw await de_ValidationExceptionRes(parsedOutput, context);
711
696
  default:
712
697
  const parsedBody = parsedOutput.body;
713
- throwDefaultError({
698
+ return throwDefaultError({
714
699
  output,
715
700
  parsedBody,
716
- exceptionCtor: __BaseException,
717
701
  errorCode,
718
702
  });
719
703
  }
@@ -755,10 +739,9 @@ const de_DeleteInsightCommandError = async (output, context) => {
755
739
  throw await de_ValidationExceptionRes(parsedOutput, context);
756
740
  default:
757
741
  const parsedBody = parsedOutput.body;
758
- throwDefaultError({
742
+ return throwDefaultError({
759
743
  output,
760
744
  parsedBody,
761
- exceptionCtor: __BaseException,
762
745
  errorCode,
763
746
  });
764
747
  }
@@ -771,21 +754,14 @@ export const de_DescribeAccountHealthCommand = async (output, context) => {
771
754
  $metadata: deserializeMetadata(output),
772
755
  });
773
756
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
774
- if (data.AnalyzedResourceCount != null) {
775
- contents.AnalyzedResourceCount = __expectLong(data.AnalyzedResourceCount);
776
- }
777
- if (data.MetricsAnalyzed != null) {
778
- contents.MetricsAnalyzed = __expectInt32(data.MetricsAnalyzed);
779
- }
780
- if (data.OpenProactiveInsights != null) {
781
- contents.OpenProactiveInsights = __expectInt32(data.OpenProactiveInsights);
782
- }
783
- if (data.OpenReactiveInsights != null) {
784
- contents.OpenReactiveInsights = __expectInt32(data.OpenReactiveInsights);
785
- }
786
- if (data.ResourceHours != null) {
787
- contents.ResourceHours = __expectLong(data.ResourceHours);
788
- }
757
+ const doc = take(data, {
758
+ AnalyzedResourceCount: __expectLong,
759
+ MetricsAnalyzed: __expectInt32,
760
+ OpenProactiveInsights: __expectInt32,
761
+ OpenReactiveInsights: __expectInt32,
762
+ ResourceHours: __expectLong,
763
+ });
764
+ Object.assign(contents, doc);
789
765
  return contents;
790
766
  };
791
767
  const de_DescribeAccountHealthCommandError = async (output, context) => {
@@ -809,10 +785,9 @@ const de_DescribeAccountHealthCommandError = async (output, context) => {
809
785
  throw await de_ValidationExceptionRes(parsedOutput, context);
810
786
  default:
811
787
  const parsedBody = parsedOutput.body;
812
- throwDefaultError({
788
+ return throwDefaultError({
813
789
  output,
814
790
  parsedBody,
815
- exceptionCtor: __BaseException,
816
791
  errorCode,
817
792
  });
818
793
  }
@@ -825,15 +800,12 @@ export const de_DescribeAccountOverviewCommand = async (output, context) => {
825
800
  $metadata: deserializeMetadata(output),
826
801
  });
827
802
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
828
- if (data.MeanTimeToRecoverInMilliseconds != null) {
829
- contents.MeanTimeToRecoverInMilliseconds = __expectLong(data.MeanTimeToRecoverInMilliseconds);
830
- }
831
- if (data.ProactiveInsights != null) {
832
- contents.ProactiveInsights = __expectInt32(data.ProactiveInsights);
833
- }
834
- if (data.ReactiveInsights != null) {
835
- contents.ReactiveInsights = __expectInt32(data.ReactiveInsights);
836
- }
803
+ const doc = take(data, {
804
+ MeanTimeToRecoverInMilliseconds: __expectLong,
805
+ ProactiveInsights: __expectInt32,
806
+ ReactiveInsights: __expectInt32,
807
+ });
808
+ Object.assign(contents, doc);
837
809
  return contents;
838
810
  };
839
811
  const de_DescribeAccountOverviewCommandError = async (output, context) => {
@@ -857,10 +829,9 @@ const de_DescribeAccountOverviewCommandError = async (output, context) => {
857
829
  throw await de_ValidationExceptionRes(parsedOutput, context);
858
830
  default:
859
831
  const parsedBody = parsedOutput.body;
860
- throwDefaultError({
832
+ return throwDefaultError({
861
833
  output,
862
834
  parsedBody,
863
- exceptionCtor: __BaseException,
864
835
  errorCode,
865
836
  });
866
837
  }
@@ -873,12 +844,11 @@ export const de_DescribeAnomalyCommand = async (output, context) => {
873
844
  $metadata: deserializeMetadata(output),
874
845
  });
875
846
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
876
- if (data.ProactiveAnomaly != null) {
877
- contents.ProactiveAnomaly = de_ProactiveAnomaly(data.ProactiveAnomaly, context);
878
- }
879
- if (data.ReactiveAnomaly != null) {
880
- contents.ReactiveAnomaly = de_ReactiveAnomaly(data.ReactiveAnomaly, context);
881
- }
847
+ const doc = take(data, {
848
+ ProactiveAnomaly: (_) => de_ProactiveAnomaly(_, context),
849
+ ReactiveAnomaly: (_) => de_ReactiveAnomaly(_, context),
850
+ });
851
+ Object.assign(contents, doc);
882
852
  return contents;
883
853
  };
884
854
  const de_DescribeAnomalyCommandError = async (output, context) => {
@@ -905,10 +875,9 @@ const de_DescribeAnomalyCommandError = async (output, context) => {
905
875
  throw await de_ValidationExceptionRes(parsedOutput, context);
906
876
  default:
907
877
  const parsedBody = parsedOutput.body;
908
- throwDefaultError({
878
+ return throwDefaultError({
909
879
  output,
910
880
  parsedBody,
911
- exceptionCtor: __BaseException,
912
881
  errorCode,
913
882
  });
914
883
  }
@@ -921,9 +890,10 @@ export const de_DescribeEventSourcesConfigCommand = async (output, context) => {
921
890
  $metadata: deserializeMetadata(output),
922
891
  });
923
892
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
924
- if (data.EventSources != null) {
925
- contents.EventSources = de_EventSourcesConfig(data.EventSources, context);
926
- }
893
+ const doc = take(data, {
894
+ EventSources: _json,
895
+ });
896
+ Object.assign(contents, doc);
927
897
  return contents;
928
898
  };
929
899
  const de_DescribeEventSourcesConfigCommandError = async (output, context) => {
@@ -947,10 +917,9 @@ const de_DescribeEventSourcesConfigCommandError = async (output, context) => {
947
917
  throw await de_ValidationExceptionRes(parsedOutput, context);
948
918
  default:
949
919
  const parsedBody = parsedOutput.body;
950
- throwDefaultError({
920
+ return throwDefaultError({
951
921
  output,
952
922
  parsedBody,
953
- exceptionCtor: __BaseException,
954
923
  errorCode,
955
924
  });
956
925
  }
@@ -963,9 +932,10 @@ export const de_DescribeFeedbackCommand = async (output, context) => {
963
932
  $metadata: deserializeMetadata(output),
964
933
  });
965
934
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
966
- if (data.InsightFeedback != null) {
967
- contents.InsightFeedback = de_InsightFeedback(data.InsightFeedback, context);
968
- }
935
+ const doc = take(data, {
936
+ InsightFeedback: _json,
937
+ });
938
+ Object.assign(contents, doc);
969
939
  return contents;
970
940
  };
971
941
  const de_DescribeFeedbackCommandError = async (output, context) => {
@@ -992,10 +962,9 @@ const de_DescribeFeedbackCommandError = async (output, context) => {
992
962
  throw await de_ValidationExceptionRes(parsedOutput, context);
993
963
  default:
994
964
  const parsedBody = parsedOutput.body;
995
- throwDefaultError({
965
+ return throwDefaultError({
996
966
  output,
997
967
  parsedBody,
998
- exceptionCtor: __BaseException,
999
968
  errorCode,
1000
969
  });
1001
970
  }
@@ -1008,12 +977,11 @@ export const de_DescribeInsightCommand = async (output, context) => {
1008
977
  $metadata: deserializeMetadata(output),
1009
978
  });
1010
979
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1011
- if (data.ProactiveInsight != null) {
1012
- contents.ProactiveInsight = de_ProactiveInsight(data.ProactiveInsight, context);
1013
- }
1014
- if (data.ReactiveInsight != null) {
1015
- contents.ReactiveInsight = de_ReactiveInsight(data.ReactiveInsight, context);
1016
- }
980
+ const doc = take(data, {
981
+ ProactiveInsight: (_) => de_ProactiveInsight(_, context),
982
+ ReactiveInsight: (_) => de_ReactiveInsight(_, context),
983
+ });
984
+ Object.assign(contents, doc);
1017
985
  return contents;
1018
986
  };
1019
987
  const de_DescribeInsightCommandError = async (output, context) => {
@@ -1040,10 +1008,9 @@ const de_DescribeInsightCommandError = async (output, context) => {
1040
1008
  throw await de_ValidationExceptionRes(parsedOutput, context);
1041
1009
  default:
1042
1010
  const parsedBody = parsedOutput.body;
1043
- throwDefaultError({
1011
+ return throwDefaultError({
1044
1012
  output,
1045
1013
  parsedBody,
1046
- exceptionCtor: __BaseException,
1047
1014
  errorCode,
1048
1015
  });
1049
1016
  }
@@ -1056,18 +1023,13 @@ export const de_DescribeOrganizationHealthCommand = async (output, context) => {
1056
1023
  $metadata: deserializeMetadata(output),
1057
1024
  });
1058
1025
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1059
- if (data.MetricsAnalyzed != null) {
1060
- contents.MetricsAnalyzed = __expectInt32(data.MetricsAnalyzed);
1061
- }
1062
- if (data.OpenProactiveInsights != null) {
1063
- contents.OpenProactiveInsights = __expectInt32(data.OpenProactiveInsights);
1064
- }
1065
- if (data.OpenReactiveInsights != null) {
1066
- contents.OpenReactiveInsights = __expectInt32(data.OpenReactiveInsights);
1067
- }
1068
- if (data.ResourceHours != null) {
1069
- contents.ResourceHours = __expectLong(data.ResourceHours);
1070
- }
1026
+ const doc = take(data, {
1027
+ MetricsAnalyzed: __expectInt32,
1028
+ OpenProactiveInsights: __expectInt32,
1029
+ OpenReactiveInsights: __expectInt32,
1030
+ ResourceHours: __expectLong,
1031
+ });
1032
+ Object.assign(contents, doc);
1071
1033
  return contents;
1072
1034
  };
1073
1035
  const de_DescribeOrganizationHealthCommandError = async (output, context) => {
@@ -1091,10 +1053,9 @@ const de_DescribeOrganizationHealthCommandError = async (output, context) => {
1091
1053
  throw await de_ValidationExceptionRes(parsedOutput, context);
1092
1054
  default:
1093
1055
  const parsedBody = parsedOutput.body;
1094
- throwDefaultError({
1056
+ return throwDefaultError({
1095
1057
  output,
1096
1058
  parsedBody,
1097
- exceptionCtor: __BaseException,
1098
1059
  errorCode,
1099
1060
  });
1100
1061
  }
@@ -1107,12 +1068,11 @@ export const de_DescribeOrganizationOverviewCommand = async (output, context) =>
1107
1068
  $metadata: deserializeMetadata(output),
1108
1069
  });
1109
1070
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1110
- if (data.ProactiveInsights != null) {
1111
- contents.ProactiveInsights = __expectInt32(data.ProactiveInsights);
1112
- }
1113
- if (data.ReactiveInsights != null) {
1114
- contents.ReactiveInsights = __expectInt32(data.ReactiveInsights);
1115
- }
1071
+ const doc = take(data, {
1072
+ ProactiveInsights: __expectInt32,
1073
+ ReactiveInsights: __expectInt32,
1074
+ });
1075
+ Object.assign(contents, doc);
1116
1076
  return contents;
1117
1077
  };
1118
1078
  const de_DescribeOrganizationOverviewCommandError = async (output, context) => {
@@ -1136,10 +1096,9 @@ const de_DescribeOrganizationOverviewCommandError = async (output, context) => {
1136
1096
  throw await de_ValidationExceptionRes(parsedOutput, context);
1137
1097
  default:
1138
1098
  const parsedBody = parsedOutput.body;
1139
- throwDefaultError({
1099
+ return throwDefaultError({
1140
1100
  output,
1141
1101
  parsedBody,
1142
- exceptionCtor: __BaseException,
1143
1102
  errorCode,
1144
1103
  });
1145
1104
  }
@@ -1152,21 +1111,14 @@ export const de_DescribeOrganizationResourceCollectionHealthCommand = async (out
1152
1111
  $metadata: deserializeMetadata(output),
1153
1112
  });
1154
1113
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1155
- if (data.Account != null) {
1156
- contents.Account = de_AccountHealths(data.Account, context);
1157
- }
1158
- if (data.CloudFormation != null) {
1159
- contents.CloudFormation = de_CloudFormationHealths(data.CloudFormation, context);
1160
- }
1161
- if (data.NextToken != null) {
1162
- contents.NextToken = __expectString(data.NextToken);
1163
- }
1164
- if (data.Service != null) {
1165
- contents.Service = de_ServiceHealths(data.Service, context);
1166
- }
1167
- if (data.Tags != null) {
1168
- contents.Tags = de_TagHealths(data.Tags, context);
1169
- }
1114
+ const doc = take(data, {
1115
+ Account: _json,
1116
+ CloudFormation: _json,
1117
+ NextToken: __expectString,
1118
+ Service: _json,
1119
+ Tags: _json,
1120
+ });
1121
+ Object.assign(contents, doc);
1170
1122
  return contents;
1171
1123
  };
1172
1124
  const de_DescribeOrganizationResourceCollectionHealthCommandError = async (output, context) => {
@@ -1190,10 +1142,9 @@ const de_DescribeOrganizationResourceCollectionHealthCommandError = async (outpu
1190
1142
  throw await de_ValidationExceptionRes(parsedOutput, context);
1191
1143
  default:
1192
1144
  const parsedBody = parsedOutput.body;
1193
- throwDefaultError({
1145
+ return throwDefaultError({
1194
1146
  output,
1195
1147
  parsedBody,
1196
- exceptionCtor: __BaseException,
1197
1148
  errorCode,
1198
1149
  });
1199
1150
  }
@@ -1206,18 +1157,13 @@ export const de_DescribeResourceCollectionHealthCommand = async (output, context
1206
1157
  $metadata: deserializeMetadata(output),
1207
1158
  });
1208
1159
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1209
- if (data.CloudFormation != null) {
1210
- contents.CloudFormation = de_CloudFormationHealths(data.CloudFormation, context);
1211
- }
1212
- if (data.NextToken != null) {
1213
- contents.NextToken = __expectString(data.NextToken);
1214
- }
1215
- if (data.Service != null) {
1216
- contents.Service = de_ServiceHealths(data.Service, context);
1217
- }
1218
- if (data.Tags != null) {
1219
- contents.Tags = de_TagHealths(data.Tags, context);
1220
- }
1160
+ const doc = take(data, {
1161
+ CloudFormation: _json,
1162
+ NextToken: __expectString,
1163
+ Service: _json,
1164
+ Tags: _json,
1165
+ });
1166
+ Object.assign(contents, doc);
1221
1167
  return contents;
1222
1168
  };
1223
1169
  const de_DescribeResourceCollectionHealthCommandError = async (output, context) => {
@@ -1241,10 +1187,9 @@ const de_DescribeResourceCollectionHealthCommandError = async (output, context)
1241
1187
  throw await de_ValidationExceptionRes(parsedOutput, context);
1242
1188
  default:
1243
1189
  const parsedBody = parsedOutput.body;
1244
- throwDefaultError({
1190
+ return throwDefaultError({
1245
1191
  output,
1246
1192
  parsedBody,
1247
- exceptionCtor: __BaseException,
1248
1193
  errorCode,
1249
1194
  });
1250
1195
  }
@@ -1257,9 +1202,10 @@ export const de_DescribeServiceIntegrationCommand = async (output, context) => {
1257
1202
  $metadata: deserializeMetadata(output),
1258
1203
  });
1259
1204
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1260
- if (data.ServiceIntegration != null) {
1261
- contents.ServiceIntegration = de_ServiceIntegrationConfig(data.ServiceIntegration, context);
1262
- }
1205
+ const doc = take(data, {
1206
+ ServiceIntegration: _json,
1207
+ });
1208
+ Object.assign(contents, doc);
1263
1209
  return contents;
1264
1210
  };
1265
1211
  const de_DescribeServiceIntegrationCommandError = async (output, context) => {
@@ -1286,10 +1232,9 @@ const de_DescribeServiceIntegrationCommandError = async (output, context) => {
1286
1232
  throw await de_ValidationExceptionRes(parsedOutput, context);
1287
1233
  default:
1288
1234
  const parsedBody = parsedOutput.body;
1289
- throwDefaultError({
1235
+ return throwDefaultError({
1290
1236
  output,
1291
1237
  parsedBody,
1292
- exceptionCtor: __BaseException,
1293
1238
  errorCode,
1294
1239
  });
1295
1240
  }
@@ -1302,24 +1247,15 @@ export const de_GetCostEstimationCommand = async (output, context) => {
1302
1247
  $metadata: deserializeMetadata(output),
1303
1248
  });
1304
1249
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1305
- if (data.Costs != null) {
1306
- contents.Costs = de_ServiceResourceCosts(data.Costs, context);
1307
- }
1308
- if (data.NextToken != null) {
1309
- contents.NextToken = __expectString(data.NextToken);
1310
- }
1311
- if (data.ResourceCollection != null) {
1312
- contents.ResourceCollection = de_CostEstimationResourceCollectionFilter(data.ResourceCollection, context);
1313
- }
1314
- if (data.Status != null) {
1315
- contents.Status = __expectString(data.Status);
1316
- }
1317
- if (data.TimeRange != null) {
1318
- contents.TimeRange = de_CostEstimationTimeRange(data.TimeRange, context);
1319
- }
1320
- if (data.TotalCost != null) {
1321
- contents.TotalCost = __limitedParseDouble(data.TotalCost);
1322
- }
1250
+ const doc = take(data, {
1251
+ Costs: (_) => de_ServiceResourceCosts(_, context),
1252
+ NextToken: __expectString,
1253
+ ResourceCollection: _json,
1254
+ Status: __expectString,
1255
+ TimeRange: (_) => de_CostEstimationTimeRange(_, context),
1256
+ TotalCost: __limitedParseDouble,
1257
+ });
1258
+ Object.assign(contents, doc);
1323
1259
  return contents;
1324
1260
  };
1325
1261
  const de_GetCostEstimationCommandError = async (output, context) => {
@@ -1346,10 +1282,9 @@ const de_GetCostEstimationCommandError = async (output, context) => {
1346
1282
  throw await de_ValidationExceptionRes(parsedOutput, context);
1347
1283
  default:
1348
1284
  const parsedBody = parsedOutput.body;
1349
- throwDefaultError({
1285
+ return throwDefaultError({
1350
1286
  output,
1351
1287
  parsedBody,
1352
- exceptionCtor: __BaseException,
1353
1288
  errorCode,
1354
1289
  });
1355
1290
  }
@@ -1362,12 +1297,11 @@ export const de_GetResourceCollectionCommand = async (output, context) => {
1362
1297
  $metadata: deserializeMetadata(output),
1363
1298
  });
1364
1299
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1365
- if (data.NextToken != null) {
1366
- contents.NextToken = __expectString(data.NextToken);
1367
- }
1368
- if (data.ResourceCollection != null) {
1369
- contents.ResourceCollection = de_ResourceCollectionFilter(data.ResourceCollection, context);
1370
- }
1300
+ const doc = take(data, {
1301
+ NextToken: __expectString,
1302
+ ResourceCollection: _json,
1303
+ });
1304
+ Object.assign(contents, doc);
1371
1305
  return contents;
1372
1306
  };
1373
1307
  const de_GetResourceCollectionCommandError = async (output, context) => {
@@ -1394,10 +1328,9 @@ const de_GetResourceCollectionCommandError = async (output, context) => {
1394
1328
  throw await de_ValidationExceptionRes(parsedOutput, context);
1395
1329
  default:
1396
1330
  const parsedBody = parsedOutput.body;
1397
- throwDefaultError({
1331
+ return throwDefaultError({
1398
1332
  output,
1399
1333
  parsedBody,
1400
- exceptionCtor: __BaseException,
1401
1334
  errorCode,
1402
1335
  });
1403
1336
  }
@@ -1410,15 +1343,12 @@ export const de_ListAnomaliesForInsightCommand = async (output, context) => {
1410
1343
  $metadata: deserializeMetadata(output),
1411
1344
  });
1412
1345
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1413
- if (data.NextToken != null) {
1414
- contents.NextToken = __expectString(data.NextToken);
1415
- }
1416
- if (data.ProactiveAnomalies != null) {
1417
- contents.ProactiveAnomalies = de_ProactiveAnomalies(data.ProactiveAnomalies, context);
1418
- }
1419
- if (data.ReactiveAnomalies != null) {
1420
- contents.ReactiveAnomalies = de_ReactiveAnomalies(data.ReactiveAnomalies, context);
1421
- }
1346
+ const doc = take(data, {
1347
+ NextToken: __expectString,
1348
+ ProactiveAnomalies: (_) => de_ProactiveAnomalies(_, context),
1349
+ ReactiveAnomalies: (_) => de_ReactiveAnomalies(_, context),
1350
+ });
1351
+ Object.assign(contents, doc);
1422
1352
  return contents;
1423
1353
  };
1424
1354
  const de_ListAnomaliesForInsightCommandError = async (output, context) => {
@@ -1445,10 +1375,9 @@ const de_ListAnomaliesForInsightCommandError = async (output, context) => {
1445
1375
  throw await de_ValidationExceptionRes(parsedOutput, context);
1446
1376
  default:
1447
1377
  const parsedBody = parsedOutput.body;
1448
- throwDefaultError({
1378
+ return throwDefaultError({
1449
1379
  output,
1450
1380
  parsedBody,
1451
- exceptionCtor: __BaseException,
1452
1381
  errorCode,
1453
1382
  });
1454
1383
  }
@@ -1461,15 +1390,12 @@ export const de_ListAnomalousLogGroupsCommand = async (output, context) => {
1461
1390
  $metadata: deserializeMetadata(output),
1462
1391
  });
1463
1392
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1464
- if (data.AnomalousLogGroups != null) {
1465
- contents.AnomalousLogGroups = de_AnomalousLogGroups(data.AnomalousLogGroups, context);
1466
- }
1467
- if (data.InsightId != null) {
1468
- contents.InsightId = __expectString(data.InsightId);
1469
- }
1470
- if (data.NextToken != null) {
1471
- contents.NextToken = __expectString(data.NextToken);
1472
- }
1393
+ const doc = take(data, {
1394
+ AnomalousLogGroups: (_) => de_AnomalousLogGroups(_, context),
1395
+ InsightId: __expectString,
1396
+ NextToken: __expectString,
1397
+ });
1398
+ Object.assign(contents, doc);
1473
1399
  return contents;
1474
1400
  };
1475
1401
  const de_ListAnomalousLogGroupsCommandError = async (output, context) => {
@@ -1496,10 +1422,9 @@ const de_ListAnomalousLogGroupsCommandError = async (output, context) => {
1496
1422
  throw await de_ValidationExceptionRes(parsedOutput, context);
1497
1423
  default:
1498
1424
  const parsedBody = parsedOutput.body;
1499
- throwDefaultError({
1425
+ return throwDefaultError({
1500
1426
  output,
1501
1427
  parsedBody,
1502
- exceptionCtor: __BaseException,
1503
1428
  errorCode,
1504
1429
  });
1505
1430
  }
@@ -1512,12 +1437,11 @@ export const de_ListEventsCommand = async (output, context) => {
1512
1437
  $metadata: deserializeMetadata(output),
1513
1438
  });
1514
1439
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1515
- if (data.Events != null) {
1516
- contents.Events = de_Events(data.Events, context);
1517
- }
1518
- if (data.NextToken != null) {
1519
- contents.NextToken = __expectString(data.NextToken);
1520
- }
1440
+ const doc = take(data, {
1441
+ Events: (_) => de_Events(_, context),
1442
+ NextToken: __expectString,
1443
+ });
1444
+ Object.assign(contents, doc);
1521
1445
  return contents;
1522
1446
  };
1523
1447
  const de_ListEventsCommandError = async (output, context) => {
@@ -1544,10 +1468,9 @@ const de_ListEventsCommandError = async (output, context) => {
1544
1468
  throw await de_ValidationExceptionRes(parsedOutput, context);
1545
1469
  default:
1546
1470
  const parsedBody = parsedOutput.body;
1547
- throwDefaultError({
1471
+ return throwDefaultError({
1548
1472
  output,
1549
1473
  parsedBody,
1550
- exceptionCtor: __BaseException,
1551
1474
  errorCode,
1552
1475
  });
1553
1476
  }
@@ -1560,15 +1483,12 @@ export const de_ListInsightsCommand = async (output, context) => {
1560
1483
  $metadata: deserializeMetadata(output),
1561
1484
  });
1562
1485
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1563
- if (data.NextToken != null) {
1564
- contents.NextToken = __expectString(data.NextToken);
1565
- }
1566
- if (data.ProactiveInsights != null) {
1567
- contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context);
1568
- }
1569
- if (data.ReactiveInsights != null) {
1570
- contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context);
1571
- }
1486
+ const doc = take(data, {
1487
+ NextToken: __expectString,
1488
+ ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1489
+ ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1490
+ });
1491
+ Object.assign(contents, doc);
1572
1492
  return contents;
1573
1493
  };
1574
1494
  const de_ListInsightsCommandError = async (output, context) => {
@@ -1592,10 +1512,9 @@ const de_ListInsightsCommandError = async (output, context) => {
1592
1512
  throw await de_ValidationExceptionRes(parsedOutput, context);
1593
1513
  default:
1594
1514
  const parsedBody = parsedOutput.body;
1595
- throwDefaultError({
1515
+ return throwDefaultError({
1596
1516
  output,
1597
1517
  parsedBody,
1598
- exceptionCtor: __BaseException,
1599
1518
  errorCode,
1600
1519
  });
1601
1520
  }
@@ -1608,12 +1527,11 @@ export const de_ListMonitoredResourcesCommand = async (output, context) => {
1608
1527
  $metadata: deserializeMetadata(output),
1609
1528
  });
1610
1529
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1611
- if (data.MonitoredResourceIdentifiers != null) {
1612
- contents.MonitoredResourceIdentifiers = de_MonitoredResourceIdentifiers(data.MonitoredResourceIdentifiers, context);
1613
- }
1614
- if (data.NextToken != null) {
1615
- contents.NextToken = __expectString(data.NextToken);
1616
- }
1530
+ const doc = take(data, {
1531
+ MonitoredResourceIdentifiers: (_) => de_MonitoredResourceIdentifiers(_, context),
1532
+ NextToken: __expectString,
1533
+ });
1534
+ Object.assign(contents, doc);
1617
1535
  return contents;
1618
1536
  };
1619
1537
  const de_ListMonitoredResourcesCommandError = async (output, context) => {
@@ -1637,10 +1555,9 @@ const de_ListMonitoredResourcesCommandError = async (output, context) => {
1637
1555
  throw await de_ValidationExceptionRes(parsedOutput, context);
1638
1556
  default:
1639
1557
  const parsedBody = parsedOutput.body;
1640
- throwDefaultError({
1558
+ return throwDefaultError({
1641
1559
  output,
1642
1560
  parsedBody,
1643
- exceptionCtor: __BaseException,
1644
1561
  errorCode,
1645
1562
  });
1646
1563
  }
@@ -1653,12 +1570,11 @@ export const de_ListNotificationChannelsCommand = async (output, context) => {
1653
1570
  $metadata: deserializeMetadata(output),
1654
1571
  });
1655
1572
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1656
- if (data.Channels != null) {
1657
- contents.Channels = de_Channels(data.Channels, context);
1658
- }
1659
- if (data.NextToken != null) {
1660
- contents.NextToken = __expectString(data.NextToken);
1661
- }
1573
+ const doc = take(data, {
1574
+ Channels: _json,
1575
+ NextToken: __expectString,
1576
+ });
1577
+ Object.assign(contents, doc);
1662
1578
  return contents;
1663
1579
  };
1664
1580
  const de_ListNotificationChannelsCommandError = async (output, context) => {
@@ -1682,10 +1598,9 @@ const de_ListNotificationChannelsCommandError = async (output, context) => {
1682
1598
  throw await de_ValidationExceptionRes(parsedOutput, context);
1683
1599
  default:
1684
1600
  const parsedBody = parsedOutput.body;
1685
- throwDefaultError({
1601
+ return throwDefaultError({
1686
1602
  output,
1687
1603
  parsedBody,
1688
- exceptionCtor: __BaseException,
1689
1604
  errorCode,
1690
1605
  });
1691
1606
  }
@@ -1698,15 +1613,12 @@ export const de_ListOrganizationInsightsCommand = async (output, context) => {
1698
1613
  $metadata: deserializeMetadata(output),
1699
1614
  });
1700
1615
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1701
- if (data.NextToken != null) {
1702
- contents.NextToken = __expectString(data.NextToken);
1703
- }
1704
- if (data.ProactiveInsights != null) {
1705
- contents.ProactiveInsights = de_ProactiveOrganizationInsights(data.ProactiveInsights, context);
1706
- }
1707
- if (data.ReactiveInsights != null) {
1708
- contents.ReactiveInsights = de_ReactiveOrganizationInsights(data.ReactiveInsights, context);
1709
- }
1616
+ const doc = take(data, {
1617
+ NextToken: __expectString,
1618
+ ProactiveInsights: (_) => de_ProactiveOrganizationInsights(_, context),
1619
+ ReactiveInsights: (_) => de_ReactiveOrganizationInsights(_, context),
1620
+ });
1621
+ Object.assign(contents, doc);
1710
1622
  return contents;
1711
1623
  };
1712
1624
  const de_ListOrganizationInsightsCommandError = async (output, context) => {
@@ -1730,10 +1642,9 @@ const de_ListOrganizationInsightsCommandError = async (output, context) => {
1730
1642
  throw await de_ValidationExceptionRes(parsedOutput, context);
1731
1643
  default:
1732
1644
  const parsedBody = parsedOutput.body;
1733
- throwDefaultError({
1645
+ return throwDefaultError({
1734
1646
  output,
1735
1647
  parsedBody,
1736
- exceptionCtor: __BaseException,
1737
1648
  errorCode,
1738
1649
  });
1739
1650
  }
@@ -1746,12 +1657,11 @@ export const de_ListRecommendationsCommand = async (output, context) => {
1746
1657
  $metadata: deserializeMetadata(output),
1747
1658
  });
1748
1659
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1749
- if (data.NextToken != null) {
1750
- contents.NextToken = __expectString(data.NextToken);
1751
- }
1752
- if (data.Recommendations != null) {
1753
- contents.Recommendations = de_Recommendations(data.Recommendations, context);
1754
- }
1660
+ const doc = take(data, {
1661
+ NextToken: __expectString,
1662
+ Recommendations: _json,
1663
+ });
1664
+ Object.assign(contents, doc);
1755
1665
  return contents;
1756
1666
  };
1757
1667
  const de_ListRecommendationsCommandError = async (output, context) => {
@@ -1778,10 +1688,9 @@ const de_ListRecommendationsCommandError = async (output, context) => {
1778
1688
  throw await de_ValidationExceptionRes(parsedOutput, context);
1779
1689
  default:
1780
1690
  const parsedBody = parsedOutput.body;
1781
- throwDefaultError({
1691
+ return throwDefaultError({
1782
1692
  output,
1783
1693
  parsedBody,
1784
- exceptionCtor: __BaseException,
1785
1694
  errorCode,
1786
1695
  });
1787
1696
  }
@@ -1823,10 +1732,9 @@ const de_PutFeedbackCommandError = async (output, context) => {
1823
1732
  throw await de_ValidationExceptionRes(parsedOutput, context);
1824
1733
  default:
1825
1734
  const parsedBody = parsedOutput.body;
1826
- throwDefaultError({
1735
+ return throwDefaultError({
1827
1736
  output,
1828
1737
  parsedBody,
1829
- exceptionCtor: __BaseException,
1830
1738
  errorCode,
1831
1739
  });
1832
1740
  }
@@ -1868,10 +1776,9 @@ const de_RemoveNotificationChannelCommandError = async (output, context) => {
1868
1776
  throw await de_ValidationExceptionRes(parsedOutput, context);
1869
1777
  default:
1870
1778
  const parsedBody = parsedOutput.body;
1871
- throwDefaultError({
1779
+ return throwDefaultError({
1872
1780
  output,
1873
1781
  parsedBody,
1874
- exceptionCtor: __BaseException,
1875
1782
  errorCode,
1876
1783
  });
1877
1784
  }
@@ -1884,15 +1791,12 @@ export const de_SearchInsightsCommand = async (output, context) => {
1884
1791
  $metadata: deserializeMetadata(output),
1885
1792
  });
1886
1793
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1887
- if (data.NextToken != null) {
1888
- contents.NextToken = __expectString(data.NextToken);
1889
- }
1890
- if (data.ProactiveInsights != null) {
1891
- contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context);
1892
- }
1893
- if (data.ReactiveInsights != null) {
1894
- contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context);
1895
- }
1794
+ const doc = take(data, {
1795
+ NextToken: __expectString,
1796
+ ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1797
+ ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1798
+ });
1799
+ Object.assign(contents, doc);
1896
1800
  return contents;
1897
1801
  };
1898
1802
  const de_SearchInsightsCommandError = async (output, context) => {
@@ -1916,10 +1820,9 @@ const de_SearchInsightsCommandError = async (output, context) => {
1916
1820
  throw await de_ValidationExceptionRes(parsedOutput, context);
1917
1821
  default:
1918
1822
  const parsedBody = parsedOutput.body;
1919
- throwDefaultError({
1823
+ return throwDefaultError({
1920
1824
  output,
1921
1825
  parsedBody,
1922
- exceptionCtor: __BaseException,
1923
1826
  errorCode,
1924
1827
  });
1925
1828
  }
@@ -1932,15 +1835,12 @@ export const de_SearchOrganizationInsightsCommand = async (output, context) => {
1932
1835
  $metadata: deserializeMetadata(output),
1933
1836
  });
1934
1837
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1935
- if (data.NextToken != null) {
1936
- contents.NextToken = __expectString(data.NextToken);
1937
- }
1938
- if (data.ProactiveInsights != null) {
1939
- contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context);
1940
- }
1941
- if (data.ReactiveInsights != null) {
1942
- contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context);
1943
- }
1838
+ const doc = take(data, {
1839
+ NextToken: __expectString,
1840
+ ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1841
+ ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1842
+ });
1843
+ Object.assign(contents, doc);
1944
1844
  return contents;
1945
1845
  };
1946
1846
  const de_SearchOrganizationInsightsCommandError = async (output, context) => {
@@ -1964,10 +1864,9 @@ const de_SearchOrganizationInsightsCommandError = async (output, context) => {
1964
1864
  throw await de_ValidationExceptionRes(parsedOutput, context);
1965
1865
  default:
1966
1866
  const parsedBody = parsedOutput.body;
1967
- throwDefaultError({
1867
+ return throwDefaultError({
1968
1868
  output,
1969
1869
  parsedBody,
1970
- exceptionCtor: __BaseException,
1971
1870
  errorCode,
1972
1871
  });
1973
1872
  }
@@ -2009,10 +1908,9 @@ const de_StartCostEstimationCommandError = async (output, context) => {
2009
1908
  throw await de_ValidationExceptionRes(parsedOutput, context);
2010
1909
  default:
2011
1910
  const parsedBody = parsedOutput.body;
2012
- throwDefaultError({
1911
+ return throwDefaultError({
2013
1912
  output,
2014
1913
  parsedBody,
2015
- exceptionCtor: __BaseException,
2016
1914
  errorCode,
2017
1915
  });
2018
1916
  }
@@ -2048,10 +1946,9 @@ const de_UpdateEventSourcesConfigCommandError = async (output, context) => {
2048
1946
  throw await de_ValidationExceptionRes(parsedOutput, context);
2049
1947
  default:
2050
1948
  const parsedBody = parsedOutput.body;
2051
- throwDefaultError({
1949
+ return throwDefaultError({
2052
1950
  output,
2053
1951
  parsedBody,
2054
- exceptionCtor: __BaseException,
2055
1952
  errorCode,
2056
1953
  });
2057
1954
  }
@@ -2090,10 +1987,9 @@ const de_UpdateResourceCollectionCommandError = async (output, context) => {
2090
1987
  throw await de_ValidationExceptionRes(parsedOutput, context);
2091
1988
  default:
2092
1989
  const parsedBody = parsedOutput.body;
2093
- throwDefaultError({
1990
+ return throwDefaultError({
2094
1991
  output,
2095
1992
  parsedBody,
2096
- exceptionCtor: __BaseException,
2097
1993
  errorCode,
2098
1994
  });
2099
1995
  }
@@ -2132,21 +2028,21 @@ const de_UpdateServiceIntegrationCommandError = async (output, context) => {
2132
2028
  throw await de_ValidationExceptionRes(parsedOutput, context);
2133
2029
  default:
2134
2030
  const parsedBody = parsedOutput.body;
2135
- throwDefaultError({
2031
+ return throwDefaultError({
2136
2032
  output,
2137
2033
  parsedBody,
2138
- exceptionCtor: __BaseException,
2139
2034
  errorCode,
2140
2035
  });
2141
2036
  }
2142
2037
  };
2143
- const map = __map;
2038
+ const throwDefaultError = withBaseException(__BaseException);
2144
2039
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2145
2040
  const contents = map({});
2146
2041
  const data = parsedOutput.body;
2147
- if (data.Message != null) {
2148
- contents.Message = __expectString(data.Message);
2149
- }
2042
+ const doc = take(data, {
2043
+ Message: __expectString,
2044
+ });
2045
+ Object.assign(contents, doc);
2150
2046
  const exception = new AccessDeniedException({
2151
2047
  $metadata: deserializeMetadata(parsedOutput),
2152
2048
  ...contents,
@@ -2156,15 +2052,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2156
2052
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2157
2053
  const contents = map({});
2158
2054
  const data = parsedOutput.body;
2159
- if (data.Message != null) {
2160
- contents.Message = __expectString(data.Message);
2161
- }
2162
- if (data.ResourceId != null) {
2163
- contents.ResourceId = __expectString(data.ResourceId);
2164
- }
2165
- if (data.ResourceType != null) {
2166
- contents.ResourceType = __expectString(data.ResourceType);
2167
- }
2055
+ const doc = take(data, {
2056
+ Message: __expectString,
2057
+ ResourceId: __expectString,
2058
+ ResourceType: __expectString,
2059
+ });
2060
+ Object.assign(contents, doc);
2168
2061
  const exception = new ConflictException({
2169
2062
  $metadata: deserializeMetadata(parsedOutput),
2170
2063
  ...contents,
@@ -2179,9 +2072,10 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2179
2072
  ],
2180
2073
  });
2181
2074
  const data = parsedOutput.body;
2182
- if (data.Message != null) {
2183
- contents.Message = __expectString(data.Message);
2184
- }
2075
+ const doc = take(data, {
2076
+ Message: __expectString,
2077
+ });
2078
+ Object.assign(contents, doc);
2185
2079
  const exception = new InternalServerException({
2186
2080
  $metadata: deserializeMetadata(parsedOutput),
2187
2081
  ...contents,
@@ -2191,15 +2085,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2191
2085
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2192
2086
  const contents = map({});
2193
2087
  const data = parsedOutput.body;
2194
- if (data.Message != null) {
2195
- contents.Message = __expectString(data.Message);
2196
- }
2197
- if (data.ResourceId != null) {
2198
- contents.ResourceId = __expectString(data.ResourceId);
2199
- }
2200
- if (data.ResourceType != null) {
2201
- contents.ResourceType = __expectString(data.ResourceType);
2202
- }
2088
+ const doc = take(data, {
2089
+ Message: __expectString,
2090
+ ResourceId: __expectString,
2091
+ ResourceType: __expectString,
2092
+ });
2093
+ Object.assign(contents, doc);
2203
2094
  const exception = new ResourceNotFoundException({
2204
2095
  $metadata: deserializeMetadata(parsedOutput),
2205
2096
  ...contents,
@@ -2209,9 +2100,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2209
2100
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2210
2101
  const contents = map({});
2211
2102
  const data = parsedOutput.body;
2212
- if (data.Message != null) {
2213
- contents.Message = __expectString(data.Message);
2214
- }
2103
+ const doc = take(data, {
2104
+ Message: __expectString,
2105
+ });
2106
+ Object.assign(contents, doc);
2215
2107
  const exception = new ServiceQuotaExceededException({
2216
2108
  $metadata: deserializeMetadata(parsedOutput),
2217
2109
  ...contents,
@@ -2226,15 +2118,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2226
2118
  ],
2227
2119
  });
2228
2120
  const data = parsedOutput.body;
2229
- if (data.Message != null) {
2230
- contents.Message = __expectString(data.Message);
2231
- }
2232
- if (data.QuotaCode != null) {
2233
- contents.QuotaCode = __expectString(data.QuotaCode);
2234
- }
2235
- if (data.ServiceCode != null) {
2236
- contents.ServiceCode = __expectString(data.ServiceCode);
2237
- }
2121
+ const doc = take(data, {
2122
+ Message: __expectString,
2123
+ QuotaCode: __expectString,
2124
+ ServiceCode: __expectString,
2125
+ });
2126
+ Object.assign(contents, doc);
2238
2127
  const exception = new ThrottlingException({
2239
2128
  $metadata: deserializeMetadata(parsedOutput),
2240
2129
  ...contents,
@@ -2244,1452 +2133,495 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2244
2133
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2245
2134
  const contents = map({});
2246
2135
  const data = parsedOutput.body;
2247
- if (data.Fields != null) {
2248
- contents.Fields = de_ValidationExceptionFields(data.Fields, context);
2249
- }
2250
- if (data.Message != null) {
2251
- contents.Message = __expectString(data.Message);
2252
- }
2253
- if (data.Reason != null) {
2254
- contents.Reason = __expectString(data.Reason);
2255
- }
2136
+ const doc = take(data, {
2137
+ Fields: _json,
2138
+ Message: __expectString,
2139
+ Reason: __expectString,
2140
+ });
2141
+ Object.assign(contents, doc);
2256
2142
  const exception = new ValidationException({
2257
2143
  $metadata: deserializeMetadata(parsedOutput),
2258
2144
  ...contents,
2259
2145
  });
2260
2146
  return __decorateServiceException(exception, parsedOutput.body);
2261
2147
  };
2262
- const se_AccountIdList = (input, context) => {
2263
- return input
2264
- .filter((e) => e != null)
2265
- .map((entry) => {
2266
- return entry;
2148
+ const se_EndTimeRange = (input, context) => {
2149
+ return take(input, {
2150
+ FromTime: (_) => Math.round(_.getTime() / 1000),
2151
+ ToTime: (_) => Math.round(_.getTime() / 1000),
2267
2152
  });
2268
2153
  };
2269
- const se_AmazonCodeGuruProfilerIntegration = (input, context) => {
2270
- return {
2271
- ...(input.Status != null && { Status: input.Status }),
2272
- };
2154
+ const se_EventTimeRange = (input, context) => {
2155
+ return take(input, {
2156
+ FromTime: (_) => Math.round(_.getTime() / 1000),
2157
+ ToTime: (_) => Math.round(_.getTime() / 1000),
2158
+ });
2273
2159
  };
2274
- const se_CloudFormationCollection = (input, context) => {
2275
- return {
2276
- ...(input.StackNames != null && { StackNames: se_StackNames(input.StackNames, context) }),
2277
- };
2160
+ const se_ListEventsFilters = (input, context) => {
2161
+ return take(input, {
2162
+ DataSource: [],
2163
+ EventClass: [],
2164
+ EventSource: [],
2165
+ EventTimeRange: (_) => se_EventTimeRange(_, context),
2166
+ InsightId: [],
2167
+ ResourceCollection: _json,
2168
+ });
2278
2169
  };
2279
- const se_CloudFormationCostEstimationResourceCollectionFilter = (input, context) => {
2280
- return {
2281
- ...(input.StackNames != null && { StackNames: se_CostEstimationStackNames(input.StackNames, context) }),
2282
- };
2170
+ const se_ListInsightsAnyStatusFilter = (input, context) => {
2171
+ return take(input, {
2172
+ StartTimeRange: (_) => se_StartTimeRange(_, context),
2173
+ Type: [],
2174
+ });
2283
2175
  };
2284
- const se_CostEstimationResourceCollectionFilter = (input, context) => {
2285
- return {
2286
- ...(input.CloudFormation != null && {
2287
- CloudFormation: se_CloudFormationCostEstimationResourceCollectionFilter(input.CloudFormation, context),
2288
- }),
2289
- ...(input.Tags != null && { Tags: se_TagCostEstimationResourceCollectionFilters(input.Tags, context) }),
2290
- };
2176
+ const se_ListInsightsClosedStatusFilter = (input, context) => {
2177
+ return take(input, {
2178
+ EndTimeRange: (_) => se_EndTimeRange(_, context),
2179
+ Type: [],
2180
+ });
2291
2181
  };
2292
- const se_CostEstimationStackNames = (input, context) => {
2293
- return input
2294
- .filter((e) => e != null)
2295
- .map((entry) => {
2296
- return entry;
2182
+ const se_ListInsightsStatusFilter = (input, context) => {
2183
+ return take(input, {
2184
+ Any: (_) => se_ListInsightsAnyStatusFilter(_, context),
2185
+ Closed: (_) => se_ListInsightsClosedStatusFilter(_, context),
2186
+ Ongoing: _json,
2187
+ });
2188
+ };
2189
+ const se_StartTimeRange = (input, context) => {
2190
+ return take(input, {
2191
+ FromTime: (_) => Math.round(_.getTime() / 1000),
2192
+ ToTime: (_) => Math.round(_.getTime() / 1000),
2193
+ });
2194
+ };
2195
+ const de_AnomalousLogGroup = (output, context) => {
2196
+ return take(output, {
2197
+ ImpactEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2198
+ ImpactStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2199
+ LogAnomalyShowcases: (_) => de_LogAnomalyShowcases(_, context),
2200
+ LogGroupName: __expectString,
2201
+ NumberOfLogLinesScanned: __expectInt32,
2297
2202
  });
2298
2203
  };
2299
- const se_CostEstimationTagValues = (input, context) => {
2300
- return input
2204
+ const de_AnomalousLogGroups = (output, context) => {
2205
+ const retVal = (output || [])
2301
2206
  .filter((e) => e != null)
2302
2207
  .map((entry) => {
2303
- return entry;
2208
+ return de_AnomalousLogGroup(entry, context);
2304
2209
  });
2210
+ return retVal;
2305
2211
  };
2306
- const se_EndTimeRange = (input, context) => {
2307
- return {
2308
- ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
2309
- ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
2310
- };
2212
+ const de_AnomalyReportedTimeRange = (output, context) => {
2213
+ return take(output, {
2214
+ CloseTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2215
+ OpenTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2216
+ });
2311
2217
  };
2312
- const se_EventSourcesConfig = (input, context) => {
2313
- return {
2314
- ...(input.AmazonCodeGuruProfiler != null && {
2315
- AmazonCodeGuruProfiler: se_AmazonCodeGuruProfilerIntegration(input.AmazonCodeGuruProfiler, context),
2316
- }),
2317
- };
2218
+ const de_AnomalySourceDetails = (output, context) => {
2219
+ return take(output, {
2220
+ CloudWatchMetrics: (_) => de_CloudWatchMetricsDetails(_, context),
2221
+ PerformanceInsightsMetrics: (_) => de_PerformanceInsightsMetricsDetails(_, context),
2222
+ });
2318
2223
  };
2319
- const se_EventTimeRange = (input, context) => {
2320
- return {
2321
- ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
2322
- ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
2323
- };
2224
+ const de_AnomalyTimeRange = (output, context) => {
2225
+ return take(output, {
2226
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2227
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2228
+ });
2324
2229
  };
2325
- const se_InsightFeedback = (input, context) => {
2326
- return {
2327
- ...(input.Feedback != null && { Feedback: input.Feedback }),
2328
- ...(input.Id != null && { Id: input.Id }),
2329
- };
2230
+ const de_CloudWatchMetricsDataSummary = (output, context) => {
2231
+ return take(output, {
2232
+ StatusCode: __expectString,
2233
+ TimestampMetricValuePairList: (_) => de_TimestampMetricValuePairList(_, context),
2234
+ });
2330
2235
  };
2331
- const se_InsightSeverities = (input, context) => {
2332
- return input
2333
- .filter((e) => e != null)
2334
- .map((entry) => {
2335
- return entry;
2236
+ const de_CloudWatchMetricsDetail = (output, context) => {
2237
+ return take(output, {
2238
+ Dimensions: _json,
2239
+ MetricDataSummary: (_) => de_CloudWatchMetricsDataSummary(_, context),
2240
+ MetricName: __expectString,
2241
+ Namespace: __expectString,
2242
+ Period: __expectInt32,
2243
+ Stat: __expectString,
2244
+ Unit: __expectString,
2336
2245
  });
2337
2246
  };
2338
- const se_InsightStatuses = (input, context) => {
2339
- return input
2247
+ const de_CloudWatchMetricsDetails = (output, context) => {
2248
+ const retVal = (output || [])
2340
2249
  .filter((e) => e != null)
2341
2250
  .map((entry) => {
2342
- return entry;
2251
+ return de_CloudWatchMetricsDetail(entry, context);
2343
2252
  });
2253
+ return retVal;
2344
2254
  };
2345
- const se_ListAnomaliesForInsightFilters = (input, context) => {
2346
- return {
2347
- ...(input.ServiceCollection != null && {
2348
- ServiceCollection: se_ServiceCollection(input.ServiceCollection, context),
2349
- }),
2350
- };
2255
+ const de_CostEstimationTimeRange = (output, context) => {
2256
+ return take(output, {
2257
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2258
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2259
+ });
2351
2260
  };
2352
- const se_ListEventsFilters = (input, context) => {
2353
- return {
2354
- ...(input.DataSource != null && { DataSource: input.DataSource }),
2355
- ...(input.EventClass != null && { EventClass: input.EventClass }),
2356
- ...(input.EventSource != null && { EventSource: input.EventSource }),
2357
- ...(input.EventTimeRange != null && { EventTimeRange: se_EventTimeRange(input.EventTimeRange, context) }),
2358
- ...(input.InsightId != null && { InsightId: input.InsightId }),
2359
- ...(input.ResourceCollection != null && {
2360
- ResourceCollection: se_ResourceCollection(input.ResourceCollection, context),
2361
- }),
2362
- };
2261
+ const de_Event = (output, context) => {
2262
+ return take(output, {
2263
+ DataSource: __expectString,
2264
+ EventClass: __expectString,
2265
+ EventSource: __expectString,
2266
+ Id: __expectString,
2267
+ Name: __expectString,
2268
+ ResourceCollection: _json,
2269
+ Resources: _json,
2270
+ Time: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2271
+ });
2363
2272
  };
2364
- const se_ListInsightsAccountIdList = (input, context) => {
2365
- return input
2273
+ const de_Events = (output, context) => {
2274
+ const retVal = (output || [])
2366
2275
  .filter((e) => e != null)
2367
2276
  .map((entry) => {
2368
- return entry;
2277
+ return de_Event(entry, context);
2369
2278
  });
2279
+ return retVal;
2370
2280
  };
2371
- const se_ListInsightsAnyStatusFilter = (input, context) => {
2372
- return {
2373
- ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }),
2374
- ...(input.Type != null && { Type: input.Type }),
2375
- };
2376
- };
2377
- const se_ListInsightsClosedStatusFilter = (input, context) => {
2378
- return {
2379
- ...(input.EndTimeRange != null && { EndTimeRange: se_EndTimeRange(input.EndTimeRange, context) }),
2380
- ...(input.Type != null && { Type: input.Type }),
2381
- };
2281
+ const de_InsightTimeRange = (output, context) => {
2282
+ return take(output, {
2283
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2284
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2285
+ });
2382
2286
  };
2383
- const se_ListInsightsOngoingStatusFilter = (input, context) => {
2384
- return {
2385
- ...(input.Type != null && { Type: input.Type }),
2386
- };
2287
+ const de_LogAnomalyClass = (output, context) => {
2288
+ return take(output, {
2289
+ Explanation: __expectString,
2290
+ LogAnomalyToken: __expectString,
2291
+ LogAnomalyType: __expectString,
2292
+ LogEventId: __expectString,
2293
+ LogEventTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2294
+ LogStreamName: __expectString,
2295
+ NumberOfLogLinesOccurrences: __expectInt32,
2296
+ });
2387
2297
  };
2388
- const se_ListInsightsOrganizationalUnitIdList = (input, context) => {
2389
- return input
2298
+ const de_LogAnomalyClasses = (output, context) => {
2299
+ const retVal = (output || [])
2390
2300
  .filter((e) => e != null)
2391
2301
  .map((entry) => {
2392
- return entry;
2302
+ return de_LogAnomalyClass(entry, context);
2393
2303
  });
2304
+ return retVal;
2394
2305
  };
2395
- const se_ListInsightsStatusFilter = (input, context) => {
2396
- return {
2397
- ...(input.Any != null && { Any: se_ListInsightsAnyStatusFilter(input.Any, context) }),
2398
- ...(input.Closed != null && { Closed: se_ListInsightsClosedStatusFilter(input.Closed, context) }),
2399
- ...(input.Ongoing != null && { Ongoing: se_ListInsightsOngoingStatusFilter(input.Ongoing, context) }),
2400
- };
2401
- };
2402
- const se_ListMonitoredResourcesFilters = (input, context) => {
2403
- return {
2404
- ...(input.ResourcePermission != null && { ResourcePermission: input.ResourcePermission }),
2405
- ...(input.ResourceTypeFilters != null && {
2406
- ResourceTypeFilters: se_ResourceTypeFilters(input.ResourceTypeFilters, context),
2407
- }),
2408
- };
2409
- };
2410
- const se_LogsAnomalyDetectionIntegrationConfig = (input, context) => {
2411
- return {
2412
- ...(input.OptInStatus != null && { OptInStatus: input.OptInStatus }),
2413
- };
2414
- };
2415
- const se_NotificationChannelConfig = (input, context) => {
2416
- return {
2417
- ...(input.Filters != null && { Filters: se_NotificationFilterConfig(input.Filters, context) }),
2418
- ...(input.Sns != null && { Sns: se_SnsChannelConfig(input.Sns, context) }),
2419
- };
2420
- };
2421
- const se_NotificationFilterConfig = (input, context) => {
2422
- return {
2423
- ...(input.MessageTypes != null && { MessageTypes: se_NotificationMessageTypes(input.MessageTypes, context) }),
2424
- ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }),
2425
- };
2306
+ const de_LogAnomalyShowcase = (output, context) => {
2307
+ return take(output, {
2308
+ LogAnomalyClasses: (_) => de_LogAnomalyClasses(_, context),
2309
+ });
2426
2310
  };
2427
- const se_NotificationMessageTypes = (input, context) => {
2428
- return input
2311
+ const de_LogAnomalyShowcases = (output, context) => {
2312
+ const retVal = (output || [])
2429
2313
  .filter((e) => e != null)
2430
2314
  .map((entry) => {
2431
- return entry;
2315
+ return de_LogAnomalyShowcase(entry, context);
2432
2316
  });
2317
+ return retVal;
2433
2318
  };
2434
- const se_OpsCenterIntegrationConfig = (input, context) => {
2435
- return {
2436
- ...(input.OptInStatus != null && { OptInStatus: input.OptInStatus }),
2437
- };
2319
+ const de_MonitoredResourceIdentifier = (output, context) => {
2320
+ return take(output, {
2321
+ LastUpdated: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2322
+ MonitoredResourceName: __expectString,
2323
+ ResourceCollection: _json,
2324
+ ResourcePermission: __expectString,
2325
+ Type: __expectString,
2326
+ });
2438
2327
  };
2439
- const se_OrganizationalUnitIdList = (input, context) => {
2440
- return input
2328
+ const de_MonitoredResourceIdentifiers = (output, context) => {
2329
+ const retVal = (output || [])
2441
2330
  .filter((e) => e != null)
2442
2331
  .map((entry) => {
2443
- return entry;
2332
+ return de_MonitoredResourceIdentifier(entry, context);
2444
2333
  });
2334
+ return retVal;
2445
2335
  };
2446
- const se_ResourceCollection = (input, context) => {
2447
- return {
2448
- ...(input.CloudFormation != null && { CloudFormation: se_CloudFormationCollection(input.CloudFormation, context) }),
2449
- ...(input.Tags != null && { Tags: se_TagCollections(input.Tags, context) }),
2450
- };
2451
- };
2452
- const se_ResourceTypeFilters = (input, context) => {
2453
- return input
2454
- .filter((e) => e != null)
2455
- .map((entry) => {
2456
- return entry;
2336
+ const de_PerformanceInsightsMetricsDetail = (output, context) => {
2337
+ return take(output, {
2338
+ MetricDisplayName: __expectString,
2339
+ MetricQuery: _json,
2340
+ ReferenceData: (_) => de_PerformanceInsightsReferenceDataList(_, context),
2341
+ StatsAtAnomaly: (_) => de_PerformanceInsightsStats(_, context),
2342
+ StatsAtBaseline: (_) => de_PerformanceInsightsStats(_, context),
2343
+ Unit: __expectString,
2457
2344
  });
2458
2345
  };
2459
- const se_SearchInsightsAccountIdList = (input, context) => {
2460
- return input
2346
+ const de_PerformanceInsightsMetricsDetails = (output, context) => {
2347
+ const retVal = (output || [])
2461
2348
  .filter((e) => e != null)
2462
2349
  .map((entry) => {
2463
- return entry;
2464
- });
2465
- };
2466
- const se_SearchInsightsFilters = (input, context) => {
2467
- return {
2468
- ...(input.ResourceCollection != null && {
2469
- ResourceCollection: se_ResourceCollection(input.ResourceCollection, context),
2470
- }),
2471
- ...(input.ServiceCollection != null && {
2472
- ServiceCollection: se_ServiceCollection(input.ServiceCollection, context),
2473
- }),
2474
- ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }),
2475
- ...(input.Statuses != null && { Statuses: se_InsightStatuses(input.Statuses, context) }),
2476
- };
2350
+ return de_PerformanceInsightsMetricsDetail(entry, context);
2351
+ });
2352
+ return retVal;
2477
2353
  };
2478
- const se_SearchOrganizationInsightsFilters = (input, context) => {
2479
- return {
2480
- ...(input.ResourceCollection != null && {
2481
- ResourceCollection: se_ResourceCollection(input.ResourceCollection, context),
2482
- }),
2483
- ...(input.ServiceCollection != null && {
2484
- ServiceCollection: se_ServiceCollection(input.ServiceCollection, context),
2485
- }),
2486
- ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }),
2487
- ...(input.Statuses != null && { Statuses: se_InsightStatuses(input.Statuses, context) }),
2488
- };
2354
+ const de_PerformanceInsightsReferenceComparisonValues = (output, context) => {
2355
+ return take(output, {
2356
+ ReferenceMetric: _json,
2357
+ ReferenceScalar: (_) => de_PerformanceInsightsReferenceScalar(_, context),
2358
+ });
2489
2359
  };
2490
- const se_ServiceCollection = (input, context) => {
2491
- return {
2492
- ...(input.ServiceNames != null && { ServiceNames: se_ServiceNames(input.ServiceNames, context) }),
2493
- };
2360
+ const de_PerformanceInsightsReferenceData = (output, context) => {
2361
+ return take(output, {
2362
+ ComparisonValues: (_) => de_PerformanceInsightsReferenceComparisonValues(_, context),
2363
+ Name: __expectString,
2364
+ });
2494
2365
  };
2495
- const se_ServiceNames = (input, context) => {
2496
- return input
2366
+ const de_PerformanceInsightsReferenceDataList = (output, context) => {
2367
+ const retVal = (output || [])
2497
2368
  .filter((e) => e != null)
2498
2369
  .map((entry) => {
2499
- return entry;
2370
+ return de_PerformanceInsightsReferenceData(entry, context);
2500
2371
  });
2372
+ return retVal;
2501
2373
  };
2502
- const se_SnsChannelConfig = (input, context) => {
2503
- return {
2504
- ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
2505
- };
2374
+ const de_PerformanceInsightsReferenceScalar = (output, context) => {
2375
+ return take(output, {
2376
+ Value: __limitedParseDouble,
2377
+ });
2378
+ };
2379
+ const de_PerformanceInsightsStat = (output, context) => {
2380
+ return take(output, {
2381
+ Type: __expectString,
2382
+ Value: __limitedParseDouble,
2383
+ });
2506
2384
  };
2507
- const se_StackNames = (input, context) => {
2508
- return input
2385
+ const de_PerformanceInsightsStats = (output, context) => {
2386
+ const retVal = (output || [])
2509
2387
  .filter((e) => e != null)
2510
2388
  .map((entry) => {
2511
- return entry;
2512
- });
2513
- };
2514
- const se_StartTimeRange = (input, context) => {
2515
- return {
2516
- ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }),
2517
- ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }),
2518
- };
2519
- };
2520
- const se_TagCollection = (input, context) => {
2521
- return {
2522
- ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }),
2523
- ...(input.TagValues != null && { TagValues: se_TagValues(input.TagValues, context) }),
2524
- };
2525
- };
2526
- const se_TagCollections = (input, context) => {
2527
- return input
2528
- .filter((e) => e != null)
2529
- .map((entry) => {
2530
- return se_TagCollection(entry, context);
2531
- });
2532
- };
2533
- const se_TagCostEstimationResourceCollectionFilter = (input, context) => {
2534
- return {
2535
- ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }),
2536
- ...(input.TagValues != null && { TagValues: se_CostEstimationTagValues(input.TagValues, context) }),
2537
- };
2538
- };
2539
- const se_TagCostEstimationResourceCollectionFilters = (input, context) => {
2540
- return input
2541
- .filter((e) => e != null)
2542
- .map((entry) => {
2543
- return se_TagCostEstimationResourceCollectionFilter(entry, context);
2544
- });
2545
- };
2546
- const se_TagValues = (input, context) => {
2547
- return input
2548
- .filter((e) => e != null)
2549
- .map((entry) => {
2550
- return entry;
2551
- });
2552
- };
2553
- const se_UpdateCloudFormationCollectionFilter = (input, context) => {
2554
- return {
2555
- ...(input.StackNames != null && { StackNames: se_UpdateStackNames(input.StackNames, context) }),
2556
- };
2557
- };
2558
- const se_UpdateResourceCollectionFilter = (input, context) => {
2559
- return {
2560
- ...(input.CloudFormation != null && {
2561
- CloudFormation: se_UpdateCloudFormationCollectionFilter(input.CloudFormation, context),
2562
- }),
2563
- ...(input.Tags != null && { Tags: se_UpdateTagCollectionFilters(input.Tags, context) }),
2564
- };
2565
- };
2566
- const se_UpdateServiceIntegrationConfig = (input, context) => {
2567
- return {
2568
- ...(input.LogsAnomalyDetection != null && {
2569
- LogsAnomalyDetection: se_LogsAnomalyDetectionIntegrationConfig(input.LogsAnomalyDetection, context),
2570
- }),
2571
- ...(input.OpsCenter != null && { OpsCenter: se_OpsCenterIntegrationConfig(input.OpsCenter, context) }),
2572
- };
2573
- };
2574
- const se_UpdateStackNames = (input, context) => {
2575
- return input
2576
- .filter((e) => e != null)
2577
- .map((entry) => {
2578
- return entry;
2579
- });
2580
- };
2581
- const se_UpdateTagCollectionFilter = (input, context) => {
2582
- return {
2583
- ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }),
2584
- ...(input.TagValues != null && { TagValues: se_UpdateTagValues(input.TagValues, context) }),
2585
- };
2586
- };
2587
- const se_UpdateTagCollectionFilters = (input, context) => {
2588
- return input
2589
- .filter((e) => e != null)
2590
- .map((entry) => {
2591
- return se_UpdateTagCollectionFilter(entry, context);
2592
- });
2593
- };
2594
- const se_UpdateTagValues = (input, context) => {
2595
- return input
2596
- .filter((e) => e != null)
2597
- .map((entry) => {
2598
- return entry;
2599
- });
2600
- };
2601
- const de_AccountHealth = (output, context) => {
2602
- return {
2603
- AccountId: __expectString(output.AccountId),
2604
- Insight: output.Insight != null ? de_AccountInsightHealth(output.Insight, context) : undefined,
2605
- };
2606
- };
2607
- const de_AccountHealths = (output, context) => {
2608
- const retVal = (output || [])
2609
- .filter((e) => e != null)
2610
- .map((entry) => {
2611
- if (entry === null) {
2612
- return null;
2613
- }
2614
- return de_AccountHealth(entry, context);
2615
- });
2616
- return retVal;
2617
- };
2618
- const de_AccountInsightHealth = (output, context) => {
2619
- return {
2620
- OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights),
2621
- OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights),
2622
- };
2623
- };
2624
- const de_AmazonCodeGuruProfilerIntegration = (output, context) => {
2625
- return {
2626
- Status: __expectString(output.Status),
2627
- };
2628
- };
2629
- const de_AnomalousLogGroup = (output, context) => {
2630
- return {
2631
- ImpactEndTime: output.ImpactEndTime != null
2632
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImpactEndTime)))
2633
- : undefined,
2634
- ImpactStartTime: output.ImpactStartTime != null
2635
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImpactStartTime)))
2636
- : undefined,
2637
- LogAnomalyShowcases: output.LogAnomalyShowcases != null ? de_LogAnomalyShowcases(output.LogAnomalyShowcases, context) : undefined,
2638
- LogGroupName: __expectString(output.LogGroupName),
2639
- NumberOfLogLinesScanned: __expectInt32(output.NumberOfLogLinesScanned),
2640
- };
2641
- };
2642
- const de_AnomalousLogGroups = (output, context) => {
2643
- const retVal = (output || [])
2644
- .filter((e) => e != null)
2645
- .map((entry) => {
2646
- if (entry === null) {
2647
- return null;
2648
- }
2649
- return de_AnomalousLogGroup(entry, context);
2650
- });
2651
- return retVal;
2652
- };
2653
- const de_AnomalyReportedTimeRange = (output, context) => {
2654
- return {
2655
- CloseTime: output.CloseTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CloseTime))) : undefined,
2656
- OpenTime: output.OpenTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OpenTime))) : undefined,
2657
- };
2658
- };
2659
- const de_AnomalyResource = (output, context) => {
2660
- return {
2661
- Name: __expectString(output.Name),
2662
- Type: __expectString(output.Type),
2663
- };
2664
- };
2665
- const de_AnomalyResources = (output, context) => {
2666
- const retVal = (output || [])
2667
- .filter((e) => e != null)
2668
- .map((entry) => {
2669
- if (entry === null) {
2670
- return null;
2671
- }
2672
- return de_AnomalyResource(entry, context);
2673
- });
2674
- return retVal;
2675
- };
2676
- const de_AnomalySourceDetails = (output, context) => {
2677
- return {
2678
- CloudWatchMetrics: output.CloudWatchMetrics != null ? de_CloudWatchMetricsDetails(output.CloudWatchMetrics, context) : undefined,
2679
- PerformanceInsightsMetrics: output.PerformanceInsightsMetrics != null
2680
- ? de_PerformanceInsightsMetricsDetails(output.PerformanceInsightsMetrics, context)
2681
- : undefined,
2682
- };
2683
- };
2684
- const de_AnomalySourceMetadata = (output, context) => {
2685
- return {
2686
- Source: __expectString(output.Source),
2687
- SourceResourceName: __expectString(output.SourceResourceName),
2688
- SourceResourceType: __expectString(output.SourceResourceType),
2689
- };
2690
- };
2691
- const de_AnomalyTimeRange = (output, context) => {
2692
- return {
2693
- EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
2694
- StartTime: output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined,
2695
- };
2696
- };
2697
- const de_AssociatedResourceArns = (output, context) => {
2698
- const retVal = (output || [])
2699
- .filter((e) => e != null)
2700
- .map((entry) => {
2701
- if (entry === null) {
2702
- return null;
2703
- }
2704
- return __expectString(entry);
2705
- });
2706
- return retVal;
2707
- };
2708
- const de_Channels = (output, context) => {
2709
- const retVal = (output || [])
2710
- .filter((e) => e != null)
2711
- .map((entry) => {
2712
- if (entry === null) {
2713
- return null;
2714
- }
2715
- return de_NotificationChannel(entry, context);
2716
- });
2717
- return retVal;
2718
- };
2719
- const de_CloudFormationCollection = (output, context) => {
2720
- return {
2721
- StackNames: output.StackNames != null ? de_StackNames(output.StackNames, context) : undefined,
2722
- };
2723
- };
2724
- const de_CloudFormationCollectionFilter = (output, context) => {
2725
- return {
2726
- StackNames: output.StackNames != null ? de_StackNames(output.StackNames, context) : undefined,
2727
- };
2728
- };
2729
- const de_CloudFormationCostEstimationResourceCollectionFilter = (output, context) => {
2730
- return {
2731
- StackNames: output.StackNames != null ? de_CostEstimationStackNames(output.StackNames, context) : undefined,
2732
- };
2733
- };
2734
- const de_CloudFormationHealth = (output, context) => {
2735
- return {
2736
- AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount),
2737
- Insight: output.Insight != null ? de_InsightHealth(output.Insight, context) : undefined,
2738
- StackName: __expectString(output.StackName),
2739
- };
2740
- };
2741
- const de_CloudFormationHealths = (output, context) => {
2742
- const retVal = (output || [])
2743
- .filter((e) => e != null)
2744
- .map((entry) => {
2745
- if (entry === null) {
2746
- return null;
2747
- }
2748
- return de_CloudFormationHealth(entry, context);
2749
- });
2750
- return retVal;
2751
- };
2752
- const de_CloudWatchMetricsDataSummary = (output, context) => {
2753
- return {
2754
- StatusCode: __expectString(output.StatusCode),
2755
- TimestampMetricValuePairList: output.TimestampMetricValuePairList != null
2756
- ? de_TimestampMetricValuePairList(output.TimestampMetricValuePairList, context)
2757
- : undefined,
2758
- };
2759
- };
2760
- const de_CloudWatchMetricsDetail = (output, context) => {
2761
- return {
2762
- Dimensions: output.Dimensions != null ? de_CloudWatchMetricsDimensions(output.Dimensions, context) : undefined,
2763
- MetricDataSummary: output.MetricDataSummary != null ? de_CloudWatchMetricsDataSummary(output.MetricDataSummary, context) : undefined,
2764
- MetricName: __expectString(output.MetricName),
2765
- Namespace: __expectString(output.Namespace),
2766
- Period: __expectInt32(output.Period),
2767
- Stat: __expectString(output.Stat),
2768
- Unit: __expectString(output.Unit),
2769
- };
2770
- };
2771
- const de_CloudWatchMetricsDetails = (output, context) => {
2772
- const retVal = (output || [])
2773
- .filter((e) => e != null)
2774
- .map((entry) => {
2775
- if (entry === null) {
2776
- return null;
2777
- }
2778
- return de_CloudWatchMetricsDetail(entry, context);
2779
- });
2780
- return retVal;
2781
- };
2782
- const de_CloudWatchMetricsDimension = (output, context) => {
2783
- return {
2784
- Name: __expectString(output.Name),
2785
- Value: __expectString(output.Value),
2786
- };
2787
- };
2788
- const de_CloudWatchMetricsDimensions = (output, context) => {
2789
- const retVal = (output || [])
2790
- .filter((e) => e != null)
2791
- .map((entry) => {
2792
- if (entry === null) {
2793
- return null;
2794
- }
2795
- return de_CloudWatchMetricsDimension(entry, context);
2796
- });
2797
- return retVal;
2798
- };
2799
- const de_CostEstimationResourceCollectionFilter = (output, context) => {
2800
- return {
2801
- CloudFormation: output.CloudFormation != null
2802
- ? de_CloudFormationCostEstimationResourceCollectionFilter(output.CloudFormation, context)
2803
- : undefined,
2804
- Tags: output.Tags != null ? de_TagCostEstimationResourceCollectionFilters(output.Tags, context) : undefined,
2805
- };
2806
- };
2807
- const de_CostEstimationStackNames = (output, context) => {
2808
- const retVal = (output || [])
2809
- .filter((e) => e != null)
2810
- .map((entry) => {
2811
- if (entry === null) {
2812
- return null;
2813
- }
2814
- return __expectString(entry);
2815
- });
2816
- return retVal;
2817
- };
2818
- const de_CostEstimationTagValues = (output, context) => {
2819
- const retVal = (output || [])
2820
- .filter((e) => e != null)
2821
- .map((entry) => {
2822
- if (entry === null) {
2823
- return null;
2824
- }
2825
- return __expectString(entry);
2826
- });
2827
- return retVal;
2828
- };
2829
- const de_CostEstimationTimeRange = (output, context) => {
2830
- return {
2831
- EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
2832
- StartTime: output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined,
2833
- };
2834
- };
2835
- const de_Event = (output, context) => {
2836
- return {
2837
- DataSource: __expectString(output.DataSource),
2838
- EventClass: __expectString(output.EventClass),
2839
- EventSource: __expectString(output.EventSource),
2840
- Id: __expectString(output.Id),
2841
- Name: __expectString(output.Name),
2842
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
2843
- Resources: output.Resources != null ? de_EventResources(output.Resources, context) : undefined,
2844
- Time: output.Time != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Time))) : undefined,
2845
- };
2846
- };
2847
- const de_EventResource = (output, context) => {
2848
- return {
2849
- Arn: __expectString(output.Arn),
2850
- Name: __expectString(output.Name),
2851
- Type: __expectString(output.Type),
2852
- };
2853
- };
2854
- const de_EventResources = (output, context) => {
2855
- const retVal = (output || [])
2856
- .filter((e) => e != null)
2857
- .map((entry) => {
2858
- if (entry === null) {
2859
- return null;
2860
- }
2861
- return de_EventResource(entry, context);
2862
- });
2863
- return retVal;
2864
- };
2865
- const de_Events = (output, context) => {
2866
- const retVal = (output || [])
2867
- .filter((e) => e != null)
2868
- .map((entry) => {
2869
- if (entry === null) {
2870
- return null;
2871
- }
2872
- return de_Event(entry, context);
2873
- });
2874
- return retVal;
2875
- };
2876
- const de_EventSourcesConfig = (output, context) => {
2877
- return {
2878
- AmazonCodeGuruProfiler: output.AmazonCodeGuruProfiler != null
2879
- ? de_AmazonCodeGuruProfilerIntegration(output.AmazonCodeGuruProfiler, context)
2880
- : undefined,
2881
- };
2882
- };
2883
- const de_InsightFeedback = (output, context) => {
2884
- return {
2885
- Feedback: __expectString(output.Feedback),
2886
- Id: __expectString(output.Id),
2887
- };
2888
- };
2889
- const de_InsightHealth = (output, context) => {
2890
- return {
2891
- MeanTimeToRecoverInMilliseconds: __expectLong(output.MeanTimeToRecoverInMilliseconds),
2892
- OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights),
2893
- OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights),
2894
- };
2895
- };
2896
- const de_InsightSeverities = (output, context) => {
2897
- const retVal = (output || [])
2898
- .filter((e) => e != null)
2899
- .map((entry) => {
2900
- if (entry === null) {
2901
- return null;
2902
- }
2903
- return __expectString(entry);
2904
- });
2905
- return retVal;
2906
- };
2907
- const de_InsightTimeRange = (output, context) => {
2908
- return {
2909
- EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
2910
- StartTime: output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined,
2911
- };
2912
- };
2913
- const de_LogAnomalyClass = (output, context) => {
2914
- return {
2915
- Explanation: __expectString(output.Explanation),
2916
- LogAnomalyToken: __expectString(output.LogAnomalyToken),
2917
- LogAnomalyType: __expectString(output.LogAnomalyType),
2918
- LogEventId: __expectString(output.LogEventId),
2919
- LogEventTimestamp: output.LogEventTimestamp != null
2920
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LogEventTimestamp)))
2921
- : undefined,
2922
- LogStreamName: __expectString(output.LogStreamName),
2923
- NumberOfLogLinesOccurrences: __expectInt32(output.NumberOfLogLinesOccurrences),
2924
- };
2925
- };
2926
- const de_LogAnomalyClasses = (output, context) => {
2927
- const retVal = (output || [])
2928
- .filter((e) => e != null)
2929
- .map((entry) => {
2930
- if (entry === null) {
2931
- return null;
2932
- }
2933
- return de_LogAnomalyClass(entry, context);
2934
- });
2935
- return retVal;
2936
- };
2937
- const de_LogAnomalyShowcase = (output, context) => {
2938
- return {
2939
- LogAnomalyClasses: output.LogAnomalyClasses != null ? de_LogAnomalyClasses(output.LogAnomalyClasses, context) : undefined,
2940
- };
2941
- };
2942
- const de_LogAnomalyShowcases = (output, context) => {
2943
- const retVal = (output || [])
2944
- .filter((e) => e != null)
2945
- .map((entry) => {
2946
- if (entry === null) {
2947
- return null;
2948
- }
2949
- return de_LogAnomalyShowcase(entry, context);
2950
- });
2951
- return retVal;
2952
- };
2953
- const de_LogsAnomalyDetectionIntegration = (output, context) => {
2954
- return {
2955
- OptInStatus: __expectString(output.OptInStatus),
2956
- };
2957
- };
2958
- const de_MonitoredResourceIdentifier = (output, context) => {
2959
- return {
2960
- LastUpdated: output.LastUpdated != null
2961
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated)))
2962
- : undefined,
2963
- MonitoredResourceName: __expectString(output.MonitoredResourceName),
2964
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
2965
- ResourcePermission: __expectString(output.ResourcePermission),
2966
- Type: __expectString(output.Type),
2967
- };
2968
- };
2969
- const de_MonitoredResourceIdentifiers = (output, context) => {
2970
- const retVal = (output || [])
2971
- .filter((e) => e != null)
2972
- .map((entry) => {
2973
- if (entry === null) {
2974
- return null;
2975
- }
2976
- return de_MonitoredResourceIdentifier(entry, context);
2977
- });
2978
- return retVal;
2979
- };
2980
- const de_NotificationChannel = (output, context) => {
2981
- return {
2982
- Config: output.Config != null ? de_NotificationChannelConfig(output.Config, context) : undefined,
2983
- Id: __expectString(output.Id),
2984
- };
2985
- };
2986
- const de_NotificationChannelConfig = (output, context) => {
2987
- return {
2988
- Filters: output.Filters != null ? de_NotificationFilterConfig(output.Filters, context) : undefined,
2989
- Sns: output.Sns != null ? de_SnsChannelConfig(output.Sns, context) : undefined,
2990
- };
2991
- };
2992
- const de_NotificationFilterConfig = (output, context) => {
2993
- return {
2994
- MessageTypes: output.MessageTypes != null ? de_NotificationMessageTypes(output.MessageTypes, context) : undefined,
2995
- Severities: output.Severities != null ? de_InsightSeverities(output.Severities, context) : undefined,
2996
- };
2997
- };
2998
- const de_NotificationMessageTypes = (output, context) => {
2999
- const retVal = (output || [])
3000
- .filter((e) => e != null)
3001
- .map((entry) => {
3002
- if (entry === null) {
3003
- return null;
3004
- }
3005
- return __expectString(entry);
3006
- });
3007
- return retVal;
3008
- };
3009
- const de_OpsCenterIntegration = (output, context) => {
3010
- return {
3011
- OptInStatus: __expectString(output.OptInStatus),
3012
- };
3013
- };
3014
- const de_PerformanceInsightsMetricDimensionGroup = (output, context) => {
3015
- return {
3016
- Dimensions: output.Dimensions != null ? de_PerformanceInsightsMetricDimensions(output.Dimensions, context) : undefined,
3017
- Group: __expectString(output.Group),
3018
- Limit: __expectInt32(output.Limit),
3019
- };
3020
- };
3021
- const de_PerformanceInsightsMetricDimensions = (output, context) => {
3022
- const retVal = (output || [])
3023
- .filter((e) => e != null)
3024
- .map((entry) => {
3025
- if (entry === null) {
3026
- return null;
3027
- }
3028
- return __expectString(entry);
3029
- });
3030
- return retVal;
3031
- };
3032
- const de_PerformanceInsightsMetricFilterMap = (output, context) => {
3033
- return Object.entries(output).reduce((acc, [key, value]) => {
3034
- if (value === null) {
3035
- return acc;
3036
- }
3037
- acc[key] = __expectString(value);
3038
- return acc;
3039
- }, {});
3040
- };
3041
- const de_PerformanceInsightsMetricQuery = (output, context) => {
3042
- return {
3043
- Filter: output.Filter != null ? de_PerformanceInsightsMetricFilterMap(output.Filter, context) : undefined,
3044
- GroupBy: output.GroupBy != null ? de_PerformanceInsightsMetricDimensionGroup(output.GroupBy, context) : undefined,
3045
- Metric: __expectString(output.Metric),
3046
- };
3047
- };
3048
- const de_PerformanceInsightsMetricsDetail = (output, context) => {
3049
- return {
3050
- MetricDisplayName: __expectString(output.MetricDisplayName),
3051
- MetricQuery: output.MetricQuery != null ? de_PerformanceInsightsMetricQuery(output.MetricQuery, context) : undefined,
3052
- ReferenceData: output.ReferenceData != null ? de_PerformanceInsightsReferenceDataList(output.ReferenceData, context) : undefined,
3053
- StatsAtAnomaly: output.StatsAtAnomaly != null ? de_PerformanceInsightsStats(output.StatsAtAnomaly, context) : undefined,
3054
- StatsAtBaseline: output.StatsAtBaseline != null ? de_PerformanceInsightsStats(output.StatsAtBaseline, context) : undefined,
3055
- Unit: __expectString(output.Unit),
3056
- };
3057
- };
3058
- const de_PerformanceInsightsMetricsDetails = (output, context) => {
3059
- const retVal = (output || [])
3060
- .filter((e) => e != null)
3061
- .map((entry) => {
3062
- if (entry === null) {
3063
- return null;
3064
- }
3065
- return de_PerformanceInsightsMetricsDetail(entry, context);
3066
- });
3067
- return retVal;
3068
- };
3069
- const de_PerformanceInsightsReferenceComparisonValues = (output, context) => {
3070
- return {
3071
- ReferenceMetric: output.ReferenceMetric != null
3072
- ? de_PerformanceInsightsReferenceMetric(output.ReferenceMetric, context)
3073
- : undefined,
3074
- ReferenceScalar: output.ReferenceScalar != null
3075
- ? de_PerformanceInsightsReferenceScalar(output.ReferenceScalar, context)
3076
- : undefined,
3077
- };
3078
- };
3079
- const de_PerformanceInsightsReferenceData = (output, context) => {
3080
- return {
3081
- ComparisonValues: output.ComparisonValues != null
3082
- ? de_PerformanceInsightsReferenceComparisonValues(output.ComparisonValues, context)
3083
- : undefined,
3084
- Name: __expectString(output.Name),
3085
- };
3086
- };
3087
- const de_PerformanceInsightsReferenceDataList = (output, context) => {
3088
- const retVal = (output || [])
3089
- .filter((e) => e != null)
3090
- .map((entry) => {
3091
- if (entry === null) {
3092
- return null;
3093
- }
3094
- return de_PerformanceInsightsReferenceData(entry, context);
3095
- });
3096
- return retVal;
3097
- };
3098
- const de_PerformanceInsightsReferenceMetric = (output, context) => {
3099
- return {
3100
- MetricQuery: output.MetricQuery != null ? de_PerformanceInsightsMetricQuery(output.MetricQuery, context) : undefined,
3101
- };
3102
- };
3103
- const de_PerformanceInsightsReferenceScalar = (output, context) => {
3104
- return {
3105
- Value: __limitedParseDouble(output.Value),
3106
- };
3107
- };
3108
- const de_PerformanceInsightsStat = (output, context) => {
3109
- return {
3110
- Type: __expectString(output.Type),
3111
- Value: __limitedParseDouble(output.Value),
3112
- };
3113
- };
3114
- const de_PerformanceInsightsStats = (output, context) => {
3115
- const retVal = (output || [])
3116
- .filter((e) => e != null)
3117
- .map((entry) => {
3118
- if (entry === null) {
3119
- return null;
3120
- }
3121
- return de_PerformanceInsightsStat(entry, context);
2389
+ return de_PerformanceInsightsStat(entry, context);
3122
2390
  });
3123
2391
  return retVal;
3124
2392
  };
3125
2393
  const de_PredictionTimeRange = (output, context) => {
3126
- return {
3127
- EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
3128
- StartTime: output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined,
3129
- };
2394
+ return take(output, {
2395
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2396
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2397
+ });
3130
2398
  };
3131
2399
  const de_ProactiveAnomalies = (output, context) => {
3132
2400
  const retVal = (output || [])
3133
2401
  .filter((e) => e != null)
3134
2402
  .map((entry) => {
3135
- if (entry === null) {
3136
- return null;
3137
- }
3138
2403
  return de_ProactiveAnomalySummary(entry, context);
3139
2404
  });
3140
2405
  return retVal;
3141
2406
  };
3142
2407
  const de_ProactiveAnomaly = (output, context) => {
3143
- return {
3144
- AnomalyReportedTimeRange: output.AnomalyReportedTimeRange != null
3145
- ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3146
- : undefined,
3147
- AnomalyResources: output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined,
3148
- AnomalyTimeRange: output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined,
3149
- AssociatedInsightId: __expectString(output.AssociatedInsightId),
3150
- Description: __expectString(output.Description),
3151
- Id: __expectString(output.Id),
3152
- Limit: __limitedParseDouble(output.Limit),
3153
- PredictionTimeRange: output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined,
3154
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3155
- Severity: __expectString(output.Severity),
3156
- SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined,
3157
- SourceMetadata: output.SourceMetadata != null ? de_AnomalySourceMetadata(output.SourceMetadata, context) : undefined,
3158
- Status: __expectString(output.Status),
3159
- UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined,
3160
- };
2408
+ return take(output, {
2409
+ AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2410
+ AnomalyResources: _json,
2411
+ AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2412
+ AssociatedInsightId: __expectString,
2413
+ Description: __expectString,
2414
+ Id: __expectString,
2415
+ Limit: __limitedParseDouble,
2416
+ PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2417
+ ResourceCollection: _json,
2418
+ Severity: __expectString,
2419
+ SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2420
+ SourceMetadata: _json,
2421
+ Status: __expectString,
2422
+ UpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2423
+ });
3161
2424
  };
3162
2425
  const de_ProactiveAnomalySummary = (output, context) => {
3163
- return {
3164
- AnomalyReportedTimeRange: output.AnomalyReportedTimeRange != null
3165
- ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3166
- : undefined,
3167
- AnomalyResources: output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined,
3168
- AnomalyTimeRange: output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined,
3169
- AssociatedInsightId: __expectString(output.AssociatedInsightId),
3170
- Description: __expectString(output.Description),
3171
- Id: __expectString(output.Id),
3172
- Limit: __limitedParseDouble(output.Limit),
3173
- PredictionTimeRange: output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined,
3174
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3175
- Severity: __expectString(output.Severity),
3176
- SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined,
3177
- SourceMetadata: output.SourceMetadata != null ? de_AnomalySourceMetadata(output.SourceMetadata, context) : undefined,
3178
- Status: __expectString(output.Status),
3179
- UpdateTime: output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined,
3180
- };
2426
+ return take(output, {
2427
+ AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2428
+ AnomalyResources: _json,
2429
+ AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2430
+ AssociatedInsightId: __expectString,
2431
+ Description: __expectString,
2432
+ Id: __expectString,
2433
+ Limit: __limitedParseDouble,
2434
+ PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2435
+ ResourceCollection: _json,
2436
+ Severity: __expectString,
2437
+ SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2438
+ SourceMetadata: _json,
2439
+ Status: __expectString,
2440
+ UpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2441
+ });
3181
2442
  };
3182
2443
  const de_ProactiveInsight = (output, context) => {
3183
- return {
3184
- Description: __expectString(output.Description),
3185
- Id: __expectString(output.Id),
3186
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3187
- Name: __expectString(output.Name),
3188
- PredictionTimeRange: output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined,
3189
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3190
- Severity: __expectString(output.Severity),
3191
- SsmOpsItemId: __expectString(output.SsmOpsItemId),
3192
- Status: __expectString(output.Status),
3193
- };
2444
+ return take(output, {
2445
+ Description: __expectString,
2446
+ Id: __expectString,
2447
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2448
+ Name: __expectString,
2449
+ PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2450
+ ResourceCollection: _json,
2451
+ Severity: __expectString,
2452
+ SsmOpsItemId: __expectString,
2453
+ Status: __expectString,
2454
+ });
3194
2455
  };
3195
2456
  const de_ProactiveInsights = (output, context) => {
3196
2457
  const retVal = (output || [])
3197
2458
  .filter((e) => e != null)
3198
2459
  .map((entry) => {
3199
- if (entry === null) {
3200
- return null;
3201
- }
3202
2460
  return de_ProactiveInsightSummary(entry, context);
3203
2461
  });
3204
2462
  return retVal;
3205
2463
  };
3206
2464
  const de_ProactiveInsightSummary = (output, context) => {
3207
- return {
3208
- AssociatedResourceArns: output.AssociatedResourceArns != null
3209
- ? de_AssociatedResourceArns(output.AssociatedResourceArns, context)
3210
- : undefined,
3211
- Id: __expectString(output.Id),
3212
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3213
- Name: __expectString(output.Name),
3214
- PredictionTimeRange: output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined,
3215
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3216
- ServiceCollection: output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined,
3217
- Severity: __expectString(output.Severity),
3218
- Status: __expectString(output.Status),
3219
- };
2465
+ return take(output, {
2466
+ AssociatedResourceArns: _json,
2467
+ Id: __expectString,
2468
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2469
+ Name: __expectString,
2470
+ PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2471
+ ResourceCollection: _json,
2472
+ ServiceCollection: _json,
2473
+ Severity: __expectString,
2474
+ Status: __expectString,
2475
+ });
3220
2476
  };
3221
2477
  const de_ProactiveOrganizationInsights = (output, context) => {
3222
2478
  const retVal = (output || [])
3223
2479
  .filter((e) => e != null)
3224
2480
  .map((entry) => {
3225
- if (entry === null) {
3226
- return null;
3227
- }
3228
2481
  return de_ProactiveOrganizationInsightSummary(entry, context);
3229
2482
  });
3230
2483
  return retVal;
3231
2484
  };
3232
2485
  const de_ProactiveOrganizationInsightSummary = (output, context) => {
3233
- return {
3234
- AccountId: __expectString(output.AccountId),
3235
- Id: __expectString(output.Id),
3236
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3237
- Name: __expectString(output.Name),
3238
- OrganizationalUnitId: __expectString(output.OrganizationalUnitId),
3239
- PredictionTimeRange: output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined,
3240
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3241
- ServiceCollection: output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined,
3242
- Severity: __expectString(output.Severity),
3243
- Status: __expectString(output.Status),
3244
- };
2486
+ return take(output, {
2487
+ AccountId: __expectString,
2488
+ Id: __expectString,
2489
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2490
+ Name: __expectString,
2491
+ OrganizationalUnitId: __expectString,
2492
+ PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2493
+ ResourceCollection: _json,
2494
+ ServiceCollection: _json,
2495
+ Severity: __expectString,
2496
+ Status: __expectString,
2497
+ });
3245
2498
  };
3246
2499
  const de_ReactiveAnomalies = (output, context) => {
3247
2500
  const retVal = (output || [])
3248
2501
  .filter((e) => e != null)
3249
2502
  .map((entry) => {
3250
- if (entry === null) {
3251
- return null;
3252
- }
3253
2503
  return de_ReactiveAnomalySummary(entry, context);
3254
2504
  });
3255
2505
  return retVal;
3256
2506
  };
3257
2507
  const de_ReactiveAnomaly = (output, context) => {
3258
- return {
3259
- AnomalyReportedTimeRange: output.AnomalyReportedTimeRange != null
3260
- ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3261
- : undefined,
3262
- AnomalyResources: output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined,
3263
- AnomalyTimeRange: output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined,
3264
- AssociatedInsightId: __expectString(output.AssociatedInsightId),
3265
- CausalAnomalyId: __expectString(output.CausalAnomalyId),
3266
- Description: __expectString(output.Description),
3267
- Id: __expectString(output.Id),
3268
- Name: __expectString(output.Name),
3269
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3270
- Severity: __expectString(output.Severity),
3271
- SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined,
3272
- Status: __expectString(output.Status),
3273
- Type: __expectString(output.Type),
3274
- };
2508
+ return take(output, {
2509
+ AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2510
+ AnomalyResources: _json,
2511
+ AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2512
+ AssociatedInsightId: __expectString,
2513
+ CausalAnomalyId: __expectString,
2514
+ Description: __expectString,
2515
+ Id: __expectString,
2516
+ Name: __expectString,
2517
+ ResourceCollection: _json,
2518
+ Severity: __expectString,
2519
+ SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2520
+ Status: __expectString,
2521
+ Type: __expectString,
2522
+ });
3275
2523
  };
3276
2524
  const de_ReactiveAnomalySummary = (output, context) => {
3277
- return {
3278
- AnomalyReportedTimeRange: output.AnomalyReportedTimeRange != null
3279
- ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
3280
- : undefined,
3281
- AnomalyResources: output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined,
3282
- AnomalyTimeRange: output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined,
3283
- AssociatedInsightId: __expectString(output.AssociatedInsightId),
3284
- CausalAnomalyId: __expectString(output.CausalAnomalyId),
3285
- Description: __expectString(output.Description),
3286
- Id: __expectString(output.Id),
3287
- Name: __expectString(output.Name),
3288
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3289
- Severity: __expectString(output.Severity),
3290
- SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined,
3291
- Status: __expectString(output.Status),
3292
- Type: __expectString(output.Type),
3293
- };
2525
+ return take(output, {
2526
+ AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2527
+ AnomalyResources: _json,
2528
+ AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2529
+ AssociatedInsightId: __expectString,
2530
+ CausalAnomalyId: __expectString,
2531
+ Description: __expectString,
2532
+ Id: __expectString,
2533
+ Name: __expectString,
2534
+ ResourceCollection: _json,
2535
+ Severity: __expectString,
2536
+ SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2537
+ Status: __expectString,
2538
+ Type: __expectString,
2539
+ });
3294
2540
  };
3295
2541
  const de_ReactiveInsight = (output, context) => {
3296
- return {
3297
- Description: __expectString(output.Description),
3298
- Id: __expectString(output.Id),
3299
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3300
- Name: __expectString(output.Name),
3301
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3302
- Severity: __expectString(output.Severity),
3303
- SsmOpsItemId: __expectString(output.SsmOpsItemId),
3304
- Status: __expectString(output.Status),
3305
- };
2542
+ return take(output, {
2543
+ Description: __expectString,
2544
+ Id: __expectString,
2545
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2546
+ Name: __expectString,
2547
+ ResourceCollection: _json,
2548
+ Severity: __expectString,
2549
+ SsmOpsItemId: __expectString,
2550
+ Status: __expectString,
2551
+ });
3306
2552
  };
3307
2553
  const de_ReactiveInsights = (output, context) => {
3308
2554
  const retVal = (output || [])
3309
2555
  .filter((e) => e != null)
3310
2556
  .map((entry) => {
3311
- if (entry === null) {
3312
- return null;
3313
- }
3314
2557
  return de_ReactiveInsightSummary(entry, context);
3315
2558
  });
3316
2559
  return retVal;
3317
2560
  };
3318
2561
  const de_ReactiveInsightSummary = (output, context) => {
3319
- return {
3320
- AssociatedResourceArns: output.AssociatedResourceArns != null
3321
- ? de_AssociatedResourceArns(output.AssociatedResourceArns, context)
3322
- : undefined,
3323
- Id: __expectString(output.Id),
3324
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3325
- Name: __expectString(output.Name),
3326
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3327
- ServiceCollection: output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined,
3328
- Severity: __expectString(output.Severity),
3329
- Status: __expectString(output.Status),
3330
- };
2562
+ return take(output, {
2563
+ AssociatedResourceArns: _json,
2564
+ Id: __expectString,
2565
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2566
+ Name: __expectString,
2567
+ ResourceCollection: _json,
2568
+ ServiceCollection: _json,
2569
+ Severity: __expectString,
2570
+ Status: __expectString,
2571
+ });
3331
2572
  };
3332
2573
  const de_ReactiveOrganizationInsights = (output, context) => {
3333
2574
  const retVal = (output || [])
3334
2575
  .filter((e) => e != null)
3335
2576
  .map((entry) => {
3336
- if (entry === null) {
3337
- return null;
3338
- }
3339
2577
  return de_ReactiveOrganizationInsightSummary(entry, context);
3340
2578
  });
3341
2579
  return retVal;
3342
2580
  };
3343
2581
  const de_ReactiveOrganizationInsightSummary = (output, context) => {
3344
- return {
3345
- AccountId: __expectString(output.AccountId),
3346
- Id: __expectString(output.Id),
3347
- InsightTimeRange: output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined,
3348
- Name: __expectString(output.Name),
3349
- OrganizationalUnitId: __expectString(output.OrganizationalUnitId),
3350
- ResourceCollection: output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined,
3351
- ServiceCollection: output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined,
3352
- Severity: __expectString(output.Severity),
3353
- Status: __expectString(output.Status),
3354
- };
3355
- };
3356
- const de_Recommendation = (output, context) => {
3357
- return {
3358
- Category: __expectString(output.Category),
3359
- Description: __expectString(output.Description),
3360
- Link: __expectString(output.Link),
3361
- Name: __expectString(output.Name),
3362
- Reason: __expectString(output.Reason),
3363
- RelatedAnomalies: output.RelatedAnomalies != null ? de_RecommendationRelatedAnomalies(output.RelatedAnomalies, context) : undefined,
3364
- RelatedEvents: output.RelatedEvents != null ? de_RecommendationRelatedEvents(output.RelatedEvents, context) : undefined,
3365
- };
3366
- };
3367
- const de_RecommendationRelatedAnomalies = (output, context) => {
3368
- const retVal = (output || [])
3369
- .filter((e) => e != null)
3370
- .map((entry) => {
3371
- if (entry === null) {
3372
- return null;
3373
- }
3374
- return de_RecommendationRelatedAnomaly(entry, context);
3375
- });
3376
- return retVal;
3377
- };
3378
- const de_RecommendationRelatedAnomaly = (output, context) => {
3379
- return {
3380
- AnomalyId: __expectString(output.AnomalyId),
3381
- Resources: output.Resources != null ? de_RecommendationRelatedAnomalyResources(output.Resources, context) : undefined,
3382
- SourceDetails: output.SourceDetails != null ? de_RelatedAnomalySourceDetails(output.SourceDetails, context) : undefined,
3383
- };
3384
- };
3385
- const de_RecommendationRelatedAnomalyResource = (output, context) => {
3386
- return {
3387
- Name: __expectString(output.Name),
3388
- Type: __expectString(output.Type),
3389
- };
3390
- };
3391
- const de_RecommendationRelatedAnomalyResources = (output, context) => {
3392
- const retVal = (output || [])
3393
- .filter((e) => e != null)
3394
- .map((entry) => {
3395
- if (entry === null) {
3396
- return null;
3397
- }
3398
- return de_RecommendationRelatedAnomalyResource(entry, context);
3399
- });
3400
- return retVal;
3401
- };
3402
- const de_RecommendationRelatedAnomalySourceDetail = (output, context) => {
3403
- return {
3404
- CloudWatchMetrics: output.CloudWatchMetrics != null
3405
- ? de_RecommendationRelatedCloudWatchMetricsSourceDetails(output.CloudWatchMetrics, context)
3406
- : undefined,
3407
- };
3408
- };
3409
- const de_RecommendationRelatedCloudWatchMetricsSourceDetail = (output, context) => {
3410
- return {
3411
- MetricName: __expectString(output.MetricName),
3412
- Namespace: __expectString(output.Namespace),
3413
- };
3414
- };
3415
- const de_RecommendationRelatedCloudWatchMetricsSourceDetails = (output, context) => {
3416
- const retVal = (output || [])
3417
- .filter((e) => e != null)
3418
- .map((entry) => {
3419
- if (entry === null) {
3420
- return null;
3421
- }
3422
- return de_RecommendationRelatedCloudWatchMetricsSourceDetail(entry, context);
2582
+ return take(output, {
2583
+ AccountId: __expectString,
2584
+ Id: __expectString,
2585
+ InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2586
+ Name: __expectString,
2587
+ OrganizationalUnitId: __expectString,
2588
+ ResourceCollection: _json,
2589
+ ServiceCollection: _json,
2590
+ Severity: __expectString,
2591
+ Status: __expectString,
3423
2592
  });
3424
- return retVal;
3425
- };
3426
- const de_RecommendationRelatedEvent = (output, context) => {
3427
- return {
3428
- Name: __expectString(output.Name),
3429
- Resources: output.Resources != null ? de_RecommendationRelatedEventResources(output.Resources, context) : undefined,
3430
- };
3431
- };
3432
- const de_RecommendationRelatedEventResource = (output, context) => {
3433
- return {
3434
- Name: __expectString(output.Name),
3435
- Type: __expectString(output.Type),
3436
- };
3437
- };
3438
- const de_RecommendationRelatedEventResources = (output, context) => {
3439
- const retVal = (output || [])
3440
- .filter((e) => e != null)
3441
- .map((entry) => {
3442
- if (entry === null) {
3443
- return null;
3444
- }
3445
- return de_RecommendationRelatedEventResource(entry, context);
3446
- });
3447
- return retVal;
3448
- };
3449
- const de_RecommendationRelatedEvents = (output, context) => {
3450
- const retVal = (output || [])
3451
- .filter((e) => e != null)
3452
- .map((entry) => {
3453
- if (entry === null) {
3454
- return null;
3455
- }
3456
- return de_RecommendationRelatedEvent(entry, context);
3457
- });
3458
- return retVal;
3459
- };
3460
- const de_Recommendations = (output, context) => {
3461
- const retVal = (output || [])
3462
- .filter((e) => e != null)
3463
- .map((entry) => {
3464
- if (entry === null) {
3465
- return null;
3466
- }
3467
- return de_Recommendation(entry, context);
3468
- });
3469
- return retVal;
3470
- };
3471
- const de_RelatedAnomalySourceDetails = (output, context) => {
3472
- const retVal = (output || [])
3473
- .filter((e) => e != null)
3474
- .map((entry) => {
3475
- if (entry === null) {
3476
- return null;
3477
- }
3478
- return de_RecommendationRelatedAnomalySourceDetail(entry, context);
3479
- });
3480
- return retVal;
3481
- };
3482
- const de_ResourceCollection = (output, context) => {
3483
- return {
3484
- CloudFormation: output.CloudFormation != null ? de_CloudFormationCollection(output.CloudFormation, context) : undefined,
3485
- Tags: output.Tags != null ? de_TagCollections(output.Tags, context) : undefined,
3486
- };
3487
- };
3488
- const de_ResourceCollectionFilter = (output, context) => {
3489
- return {
3490
- CloudFormation: output.CloudFormation != null ? de_CloudFormationCollectionFilter(output.CloudFormation, context) : undefined,
3491
- Tags: output.Tags != null ? de_TagCollectionFilters(output.Tags, context) : undefined,
3492
- };
3493
- };
3494
- const de_ServiceCollection = (output, context) => {
3495
- return {
3496
- ServiceNames: output.ServiceNames != null ? de_ServiceNames(output.ServiceNames, context) : undefined,
3497
- };
3498
- };
3499
- const de_ServiceHealth = (output, context) => {
3500
- return {
3501
- AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount),
3502
- Insight: output.Insight != null ? de_ServiceInsightHealth(output.Insight, context) : undefined,
3503
- ServiceName: __expectString(output.ServiceName),
3504
- };
3505
- };
3506
- const de_ServiceHealths = (output, context) => {
3507
- const retVal = (output || [])
3508
- .filter((e) => e != null)
3509
- .map((entry) => {
3510
- if (entry === null) {
3511
- return null;
3512
- }
3513
- return de_ServiceHealth(entry, context);
3514
- });
3515
- return retVal;
3516
- };
3517
- const de_ServiceInsightHealth = (output, context) => {
3518
- return {
3519
- OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights),
3520
- OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights),
3521
- };
3522
- };
3523
- const de_ServiceIntegrationConfig = (output, context) => {
3524
- return {
3525
- LogsAnomalyDetection: output.LogsAnomalyDetection != null
3526
- ? de_LogsAnomalyDetectionIntegration(output.LogsAnomalyDetection, context)
3527
- : undefined,
3528
- OpsCenter: output.OpsCenter != null ? de_OpsCenterIntegration(output.OpsCenter, context) : undefined,
3529
- };
3530
- };
3531
- const de_ServiceNames = (output, context) => {
3532
- const retVal = (output || [])
3533
- .filter((e) => e != null)
3534
- .map((entry) => {
3535
- if (entry === null) {
3536
- return null;
3537
- }
3538
- return __expectString(entry);
3539
- });
3540
- return retVal;
3541
2593
  };
3542
2594
  const de_ServiceResourceCost = (output, context) => {
3543
- return {
3544
- Cost: __limitedParseDouble(output.Cost),
3545
- Count: __expectInt32(output.Count),
3546
- State: __expectString(output.State),
3547
- Type: __expectString(output.Type),
3548
- UnitCost: __limitedParseDouble(output.UnitCost),
3549
- };
2595
+ return take(output, {
2596
+ Cost: __limitedParseDouble,
2597
+ Count: __expectInt32,
2598
+ State: __expectString,
2599
+ Type: __expectString,
2600
+ UnitCost: __limitedParseDouble,
2601
+ });
3550
2602
  };
3551
2603
  const de_ServiceResourceCosts = (output, context) => {
3552
2604
  const retVal = (output || [])
3553
2605
  .filter((e) => e != null)
3554
2606
  .map((entry) => {
3555
- if (entry === null) {
3556
- return null;
3557
- }
3558
2607
  return de_ServiceResourceCost(entry, context);
3559
2608
  });
3560
2609
  return retVal;
3561
2610
  };
3562
- const de_SnsChannelConfig = (output, context) => {
3563
- return {
3564
- TopicArn: __expectString(output.TopicArn),
3565
- };
3566
- };
3567
- const de_StackNames = (output, context) => {
3568
- const retVal = (output || [])
3569
- .filter((e) => e != null)
3570
- .map((entry) => {
3571
- if (entry === null) {
3572
- return null;
3573
- }
3574
- return __expectString(entry);
3575
- });
3576
- return retVal;
3577
- };
3578
- const de_TagCollection = (output, context) => {
3579
- return {
3580
- AppBoundaryKey: __expectString(output.AppBoundaryKey),
3581
- TagValues: output.TagValues != null ? de_TagValues(output.TagValues, context) : undefined,
3582
- };
3583
- };
3584
- const de_TagCollectionFilter = (output, context) => {
3585
- return {
3586
- AppBoundaryKey: __expectString(output.AppBoundaryKey),
3587
- TagValues: output.TagValues != null ? de_TagValues(output.TagValues, context) : undefined,
3588
- };
3589
- };
3590
- const de_TagCollectionFilters = (output, context) => {
3591
- const retVal = (output || [])
3592
- .filter((e) => e != null)
3593
- .map((entry) => {
3594
- if (entry === null) {
3595
- return null;
3596
- }
3597
- return de_TagCollectionFilter(entry, context);
3598
- });
3599
- return retVal;
3600
- };
3601
- const de_TagCollections = (output, context) => {
3602
- const retVal = (output || [])
3603
- .filter((e) => e != null)
3604
- .map((entry) => {
3605
- if (entry === null) {
3606
- return null;
3607
- }
3608
- return de_TagCollection(entry, context);
3609
- });
3610
- return retVal;
3611
- };
3612
- const de_TagCostEstimationResourceCollectionFilter = (output, context) => {
3613
- return {
3614
- AppBoundaryKey: __expectString(output.AppBoundaryKey),
3615
- TagValues: output.TagValues != null ? de_CostEstimationTagValues(output.TagValues, context) : undefined,
3616
- };
3617
- };
3618
- const de_TagCostEstimationResourceCollectionFilters = (output, context) => {
3619
- const retVal = (output || [])
3620
- .filter((e) => e != null)
3621
- .map((entry) => {
3622
- if (entry === null) {
3623
- return null;
3624
- }
3625
- return de_TagCostEstimationResourceCollectionFilter(entry, context);
3626
- });
3627
- return retVal;
3628
- };
3629
- const de_TagHealth = (output, context) => {
3630
- return {
3631
- AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount),
3632
- AppBoundaryKey: __expectString(output.AppBoundaryKey),
3633
- Insight: output.Insight != null ? de_InsightHealth(output.Insight, context) : undefined,
3634
- TagValue: __expectString(output.TagValue),
3635
- };
3636
- };
3637
- const de_TagHealths = (output, context) => {
3638
- const retVal = (output || [])
3639
- .filter((e) => e != null)
3640
- .map((entry) => {
3641
- if (entry === null) {
3642
- return null;
3643
- }
3644
- return de_TagHealth(entry, context);
3645
- });
3646
- return retVal;
3647
- };
3648
- const de_TagValues = (output, context) => {
3649
- const retVal = (output || [])
3650
- .filter((e) => e != null)
3651
- .map((entry) => {
3652
- if (entry === null) {
3653
- return null;
3654
- }
3655
- return __expectString(entry);
3656
- });
3657
- return retVal;
3658
- };
3659
2611
  const de_TimestampMetricValuePair = (output, context) => {
3660
- return {
3661
- MetricValue: __limitedParseDouble(output.MetricValue),
3662
- Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
3663
- };
2612
+ return take(output, {
2613
+ MetricValue: __limitedParseDouble,
2614
+ Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2615
+ });
3664
2616
  };
3665
2617
  const de_TimestampMetricValuePairList = (output, context) => {
3666
2618
  const retVal = (output || [])
3667
2619
  .filter((e) => e != null)
3668
2620
  .map((entry) => {
3669
- if (entry === null) {
3670
- return null;
3671
- }
3672
2621
  return de_TimestampMetricValuePair(entry, context);
3673
2622
  });
3674
2623
  return retVal;
3675
2624
  };
3676
- const de_ValidationExceptionField = (output, context) => {
3677
- return {
3678
- Message: __expectString(output.Message),
3679
- Name: __expectString(output.Name),
3680
- };
3681
- };
3682
- const de_ValidationExceptionFields = (output, context) => {
3683
- const retVal = (output || [])
3684
- .filter((e) => e != null)
3685
- .map((entry) => {
3686
- if (entry === null) {
3687
- return null;
3688
- }
3689
- return de_ValidationExceptionField(entry, context);
3690
- });
3691
- return retVal;
3692
- };
3693
2625
  const deserializeMetadata = (output) => ({
3694
2626
  httpStatusCode: output.statusCode,
3695
2627
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],