@aws-sdk/client-iot-events 3.312.0 → 3.316.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, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { IoTEventsServiceException as __BaseException } from "../models/IoTEventsServiceException";
4
4
  import { InternalFailureException, InvalidRequestException, LimitExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnsupportedOperationException, } from "../models/models_0";
5
5
  export const se_CreateAlarmModelCommand = async (input, context) => {
@@ -9,24 +9,18 @@ export const se_CreateAlarmModelCommand = async (input, context) => {
9
9
  };
10
10
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarm-models";
11
11
  let body;
12
- body = JSON.stringify({
13
- ...(input.alarmCapabilities != null && {
14
- alarmCapabilities: se_AlarmCapabilities(input.alarmCapabilities, context),
15
- }),
16
- ...(input.alarmEventActions != null && {
17
- alarmEventActions: se_AlarmEventActions(input.alarmEventActions, context),
18
- }),
19
- ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }),
20
- ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
21
- ...(input.alarmNotification != null && {
22
- alarmNotification: se_AlarmNotification(input.alarmNotification, context),
23
- }),
24
- ...(input.alarmRule != null && { alarmRule: se_AlarmRule(input.alarmRule, context) }),
25
- ...(input.key != null && { key: input.key }),
26
- ...(input.roleArn != null && { roleArn: input.roleArn }),
27
- ...(input.severity != null && { severity: input.severity }),
28
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
29
- });
12
+ body = JSON.stringify(take(input, {
13
+ alarmCapabilities: (_) => _json(_),
14
+ alarmEventActions: (_) => _json(_),
15
+ alarmModelDescription: [],
16
+ alarmModelName: [],
17
+ alarmNotification: (_) => _json(_),
18
+ alarmRule: (_) => _json(_),
19
+ key: [],
20
+ roleArn: [],
21
+ severity: [],
22
+ tags: (_) => _json(_),
23
+ }));
30
24
  return new __HttpRequest({
31
25
  protocol,
32
26
  hostname,
@@ -44,17 +38,15 @@ export const se_CreateDetectorModelCommand = async (input, context) => {
44
38
  };
45
39
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector-models";
46
40
  let body;
47
- body = JSON.stringify({
48
- ...(input.detectorModelDefinition != null && {
49
- detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context),
50
- }),
51
- ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }),
52
- ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
53
- ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }),
54
- ...(input.key != null && { key: input.key }),
55
- ...(input.roleArn != null && { roleArn: input.roleArn }),
56
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
57
- });
41
+ body = JSON.stringify(take(input, {
42
+ detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
43
+ detectorModelDescription: [],
44
+ detectorModelName: [],
45
+ evaluationMethod: [],
46
+ key: [],
47
+ roleArn: [],
48
+ tags: (_) => _json(_),
49
+ }));
58
50
  return new __HttpRequest({
59
51
  protocol,
60
52
  hostname,
@@ -72,12 +64,12 @@ export const se_CreateInputCommand = async (input, context) => {
72
64
  };
73
65
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/inputs";
74
66
  let body;
75
- body = JSON.stringify({
76
- ...(input.inputDefinition != null && { inputDefinition: se_InputDefinition(input.inputDefinition, context) }),
77
- ...(input.inputDescription != null && { inputDescription: input.inputDescription }),
78
- ...(input.inputName != null && { inputName: input.inputName }),
79
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
80
- });
67
+ body = JSON.stringify(take(input, {
68
+ inputDefinition: (_) => _json(_),
69
+ inputDescription: [],
70
+ inputName: [],
71
+ tags: (_) => _json(_),
72
+ }));
81
73
  return new __HttpRequest({
82
74
  protocol,
83
75
  hostname,
@@ -338,11 +330,11 @@ export const se_ListInputRoutingsCommand = async (input, context) => {
338
330
  };
339
331
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/input-routings";
340
332
  let body;
341
- body = JSON.stringify({
342
- ...(input.inputIdentifier != null && { inputIdentifier: se_InputIdentifier(input.inputIdentifier, context) }),
343
- ...(input.maxResults != null && { maxResults: input.maxResults }),
344
- ...(input.nextToken != null && { nextToken: input.nextToken }),
345
- });
333
+ body = JSON.stringify(take(input, {
334
+ inputIdentifier: (_) => _json(_),
335
+ maxResults: [],
336
+ nextToken: [],
337
+ }));
346
338
  return new __HttpRequest({
347
339
  protocol,
348
340
  hostname,
@@ -399,9 +391,9 @@ export const se_PutLoggingOptionsCommand = async (input, context) => {
399
391
  };
400
392
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging";
401
393
  let body;
402
- body = JSON.stringify({
403
- ...(input.loggingOptions != null && { loggingOptions: se_LoggingOptions(input.loggingOptions, context) }),
404
- });
394
+ body = JSON.stringify(take(input, {
395
+ loggingOptions: (_) => _json(_),
396
+ }));
405
397
  return new __HttpRequest({
406
398
  protocol,
407
399
  hostname,
@@ -419,11 +411,9 @@ export const se_StartDetectorModelAnalysisCommand = async (input, context) => {
419
411
  };
420
412
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analysis/detector-models";
421
413
  let body;
422
- body = JSON.stringify({
423
- ...(input.detectorModelDefinition != null && {
424
- detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context),
425
- }),
426
- });
414
+ body = JSON.stringify(take(input, {
415
+ detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
416
+ }));
427
417
  return new __HttpRequest({
428
418
  protocol,
429
419
  hostname,
@@ -444,9 +434,9 @@ export const se_TagResourceCommand = async (input, context) => {
444
434
  resourceArn: [, __expectNonNull(input.resourceArn, `resourceArn`)],
445
435
  });
446
436
  let body;
447
- body = JSON.stringify({
448
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
449
- });
437
+ body = JSON.stringify(take(input, {
438
+ tags: (_) => _json(_),
439
+ }));
450
440
  return new __HttpRequest({
451
441
  protocol,
452
442
  hostname,
@@ -489,21 +479,15 @@ export const se_UpdateAlarmModelCommand = async (input, context) => {
489
479
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarm-models/{alarmModelName}";
490
480
  resolvedPath = __resolvedPath(resolvedPath, input, "alarmModelName", () => input.alarmModelName, "{alarmModelName}", false);
491
481
  let body;
492
- body = JSON.stringify({
493
- ...(input.alarmCapabilities != null && {
494
- alarmCapabilities: se_AlarmCapabilities(input.alarmCapabilities, context),
495
- }),
496
- ...(input.alarmEventActions != null && {
497
- alarmEventActions: se_AlarmEventActions(input.alarmEventActions, context),
498
- }),
499
- ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }),
500
- ...(input.alarmNotification != null && {
501
- alarmNotification: se_AlarmNotification(input.alarmNotification, context),
502
- }),
503
- ...(input.alarmRule != null && { alarmRule: se_AlarmRule(input.alarmRule, context) }),
504
- ...(input.roleArn != null && { roleArn: input.roleArn }),
505
- ...(input.severity != null && { severity: input.severity }),
506
- });
482
+ body = JSON.stringify(take(input, {
483
+ alarmCapabilities: (_) => _json(_),
484
+ alarmEventActions: (_) => _json(_),
485
+ alarmModelDescription: [],
486
+ alarmNotification: (_) => _json(_),
487
+ alarmRule: (_) => _json(_),
488
+ roleArn: [],
489
+ severity: [],
490
+ }));
507
491
  return new __HttpRequest({
508
492
  protocol,
509
493
  hostname,
@@ -522,14 +506,12 @@ export const se_UpdateDetectorModelCommand = async (input, context) => {
522
506
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector-models/{detectorModelName}";
523
507
  resolvedPath = __resolvedPath(resolvedPath, input, "detectorModelName", () => input.detectorModelName, "{detectorModelName}", false);
524
508
  let body;
525
- body = JSON.stringify({
526
- ...(input.detectorModelDefinition != null && {
527
- detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context),
528
- }),
529
- ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }),
530
- ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }),
531
- ...(input.roleArn != null && { roleArn: input.roleArn }),
532
- });
509
+ body = JSON.stringify(take(input, {
510
+ detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context),
511
+ detectorModelDescription: [],
512
+ evaluationMethod: [],
513
+ roleArn: [],
514
+ }));
533
515
  return new __HttpRequest({
534
516
  protocol,
535
517
  hostname,
@@ -548,10 +530,10 @@ export const se_UpdateInputCommand = async (input, context) => {
548
530
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/inputs/{inputName}";
549
531
  resolvedPath = __resolvedPath(resolvedPath, input, "inputName", () => input.inputName, "{inputName}", false);
550
532
  let body;
551
- body = JSON.stringify({
552
- ...(input.inputDefinition != null && { inputDefinition: se_InputDefinition(input.inputDefinition, context) }),
553
- ...(input.inputDescription != null && { inputDescription: input.inputDescription }),
554
- });
533
+ body = JSON.stringify(take(input, {
534
+ inputDefinition: (_) => _json(_),
535
+ inputDescription: [],
536
+ }));
555
537
  return new __HttpRequest({
556
538
  protocol,
557
539
  hostname,
@@ -570,21 +552,14 @@ export const de_CreateAlarmModelCommand = async (output, context) => {
570
552
  $metadata: deserializeMetadata(output),
571
553
  });
572
554
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
573
- if (data.alarmModelArn != null) {
574
- contents.alarmModelArn = __expectString(data.alarmModelArn);
575
- }
576
- if (data.alarmModelVersion != null) {
577
- contents.alarmModelVersion = __expectString(data.alarmModelVersion);
578
- }
579
- if (data.creationTime != null) {
580
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
581
- }
582
- if (data.lastUpdateTime != null) {
583
- contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime)));
584
- }
585
- if (data.status != null) {
586
- contents.status = __expectString(data.status);
587
- }
555
+ const doc = take(data, {
556
+ alarmModelArn: __expectString,
557
+ alarmModelVersion: __expectString,
558
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
559
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
560
+ status: __expectString,
561
+ });
562
+ Object.assign(contents, doc);
588
563
  return contents;
589
564
  };
590
565
  const de_CreateAlarmModelCommandError = async (output, context) => {
@@ -617,10 +592,9 @@ const de_CreateAlarmModelCommandError = async (output, context) => {
617
592
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
618
593
  default:
619
594
  const parsedBody = parsedOutput.body;
620
- throwDefaultError({
595
+ return throwDefaultError({
621
596
  output,
622
597
  parsedBody,
623
- exceptionCtor: __BaseException,
624
598
  errorCode,
625
599
  });
626
600
  }
@@ -633,9 +607,10 @@ export const de_CreateDetectorModelCommand = async (output, context) => {
633
607
  $metadata: deserializeMetadata(output),
634
608
  });
635
609
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
636
- if (data.detectorModelConfiguration != null) {
637
- contents.detectorModelConfiguration = de_DetectorModelConfiguration(data.detectorModelConfiguration, context);
638
- }
610
+ const doc = take(data, {
611
+ detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
612
+ });
613
+ Object.assign(contents, doc);
639
614
  return contents;
640
615
  };
641
616
  const de_CreateDetectorModelCommandError = async (output, context) => {
@@ -668,10 +643,9 @@ const de_CreateDetectorModelCommandError = async (output, context) => {
668
643
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
669
644
  default:
670
645
  const parsedBody = parsedOutput.body;
671
- throwDefaultError({
646
+ return throwDefaultError({
672
647
  output,
673
648
  parsedBody,
674
- exceptionCtor: __BaseException,
675
649
  errorCode,
676
650
  });
677
651
  }
@@ -684,9 +658,10 @@ export const de_CreateInputCommand = async (output, context) => {
684
658
  $metadata: deserializeMetadata(output),
685
659
  });
686
660
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
687
- if (data.inputConfiguration != null) {
688
- contents.inputConfiguration = de_InputConfiguration(data.inputConfiguration, context);
689
- }
661
+ const doc = take(data, {
662
+ inputConfiguration: (_) => de_InputConfiguration(_, context),
663
+ });
664
+ Object.assign(contents, doc);
690
665
  return contents;
691
666
  };
692
667
  const de_CreateInputCommandError = async (output, context) => {
@@ -713,10 +688,9 @@ const de_CreateInputCommandError = async (output, context) => {
713
688
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
714
689
  default:
715
690
  const parsedBody = parsedOutput.body;
716
- throwDefaultError({
691
+ return throwDefaultError({
717
692
  output,
718
693
  parsedBody,
719
- exceptionCtor: __BaseException,
720
694
  errorCode,
721
695
  });
722
696
  }
@@ -758,10 +732,9 @@ const de_DeleteAlarmModelCommandError = async (output, context) => {
758
732
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
759
733
  default:
760
734
  const parsedBody = parsedOutput.body;
761
- throwDefaultError({
735
+ return throwDefaultError({
762
736
  output,
763
737
  parsedBody,
764
- exceptionCtor: __BaseException,
765
738
  errorCode,
766
739
  });
767
740
  }
@@ -803,10 +776,9 @@ const de_DeleteDetectorModelCommandError = async (output, context) => {
803
776
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
804
777
  default:
805
778
  const parsedBody = parsedOutput.body;
806
- throwDefaultError({
779
+ return throwDefaultError({
807
780
  output,
808
781
  parsedBody,
809
- exceptionCtor: __BaseException,
810
782
  errorCode,
811
783
  });
812
784
  }
@@ -848,10 +820,9 @@ const de_DeleteInputCommandError = async (output, context) => {
848
820
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
849
821
  default:
850
822
  const parsedBody = parsedOutput.body;
851
- throwDefaultError({
823
+ return throwDefaultError({
852
824
  output,
853
825
  parsedBody,
854
- exceptionCtor: __BaseException,
855
826
  errorCode,
856
827
  });
857
828
  }
@@ -864,51 +835,24 @@ export const de_DescribeAlarmModelCommand = async (output, context) => {
864
835
  $metadata: deserializeMetadata(output),
865
836
  });
866
837
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
867
- if (data.alarmCapabilities != null) {
868
- contents.alarmCapabilities = de_AlarmCapabilities(data.alarmCapabilities, context);
869
- }
870
- if (data.alarmEventActions != null) {
871
- contents.alarmEventActions = de_AlarmEventActions(data.alarmEventActions, context);
872
- }
873
- if (data.alarmModelArn != null) {
874
- contents.alarmModelArn = __expectString(data.alarmModelArn);
875
- }
876
- if (data.alarmModelDescription != null) {
877
- contents.alarmModelDescription = __expectString(data.alarmModelDescription);
878
- }
879
- if (data.alarmModelName != null) {
880
- contents.alarmModelName = __expectString(data.alarmModelName);
881
- }
882
- if (data.alarmModelVersion != null) {
883
- contents.alarmModelVersion = __expectString(data.alarmModelVersion);
884
- }
885
- if (data.alarmNotification != null) {
886
- contents.alarmNotification = de_AlarmNotification(data.alarmNotification, context);
887
- }
888
- if (data.alarmRule != null) {
889
- contents.alarmRule = de_AlarmRule(data.alarmRule, context);
890
- }
891
- if (data.creationTime != null) {
892
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
893
- }
894
- if (data.key != null) {
895
- contents.key = __expectString(data.key);
896
- }
897
- if (data.lastUpdateTime != null) {
898
- contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime)));
899
- }
900
- if (data.roleArn != null) {
901
- contents.roleArn = __expectString(data.roleArn);
902
- }
903
- if (data.severity != null) {
904
- contents.severity = __expectInt32(data.severity);
905
- }
906
- if (data.status != null) {
907
- contents.status = __expectString(data.status);
908
- }
909
- if (data.statusMessage != null) {
910
- contents.statusMessage = __expectString(data.statusMessage);
911
- }
838
+ const doc = take(data, {
839
+ alarmCapabilities: _json,
840
+ alarmEventActions: _json,
841
+ alarmModelArn: __expectString,
842
+ alarmModelDescription: __expectString,
843
+ alarmModelName: __expectString,
844
+ alarmModelVersion: __expectString,
845
+ alarmNotification: _json,
846
+ alarmRule: _json,
847
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
848
+ key: __expectString,
849
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
850
+ roleArn: __expectString,
851
+ severity: __expectInt32,
852
+ status: __expectString,
853
+ statusMessage: __expectString,
854
+ });
855
+ Object.assign(contents, doc);
912
856
  return contents;
913
857
  };
914
858
  const de_DescribeAlarmModelCommandError = async (output, context) => {
@@ -935,10 +879,9 @@ const de_DescribeAlarmModelCommandError = async (output, context) => {
935
879
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
936
880
  default:
937
881
  const parsedBody = parsedOutput.body;
938
- throwDefaultError({
882
+ return throwDefaultError({
939
883
  output,
940
884
  parsedBody,
941
- exceptionCtor: __BaseException,
942
885
  errorCode,
943
886
  });
944
887
  }
@@ -951,9 +894,10 @@ export const de_DescribeDetectorModelCommand = async (output, context) => {
951
894
  $metadata: deserializeMetadata(output),
952
895
  });
953
896
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
954
- if (data.detectorModel != null) {
955
- contents.detectorModel = de_DetectorModel(data.detectorModel, context);
956
- }
897
+ const doc = take(data, {
898
+ detectorModel: (_) => de_DetectorModel(_, context),
899
+ });
900
+ Object.assign(contents, doc);
957
901
  return contents;
958
902
  };
959
903
  const de_DescribeDetectorModelCommandError = async (output, context) => {
@@ -980,10 +924,9 @@ const de_DescribeDetectorModelCommandError = async (output, context) => {
980
924
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
981
925
  default:
982
926
  const parsedBody = parsedOutput.body;
983
- throwDefaultError({
927
+ return throwDefaultError({
984
928
  output,
985
929
  parsedBody,
986
- exceptionCtor: __BaseException,
987
930
  errorCode,
988
931
  });
989
932
  }
@@ -996,9 +939,10 @@ export const de_DescribeDetectorModelAnalysisCommand = async (output, context) =
996
939
  $metadata: deserializeMetadata(output),
997
940
  });
998
941
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
999
- if (data.status != null) {
1000
- contents.status = __expectString(data.status);
1001
- }
942
+ const doc = take(data, {
943
+ status: __expectString,
944
+ });
945
+ Object.assign(contents, doc);
1002
946
  return contents;
1003
947
  };
1004
948
  const de_DescribeDetectorModelAnalysisCommandError = async (output, context) => {
@@ -1025,10 +969,9 @@ const de_DescribeDetectorModelAnalysisCommandError = async (output, context) =>
1025
969
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1026
970
  default:
1027
971
  const parsedBody = parsedOutput.body;
1028
- throwDefaultError({
972
+ return throwDefaultError({
1029
973
  output,
1030
974
  parsedBody,
1031
- exceptionCtor: __BaseException,
1032
975
  errorCode,
1033
976
  });
1034
977
  }
@@ -1041,9 +984,10 @@ export const de_DescribeInputCommand = async (output, context) => {
1041
984
  $metadata: deserializeMetadata(output),
1042
985
  });
1043
986
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1044
- if (data.input != null) {
1045
- contents.input = de_Input(data.input, context);
1046
- }
987
+ const doc = take(data, {
988
+ input: (_) => de_Input(_, context),
989
+ });
990
+ Object.assign(contents, doc);
1047
991
  return contents;
1048
992
  };
1049
993
  const de_DescribeInputCommandError = async (output, context) => {
@@ -1070,10 +1014,9 @@ const de_DescribeInputCommandError = async (output, context) => {
1070
1014
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1071
1015
  default:
1072
1016
  const parsedBody = parsedOutput.body;
1073
- throwDefaultError({
1017
+ return throwDefaultError({
1074
1018
  output,
1075
1019
  parsedBody,
1076
- exceptionCtor: __BaseException,
1077
1020
  errorCode,
1078
1021
  });
1079
1022
  }
@@ -1086,9 +1029,10 @@ export const de_DescribeLoggingOptionsCommand = async (output, context) => {
1086
1029
  $metadata: deserializeMetadata(output),
1087
1030
  });
1088
1031
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1089
- if (data.loggingOptions != null) {
1090
- contents.loggingOptions = de_LoggingOptions(data.loggingOptions, context);
1091
- }
1032
+ const doc = take(data, {
1033
+ loggingOptions: _json,
1034
+ });
1035
+ Object.assign(contents, doc);
1092
1036
  return contents;
1093
1037
  };
1094
1038
  const de_DescribeLoggingOptionsCommandError = async (output, context) => {
@@ -1118,10 +1062,9 @@ const de_DescribeLoggingOptionsCommandError = async (output, context) => {
1118
1062
  throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1119
1063
  default:
1120
1064
  const parsedBody = parsedOutput.body;
1121
- throwDefaultError({
1065
+ return throwDefaultError({
1122
1066
  output,
1123
1067
  parsedBody,
1124
- exceptionCtor: __BaseException,
1125
1068
  errorCode,
1126
1069
  });
1127
1070
  }
@@ -1134,12 +1077,11 @@ export const de_GetDetectorModelAnalysisResultsCommand = async (output, context)
1134
1077
  $metadata: deserializeMetadata(output),
1135
1078
  });
1136
1079
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1137
- if (data.analysisResults != null) {
1138
- contents.analysisResults = de_AnalysisResults(data.analysisResults, context);
1139
- }
1140
- if (data.nextToken != null) {
1141
- contents.nextToken = __expectString(data.nextToken);
1142
- }
1080
+ const doc = take(data, {
1081
+ analysisResults: _json,
1082
+ nextToken: __expectString,
1083
+ });
1084
+ Object.assign(contents, doc);
1143
1085
  return contents;
1144
1086
  };
1145
1087
  const de_GetDetectorModelAnalysisResultsCommandError = async (output, context) => {
@@ -1166,10 +1108,9 @@ const de_GetDetectorModelAnalysisResultsCommandError = async (output, context) =
1166
1108
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1167
1109
  default:
1168
1110
  const parsedBody = parsedOutput.body;
1169
- throwDefaultError({
1111
+ return throwDefaultError({
1170
1112
  output,
1171
1113
  parsedBody,
1172
- exceptionCtor: __BaseException,
1173
1114
  errorCode,
1174
1115
  });
1175
1116
  }
@@ -1182,12 +1123,11 @@ export const de_ListAlarmModelsCommand = async (output, context) => {
1182
1123
  $metadata: deserializeMetadata(output),
1183
1124
  });
1184
1125
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1185
- if (data.alarmModelSummaries != null) {
1186
- contents.alarmModelSummaries = de_AlarmModelSummaries(data.alarmModelSummaries, context);
1187
- }
1188
- if (data.nextToken != null) {
1189
- contents.nextToken = __expectString(data.nextToken);
1190
- }
1126
+ const doc = take(data, {
1127
+ alarmModelSummaries: (_) => de_AlarmModelSummaries(_, context),
1128
+ nextToken: __expectString,
1129
+ });
1130
+ Object.assign(contents, doc);
1191
1131
  return contents;
1192
1132
  };
1193
1133
  const de_ListAlarmModelsCommandError = async (output, context) => {
@@ -1211,10 +1151,9 @@ const de_ListAlarmModelsCommandError = async (output, context) => {
1211
1151
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1212
1152
  default:
1213
1153
  const parsedBody = parsedOutput.body;
1214
- throwDefaultError({
1154
+ return throwDefaultError({
1215
1155
  output,
1216
1156
  parsedBody,
1217
- exceptionCtor: __BaseException,
1218
1157
  errorCode,
1219
1158
  });
1220
1159
  }
@@ -1227,12 +1166,11 @@ export const de_ListAlarmModelVersionsCommand = async (output, context) => {
1227
1166
  $metadata: deserializeMetadata(output),
1228
1167
  });
1229
1168
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1230
- if (data.alarmModelVersionSummaries != null) {
1231
- contents.alarmModelVersionSummaries = de_AlarmModelVersionSummaries(data.alarmModelVersionSummaries, context);
1232
- }
1233
- if (data.nextToken != null) {
1234
- contents.nextToken = __expectString(data.nextToken);
1235
- }
1169
+ const doc = take(data, {
1170
+ alarmModelVersionSummaries: (_) => de_AlarmModelVersionSummaries(_, context),
1171
+ nextToken: __expectString,
1172
+ });
1173
+ Object.assign(contents, doc);
1236
1174
  return contents;
1237
1175
  };
1238
1176
  const de_ListAlarmModelVersionsCommandError = async (output, context) => {
@@ -1259,10 +1197,9 @@ const de_ListAlarmModelVersionsCommandError = async (output, context) => {
1259
1197
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1260
1198
  default:
1261
1199
  const parsedBody = parsedOutput.body;
1262
- throwDefaultError({
1200
+ return throwDefaultError({
1263
1201
  output,
1264
1202
  parsedBody,
1265
- exceptionCtor: __BaseException,
1266
1203
  errorCode,
1267
1204
  });
1268
1205
  }
@@ -1275,12 +1212,11 @@ export const de_ListDetectorModelsCommand = async (output, context) => {
1275
1212
  $metadata: deserializeMetadata(output),
1276
1213
  });
1277
1214
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1278
- if (data.detectorModelSummaries != null) {
1279
- contents.detectorModelSummaries = de_DetectorModelSummaries(data.detectorModelSummaries, context);
1280
- }
1281
- if (data.nextToken != null) {
1282
- contents.nextToken = __expectString(data.nextToken);
1283
- }
1215
+ const doc = take(data, {
1216
+ detectorModelSummaries: (_) => de_DetectorModelSummaries(_, context),
1217
+ nextToken: __expectString,
1218
+ });
1219
+ Object.assign(contents, doc);
1284
1220
  return contents;
1285
1221
  };
1286
1222
  const de_ListDetectorModelsCommandError = async (output, context) => {
@@ -1304,10 +1240,9 @@ const de_ListDetectorModelsCommandError = async (output, context) => {
1304
1240
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1305
1241
  default:
1306
1242
  const parsedBody = parsedOutput.body;
1307
- throwDefaultError({
1243
+ return throwDefaultError({
1308
1244
  output,
1309
1245
  parsedBody,
1310
- exceptionCtor: __BaseException,
1311
1246
  errorCode,
1312
1247
  });
1313
1248
  }
@@ -1320,12 +1255,11 @@ export const de_ListDetectorModelVersionsCommand = async (output, context) => {
1320
1255
  $metadata: deserializeMetadata(output),
1321
1256
  });
1322
1257
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1323
- if (data.detectorModelVersionSummaries != null) {
1324
- contents.detectorModelVersionSummaries = de_DetectorModelVersionSummaries(data.detectorModelVersionSummaries, context);
1325
- }
1326
- if (data.nextToken != null) {
1327
- contents.nextToken = __expectString(data.nextToken);
1328
- }
1258
+ const doc = take(data, {
1259
+ detectorModelVersionSummaries: (_) => de_DetectorModelVersionSummaries(_, context),
1260
+ nextToken: __expectString,
1261
+ });
1262
+ Object.assign(contents, doc);
1329
1263
  return contents;
1330
1264
  };
1331
1265
  const de_ListDetectorModelVersionsCommandError = async (output, context) => {
@@ -1352,10 +1286,9 @@ const de_ListDetectorModelVersionsCommandError = async (output, context) => {
1352
1286
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1353
1287
  default:
1354
1288
  const parsedBody = parsedOutput.body;
1355
- throwDefaultError({
1289
+ return throwDefaultError({
1356
1290
  output,
1357
1291
  parsedBody,
1358
- exceptionCtor: __BaseException,
1359
1292
  errorCode,
1360
1293
  });
1361
1294
  }
@@ -1368,12 +1301,11 @@ export const de_ListInputRoutingsCommand = async (output, context) => {
1368
1301
  $metadata: deserializeMetadata(output),
1369
1302
  });
1370
1303
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1371
- if (data.nextToken != null) {
1372
- contents.nextToken = __expectString(data.nextToken);
1373
- }
1374
- if (data.routedResources != null) {
1375
- contents.routedResources = de_RoutedResources(data.routedResources, context);
1376
- }
1304
+ const doc = take(data, {
1305
+ nextToken: __expectString,
1306
+ routedResources: _json,
1307
+ });
1308
+ Object.assign(contents, doc);
1377
1309
  return contents;
1378
1310
  };
1379
1311
  const de_ListInputRoutingsCommandError = async (output, context) => {
@@ -1400,10 +1332,9 @@ const de_ListInputRoutingsCommandError = async (output, context) => {
1400
1332
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1401
1333
  default:
1402
1334
  const parsedBody = parsedOutput.body;
1403
- throwDefaultError({
1335
+ return throwDefaultError({
1404
1336
  output,
1405
1337
  parsedBody,
1406
- exceptionCtor: __BaseException,
1407
1338
  errorCode,
1408
1339
  });
1409
1340
  }
@@ -1416,12 +1347,11 @@ export const de_ListInputsCommand = async (output, context) => {
1416
1347
  $metadata: deserializeMetadata(output),
1417
1348
  });
1418
1349
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1419
- if (data.inputSummaries != null) {
1420
- contents.inputSummaries = de_InputSummaries(data.inputSummaries, context);
1421
- }
1422
- if (data.nextToken != null) {
1423
- contents.nextToken = __expectString(data.nextToken);
1424
- }
1350
+ const doc = take(data, {
1351
+ inputSummaries: (_) => de_InputSummaries(_, context),
1352
+ nextToken: __expectString,
1353
+ });
1354
+ Object.assign(contents, doc);
1425
1355
  return contents;
1426
1356
  };
1427
1357
  const de_ListInputsCommandError = async (output, context) => {
@@ -1445,10 +1375,9 @@ const de_ListInputsCommandError = async (output, context) => {
1445
1375
  throw await de_ThrottlingExceptionRes(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,9 +1390,10 @@ export const de_ListTagsForResourceCommand = 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.tags != null) {
1465
- contents.tags = de_Tags(data.tags, context);
1466
- }
1393
+ const doc = take(data, {
1394
+ tags: _json,
1395
+ });
1396
+ Object.assign(contents, doc);
1467
1397
  return contents;
1468
1398
  };
1469
1399
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1490,10 +1420,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1490
1420
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1491
1421
  default:
1492
1422
  const parsedBody = parsedOutput.body;
1493
- throwDefaultError({
1423
+ return throwDefaultError({
1494
1424
  output,
1495
1425
  parsedBody,
1496
- exceptionCtor: __BaseException,
1497
1426
  errorCode,
1498
1427
  });
1499
1428
  }
@@ -1535,10 +1464,9 @@ const de_PutLoggingOptionsCommandError = async (output, context) => {
1535
1464
  throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1536
1465
  default:
1537
1466
  const parsedBody = parsedOutput.body;
1538
- throwDefaultError({
1467
+ return throwDefaultError({
1539
1468
  output,
1540
1469
  parsedBody,
1541
- exceptionCtor: __BaseException,
1542
1470
  errorCode,
1543
1471
  });
1544
1472
  }
@@ -1551,9 +1479,10 @@ export const de_StartDetectorModelAnalysisCommand = async (output, context) => {
1551
1479
  $metadata: deserializeMetadata(output),
1552
1480
  });
1553
1481
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1554
- if (data.analysisId != null) {
1555
- contents.analysisId = __expectString(data.analysisId);
1556
- }
1482
+ const doc = take(data, {
1483
+ analysisId: __expectString,
1484
+ });
1485
+ Object.assign(contents, doc);
1557
1486
  return contents;
1558
1487
  };
1559
1488
  const de_StartDetectorModelAnalysisCommandError = async (output, context) => {
@@ -1580,10 +1509,9 @@ const de_StartDetectorModelAnalysisCommandError = async (output, context) => {
1580
1509
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1581
1510
  default:
1582
1511
  const parsedBody = parsedOutput.body;
1583
- throwDefaultError({
1512
+ return throwDefaultError({
1584
1513
  output,
1585
1514
  parsedBody,
1586
- exceptionCtor: __BaseException,
1587
1515
  errorCode,
1588
1516
  });
1589
1517
  }
@@ -1625,10 +1553,9 @@ const de_TagResourceCommandError = async (output, context) => {
1625
1553
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1626
1554
  default:
1627
1555
  const parsedBody = parsedOutput.body;
1628
- throwDefaultError({
1556
+ return throwDefaultError({
1629
1557
  output,
1630
1558
  parsedBody,
1631
- exceptionCtor: __BaseException,
1632
1559
  errorCode,
1633
1560
  });
1634
1561
  }
@@ -1667,10 +1594,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1667
1594
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1668
1595
  default:
1669
1596
  const parsedBody = parsedOutput.body;
1670
- throwDefaultError({
1597
+ return throwDefaultError({
1671
1598
  output,
1672
1599
  parsedBody,
1673
- exceptionCtor: __BaseException,
1674
1600
  errorCode,
1675
1601
  });
1676
1602
  }
@@ -1683,21 +1609,14 @@ export const de_UpdateAlarmModelCommand = async (output, context) => {
1683
1609
  $metadata: deserializeMetadata(output),
1684
1610
  });
1685
1611
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1686
- if (data.alarmModelArn != null) {
1687
- contents.alarmModelArn = __expectString(data.alarmModelArn);
1688
- }
1689
- if (data.alarmModelVersion != null) {
1690
- contents.alarmModelVersion = __expectString(data.alarmModelVersion);
1691
- }
1692
- if (data.creationTime != null) {
1693
- contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
1694
- }
1695
- if (data.lastUpdateTime != null) {
1696
- contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime)));
1697
- }
1698
- if (data.status != null) {
1699
- contents.status = __expectString(data.status);
1700
- }
1612
+ const doc = take(data, {
1613
+ alarmModelArn: __expectString,
1614
+ alarmModelVersion: __expectString,
1615
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1616
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1617
+ status: __expectString,
1618
+ });
1619
+ Object.assign(contents, doc);
1701
1620
  return contents;
1702
1621
  };
1703
1622
  const de_UpdateAlarmModelCommandError = async (output, context) => {
@@ -1727,10 +1646,9 @@ const de_UpdateAlarmModelCommandError = async (output, context) => {
1727
1646
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1728
1647
  default:
1729
1648
  const parsedBody = parsedOutput.body;
1730
- throwDefaultError({
1649
+ return throwDefaultError({
1731
1650
  output,
1732
1651
  parsedBody,
1733
- exceptionCtor: __BaseException,
1734
1652
  errorCode,
1735
1653
  });
1736
1654
  }
@@ -1743,9 +1661,10 @@ export const de_UpdateDetectorModelCommand = async (output, context) => {
1743
1661
  $metadata: deserializeMetadata(output),
1744
1662
  });
1745
1663
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1746
- if (data.detectorModelConfiguration != null) {
1747
- contents.detectorModelConfiguration = de_DetectorModelConfiguration(data.detectorModelConfiguration, context);
1748
- }
1664
+ const doc = take(data, {
1665
+ detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
1666
+ });
1667
+ Object.assign(contents, doc);
1749
1668
  return contents;
1750
1669
  };
1751
1670
  const de_UpdateDetectorModelCommandError = async (output, context) => {
@@ -1775,10 +1694,9 @@ const de_UpdateDetectorModelCommandError = async (output, context) => {
1775
1694
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1776
1695
  default:
1777
1696
  const parsedBody = parsedOutput.body;
1778
- throwDefaultError({
1697
+ return throwDefaultError({
1779
1698
  output,
1780
1699
  parsedBody,
1781
- exceptionCtor: __BaseException,
1782
1700
  errorCode,
1783
1701
  });
1784
1702
  }
@@ -1791,9 +1709,10 @@ export const de_UpdateInputCommand = async (output, context) => {
1791
1709
  $metadata: deserializeMetadata(output),
1792
1710
  });
1793
1711
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1794
- if (data.inputConfiguration != null) {
1795
- contents.inputConfiguration = de_InputConfiguration(data.inputConfiguration, context);
1796
- }
1712
+ const doc = take(data, {
1713
+ inputConfiguration: (_) => de_InputConfiguration(_, context),
1714
+ });
1715
+ Object.assign(contents, doc);
1797
1716
  return contents;
1798
1717
  };
1799
1718
  const de_UpdateInputCommandError = async (output, context) => {
@@ -1823,21 +1742,21 @@ const de_UpdateInputCommandError = async (output, context) => {
1823
1742
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1824
1743
  default:
1825
1744
  const parsedBody = parsedOutput.body;
1826
- throwDefaultError({
1745
+ return throwDefaultError({
1827
1746
  output,
1828
1747
  parsedBody,
1829
- exceptionCtor: __BaseException,
1830
1748
  errorCode,
1831
1749
  });
1832
1750
  }
1833
1751
  };
1834
- const map = __map;
1752
+ const throwDefaultError = withBaseException(__BaseException);
1835
1753
  const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
1836
1754
  const contents = map({});
1837
1755
  const data = parsedOutput.body;
1838
- if (data.message != null) {
1839
- contents.message = __expectString(data.message);
1840
- }
1756
+ const doc = take(data, {
1757
+ message: __expectString,
1758
+ });
1759
+ Object.assign(contents, doc);
1841
1760
  const exception = new InternalFailureException({
1842
1761
  $metadata: deserializeMetadata(parsedOutput),
1843
1762
  ...contents,
@@ -1847,9 +1766,10 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
1847
1766
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1848
1767
  const contents = map({});
1849
1768
  const data = parsedOutput.body;
1850
- if (data.message != null) {
1851
- contents.message = __expectString(data.message);
1852
- }
1769
+ const doc = take(data, {
1770
+ message: __expectString,
1771
+ });
1772
+ Object.assign(contents, doc);
1853
1773
  const exception = new InvalidRequestException({
1854
1774
  $metadata: deserializeMetadata(parsedOutput),
1855
1775
  ...contents,
@@ -1859,9 +1779,10 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1859
1779
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1860
1780
  const contents = map({});
1861
1781
  const data = parsedOutput.body;
1862
- if (data.message != null) {
1863
- contents.message = __expectString(data.message);
1864
- }
1782
+ const doc = take(data, {
1783
+ message: __expectString,
1784
+ });
1785
+ Object.assign(contents, doc);
1865
1786
  const exception = new LimitExceededException({
1866
1787
  $metadata: deserializeMetadata(parsedOutput),
1867
1788
  ...contents,
@@ -1871,15 +1792,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1871
1792
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1872
1793
  const contents = map({});
1873
1794
  const data = parsedOutput.body;
1874
- if (data.message != null) {
1875
- contents.message = __expectString(data.message);
1876
- }
1877
- if (data.resourceArn != null) {
1878
- contents.resourceArn = __expectString(data.resourceArn);
1879
- }
1880
- if (data.resourceId != null) {
1881
- contents.resourceId = __expectString(data.resourceId);
1882
- }
1795
+ const doc = take(data, {
1796
+ message: __expectString,
1797
+ resourceArn: __expectString,
1798
+ resourceId: __expectString,
1799
+ });
1800
+ Object.assign(contents, doc);
1883
1801
  const exception = new ResourceAlreadyExistsException({
1884
1802
  $metadata: deserializeMetadata(parsedOutput),
1885
1803
  ...contents,
@@ -1889,9 +1807,10 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1889
1807
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1890
1808
  const contents = map({});
1891
1809
  const data = parsedOutput.body;
1892
- if (data.message != null) {
1893
- contents.message = __expectString(data.message);
1894
- }
1810
+ const doc = take(data, {
1811
+ message: __expectString,
1812
+ });
1813
+ Object.assign(contents, doc);
1895
1814
  const exception = new ResourceInUseException({
1896
1815
  $metadata: deserializeMetadata(parsedOutput),
1897
1816
  ...contents,
@@ -1901,9 +1820,10 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
1901
1820
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1902
1821
  const contents = map({});
1903
1822
  const data = parsedOutput.body;
1904
- if (data.message != null) {
1905
- contents.message = __expectString(data.message);
1906
- }
1823
+ const doc = take(data, {
1824
+ message: __expectString,
1825
+ });
1826
+ Object.assign(contents, doc);
1907
1827
  const exception = new ResourceNotFoundException({
1908
1828
  $metadata: deserializeMetadata(parsedOutput),
1909
1829
  ...contents,
@@ -1913,9 +1833,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1913
1833
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1914
1834
  const contents = map({});
1915
1835
  const data = parsedOutput.body;
1916
- if (data.message != null) {
1917
- contents.message = __expectString(data.message);
1918
- }
1836
+ const doc = take(data, {
1837
+ message: __expectString,
1838
+ });
1839
+ Object.assign(contents, doc);
1919
1840
  const exception = new ServiceUnavailableException({
1920
1841
  $metadata: deserializeMetadata(parsedOutput),
1921
1842
  ...contents,
@@ -1925,9 +1846,10 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1925
1846
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1926
1847
  const contents = map({});
1927
1848
  const data = parsedOutput.body;
1928
- if (data.message != null) {
1929
- contents.message = __expectString(data.message);
1930
- }
1849
+ const doc = take(data, {
1850
+ message: __expectString,
1851
+ });
1852
+ Object.assign(contents, doc);
1931
1853
  const exception = new ThrottlingException({
1932
1854
  $metadata: deserializeMetadata(parsedOutput),
1933
1855
  ...contents,
@@ -1937,1105 +1859,151 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1937
1859
  const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
1938
1860
  const contents = map({});
1939
1861
  const data = parsedOutput.body;
1940
- if (data.message != null) {
1941
- contents.message = __expectString(data.message);
1942
- }
1862
+ const doc = take(data, {
1863
+ message: __expectString,
1864
+ });
1865
+ Object.assign(contents, doc);
1943
1866
  const exception = new UnsupportedOperationException({
1944
1867
  $metadata: deserializeMetadata(parsedOutput),
1945
1868
  ...contents,
1946
1869
  });
1947
1870
  return __decorateServiceException(exception, parsedOutput.body);
1948
1871
  };
1949
- const se_AcknowledgeFlow = (input, context) => {
1950
- return {
1951
- ...(input.enabled != null && { enabled: input.enabled }),
1952
- };
1953
- };
1954
- const se_Action = (input, context) => {
1955
- return {
1956
- ...(input.clearTimer != null && { clearTimer: se_ClearTimerAction(input.clearTimer, context) }),
1957
- ...(input.dynamoDB != null && { dynamoDB: se_DynamoDBAction(input.dynamoDB, context) }),
1958
- ...(input.dynamoDBv2 != null && { dynamoDBv2: se_DynamoDBv2Action(input.dynamoDBv2, context) }),
1959
- ...(input.firehose != null && { firehose: se_FirehoseAction(input.firehose, context) }),
1960
- ...(input.iotEvents != null && { iotEvents: se_IotEventsAction(input.iotEvents, context) }),
1961
- ...(input.iotSiteWise != null && { iotSiteWise: se_IotSiteWiseAction(input.iotSiteWise, context) }),
1962
- ...(input.iotTopicPublish != null && { iotTopicPublish: se_IotTopicPublishAction(input.iotTopicPublish, context) }),
1963
- ...(input.lambda != null && { lambda: se_LambdaAction(input.lambda, context) }),
1964
- ...(input.resetTimer != null && { resetTimer: se_ResetTimerAction(input.resetTimer, context) }),
1965
- ...(input.setTimer != null && { setTimer: se_SetTimerAction(input.setTimer, context) }),
1966
- ...(input.setVariable != null && { setVariable: se_SetVariableAction(input.setVariable, context) }),
1967
- ...(input.sns != null && { sns: se_SNSTopicPublishAction(input.sns, context) }),
1968
- ...(input.sqs != null && { sqs: se_SqsAction(input.sqs, context) }),
1969
- };
1970
- };
1971
- const se_Actions = (input, context) => {
1972
- return input
1973
- .filter((e) => e != null)
1974
- .map((entry) => {
1975
- return se_Action(entry, context);
1976
- });
1977
- };
1978
- const se_AlarmAction = (input, context) => {
1979
- return {
1980
- ...(input.dynamoDB != null && { dynamoDB: se_DynamoDBAction(input.dynamoDB, context) }),
1981
- ...(input.dynamoDBv2 != null && { dynamoDBv2: se_DynamoDBv2Action(input.dynamoDBv2, context) }),
1982
- ...(input.firehose != null && { firehose: se_FirehoseAction(input.firehose, context) }),
1983
- ...(input.iotEvents != null && { iotEvents: se_IotEventsAction(input.iotEvents, context) }),
1984
- ...(input.iotSiteWise != null && { iotSiteWise: se_IotSiteWiseAction(input.iotSiteWise, context) }),
1985
- ...(input.iotTopicPublish != null && { iotTopicPublish: se_IotTopicPublishAction(input.iotTopicPublish, context) }),
1986
- ...(input.lambda != null && { lambda: se_LambdaAction(input.lambda, context) }),
1987
- ...(input.sns != null && { sns: se_SNSTopicPublishAction(input.sns, context) }),
1988
- ...(input.sqs != null && { sqs: se_SqsAction(input.sqs, context) }),
1989
- };
1990
- };
1991
- const se_AlarmActions = (input, context) => {
1992
- return input
1993
- .filter((e) => e != null)
1994
- .map((entry) => {
1995
- return se_AlarmAction(entry, context);
1996
- });
1997
- };
1998
- const se_AlarmCapabilities = (input, context) => {
1999
- return {
2000
- ...(input.acknowledgeFlow != null && { acknowledgeFlow: se_AcknowledgeFlow(input.acknowledgeFlow, context) }),
2001
- ...(input.initializationConfiguration != null && {
2002
- initializationConfiguration: se_InitializationConfiguration(input.initializationConfiguration, context),
2003
- }),
2004
- };
2005
- };
2006
- const se_AlarmEventActions = (input, context) => {
2007
- return {
2008
- ...(input.alarmActions != null && { alarmActions: se_AlarmActions(input.alarmActions, context) }),
2009
- };
2010
- };
2011
- const se_AlarmNotification = (input, context) => {
2012
- return {
2013
- ...(input.notificationActions != null && {
2014
- notificationActions: se_NotificationActions(input.notificationActions, context),
2015
- }),
2016
- };
2017
- };
2018
- const se_AlarmRule = (input, context) => {
2019
- return {
2020
- ...(input.simpleRule != null && { simpleRule: se_SimpleRule(input.simpleRule, context) }),
2021
- };
2022
- };
2023
- const se_AssetPropertyTimestamp = (input, context) => {
2024
- return {
2025
- ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }),
2026
- ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }),
2027
- };
2028
- };
2029
- const se_AssetPropertyValue = (input, context) => {
2030
- return {
2031
- ...(input.quality != null && { quality: input.quality }),
2032
- ...(input.timestamp != null && { timestamp: se_AssetPropertyTimestamp(input.timestamp, context) }),
2033
- ...(input.value != null && { value: se_AssetPropertyVariant(input.value, context) }),
2034
- };
2035
- };
2036
- const se_AssetPropertyVariant = (input, context) => {
2037
- return {
2038
- ...(input.booleanValue != null && { booleanValue: input.booleanValue }),
2039
- ...(input.doubleValue != null && { doubleValue: input.doubleValue }),
2040
- ...(input.integerValue != null && { integerValue: input.integerValue }),
2041
- ...(input.stringValue != null && { stringValue: input.stringValue }),
2042
- };
2043
- };
2044
- const se_Attribute = (input, context) => {
2045
- return {
2046
- ...(input.jsonPath != null && { jsonPath: input.jsonPath }),
2047
- };
2048
- };
2049
- const se_Attributes = (input, context) => {
2050
- return input
2051
- .filter((e) => e != null)
2052
- .map((entry) => {
2053
- return se_Attribute(entry, context);
2054
- });
2055
- };
2056
- const se_ClearTimerAction = (input, context) => {
2057
- return {
2058
- ...(input.timerName != null && { timerName: input.timerName }),
2059
- };
2060
- };
2061
- const se_DetectorDebugOption = (input, context) => {
2062
- return {
2063
- ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
2064
- ...(input.keyValue != null && { keyValue: input.keyValue }),
2065
- };
2066
- };
2067
- const se_DetectorDebugOptions = (input, context) => {
2068
- return input
2069
- .filter((e) => e != null)
2070
- .map((entry) => {
2071
- return se_DetectorDebugOption(entry, context);
2072
- });
2073
- };
2074
1872
  const se_DetectorModelDefinition = (input, context) => {
2075
- return {
2076
- ...(input.initialStateName != null && { initialStateName: input.initialStateName }),
2077
- ...(input.states != null && { states: se_States(input.states, context) }),
2078
- };
2079
- };
2080
- const se_DynamoDBAction = (input, context) => {
2081
- return {
2082
- ...(input.hashKeyField != null && { hashKeyField: input.hashKeyField }),
2083
- ...(input.hashKeyType != null && { hashKeyType: input.hashKeyType }),
2084
- ...(input.hashKeyValue != null && { hashKeyValue: input.hashKeyValue }),
2085
- ...(input.operation != null && { operation: input.operation }),
2086
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2087
- ...(input.payloadField != null && { payloadField: input.payloadField }),
2088
- ...(input.rangeKeyField != null && { rangeKeyField: input.rangeKeyField }),
2089
- ...(input.rangeKeyType != null && { rangeKeyType: input.rangeKeyType }),
2090
- ...(input.rangeKeyValue != null && { rangeKeyValue: input.rangeKeyValue }),
2091
- ...(input.tableName != null && { tableName: input.tableName }),
2092
- };
2093
- };
2094
- const se_DynamoDBv2Action = (input, context) => {
2095
- return {
2096
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2097
- ...(input.tableName != null && { tableName: input.tableName }),
2098
- };
2099
- };
2100
- const se_EmailConfiguration = (input, context) => {
2101
- return {
2102
- ...(input.content != null && { content: se_EmailContent(input.content, context) }),
2103
- ...(input.from != null && { from: input.from }),
2104
- ...(input.recipients != null && { recipients: se_EmailRecipients(input.recipients, context) }),
2105
- };
2106
- };
2107
- const se_EmailConfigurations = (input, context) => {
2108
- return input
2109
- .filter((e) => e != null)
2110
- .map((entry) => {
2111
- return se_EmailConfiguration(entry, context);
2112
- });
2113
- };
2114
- const se_EmailContent = (input, context) => {
2115
- return {
2116
- ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }),
2117
- ...(input.subject != null && { subject: input.subject }),
2118
- };
2119
- };
2120
- const se_EmailRecipients = (input, context) => {
2121
- return {
2122
- ...(input.to != null && { to: se_RecipientDetails(input.to, context) }),
2123
- };
2124
- };
2125
- const se_Event = (input, context) => {
2126
- return {
2127
- ...(input.actions != null && { actions: se_Actions(input.actions, context) }),
2128
- ...(input.condition != null && { condition: input.condition }),
2129
- ...(input.eventName != null && { eventName: input.eventName }),
2130
- };
2131
- };
2132
- const se_Events = (input, context) => {
2133
- return input
2134
- .filter((e) => e != null)
2135
- .map((entry) => {
2136
- return se_Event(entry, context);
2137
- });
2138
- };
2139
- const se_FirehoseAction = (input, context) => {
2140
- return {
2141
- ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }),
2142
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2143
- ...(input.separator != null && { separator: input.separator }),
2144
- };
2145
- };
2146
- const se_InitializationConfiguration = (input, context) => {
2147
- return {
2148
- ...(input.disabledOnInitialization != null && { disabledOnInitialization: input.disabledOnInitialization }),
2149
- };
2150
- };
2151
- const se_InputDefinition = (input, context) => {
2152
- return {
2153
- ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }),
2154
- };
2155
- };
2156
- const se_InputIdentifier = (input, context) => {
2157
- return {
2158
- ...(input.iotEventsInputIdentifier != null && {
2159
- iotEventsInputIdentifier: se_IotEventsInputIdentifier(input.iotEventsInputIdentifier, context),
2160
- }),
2161
- ...(input.iotSiteWiseInputIdentifier != null && {
2162
- iotSiteWiseInputIdentifier: se_IotSiteWiseInputIdentifier(input.iotSiteWiseInputIdentifier, context),
2163
- }),
2164
- };
2165
- };
2166
- const se_IotEventsAction = (input, context) => {
2167
- return {
2168
- ...(input.inputName != null && { inputName: input.inputName }),
2169
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2170
- };
2171
- };
2172
- const se_IotEventsInputIdentifier = (input, context) => {
2173
- return {
2174
- ...(input.inputName != null && { inputName: input.inputName }),
2175
- };
2176
- };
2177
- const se_IotSiteWiseAction = (input, context) => {
2178
- return {
2179
- ...(input.assetId != null && { assetId: input.assetId }),
2180
- ...(input.entryId != null && { entryId: input.entryId }),
2181
- ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
2182
- ...(input.propertyId != null && { propertyId: input.propertyId }),
2183
- ...(input.propertyValue != null && { propertyValue: se_AssetPropertyValue(input.propertyValue, context) }),
2184
- };
2185
- };
2186
- const se_IotSiteWiseAssetModelPropertyIdentifier = (input, context) => {
2187
- return {
2188
- ...(input.assetModelId != null && { assetModelId: input.assetModelId }),
2189
- ...(input.propertyId != null && { propertyId: input.propertyId }),
2190
- };
2191
- };
2192
- const se_IotSiteWiseInputIdentifier = (input, context) => {
2193
- return {
2194
- ...(input.iotSiteWiseAssetModelPropertyIdentifier != null && {
2195
- iotSiteWiseAssetModelPropertyIdentifier: se_IotSiteWiseAssetModelPropertyIdentifier(input.iotSiteWiseAssetModelPropertyIdentifier, context),
2196
- }),
2197
- };
2198
- };
2199
- const se_IotTopicPublishAction = (input, context) => {
2200
- return {
2201
- ...(input.mqttTopic != null && { mqttTopic: input.mqttTopic }),
2202
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2203
- };
2204
- };
2205
- const se_LambdaAction = (input, context) => {
2206
- return {
2207
- ...(input.functionArn != null && { functionArn: input.functionArn }),
2208
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2209
- };
2210
- };
2211
- const se_LoggingOptions = (input, context) => {
2212
- return {
2213
- ...(input.detectorDebugOptions != null && {
2214
- detectorDebugOptions: se_DetectorDebugOptions(input.detectorDebugOptions, context),
2215
- }),
2216
- ...(input.enabled != null && { enabled: input.enabled }),
2217
- ...(input.level != null && { level: input.level }),
2218
- ...(input.roleArn != null && { roleArn: input.roleArn }),
2219
- };
2220
- };
2221
- const se_NotificationAction = (input, context) => {
2222
- return {
2223
- ...(input.action != null && { action: se_NotificationTargetActions(input.action, context) }),
2224
- ...(input.emailConfigurations != null && {
2225
- emailConfigurations: se_EmailConfigurations(input.emailConfigurations, context),
2226
- }),
2227
- ...(input.smsConfigurations != null && {
2228
- smsConfigurations: se_SMSConfigurations(input.smsConfigurations, context),
2229
- }),
2230
- };
2231
- };
2232
- const se_NotificationActions = (input, context) => {
2233
- return input
2234
- .filter((e) => e != null)
2235
- .map((entry) => {
2236
- return se_NotificationAction(entry, context);
2237
- });
2238
- };
2239
- const se_NotificationTargetActions = (input, context) => {
2240
- return {
2241
- ...(input.lambdaAction != null && { lambdaAction: se_LambdaAction(input.lambdaAction, context) }),
2242
- };
2243
- };
2244
- const se_OnEnterLifecycle = (input, context) => {
2245
- return {
2246
- ...(input.events != null && { events: se_Events(input.events, context) }),
2247
- };
2248
- };
2249
- const se_OnExitLifecycle = (input, context) => {
2250
- return {
2251
- ...(input.events != null && { events: se_Events(input.events, context) }),
2252
- };
2253
- };
2254
- const se_OnInputLifecycle = (input, context) => {
2255
- return {
2256
- ...(input.events != null && { events: se_Events(input.events, context) }),
2257
- ...(input.transitionEvents != null && { transitionEvents: se_TransitionEvents(input.transitionEvents, context) }),
2258
- };
2259
- };
2260
- const se_Payload = (input, context) => {
2261
- return {
2262
- ...(input.contentExpression != null && { contentExpression: input.contentExpression }),
2263
- ...(input.type != null && { type: input.type }),
2264
- };
2265
- };
2266
- const se_RecipientDetail = (input, context) => {
2267
- return {
2268
- ...(input.ssoIdentity != null && { ssoIdentity: se_SSOIdentity(input.ssoIdentity, context) }),
2269
- };
2270
- };
2271
- const se_RecipientDetails = (input, context) => {
2272
- return input
2273
- .filter((e) => e != null)
2274
- .map((entry) => {
2275
- return se_RecipientDetail(entry, context);
2276
- });
2277
- };
2278
- const se_ResetTimerAction = (input, context) => {
2279
- return {
2280
- ...(input.timerName != null && { timerName: input.timerName }),
2281
- };
2282
- };
2283
- const se_SetTimerAction = (input, context) => {
2284
- return {
2285
- ...(input.durationExpression != null && { durationExpression: input.durationExpression }),
2286
- ...(input.seconds != null && { seconds: input.seconds }),
2287
- ...(input.timerName != null && { timerName: input.timerName }),
2288
- };
2289
- };
2290
- const se_SetVariableAction = (input, context) => {
2291
- return {
2292
- ...(input.value != null && { value: input.value }),
2293
- ...(input.variableName != null && { variableName: input.variableName }),
2294
- };
2295
- };
2296
- const se_SimpleRule = (input, context) => {
2297
- return {
2298
- ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2299
- ...(input.inputProperty != null && { inputProperty: input.inputProperty }),
2300
- ...(input.threshold != null && { threshold: input.threshold }),
2301
- };
2302
- };
2303
- const se_SMSConfiguration = (input, context) => {
2304
- return {
2305
- ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }),
2306
- ...(input.recipients != null && { recipients: se_RecipientDetails(input.recipients, context) }),
2307
- ...(input.senderId != null && { senderId: input.senderId }),
2308
- };
2309
- };
2310
- const se_SMSConfigurations = (input, context) => {
2311
- return input
2312
- .filter((e) => e != null)
2313
- .map((entry) => {
2314
- return se_SMSConfiguration(entry, context);
2315
- });
2316
- };
2317
- const se_SNSTopicPublishAction = (input, context) => {
2318
- return {
2319
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2320
- ...(input.targetArn != null && { targetArn: input.targetArn }),
2321
- };
2322
- };
2323
- const se_SqsAction = (input, context) => {
2324
- return {
2325
- ...(input.payload != null && { payload: se_Payload(input.payload, context) }),
2326
- ...(input.queueUrl != null && { queueUrl: input.queueUrl }),
2327
- ...(input.useBase64 != null && { useBase64: input.useBase64 }),
2328
- };
2329
- };
2330
- const se_SSOIdentity = (input, context) => {
2331
- return {
2332
- ...(input.identityStoreId != null && { identityStoreId: input.identityStoreId }),
2333
- ...(input.userId != null && { userId: input.userId }),
2334
- };
2335
- };
2336
- const se_State = (input, context) => {
2337
- return {
2338
- ...(input.onEnter != null && { onEnter: se_OnEnterLifecycle(input.onEnter, context) }),
2339
- ...(input.onExit != null && { onExit: se_OnExitLifecycle(input.onExit, context) }),
2340
- ...(input.onInput != null && { onInput: se_OnInputLifecycle(input.onInput, context) }),
2341
- ...(input.stateName != null && { stateName: input.stateName }),
2342
- };
2343
- };
2344
- const se_States = (input, context) => {
2345
- return input
2346
- .filter((e) => e != null)
2347
- .map((entry) => {
2348
- return se_State(entry, context);
2349
- });
2350
- };
2351
- const se_Tag = (input, context) => {
2352
- return {
2353
- ...(input.key != null && { key: input.key }),
2354
- ...(input.value != null && { value: input.value }),
2355
- };
2356
- };
2357
- const se_Tags = (input, context) => {
2358
- return input
2359
- .filter((e) => e != null)
2360
- .map((entry) => {
2361
- return se_Tag(entry, context);
2362
- });
2363
- };
2364
- const se_TransitionEvent = (input, context) => {
2365
- return {
2366
- ...(input.actions != null && { actions: se_Actions(input.actions, context) }),
2367
- ...(input.condition != null && { condition: input.condition }),
2368
- ...(input.eventName != null && { eventName: input.eventName }),
2369
- ...(input.nextState != null && { nextState: input.nextState }),
2370
- };
2371
- };
2372
- const se_TransitionEvents = (input, context) => {
2373
- return input
2374
- .filter((e) => e != null)
2375
- .map((entry) => {
2376
- return se_TransitionEvent(entry, context);
2377
- });
2378
- };
2379
- const de_AcknowledgeFlow = (output, context) => {
2380
- return {
2381
- enabled: __expectBoolean(output.enabled),
2382
- };
2383
- };
2384
- const de_Action = (output, context) => {
2385
- return {
2386
- clearTimer: output.clearTimer != null ? de_ClearTimerAction(output.clearTimer, context) : undefined,
2387
- dynamoDB: output.dynamoDB != null ? de_DynamoDBAction(output.dynamoDB, context) : undefined,
2388
- dynamoDBv2: output.dynamoDBv2 != null ? de_DynamoDBv2Action(output.dynamoDBv2, context) : undefined,
2389
- firehose: output.firehose != null ? de_FirehoseAction(output.firehose, context) : undefined,
2390
- iotEvents: output.iotEvents != null ? de_IotEventsAction(output.iotEvents, context) : undefined,
2391
- iotSiteWise: output.iotSiteWise != null ? de_IotSiteWiseAction(output.iotSiteWise, context) : undefined,
2392
- iotTopicPublish: output.iotTopicPublish != null ? de_IotTopicPublishAction(output.iotTopicPublish, context) : undefined,
2393
- lambda: output.lambda != null ? de_LambdaAction(output.lambda, context) : undefined,
2394
- resetTimer: output.resetTimer != null ? de_ResetTimerAction(output.resetTimer, context) : undefined,
2395
- setTimer: output.setTimer != null ? de_SetTimerAction(output.setTimer, context) : undefined,
2396
- setVariable: output.setVariable != null ? de_SetVariableAction(output.setVariable, context) : undefined,
2397
- sns: output.sns != null ? de_SNSTopicPublishAction(output.sns, context) : undefined,
2398
- sqs: output.sqs != null ? de_SqsAction(output.sqs, context) : undefined,
2399
- };
2400
- };
2401
- const de_Actions = (output, context) => {
2402
- const retVal = (output || [])
2403
- .filter((e) => e != null)
2404
- .map((entry) => {
2405
- if (entry === null) {
2406
- return null;
2407
- }
2408
- return de_Action(entry, context);
2409
- });
2410
- return retVal;
2411
- };
2412
- const de_AlarmAction = (output, context) => {
2413
- return {
2414
- dynamoDB: output.dynamoDB != null ? de_DynamoDBAction(output.dynamoDB, context) : undefined,
2415
- dynamoDBv2: output.dynamoDBv2 != null ? de_DynamoDBv2Action(output.dynamoDBv2, context) : undefined,
2416
- firehose: output.firehose != null ? de_FirehoseAction(output.firehose, context) : undefined,
2417
- iotEvents: output.iotEvents != null ? de_IotEventsAction(output.iotEvents, context) : undefined,
2418
- iotSiteWise: output.iotSiteWise != null ? de_IotSiteWiseAction(output.iotSiteWise, context) : undefined,
2419
- iotTopicPublish: output.iotTopicPublish != null ? de_IotTopicPublishAction(output.iotTopicPublish, context) : undefined,
2420
- lambda: output.lambda != null ? de_LambdaAction(output.lambda, context) : undefined,
2421
- sns: output.sns != null ? de_SNSTopicPublishAction(output.sns, context) : undefined,
2422
- sqs: output.sqs != null ? de_SqsAction(output.sqs, context) : undefined,
2423
- };
2424
- };
2425
- const de_AlarmActions = (output, context) => {
2426
- const retVal = (output || [])
2427
- .filter((e) => e != null)
2428
- .map((entry) => {
2429
- if (entry === null) {
2430
- return null;
2431
- }
2432
- return de_AlarmAction(entry, context);
1873
+ return take(input, {
1874
+ initialStateName: [],
1875
+ states: _json,
2433
1876
  });
2434
- return retVal;
2435
- };
2436
- const de_AlarmCapabilities = (output, context) => {
2437
- return {
2438
- acknowledgeFlow: output.acknowledgeFlow != null ? de_AcknowledgeFlow(output.acknowledgeFlow, context) : undefined,
2439
- initializationConfiguration: output.initializationConfiguration != null
2440
- ? de_InitializationConfiguration(output.initializationConfiguration, context)
2441
- : undefined,
2442
- };
2443
- };
2444
- const de_AlarmEventActions = (output, context) => {
2445
- return {
2446
- alarmActions: output.alarmActions != null ? de_AlarmActions(output.alarmActions, context) : undefined,
2447
- };
2448
1877
  };
2449
1878
  const de_AlarmModelSummaries = (output, context) => {
2450
1879
  const retVal = (output || [])
2451
1880
  .filter((e) => e != null)
2452
1881
  .map((entry) => {
2453
- if (entry === null) {
2454
- return null;
2455
- }
2456
1882
  return de_AlarmModelSummary(entry, context);
2457
1883
  });
2458
1884
  return retVal;
2459
1885
  };
2460
1886
  const de_AlarmModelSummary = (output, context) => {
2461
- return {
2462
- alarmModelDescription: __expectString(output.alarmModelDescription),
2463
- alarmModelName: __expectString(output.alarmModelName),
2464
- creationTime: output.creationTime != null
2465
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2466
- : undefined,
2467
- };
1887
+ return take(output, {
1888
+ alarmModelDescription: __expectString,
1889
+ alarmModelName: __expectString,
1890
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1891
+ });
2468
1892
  };
2469
1893
  const de_AlarmModelVersionSummaries = (output, context) => {
2470
1894
  const retVal = (output || [])
2471
1895
  .filter((e) => e != null)
2472
1896
  .map((entry) => {
2473
- if (entry === null) {
2474
- return null;
2475
- }
2476
1897
  return de_AlarmModelVersionSummary(entry, context);
2477
1898
  });
2478
1899
  return retVal;
2479
1900
  };
2480
1901
  const de_AlarmModelVersionSummary = (output, context) => {
2481
- return {
2482
- alarmModelArn: __expectString(output.alarmModelArn),
2483
- alarmModelName: __expectString(output.alarmModelName),
2484
- alarmModelVersion: __expectString(output.alarmModelVersion),
2485
- creationTime: output.creationTime != null
2486
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2487
- : undefined,
2488
- lastUpdateTime: output.lastUpdateTime != null
2489
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
2490
- : undefined,
2491
- roleArn: __expectString(output.roleArn),
2492
- status: __expectString(output.status),
2493
- statusMessage: __expectString(output.statusMessage),
2494
- };
2495
- };
2496
- const de_AlarmNotification = (output, context) => {
2497
- return {
2498
- notificationActions: output.notificationActions != null ? de_NotificationActions(output.notificationActions, context) : undefined,
2499
- };
2500
- };
2501
- const de_AlarmRule = (output, context) => {
2502
- return {
2503
- simpleRule: output.simpleRule != null ? de_SimpleRule(output.simpleRule, context) : undefined,
2504
- };
2505
- };
2506
- const de_AnalysisResult = (output, context) => {
2507
- return {
2508
- level: __expectString(output.level),
2509
- locations: output.locations != null ? de_AnalysisResultLocations(output.locations, context) : undefined,
2510
- message: __expectString(output.message),
2511
- type: __expectString(output.type),
2512
- };
2513
- };
2514
- const de_AnalysisResultLocation = (output, context) => {
2515
- return {
2516
- path: __expectString(output.path),
2517
- };
2518
- };
2519
- const de_AnalysisResultLocations = (output, context) => {
2520
- const retVal = (output || [])
2521
- .filter((e) => e != null)
2522
- .map((entry) => {
2523
- if (entry === null) {
2524
- return null;
2525
- }
2526
- return de_AnalysisResultLocation(entry, context);
1902
+ return take(output, {
1903
+ alarmModelArn: __expectString,
1904
+ alarmModelName: __expectString,
1905
+ alarmModelVersion: __expectString,
1906
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1907
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1908
+ roleArn: __expectString,
1909
+ status: __expectString,
1910
+ statusMessage: __expectString,
2527
1911
  });
2528
- return retVal;
2529
- };
2530
- const de_AnalysisResults = (output, context) => {
2531
- const retVal = (output || [])
2532
- .filter((e) => e != null)
2533
- .map((entry) => {
2534
- if (entry === null) {
2535
- return null;
2536
- }
2537
- return de_AnalysisResult(entry, context);
2538
- });
2539
- return retVal;
2540
- };
2541
- const de_AssetPropertyTimestamp = (output, context) => {
2542
- return {
2543
- offsetInNanos: __expectString(output.offsetInNanos),
2544
- timeInSeconds: __expectString(output.timeInSeconds),
2545
- };
2546
- };
2547
- const de_AssetPropertyValue = (output, context) => {
2548
- return {
2549
- quality: __expectString(output.quality),
2550
- timestamp: output.timestamp != null ? de_AssetPropertyTimestamp(output.timestamp, context) : undefined,
2551
- value: output.value != null ? de_AssetPropertyVariant(output.value, context) : undefined,
2552
- };
2553
- };
2554
- const de_AssetPropertyVariant = (output, context) => {
2555
- return {
2556
- booleanValue: __expectString(output.booleanValue),
2557
- doubleValue: __expectString(output.doubleValue),
2558
- integerValue: __expectString(output.integerValue),
2559
- stringValue: __expectString(output.stringValue),
2560
- };
2561
- };
2562
- const de_Attribute = (output, context) => {
2563
- return {
2564
- jsonPath: __expectString(output.jsonPath),
2565
- };
2566
- };
2567
- const de_Attributes = (output, context) => {
2568
- const retVal = (output || [])
2569
- .filter((e) => e != null)
2570
- .map((entry) => {
2571
- if (entry === null) {
2572
- return null;
2573
- }
2574
- return de_Attribute(entry, context);
2575
- });
2576
- return retVal;
2577
- };
2578
- const de_ClearTimerAction = (output, context) => {
2579
- return {
2580
- timerName: __expectString(output.timerName),
2581
- };
2582
- };
2583
- const de_DetectorDebugOption = (output, context) => {
2584
- return {
2585
- detectorModelName: __expectString(output.detectorModelName),
2586
- keyValue: __expectString(output.keyValue),
2587
- };
2588
- };
2589
- const de_DetectorDebugOptions = (output, context) => {
2590
- const retVal = (output || [])
2591
- .filter((e) => e != null)
2592
- .map((entry) => {
2593
- if (entry === null) {
2594
- return null;
2595
- }
2596
- return de_DetectorDebugOption(entry, context);
2597
- });
2598
- return retVal;
2599
1912
  };
2600
1913
  const de_DetectorModel = (output, context) => {
2601
- return {
2602
- detectorModelConfiguration: output.detectorModelConfiguration != null
2603
- ? de_DetectorModelConfiguration(output.detectorModelConfiguration, context)
2604
- : undefined,
2605
- detectorModelDefinition: output.detectorModelDefinition != null
2606
- ? de_DetectorModelDefinition(output.detectorModelDefinition, context)
2607
- : undefined,
2608
- };
1914
+ return take(output, {
1915
+ detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context),
1916
+ detectorModelDefinition: (_) => de_DetectorModelDefinition(_, context),
1917
+ });
2609
1918
  };
2610
1919
  const de_DetectorModelConfiguration = (output, context) => {
2611
- return {
2612
- creationTime: output.creationTime != null
2613
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2614
- : undefined,
2615
- detectorModelArn: __expectString(output.detectorModelArn),
2616
- detectorModelDescription: __expectString(output.detectorModelDescription),
2617
- detectorModelName: __expectString(output.detectorModelName),
2618
- detectorModelVersion: __expectString(output.detectorModelVersion),
2619
- evaluationMethod: __expectString(output.evaluationMethod),
2620
- key: __expectString(output.key),
2621
- lastUpdateTime: output.lastUpdateTime != null
2622
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
2623
- : undefined,
2624
- roleArn: __expectString(output.roleArn),
2625
- status: __expectString(output.status),
2626
- };
1920
+ return take(output, {
1921
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1922
+ detectorModelArn: __expectString,
1923
+ detectorModelDescription: __expectString,
1924
+ detectorModelName: __expectString,
1925
+ detectorModelVersion: __expectString,
1926
+ evaluationMethod: __expectString,
1927
+ key: __expectString,
1928
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1929
+ roleArn: __expectString,
1930
+ status: __expectString,
1931
+ });
2627
1932
  };
2628
1933
  const de_DetectorModelDefinition = (output, context) => {
2629
- return {
2630
- initialStateName: __expectString(output.initialStateName),
2631
- states: output.states != null ? de_States(output.states, context) : undefined,
2632
- };
1934
+ return take(output, {
1935
+ initialStateName: __expectString,
1936
+ states: _json,
1937
+ });
2633
1938
  };
2634
1939
  const de_DetectorModelSummaries = (output, context) => {
2635
1940
  const retVal = (output || [])
2636
1941
  .filter((e) => e != null)
2637
1942
  .map((entry) => {
2638
- if (entry === null) {
2639
- return null;
2640
- }
2641
1943
  return de_DetectorModelSummary(entry, context);
2642
1944
  });
2643
1945
  return retVal;
2644
1946
  };
2645
1947
  const de_DetectorModelSummary = (output, context) => {
2646
- return {
2647
- creationTime: output.creationTime != null
2648
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2649
- : undefined,
2650
- detectorModelDescription: __expectString(output.detectorModelDescription),
2651
- detectorModelName: __expectString(output.detectorModelName),
2652
- };
1948
+ return take(output, {
1949
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1950
+ detectorModelDescription: __expectString,
1951
+ detectorModelName: __expectString,
1952
+ });
2653
1953
  };
2654
1954
  const de_DetectorModelVersionSummaries = (output, context) => {
2655
1955
  const retVal = (output || [])
2656
1956
  .filter((e) => e != null)
2657
1957
  .map((entry) => {
2658
- if (entry === null) {
2659
- return null;
2660
- }
2661
1958
  return de_DetectorModelVersionSummary(entry, context);
2662
1959
  });
2663
1960
  return retVal;
2664
1961
  };
2665
1962
  const de_DetectorModelVersionSummary = (output, context) => {
2666
- return {
2667
- creationTime: output.creationTime != null
2668
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2669
- : undefined,
2670
- detectorModelArn: __expectString(output.detectorModelArn),
2671
- detectorModelName: __expectString(output.detectorModelName),
2672
- detectorModelVersion: __expectString(output.detectorModelVersion),
2673
- evaluationMethod: __expectString(output.evaluationMethod),
2674
- lastUpdateTime: output.lastUpdateTime != null
2675
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
2676
- : undefined,
2677
- roleArn: __expectString(output.roleArn),
2678
- status: __expectString(output.status),
2679
- };
2680
- };
2681
- const de_DynamoDBAction = (output, context) => {
2682
- return {
2683
- hashKeyField: __expectString(output.hashKeyField),
2684
- hashKeyType: __expectString(output.hashKeyType),
2685
- hashKeyValue: __expectString(output.hashKeyValue),
2686
- operation: __expectString(output.operation),
2687
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2688
- payloadField: __expectString(output.payloadField),
2689
- rangeKeyField: __expectString(output.rangeKeyField),
2690
- rangeKeyType: __expectString(output.rangeKeyType),
2691
- rangeKeyValue: __expectString(output.rangeKeyValue),
2692
- tableName: __expectString(output.tableName),
2693
- };
2694
- };
2695
- const de_DynamoDBv2Action = (output, context) => {
2696
- return {
2697
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2698
- tableName: __expectString(output.tableName),
2699
- };
2700
- };
2701
- const de_EmailConfiguration = (output, context) => {
2702
- return {
2703
- content: output.content != null ? de_EmailContent(output.content, context) : undefined,
2704
- from: __expectString(output.from),
2705
- recipients: output.recipients != null ? de_EmailRecipients(output.recipients, context) : undefined,
2706
- };
2707
- };
2708
- const de_EmailConfigurations = (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_EmailConfiguration(entry, context);
2716
- });
2717
- return retVal;
2718
- };
2719
- const de_EmailContent = (output, context) => {
2720
- return {
2721
- additionalMessage: __expectString(output.additionalMessage),
2722
- subject: __expectString(output.subject),
2723
- };
2724
- };
2725
- const de_EmailRecipients = (output, context) => {
2726
- return {
2727
- to: output.to != null ? de_RecipientDetails(output.to, context) : undefined,
2728
- };
2729
- };
2730
- const de_Event = (output, context) => {
2731
- return {
2732
- actions: output.actions != null ? de_Actions(output.actions, context) : undefined,
2733
- condition: __expectString(output.condition),
2734
- eventName: __expectString(output.eventName),
2735
- };
2736
- };
2737
- const de_Events = (output, context) => {
2738
- const retVal = (output || [])
2739
- .filter((e) => e != null)
2740
- .map((entry) => {
2741
- if (entry === null) {
2742
- return null;
2743
- }
2744
- return de_Event(entry, context);
1963
+ return take(output, {
1964
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1965
+ detectorModelArn: __expectString,
1966
+ detectorModelName: __expectString,
1967
+ detectorModelVersion: __expectString,
1968
+ evaluationMethod: __expectString,
1969
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1970
+ roleArn: __expectString,
1971
+ status: __expectString,
2745
1972
  });
2746
- return retVal;
2747
- };
2748
- const de_FirehoseAction = (output, context) => {
2749
- return {
2750
- deliveryStreamName: __expectString(output.deliveryStreamName),
2751
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2752
- separator: __expectString(output.separator),
2753
- };
2754
- };
2755
- const de_InitializationConfiguration = (output, context) => {
2756
- return {
2757
- disabledOnInitialization: __expectBoolean(output.disabledOnInitialization),
2758
- };
2759
1973
  };
2760
1974
  const de_Input = (output, context) => {
2761
- return {
2762
- inputConfiguration: output.inputConfiguration != null ? de_InputConfiguration(output.inputConfiguration, context) : undefined,
2763
- inputDefinition: output.inputDefinition != null ? de_InputDefinition(output.inputDefinition, context) : undefined,
2764
- };
1975
+ return take(output, {
1976
+ inputConfiguration: (_) => de_InputConfiguration(_, context),
1977
+ inputDefinition: _json,
1978
+ });
2765
1979
  };
2766
1980
  const de_InputConfiguration = (output, context) => {
2767
- return {
2768
- creationTime: output.creationTime != null
2769
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2770
- : undefined,
2771
- inputArn: __expectString(output.inputArn),
2772
- inputDescription: __expectString(output.inputDescription),
2773
- inputName: __expectString(output.inputName),
2774
- lastUpdateTime: output.lastUpdateTime != null
2775
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
2776
- : undefined,
2777
- status: __expectString(output.status),
2778
- };
2779
- };
2780
- const de_InputDefinition = (output, context) => {
2781
- return {
2782
- attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined,
2783
- };
1981
+ return take(output, {
1982
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1983
+ inputArn: __expectString,
1984
+ inputDescription: __expectString,
1985
+ inputName: __expectString,
1986
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1987
+ status: __expectString,
1988
+ });
2784
1989
  };
2785
1990
  const de_InputSummaries = (output, context) => {
2786
1991
  const retVal = (output || [])
2787
1992
  .filter((e) => e != null)
2788
1993
  .map((entry) => {
2789
- if (entry === null) {
2790
- return null;
2791
- }
2792
1994
  return de_InputSummary(entry, context);
2793
1995
  });
2794
1996
  return retVal;
2795
1997
  };
2796
1998
  const de_InputSummary = (output, context) => {
2797
- return {
2798
- creationTime: output.creationTime != null
2799
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
2800
- : undefined,
2801
- inputArn: __expectString(output.inputArn),
2802
- inputDescription: __expectString(output.inputDescription),
2803
- inputName: __expectString(output.inputName),
2804
- lastUpdateTime: output.lastUpdateTime != null
2805
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime)))
2806
- : undefined,
2807
- status: __expectString(output.status),
2808
- };
2809
- };
2810
- const de_IotEventsAction = (output, context) => {
2811
- return {
2812
- inputName: __expectString(output.inputName),
2813
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2814
- };
2815
- };
2816
- const de_IotSiteWiseAction = (output, context) => {
2817
- return {
2818
- assetId: __expectString(output.assetId),
2819
- entryId: __expectString(output.entryId),
2820
- propertyAlias: __expectString(output.propertyAlias),
2821
- propertyId: __expectString(output.propertyId),
2822
- propertyValue: output.propertyValue != null ? de_AssetPropertyValue(output.propertyValue, context) : undefined,
2823
- };
2824
- };
2825
- const de_IotTopicPublishAction = (output, context) => {
2826
- return {
2827
- mqttTopic: __expectString(output.mqttTopic),
2828
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2829
- };
2830
- };
2831
- const de_LambdaAction = (output, context) => {
2832
- return {
2833
- functionArn: __expectString(output.functionArn),
2834
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2835
- };
2836
- };
2837
- const de_LoggingOptions = (output, context) => {
2838
- return {
2839
- detectorDebugOptions: output.detectorDebugOptions != null ? de_DetectorDebugOptions(output.detectorDebugOptions, context) : undefined,
2840
- enabled: __expectBoolean(output.enabled),
2841
- level: __expectString(output.level),
2842
- roleArn: __expectString(output.roleArn),
2843
- };
2844
- };
2845
- const de_NotificationAction = (output, context) => {
2846
- return {
2847
- action: output.action != null ? de_NotificationTargetActions(output.action, context) : undefined,
2848
- emailConfigurations: output.emailConfigurations != null ? de_EmailConfigurations(output.emailConfigurations, context) : undefined,
2849
- smsConfigurations: output.smsConfigurations != null ? de_SMSConfigurations(output.smsConfigurations, context) : undefined,
2850
- };
2851
- };
2852
- const de_NotificationActions = (output, context) => {
2853
- const retVal = (output || [])
2854
- .filter((e) => e != null)
2855
- .map((entry) => {
2856
- if (entry === null) {
2857
- return null;
2858
- }
2859
- return de_NotificationAction(entry, context);
1999
+ return take(output, {
2000
+ creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2001
+ inputArn: __expectString,
2002
+ inputDescription: __expectString,
2003
+ inputName: __expectString,
2004
+ lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2005
+ status: __expectString,
2860
2006
  });
2861
- return retVal;
2862
- };
2863
- const de_NotificationTargetActions = (output, context) => {
2864
- return {
2865
- lambdaAction: output.lambdaAction != null ? de_LambdaAction(output.lambdaAction, context) : undefined,
2866
- };
2867
- };
2868
- const de_OnEnterLifecycle = (output, context) => {
2869
- return {
2870
- events: output.events != null ? de_Events(output.events, context) : undefined,
2871
- };
2872
- };
2873
- const de_OnExitLifecycle = (output, context) => {
2874
- return {
2875
- events: output.events != null ? de_Events(output.events, context) : undefined,
2876
- };
2877
- };
2878
- const de_OnInputLifecycle = (output, context) => {
2879
- return {
2880
- events: output.events != null ? de_Events(output.events, context) : undefined,
2881
- transitionEvents: output.transitionEvents != null ? de_TransitionEvents(output.transitionEvents, context) : undefined,
2882
- };
2883
- };
2884
- const de_Payload = (output, context) => {
2885
- return {
2886
- contentExpression: __expectString(output.contentExpression),
2887
- type: __expectString(output.type),
2888
- };
2889
- };
2890
- const de_RecipientDetail = (output, context) => {
2891
- return {
2892
- ssoIdentity: output.ssoIdentity != null ? de_SSOIdentity(output.ssoIdentity, context) : undefined,
2893
- };
2894
- };
2895
- const de_RecipientDetails = (output, context) => {
2896
- const retVal = (output || [])
2897
- .filter((e) => e != null)
2898
- .map((entry) => {
2899
- if (entry === null) {
2900
- return null;
2901
- }
2902
- return de_RecipientDetail(entry, context);
2903
- });
2904
- return retVal;
2905
- };
2906
- const de_ResetTimerAction = (output, context) => {
2907
- return {
2908
- timerName: __expectString(output.timerName),
2909
- };
2910
- };
2911
- const de_RoutedResource = (output, context) => {
2912
- return {
2913
- arn: __expectString(output.arn),
2914
- name: __expectString(output.name),
2915
- };
2916
- };
2917
- const de_RoutedResources = (output, context) => {
2918
- const retVal = (output || [])
2919
- .filter((e) => e != null)
2920
- .map((entry) => {
2921
- if (entry === null) {
2922
- return null;
2923
- }
2924
- return de_RoutedResource(entry, context);
2925
- });
2926
- return retVal;
2927
- };
2928
- const de_SetTimerAction = (output, context) => {
2929
- return {
2930
- durationExpression: __expectString(output.durationExpression),
2931
- seconds: __expectInt32(output.seconds),
2932
- timerName: __expectString(output.timerName),
2933
- };
2934
- };
2935
- const de_SetVariableAction = (output, context) => {
2936
- return {
2937
- value: __expectString(output.value),
2938
- variableName: __expectString(output.variableName),
2939
- };
2940
- };
2941
- const de_SimpleRule = (output, context) => {
2942
- return {
2943
- comparisonOperator: __expectString(output.comparisonOperator),
2944
- inputProperty: __expectString(output.inputProperty),
2945
- threshold: __expectString(output.threshold),
2946
- };
2947
- };
2948
- const de_SMSConfiguration = (output, context) => {
2949
- return {
2950
- additionalMessage: __expectString(output.additionalMessage),
2951
- recipients: output.recipients != null ? de_RecipientDetails(output.recipients, context) : undefined,
2952
- senderId: __expectString(output.senderId),
2953
- };
2954
- };
2955
- const de_SMSConfigurations = (output, context) => {
2956
- const retVal = (output || [])
2957
- .filter((e) => e != null)
2958
- .map((entry) => {
2959
- if (entry === null) {
2960
- return null;
2961
- }
2962
- return de_SMSConfiguration(entry, context);
2963
- });
2964
- return retVal;
2965
- };
2966
- const de_SNSTopicPublishAction = (output, context) => {
2967
- return {
2968
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2969
- targetArn: __expectString(output.targetArn),
2970
- };
2971
- };
2972
- const de_SqsAction = (output, context) => {
2973
- return {
2974
- payload: output.payload != null ? de_Payload(output.payload, context) : undefined,
2975
- queueUrl: __expectString(output.queueUrl),
2976
- useBase64: __expectBoolean(output.useBase64),
2977
- };
2978
- };
2979
- const de_SSOIdentity = (output, context) => {
2980
- return {
2981
- identityStoreId: __expectString(output.identityStoreId),
2982
- userId: __expectString(output.userId),
2983
- };
2984
- };
2985
- const de_State = (output, context) => {
2986
- return {
2987
- onEnter: output.onEnter != null ? de_OnEnterLifecycle(output.onEnter, context) : undefined,
2988
- onExit: output.onExit != null ? de_OnExitLifecycle(output.onExit, context) : undefined,
2989
- onInput: output.onInput != null ? de_OnInputLifecycle(output.onInput, context) : undefined,
2990
- stateName: __expectString(output.stateName),
2991
- };
2992
- };
2993
- const de_States = (output, context) => {
2994
- const retVal = (output || [])
2995
- .filter((e) => e != null)
2996
- .map((entry) => {
2997
- if (entry === null) {
2998
- return null;
2999
- }
3000
- return de_State(entry, context);
3001
- });
3002
- return retVal;
3003
- };
3004
- const de_Tag = (output, context) => {
3005
- return {
3006
- key: __expectString(output.key),
3007
- value: __expectString(output.value),
3008
- };
3009
- };
3010
- const de_Tags = (output, context) => {
3011
- const retVal = (output || [])
3012
- .filter((e) => e != null)
3013
- .map((entry) => {
3014
- if (entry === null) {
3015
- return null;
3016
- }
3017
- return de_Tag(entry, context);
3018
- });
3019
- return retVal;
3020
- };
3021
- const de_TransitionEvent = (output, context) => {
3022
- return {
3023
- actions: output.actions != null ? de_Actions(output.actions, context) : undefined,
3024
- condition: __expectString(output.condition),
3025
- eventName: __expectString(output.eventName),
3026
- nextState: __expectString(output.nextState),
3027
- };
3028
- };
3029
- const de_TransitionEvents = (output, context) => {
3030
- const retVal = (output || [])
3031
- .filter((e) => e != null)
3032
- .map((entry) => {
3033
- if (entry === null) {
3034
- return null;
3035
- }
3036
- return de_TransitionEvent(entry, context);
3037
- });
3038
- return retVal;
3039
2007
  };
3040
2008
  const deserializeMetadata = (output) => ({
3041
2009
  httpStatusCode: output.statusCode,