@aws-sdk/client-iot-events 3.118.1 → 3.128.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.
@@ -14,28 +14,22 @@ const serializeAws_restJson1CreateAlarmModelCommand = async (input, context) =>
14
14
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/alarm-models";
15
15
  let body;
16
16
  body = JSON.stringify({
17
- ...(input.alarmCapabilities !== undefined &&
18
- input.alarmCapabilities !== null && {
17
+ ...(input.alarmCapabilities != null && {
19
18
  alarmCapabilities: serializeAws_restJson1AlarmCapabilities(input.alarmCapabilities, context),
20
19
  }),
21
- ...(input.alarmEventActions !== undefined &&
22
- input.alarmEventActions !== null && {
20
+ ...(input.alarmEventActions != null && {
23
21
  alarmEventActions: serializeAws_restJson1AlarmEventActions(input.alarmEventActions, context),
24
22
  }),
25
- ...(input.alarmModelDescription !== undefined &&
26
- input.alarmModelDescription !== null && { alarmModelDescription: input.alarmModelDescription }),
27
- ...(input.alarmModelName !== undefined &&
28
- input.alarmModelName !== null && { alarmModelName: input.alarmModelName }),
29
- ...(input.alarmNotification !== undefined &&
30
- input.alarmNotification !== null && {
23
+ ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }),
24
+ ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }),
25
+ ...(input.alarmNotification != null && {
31
26
  alarmNotification: serializeAws_restJson1AlarmNotification(input.alarmNotification, context),
32
27
  }),
33
- ...(input.alarmRule !== undefined &&
34
- input.alarmRule !== null && { alarmRule: serializeAws_restJson1AlarmRule(input.alarmRule, context) }),
35
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
36
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
37
- ...(input.severity !== undefined && input.severity !== null && { severity: input.severity }),
38
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
28
+ ...(input.alarmRule != null && { alarmRule: serializeAws_restJson1AlarmRule(input.alarmRule, context) }),
29
+ ...(input.key != null && { key: input.key }),
30
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
31
+ ...(input.severity != null && { severity: input.severity }),
32
+ ...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
39
33
  });
40
34
  return new protocol_http_1.HttpRequest({
41
35
  protocol,
@@ -56,19 +50,15 @@ const serializeAws_restJson1CreateDetectorModelCommand = async (input, context)
56
50
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/detector-models";
57
51
  let body;
58
52
  body = JSON.stringify({
59
- ...(input.detectorModelDefinition !== undefined &&
60
- input.detectorModelDefinition !== null && {
53
+ ...(input.detectorModelDefinition != null && {
61
54
  detectorModelDefinition: serializeAws_restJson1DetectorModelDefinition(input.detectorModelDefinition, context),
62
55
  }),
63
- ...(input.detectorModelDescription !== undefined &&
64
- input.detectorModelDescription !== null && { detectorModelDescription: input.detectorModelDescription }),
65
- ...(input.detectorModelName !== undefined &&
66
- input.detectorModelName !== null && { detectorModelName: input.detectorModelName }),
67
- ...(input.evaluationMethod !== undefined &&
68
- input.evaluationMethod !== null && { evaluationMethod: input.evaluationMethod }),
69
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
70
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
71
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
56
+ ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }),
57
+ ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
58
+ ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }),
59
+ ...(input.key != null && { key: input.key }),
60
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
61
+ ...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
72
62
  });
73
63
  return new protocol_http_1.HttpRequest({
74
64
  protocol,
@@ -89,14 +79,12 @@ const serializeAws_restJson1CreateInputCommand = async (input, context) => {
89
79
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/inputs";
90
80
  let body;
91
81
  body = JSON.stringify({
92
- ...(input.inputDefinition !== undefined &&
93
- input.inputDefinition !== null && {
82
+ ...(input.inputDefinition != null && {
94
83
  inputDefinition: serializeAws_restJson1InputDefinition(input.inputDefinition, context),
95
84
  }),
96
- ...(input.inputDescription !== undefined &&
97
- input.inputDescription !== null && { inputDescription: input.inputDescription }),
98
- ...(input.inputName !== undefined && input.inputName !== null && { inputName: input.inputName }),
99
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
85
+ ...(input.inputDescription != null && { inputDescription: input.inputDescription }),
86
+ ...(input.inputName != null && { inputName: input.inputName }),
87
+ ...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
100
88
  });
101
89
  return new protocol_http_1.HttpRequest({
102
90
  protocol,
@@ -463,12 +451,11 @@ const serializeAws_restJson1ListInputRoutingsCommand = async (input, context) =>
463
451
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/input-routings";
464
452
  let body;
465
453
  body = JSON.stringify({
466
- ...(input.inputIdentifier !== undefined &&
467
- input.inputIdentifier !== null && {
454
+ ...(input.inputIdentifier != null && {
468
455
  inputIdentifier: serializeAws_restJson1InputIdentifier(input.inputIdentifier, context),
469
456
  }),
470
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
471
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
457
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
458
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
472
459
  });
473
460
  return new protocol_http_1.HttpRequest({
474
461
  protocol,
@@ -530,8 +517,7 @@ const serializeAws_restJson1PutLoggingOptionsCommand = async (input, context) =>
530
517
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logging";
531
518
  let body;
532
519
  body = JSON.stringify({
533
- ...(input.loggingOptions !== undefined &&
534
- input.loggingOptions !== null && {
520
+ ...(input.loggingOptions != null && {
535
521
  loggingOptions: serializeAws_restJson1LoggingOptions(input.loggingOptions, context),
536
522
  }),
537
523
  });
@@ -554,8 +540,7 @@ const serializeAws_restJson1StartDetectorModelAnalysisCommand = async (input, co
554
540
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/analysis/detector-models";
555
541
  let body;
556
542
  body = JSON.stringify({
557
- ...(input.detectorModelDefinition !== undefined &&
558
- input.detectorModelDefinition !== null && {
543
+ ...(input.detectorModelDefinition != null && {
559
544
  detectorModelDefinition: serializeAws_restJson1DetectorModelDefinition(input.detectorModelDefinition, context),
560
545
  }),
561
546
  });
@@ -581,7 +566,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
581
566
  };
582
567
  let body;
583
568
  body = JSON.stringify({
584
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
569
+ ...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
585
570
  });
586
571
  return new protocol_http_1.HttpRequest({
587
572
  protocol,
@@ -634,24 +619,19 @@ const serializeAws_restJson1UpdateAlarmModelCommand = async (input, context) =>
634
619
  }
635
620
  let body;
636
621
  body = JSON.stringify({
637
- ...(input.alarmCapabilities !== undefined &&
638
- input.alarmCapabilities !== null && {
622
+ ...(input.alarmCapabilities != null && {
639
623
  alarmCapabilities: serializeAws_restJson1AlarmCapabilities(input.alarmCapabilities, context),
640
624
  }),
641
- ...(input.alarmEventActions !== undefined &&
642
- input.alarmEventActions !== null && {
625
+ ...(input.alarmEventActions != null && {
643
626
  alarmEventActions: serializeAws_restJson1AlarmEventActions(input.alarmEventActions, context),
644
627
  }),
645
- ...(input.alarmModelDescription !== undefined &&
646
- input.alarmModelDescription !== null && { alarmModelDescription: input.alarmModelDescription }),
647
- ...(input.alarmNotification !== undefined &&
648
- input.alarmNotification !== null && {
628
+ ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }),
629
+ ...(input.alarmNotification != null && {
649
630
  alarmNotification: serializeAws_restJson1AlarmNotification(input.alarmNotification, context),
650
631
  }),
651
- ...(input.alarmRule !== undefined &&
652
- input.alarmRule !== null && { alarmRule: serializeAws_restJson1AlarmRule(input.alarmRule, context) }),
653
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
654
- ...(input.severity !== undefined && input.severity !== null && { severity: input.severity }),
632
+ ...(input.alarmRule != null && { alarmRule: serializeAws_restJson1AlarmRule(input.alarmRule, context) }),
633
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
634
+ ...(input.severity != null && { severity: input.severity }),
655
635
  });
656
636
  return new protocol_http_1.HttpRequest({
657
637
  protocol,
@@ -682,15 +662,12 @@ const serializeAws_restJson1UpdateDetectorModelCommand = async (input, context)
682
662
  }
683
663
  let body;
684
664
  body = JSON.stringify({
685
- ...(input.detectorModelDefinition !== undefined &&
686
- input.detectorModelDefinition !== null && {
665
+ ...(input.detectorModelDefinition != null && {
687
666
  detectorModelDefinition: serializeAws_restJson1DetectorModelDefinition(input.detectorModelDefinition, context),
688
667
  }),
689
- ...(input.detectorModelDescription !== undefined &&
690
- input.detectorModelDescription !== null && { detectorModelDescription: input.detectorModelDescription }),
691
- ...(input.evaluationMethod !== undefined &&
692
- input.evaluationMethod !== null && { evaluationMethod: input.evaluationMethod }),
693
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
668
+ ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }),
669
+ ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }),
670
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
694
671
  });
695
672
  return new protocol_http_1.HttpRequest({
696
673
  protocol,
@@ -721,12 +698,10 @@ const serializeAws_restJson1UpdateInputCommand = async (input, context) => {
721
698
  }
722
699
  let body;
723
700
  body = JSON.stringify({
724
- ...(input.inputDefinition !== undefined &&
725
- input.inputDefinition !== null && {
701
+ ...(input.inputDefinition != null && {
726
702
  inputDefinition: serializeAws_restJson1InputDefinition(input.inputDefinition, context),
727
703
  }),
728
- ...(input.inputDescription !== undefined &&
729
- input.inputDescription !== null && { inputDescription: input.inputDescription }),
704
+ ...(input.inputDescription != null && { inputDescription: input.inputDescription }),
730
705
  });
731
706
  return new protocol_http_1.HttpRequest({
732
707
  protocol,
@@ -776,8 +751,7 @@ const deserializeAws_restJson1CreateAlarmModelCommandError = async (output, cont
776
751
  body: await parseBody(output.body, context),
777
752
  };
778
753
  let response;
779
- let errorCode = "UnknownError";
780
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
754
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
781
755
  switch (errorCode) {
782
756
  case "InternalFailureException":
783
757
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -802,10 +776,12 @@ const deserializeAws_restJson1CreateAlarmModelCommandError = async (output, cont
802
776
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
803
777
  default:
804
778
  const parsedBody = parsedOutput.body;
779
+ const $metadata = deserializeMetadata(output);
780
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
805
781
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
806
- name: parsedBody.code || parsedBody.Code || errorCode,
782
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
807
783
  $fault: "client",
808
- $metadata: deserializeMetadata(output),
784
+ $metadata,
809
785
  });
810
786
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
811
787
  }
@@ -831,8 +807,7 @@ const deserializeAws_restJson1CreateDetectorModelCommandError = async (output, c
831
807
  body: await parseBody(output.body, context),
832
808
  };
833
809
  let response;
834
- let errorCode = "UnknownError";
835
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
836
811
  switch (errorCode) {
837
812
  case "InternalFailureException":
838
813
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -857,10 +832,12 @@ const deserializeAws_restJson1CreateDetectorModelCommandError = async (output, c
857
832
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
858
833
  default:
859
834
  const parsedBody = parsedOutput.body;
835
+ const $metadata = deserializeMetadata(output);
836
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
860
837
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
861
- name: parsedBody.code || parsedBody.Code || errorCode,
838
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
862
839
  $fault: "client",
863
- $metadata: deserializeMetadata(output),
840
+ $metadata,
864
841
  });
865
842
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
866
843
  }
@@ -886,8 +863,7 @@ const deserializeAws_restJson1CreateInputCommandError = async (output, context)
886
863
  body: await parseBody(output.body, context),
887
864
  };
888
865
  let response;
889
- let errorCode = "UnknownError";
890
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
891
867
  switch (errorCode) {
892
868
  case "InternalFailureException":
893
869
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -906,10 +882,12 @@ const deserializeAws_restJson1CreateInputCommandError = async (output, context)
906
882
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
907
883
  default:
908
884
  const parsedBody = parsedOutput.body;
885
+ const $metadata = deserializeMetadata(output);
886
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
909
887
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
910
- name: parsedBody.code || parsedBody.Code || errorCode,
888
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
911
889
  $fault: "client",
912
- $metadata: deserializeMetadata(output),
890
+ $metadata,
913
891
  });
914
892
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
915
893
  }
@@ -931,8 +909,7 @@ const deserializeAws_restJson1DeleteAlarmModelCommandError = async (output, cont
931
909
  body: await parseBody(output.body, context),
932
910
  };
933
911
  let response;
934
- let errorCode = "UnknownError";
935
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
912
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
936
913
  switch (errorCode) {
937
914
  case "InternalFailureException":
938
915
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -954,10 +931,12 @@ const deserializeAws_restJson1DeleteAlarmModelCommandError = async (output, cont
954
931
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
955
932
  default:
956
933
  const parsedBody = parsedOutput.body;
934
+ const $metadata = deserializeMetadata(output);
935
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
957
936
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
958
- name: parsedBody.code || parsedBody.Code || errorCode,
937
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
959
938
  $fault: "client",
960
- $metadata: deserializeMetadata(output),
939
+ $metadata,
961
940
  });
962
941
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
963
942
  }
@@ -979,8 +958,7 @@ const deserializeAws_restJson1DeleteDetectorModelCommandError = async (output, c
979
958
  body: await parseBody(output.body, context),
980
959
  };
981
960
  let response;
982
- let errorCode = "UnknownError";
983
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
961
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
984
962
  switch (errorCode) {
985
963
  case "InternalFailureException":
986
964
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1002,10 +980,12 @@ const deserializeAws_restJson1DeleteDetectorModelCommandError = async (output, c
1002
980
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1003
981
  default:
1004
982
  const parsedBody = parsedOutput.body;
983
+ const $metadata = deserializeMetadata(output);
984
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1005
985
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1006
- name: parsedBody.code || parsedBody.Code || errorCode,
986
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1007
987
  $fault: "client",
1008
- $metadata: deserializeMetadata(output),
988
+ $metadata,
1009
989
  });
1010
990
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1011
991
  }
@@ -1027,8 +1007,7 @@ const deserializeAws_restJson1DeleteInputCommandError = async (output, context)
1027
1007
  body: await parseBody(output.body, context),
1028
1008
  };
1029
1009
  let response;
1030
- let errorCode = "UnknownError";
1031
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1010
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1032
1011
  switch (errorCode) {
1033
1012
  case "InternalFailureException":
1034
1013
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1050,10 +1029,12 @@ const deserializeAws_restJson1DeleteInputCommandError = async (output, context)
1050
1029
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1051
1030
  default:
1052
1031
  const parsedBody = parsedOutput.body;
1032
+ const $metadata = deserializeMetadata(output);
1033
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1053
1034
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1054
- name: parsedBody.code || parsedBody.Code || errorCode,
1035
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1055
1036
  $fault: "client",
1056
- $metadata: deserializeMetadata(output),
1037
+ $metadata,
1057
1038
  });
1058
1039
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1059
1040
  }
@@ -1135,8 +1116,7 @@ const deserializeAws_restJson1DescribeAlarmModelCommandError = async (output, co
1135
1116
  body: await parseBody(output.body, context),
1136
1117
  };
1137
1118
  let response;
1138
- let errorCode = "UnknownError";
1139
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1119
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1140
1120
  switch (errorCode) {
1141
1121
  case "InternalFailureException":
1142
1122
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1155,10 +1135,12 @@ const deserializeAws_restJson1DescribeAlarmModelCommandError = async (output, co
1155
1135
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1156
1136
  default:
1157
1137
  const parsedBody = parsedOutput.body;
1138
+ const $metadata = deserializeMetadata(output);
1139
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1158
1140
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1159
- name: parsedBody.code || parsedBody.Code || errorCode,
1141
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1160
1142
  $fault: "client",
1161
- $metadata: deserializeMetadata(output),
1143
+ $metadata,
1162
1144
  });
1163
1145
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1164
1146
  }
@@ -1184,8 +1166,7 @@ const deserializeAws_restJson1DescribeDetectorModelCommandError = async (output,
1184
1166
  body: await parseBody(output.body, context),
1185
1167
  };
1186
1168
  let response;
1187
- let errorCode = "UnknownError";
1188
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1169
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
1170
  switch (errorCode) {
1190
1171
  case "InternalFailureException":
1191
1172
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1204,10 +1185,12 @@ const deserializeAws_restJson1DescribeDetectorModelCommandError = async (output,
1204
1185
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1205
1186
  default:
1206
1187
  const parsedBody = parsedOutput.body;
1188
+ const $metadata = deserializeMetadata(output);
1189
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1207
1190
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1208
- name: parsedBody.code || parsedBody.Code || errorCode,
1191
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1209
1192
  $fault: "client",
1210
- $metadata: deserializeMetadata(output),
1193
+ $metadata,
1211
1194
  });
1212
1195
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1213
1196
  }
@@ -1233,8 +1216,7 @@ const deserializeAws_restJson1DescribeDetectorModelAnalysisCommandError = async
1233
1216
  body: await parseBody(output.body, context),
1234
1217
  };
1235
1218
  let response;
1236
- let errorCode = "UnknownError";
1237
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1219
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1238
1220
  switch (errorCode) {
1239
1221
  case "InternalFailureException":
1240
1222
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1253,10 +1235,12 @@ const deserializeAws_restJson1DescribeDetectorModelAnalysisCommandError = async
1253
1235
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1254
1236
  default:
1255
1237
  const parsedBody = parsedOutput.body;
1238
+ const $metadata = deserializeMetadata(output);
1239
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1256
1240
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1257
- name: parsedBody.code || parsedBody.Code || errorCode,
1241
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1258
1242
  $fault: "client",
1259
- $metadata: deserializeMetadata(output),
1243
+ $metadata,
1260
1244
  });
1261
1245
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1262
1246
  }
@@ -1282,8 +1266,7 @@ const deserializeAws_restJson1DescribeInputCommandError = async (output, context
1282
1266
  body: await parseBody(output.body, context),
1283
1267
  };
1284
1268
  let response;
1285
- let errorCode = "UnknownError";
1286
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1287
1270
  switch (errorCode) {
1288
1271
  case "InternalFailureException":
1289
1272
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1302,10 +1285,12 @@ const deserializeAws_restJson1DescribeInputCommandError = async (output, context
1302
1285
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1303
1286
  default:
1304
1287
  const parsedBody = parsedOutput.body;
1288
+ const $metadata = deserializeMetadata(output);
1289
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1305
1290
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1306
- name: parsedBody.code || parsedBody.Code || errorCode,
1291
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1307
1292
  $fault: "client",
1308
- $metadata: deserializeMetadata(output),
1293
+ $metadata,
1309
1294
  });
1310
1295
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1311
1296
  }
@@ -1331,8 +1316,7 @@ const deserializeAws_restJson1DescribeLoggingOptionsCommandError = async (output
1331
1316
  body: await parseBody(output.body, context),
1332
1317
  };
1333
1318
  let response;
1334
- let errorCode = "UnknownError";
1335
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1319
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1336
1320
  switch (errorCode) {
1337
1321
  case "InternalFailureException":
1338
1322
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1354,10 +1338,12 @@ const deserializeAws_restJson1DescribeLoggingOptionsCommandError = async (output
1354
1338
  throw await deserializeAws_restJson1UnsupportedOperationExceptionResponse(parsedOutput, context);
1355
1339
  default:
1356
1340
  const parsedBody = parsedOutput.body;
1341
+ const $metadata = deserializeMetadata(output);
1342
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1357
1343
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1358
- name: parsedBody.code || parsedBody.Code || errorCode,
1344
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1359
1345
  $fault: "client",
1360
- $metadata: deserializeMetadata(output),
1346
+ $metadata,
1361
1347
  });
1362
1348
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1363
1349
  }
@@ -1387,8 +1373,7 @@ const deserializeAws_restJson1GetDetectorModelAnalysisResultsCommandError = asyn
1387
1373
  body: await parseBody(output.body, context),
1388
1374
  };
1389
1375
  let response;
1390
- let errorCode = "UnknownError";
1391
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1376
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1392
1377
  switch (errorCode) {
1393
1378
  case "InternalFailureException":
1394
1379
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1407,10 +1392,12 @@ const deserializeAws_restJson1GetDetectorModelAnalysisResultsCommandError = asyn
1407
1392
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1408
1393
  default:
1409
1394
  const parsedBody = parsedOutput.body;
1395
+ const $metadata = deserializeMetadata(output);
1396
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1410
1397
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1411
- name: parsedBody.code || parsedBody.Code || errorCode,
1398
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1412
1399
  $fault: "client",
1413
- $metadata: deserializeMetadata(output),
1400
+ $metadata,
1414
1401
  });
1415
1402
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1416
1403
  }
@@ -1440,8 +1427,7 @@ const deserializeAws_restJson1ListAlarmModelsCommandError = async (output, conte
1440
1427
  body: await parseBody(output.body, context),
1441
1428
  };
1442
1429
  let response;
1443
- let errorCode = "UnknownError";
1444
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1430
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1445
1431
  switch (errorCode) {
1446
1432
  case "InternalFailureException":
1447
1433
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1457,10 +1443,12 @@ const deserializeAws_restJson1ListAlarmModelsCommandError = async (output, conte
1457
1443
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1458
1444
  default:
1459
1445
  const parsedBody = parsedOutput.body;
1446
+ const $metadata = deserializeMetadata(output);
1447
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1460
1448
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1461
- name: parsedBody.code || parsedBody.Code || errorCode,
1449
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1462
1450
  $fault: "client",
1463
- $metadata: deserializeMetadata(output),
1451
+ $metadata,
1464
1452
  });
1465
1453
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1466
1454
  }
@@ -1490,8 +1478,7 @@ const deserializeAws_restJson1ListAlarmModelVersionsCommandError = async (output
1490
1478
  body: await parseBody(output.body, context),
1491
1479
  };
1492
1480
  let response;
1493
- let errorCode = "UnknownError";
1494
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1481
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
1482
  switch (errorCode) {
1496
1483
  case "InternalFailureException":
1497
1484
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1510,10 +1497,12 @@ const deserializeAws_restJson1ListAlarmModelVersionsCommandError = async (output
1510
1497
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1511
1498
  default:
1512
1499
  const parsedBody = parsedOutput.body;
1500
+ const $metadata = deserializeMetadata(output);
1501
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1513
1502
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1514
- name: parsedBody.code || parsedBody.Code || errorCode,
1503
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1515
1504
  $fault: "client",
1516
- $metadata: deserializeMetadata(output),
1505
+ $metadata,
1517
1506
  });
1518
1507
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1519
1508
  }
@@ -1543,8 +1532,7 @@ const deserializeAws_restJson1ListDetectorModelsCommandError = async (output, co
1543
1532
  body: await parseBody(output.body, context),
1544
1533
  };
1545
1534
  let response;
1546
- let errorCode = "UnknownError";
1547
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1535
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1548
1536
  switch (errorCode) {
1549
1537
  case "InternalFailureException":
1550
1538
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1560,10 +1548,12 @@ const deserializeAws_restJson1ListDetectorModelsCommandError = async (output, co
1560
1548
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1561
1549
  default:
1562
1550
  const parsedBody = parsedOutput.body;
1551
+ const $metadata = deserializeMetadata(output);
1552
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1563
1553
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1564
- name: parsedBody.code || parsedBody.Code || errorCode,
1554
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1565
1555
  $fault: "client",
1566
- $metadata: deserializeMetadata(output),
1556
+ $metadata,
1567
1557
  });
1568
1558
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1569
1559
  }
@@ -1593,8 +1583,7 @@ const deserializeAws_restJson1ListDetectorModelVersionsCommandError = async (out
1593
1583
  body: await parseBody(output.body, context),
1594
1584
  };
1595
1585
  let response;
1596
- let errorCode = "UnknownError";
1597
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1586
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1598
1587
  switch (errorCode) {
1599
1588
  case "InternalFailureException":
1600
1589
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1613,10 +1602,12 @@ const deserializeAws_restJson1ListDetectorModelVersionsCommandError = async (out
1613
1602
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1614
1603
  default:
1615
1604
  const parsedBody = parsedOutput.body;
1605
+ const $metadata = deserializeMetadata(output);
1606
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1616
1607
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1617
- name: parsedBody.code || parsedBody.Code || errorCode,
1608
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1618
1609
  $fault: "client",
1619
- $metadata: deserializeMetadata(output),
1610
+ $metadata,
1620
1611
  });
1621
1612
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1622
1613
  }
@@ -1646,8 +1637,7 @@ const deserializeAws_restJson1ListInputRoutingsCommandError = async (output, con
1646
1637
  body: await parseBody(output.body, context),
1647
1638
  };
1648
1639
  let response;
1649
- let errorCode = "UnknownError";
1650
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1640
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
1641
  switch (errorCode) {
1652
1642
  case "InternalFailureException":
1653
1643
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1666,10 +1656,12 @@ const deserializeAws_restJson1ListInputRoutingsCommandError = async (output, con
1666
1656
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1667
1657
  default:
1668
1658
  const parsedBody = parsedOutput.body;
1659
+ const $metadata = deserializeMetadata(output);
1660
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1669
1661
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1670
- name: parsedBody.code || parsedBody.Code || errorCode,
1662
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1671
1663
  $fault: "client",
1672
- $metadata: deserializeMetadata(output),
1664
+ $metadata,
1673
1665
  });
1674
1666
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1675
1667
  }
@@ -1699,8 +1691,7 @@ const deserializeAws_restJson1ListInputsCommandError = async (output, context) =
1699
1691
  body: await parseBody(output.body, context),
1700
1692
  };
1701
1693
  let response;
1702
- let errorCode = "UnknownError";
1703
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1694
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1704
1695
  switch (errorCode) {
1705
1696
  case "InternalFailureException":
1706
1697
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1716,10 +1707,12 @@ const deserializeAws_restJson1ListInputsCommandError = async (output, context) =
1716
1707
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1717
1708
  default:
1718
1709
  const parsedBody = parsedOutput.body;
1710
+ const $metadata = deserializeMetadata(output);
1711
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1719
1712
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1720
- name: parsedBody.code || parsedBody.Code || errorCode,
1713
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1721
1714
  $fault: "client",
1722
- $metadata: deserializeMetadata(output),
1715
+ $metadata,
1723
1716
  });
1724
1717
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1725
1718
  }
@@ -1745,8 +1738,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1745
1738
  body: await parseBody(output.body, context),
1746
1739
  };
1747
1740
  let response;
1748
- let errorCode = "UnknownError";
1749
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1741
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1750
1742
  switch (errorCode) {
1751
1743
  case "InternalFailureException":
1752
1744
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1765,10 +1757,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1765
1757
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1766
1758
  default:
1767
1759
  const parsedBody = parsedOutput.body;
1760
+ const $metadata = deserializeMetadata(output);
1761
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1768
1762
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1769
- name: parsedBody.code || parsedBody.Code || errorCode,
1763
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1770
1764
  $fault: "client",
1771
- $metadata: deserializeMetadata(output),
1765
+ $metadata,
1772
1766
  });
1773
1767
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1774
1768
  }
@@ -1790,8 +1784,7 @@ const deserializeAws_restJson1PutLoggingOptionsCommandError = async (output, con
1790
1784
  body: await parseBody(output.body, context),
1791
1785
  };
1792
1786
  let response;
1793
- let errorCode = "UnknownError";
1794
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1787
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1795
1788
  switch (errorCode) {
1796
1789
  case "InternalFailureException":
1797
1790
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1813,10 +1806,12 @@ const deserializeAws_restJson1PutLoggingOptionsCommandError = async (output, con
1813
1806
  throw await deserializeAws_restJson1UnsupportedOperationExceptionResponse(parsedOutput, context);
1814
1807
  default:
1815
1808
  const parsedBody = parsedOutput.body;
1809
+ const $metadata = deserializeMetadata(output);
1810
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1816
1811
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1817
- name: parsedBody.code || parsedBody.Code || errorCode,
1812
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1818
1813
  $fault: "client",
1819
- $metadata: deserializeMetadata(output),
1814
+ $metadata,
1820
1815
  });
1821
1816
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1822
1817
  }
@@ -1842,8 +1837,7 @@ const deserializeAws_restJson1StartDetectorModelAnalysisCommandError = async (ou
1842
1837
  body: await parseBody(output.body, context),
1843
1838
  };
1844
1839
  let response;
1845
- let errorCode = "UnknownError";
1846
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1840
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1847
1841
  switch (errorCode) {
1848
1842
  case "InternalFailureException":
1849
1843
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1862,10 +1856,12 @@ const deserializeAws_restJson1StartDetectorModelAnalysisCommandError = async (ou
1862
1856
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1863
1857
  default:
1864
1858
  const parsedBody = parsedOutput.body;
1859
+ const $metadata = deserializeMetadata(output);
1860
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1865
1861
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1866
- name: parsedBody.code || parsedBody.Code || errorCode,
1862
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1867
1863
  $fault: "client",
1868
- $metadata: deserializeMetadata(output),
1864
+ $metadata,
1869
1865
  });
1870
1866
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1871
1867
  }
@@ -1887,8 +1883,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1887
1883
  body: await parseBody(output.body, context),
1888
1884
  };
1889
1885
  let response;
1890
- let errorCode = "UnknownError";
1891
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1886
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1892
1887
  switch (errorCode) {
1893
1888
  case "InternalFailureException":
1894
1889
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1910,10 +1905,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1910
1905
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1911
1906
  default:
1912
1907
  const parsedBody = parsedOutput.body;
1908
+ const $metadata = deserializeMetadata(output);
1909
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1913
1910
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1914
- name: parsedBody.code || parsedBody.Code || errorCode,
1911
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1915
1912
  $fault: "client",
1916
- $metadata: deserializeMetadata(output),
1913
+ $metadata,
1917
1914
  });
1918
1915
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1919
1916
  }
@@ -1935,8 +1932,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1935
1932
  body: await parseBody(output.body, context),
1936
1933
  };
1937
1934
  let response;
1938
- let errorCode = "UnknownError";
1939
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1935
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1940
1936
  switch (errorCode) {
1941
1937
  case "InternalFailureException":
1942
1938
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -1955,10 +1951,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1955
1951
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1956
1952
  default:
1957
1953
  const parsedBody = parsedOutput.body;
1954
+ const $metadata = deserializeMetadata(output);
1955
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1958
1956
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
1959
- name: parsedBody.code || parsedBody.Code || errorCode,
1957
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1960
1958
  $fault: "client",
1961
- $metadata: deserializeMetadata(output),
1959
+ $metadata,
1962
1960
  });
1963
1961
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1964
1962
  }
@@ -2000,8 +1998,7 @@ const deserializeAws_restJson1UpdateAlarmModelCommandError = async (output, cont
2000
1998
  body: await parseBody(output.body, context),
2001
1999
  };
2002
2000
  let response;
2003
- let errorCode = "UnknownError";
2004
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2001
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2005
2002
  switch (errorCode) {
2006
2003
  case "InternalFailureException":
2007
2004
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -2023,10 +2020,12 @@ const deserializeAws_restJson1UpdateAlarmModelCommandError = async (output, cont
2023
2020
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2024
2021
  default:
2025
2022
  const parsedBody = parsedOutput.body;
2023
+ const $metadata = deserializeMetadata(output);
2024
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2026
2025
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
2027
- name: parsedBody.code || parsedBody.Code || errorCode,
2026
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2028
2027
  $fault: "client",
2029
- $metadata: deserializeMetadata(output),
2028
+ $metadata,
2030
2029
  });
2031
2030
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2032
2031
  }
@@ -2052,8 +2051,7 @@ const deserializeAws_restJson1UpdateDetectorModelCommandError = async (output, c
2052
2051
  body: await parseBody(output.body, context),
2053
2052
  };
2054
2053
  let response;
2055
- let errorCode = "UnknownError";
2056
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2054
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2057
2055
  switch (errorCode) {
2058
2056
  case "InternalFailureException":
2059
2057
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -2075,10 +2073,12 @@ const deserializeAws_restJson1UpdateDetectorModelCommandError = async (output, c
2075
2073
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2076
2074
  default:
2077
2075
  const parsedBody = parsedOutput.body;
2076
+ const $metadata = deserializeMetadata(output);
2077
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2078
2078
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
2079
- name: parsedBody.code || parsedBody.Code || errorCode,
2079
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2080
2080
  $fault: "client",
2081
- $metadata: deserializeMetadata(output),
2081
+ $metadata,
2082
2082
  });
2083
2083
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2084
2084
  }
@@ -2104,8 +2104,7 @@ const deserializeAws_restJson1UpdateInputCommandError = async (output, context)
2104
2104
  body: await parseBody(output.body, context),
2105
2105
  };
2106
2106
  let response;
2107
- let errorCode = "UnknownError";
2108
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2107
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
2108
  switch (errorCode) {
2110
2109
  case "InternalFailureException":
2111
2110
  case "com.amazonaws.iotevents#InternalFailureException":
@@ -2127,10 +2126,12 @@ const deserializeAws_restJson1UpdateInputCommandError = async (output, context)
2127
2126
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2128
2127
  default:
2129
2128
  const parsedBody = parsedOutput.body;
2129
+ const $metadata = deserializeMetadata(output);
2130
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2130
2131
  response = new IoTEventsServiceException_1.IoTEventsServiceException({
2131
- name: parsedBody.code || parsedBody.Code || errorCode,
2132
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2132
2133
  $fault: "client",
2133
- $metadata: deserializeMetadata(output),
2134
+ $metadata,
2134
2135
  });
2135
2136
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2136
2137
  }
@@ -2251,42 +2252,30 @@ const deserializeAws_restJson1UnsupportedOperationExceptionResponse = async (par
2251
2252
  };
2252
2253
  const serializeAws_restJson1AcknowledgeFlow = (input, context) => {
2253
2254
  return {
2254
- ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
2255
+ ...(input.enabled != null && { enabled: input.enabled }),
2255
2256
  };
2256
2257
  };
2257
2258
  const serializeAws_restJson1Action = (input, context) => {
2258
2259
  return {
2259
- ...(input.clearTimer !== undefined &&
2260
- input.clearTimer !== null && { clearTimer: serializeAws_restJson1ClearTimerAction(input.clearTimer, context) }),
2261
- ...(input.dynamoDB !== undefined &&
2262
- input.dynamoDB !== null && { dynamoDB: serializeAws_restJson1DynamoDBAction(input.dynamoDB, context) }),
2263
- ...(input.dynamoDBv2 !== undefined &&
2264
- input.dynamoDBv2 !== null && { dynamoDBv2: serializeAws_restJson1DynamoDBv2Action(input.dynamoDBv2, context) }),
2265
- ...(input.firehose !== undefined &&
2266
- input.firehose !== null && { firehose: serializeAws_restJson1FirehoseAction(input.firehose, context) }),
2267
- ...(input.iotEvents !== undefined &&
2268
- input.iotEvents !== null && { iotEvents: serializeAws_restJson1IotEventsAction(input.iotEvents, context) }),
2269
- ...(input.iotSiteWise !== undefined &&
2270
- input.iotSiteWise !== null && {
2260
+ ...(input.clearTimer != null && { clearTimer: serializeAws_restJson1ClearTimerAction(input.clearTimer, context) }),
2261
+ ...(input.dynamoDB != null && { dynamoDB: serializeAws_restJson1DynamoDBAction(input.dynamoDB, context) }),
2262
+ ...(input.dynamoDBv2 != null && { dynamoDBv2: serializeAws_restJson1DynamoDBv2Action(input.dynamoDBv2, context) }),
2263
+ ...(input.firehose != null && { firehose: serializeAws_restJson1FirehoseAction(input.firehose, context) }),
2264
+ ...(input.iotEvents != null && { iotEvents: serializeAws_restJson1IotEventsAction(input.iotEvents, context) }),
2265
+ ...(input.iotSiteWise != null && {
2271
2266
  iotSiteWise: serializeAws_restJson1IotSiteWiseAction(input.iotSiteWise, context),
2272
2267
  }),
2273
- ...(input.iotTopicPublish !== undefined &&
2274
- input.iotTopicPublish !== null && {
2268
+ ...(input.iotTopicPublish != null && {
2275
2269
  iotTopicPublish: serializeAws_restJson1IotTopicPublishAction(input.iotTopicPublish, context),
2276
2270
  }),
2277
- ...(input.lambda !== undefined &&
2278
- input.lambda !== null && { lambda: serializeAws_restJson1LambdaAction(input.lambda, context) }),
2279
- ...(input.resetTimer !== undefined &&
2280
- input.resetTimer !== null && { resetTimer: serializeAws_restJson1ResetTimerAction(input.resetTimer, context) }),
2281
- ...(input.setTimer !== undefined &&
2282
- input.setTimer !== null && { setTimer: serializeAws_restJson1SetTimerAction(input.setTimer, context) }),
2283
- ...(input.setVariable !== undefined &&
2284
- input.setVariable !== null && {
2271
+ ...(input.lambda != null && { lambda: serializeAws_restJson1LambdaAction(input.lambda, context) }),
2272
+ ...(input.resetTimer != null && { resetTimer: serializeAws_restJson1ResetTimerAction(input.resetTimer, context) }),
2273
+ ...(input.setTimer != null && { setTimer: serializeAws_restJson1SetTimerAction(input.setTimer, context) }),
2274
+ ...(input.setVariable != null && {
2285
2275
  setVariable: serializeAws_restJson1SetVariableAction(input.setVariable, context),
2286
2276
  }),
2287
- ...(input.sns !== undefined &&
2288
- input.sns !== null && { sns: serializeAws_restJson1SNSTopicPublishAction(input.sns, context) }),
2289
- ...(input.sqs !== undefined && input.sqs !== null && { sqs: serializeAws_restJson1SqsAction(input.sqs, context) }),
2277
+ ...(input.sns != null && { sns: serializeAws_restJson1SNSTopicPublishAction(input.sns, context) }),
2278
+ ...(input.sqs != null && { sqs: serializeAws_restJson1SqsAction(input.sqs, context) }),
2290
2279
  };
2291
2280
  };
2292
2281
  const serializeAws_restJson1Actions = (input, context) => {
@@ -2301,27 +2290,19 @@ const serializeAws_restJson1Actions = (input, context) => {
2301
2290
  };
2302
2291
  const serializeAws_restJson1AlarmAction = (input, context) => {
2303
2292
  return {
2304
- ...(input.dynamoDB !== undefined &&
2305
- input.dynamoDB !== null && { dynamoDB: serializeAws_restJson1DynamoDBAction(input.dynamoDB, context) }),
2306
- ...(input.dynamoDBv2 !== undefined &&
2307
- input.dynamoDBv2 !== null && { dynamoDBv2: serializeAws_restJson1DynamoDBv2Action(input.dynamoDBv2, context) }),
2308
- ...(input.firehose !== undefined &&
2309
- input.firehose !== null && { firehose: serializeAws_restJson1FirehoseAction(input.firehose, context) }),
2310
- ...(input.iotEvents !== undefined &&
2311
- input.iotEvents !== null && { iotEvents: serializeAws_restJson1IotEventsAction(input.iotEvents, context) }),
2312
- ...(input.iotSiteWise !== undefined &&
2313
- input.iotSiteWise !== null && {
2293
+ ...(input.dynamoDB != null && { dynamoDB: serializeAws_restJson1DynamoDBAction(input.dynamoDB, context) }),
2294
+ ...(input.dynamoDBv2 != null && { dynamoDBv2: serializeAws_restJson1DynamoDBv2Action(input.dynamoDBv2, context) }),
2295
+ ...(input.firehose != null && { firehose: serializeAws_restJson1FirehoseAction(input.firehose, context) }),
2296
+ ...(input.iotEvents != null && { iotEvents: serializeAws_restJson1IotEventsAction(input.iotEvents, context) }),
2297
+ ...(input.iotSiteWise != null && {
2314
2298
  iotSiteWise: serializeAws_restJson1IotSiteWiseAction(input.iotSiteWise, context),
2315
2299
  }),
2316
- ...(input.iotTopicPublish !== undefined &&
2317
- input.iotTopicPublish !== null && {
2300
+ ...(input.iotTopicPublish != null && {
2318
2301
  iotTopicPublish: serializeAws_restJson1IotTopicPublishAction(input.iotTopicPublish, context),
2319
2302
  }),
2320
- ...(input.lambda !== undefined &&
2321
- input.lambda !== null && { lambda: serializeAws_restJson1LambdaAction(input.lambda, context) }),
2322
- ...(input.sns !== undefined &&
2323
- input.sns !== null && { sns: serializeAws_restJson1SNSTopicPublishAction(input.sns, context) }),
2324
- ...(input.sqs !== undefined && input.sqs !== null && { sqs: serializeAws_restJson1SqsAction(input.sqs, context) }),
2303
+ ...(input.lambda != null && { lambda: serializeAws_restJson1LambdaAction(input.lambda, context) }),
2304
+ ...(input.sns != null && { sns: serializeAws_restJson1SNSTopicPublishAction(input.sns, context) }),
2305
+ ...(input.sqs != null && { sqs: serializeAws_restJson1SqsAction(input.sqs, context) }),
2325
2306
  };
2326
2307
  };
2327
2308
  const serializeAws_restJson1AlarmActions = (input, context) => {
@@ -2336,64 +2317,59 @@ const serializeAws_restJson1AlarmActions = (input, context) => {
2336
2317
  };
2337
2318
  const serializeAws_restJson1AlarmCapabilities = (input, context) => {
2338
2319
  return {
2339
- ...(input.acknowledgeFlow !== undefined &&
2340
- input.acknowledgeFlow !== null && {
2320
+ ...(input.acknowledgeFlow != null && {
2341
2321
  acknowledgeFlow: serializeAws_restJson1AcknowledgeFlow(input.acknowledgeFlow, context),
2342
2322
  }),
2343
- ...(input.initializationConfiguration !== undefined &&
2344
- input.initializationConfiguration !== null && {
2323
+ ...(input.initializationConfiguration != null && {
2345
2324
  initializationConfiguration: serializeAws_restJson1InitializationConfiguration(input.initializationConfiguration, context),
2346
2325
  }),
2347
2326
  };
2348
2327
  };
2349
2328
  const serializeAws_restJson1AlarmEventActions = (input, context) => {
2350
2329
  return {
2351
- ...(input.alarmActions !== undefined &&
2352
- input.alarmActions !== null && { alarmActions: serializeAws_restJson1AlarmActions(input.alarmActions, context) }),
2330
+ ...(input.alarmActions != null && {
2331
+ alarmActions: serializeAws_restJson1AlarmActions(input.alarmActions, context),
2332
+ }),
2353
2333
  };
2354
2334
  };
2355
2335
  const serializeAws_restJson1AlarmNotification = (input, context) => {
2356
2336
  return {
2357
- ...(input.notificationActions !== undefined &&
2358
- input.notificationActions !== null && {
2337
+ ...(input.notificationActions != null && {
2359
2338
  notificationActions: serializeAws_restJson1NotificationActions(input.notificationActions, context),
2360
2339
  }),
2361
2340
  };
2362
2341
  };
2363
2342
  const serializeAws_restJson1AlarmRule = (input, context) => {
2364
2343
  return {
2365
- ...(input.simpleRule !== undefined &&
2366
- input.simpleRule !== null && { simpleRule: serializeAws_restJson1SimpleRule(input.simpleRule, context) }),
2344
+ ...(input.simpleRule != null && { simpleRule: serializeAws_restJson1SimpleRule(input.simpleRule, context) }),
2367
2345
  };
2368
2346
  };
2369
2347
  const serializeAws_restJson1AssetPropertyTimestamp = (input, context) => {
2370
2348
  return {
2371
- ...(input.offsetInNanos !== undefined && input.offsetInNanos !== null && { offsetInNanos: input.offsetInNanos }),
2372
- ...(input.timeInSeconds !== undefined && input.timeInSeconds !== null && { timeInSeconds: input.timeInSeconds }),
2349
+ ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }),
2350
+ ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }),
2373
2351
  };
2374
2352
  };
2375
2353
  const serializeAws_restJson1AssetPropertyValue = (input, context) => {
2376
2354
  return {
2377
- ...(input.quality !== undefined && input.quality !== null && { quality: input.quality }),
2378
- ...(input.timestamp !== undefined &&
2379
- input.timestamp !== null && {
2355
+ ...(input.quality != null && { quality: input.quality }),
2356
+ ...(input.timestamp != null && {
2380
2357
  timestamp: serializeAws_restJson1AssetPropertyTimestamp(input.timestamp, context),
2381
2358
  }),
2382
- ...(input.value !== undefined &&
2383
- input.value !== null && { value: serializeAws_restJson1AssetPropertyVariant(input.value, context) }),
2359
+ ...(input.value != null && { value: serializeAws_restJson1AssetPropertyVariant(input.value, context) }),
2384
2360
  };
2385
2361
  };
2386
2362
  const serializeAws_restJson1AssetPropertyVariant = (input, context) => {
2387
2363
  return {
2388
- ...(input.booleanValue !== undefined && input.booleanValue !== null && { booleanValue: input.booleanValue }),
2389
- ...(input.doubleValue !== undefined && input.doubleValue !== null && { doubleValue: input.doubleValue }),
2390
- ...(input.integerValue !== undefined && input.integerValue !== null && { integerValue: input.integerValue }),
2391
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
2364
+ ...(input.booleanValue != null && { booleanValue: input.booleanValue }),
2365
+ ...(input.doubleValue != null && { doubleValue: input.doubleValue }),
2366
+ ...(input.integerValue != null && { integerValue: input.integerValue }),
2367
+ ...(input.stringValue != null && { stringValue: input.stringValue }),
2392
2368
  };
2393
2369
  };
2394
2370
  const serializeAws_restJson1Attribute = (input, context) => {
2395
2371
  return {
2396
- ...(input.jsonPath !== undefined && input.jsonPath !== null && { jsonPath: input.jsonPath }),
2372
+ ...(input.jsonPath != null && { jsonPath: input.jsonPath }),
2397
2373
  };
2398
2374
  };
2399
2375
  const serializeAws_restJson1Attributes = (input, context) => {
@@ -2408,14 +2384,13 @@ const serializeAws_restJson1Attributes = (input, context) => {
2408
2384
  };
2409
2385
  const serializeAws_restJson1ClearTimerAction = (input, context) => {
2410
2386
  return {
2411
- ...(input.timerName !== undefined && input.timerName !== null && { timerName: input.timerName }),
2387
+ ...(input.timerName != null && { timerName: input.timerName }),
2412
2388
  };
2413
2389
  };
2414
2390
  const serializeAws_restJson1DetectorDebugOption = (input, context) => {
2415
2391
  return {
2416
- ...(input.detectorModelName !== undefined &&
2417
- input.detectorModelName !== null && { detectorModelName: input.detectorModelName }),
2418
- ...(input.keyValue !== undefined && input.keyValue !== null && { keyValue: input.keyValue }),
2392
+ ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }),
2393
+ ...(input.keyValue != null && { keyValue: input.keyValue }),
2419
2394
  };
2420
2395
  };
2421
2396
  const serializeAws_restJson1DetectorDebugOptions = (input, context) => {
@@ -2430,41 +2405,35 @@ const serializeAws_restJson1DetectorDebugOptions = (input, context) => {
2430
2405
  };
2431
2406
  const serializeAws_restJson1DetectorModelDefinition = (input, context) => {
2432
2407
  return {
2433
- ...(input.initialStateName !== undefined &&
2434
- input.initialStateName !== null && { initialStateName: input.initialStateName }),
2435
- ...(input.states !== undefined &&
2436
- input.states !== null && { states: serializeAws_restJson1States(input.states, context) }),
2408
+ ...(input.initialStateName != null && { initialStateName: input.initialStateName }),
2409
+ ...(input.states != null && { states: serializeAws_restJson1States(input.states, context) }),
2437
2410
  };
2438
2411
  };
2439
2412
  const serializeAws_restJson1DynamoDBAction = (input, context) => {
2440
2413
  return {
2441
- ...(input.hashKeyField !== undefined && input.hashKeyField !== null && { hashKeyField: input.hashKeyField }),
2442
- ...(input.hashKeyType !== undefined && input.hashKeyType !== null && { hashKeyType: input.hashKeyType }),
2443
- ...(input.hashKeyValue !== undefined && input.hashKeyValue !== null && { hashKeyValue: input.hashKeyValue }),
2444
- ...(input.operation !== undefined && input.operation !== null && { operation: input.operation }),
2445
- ...(input.payload !== undefined &&
2446
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2447
- ...(input.payloadField !== undefined && input.payloadField !== null && { payloadField: input.payloadField }),
2448
- ...(input.rangeKeyField !== undefined && input.rangeKeyField !== null && { rangeKeyField: input.rangeKeyField }),
2449
- ...(input.rangeKeyType !== undefined && input.rangeKeyType !== null && { rangeKeyType: input.rangeKeyType }),
2450
- ...(input.rangeKeyValue !== undefined && input.rangeKeyValue !== null && { rangeKeyValue: input.rangeKeyValue }),
2451
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
2414
+ ...(input.hashKeyField != null && { hashKeyField: input.hashKeyField }),
2415
+ ...(input.hashKeyType != null && { hashKeyType: input.hashKeyType }),
2416
+ ...(input.hashKeyValue != null && { hashKeyValue: input.hashKeyValue }),
2417
+ ...(input.operation != null && { operation: input.operation }),
2418
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2419
+ ...(input.payloadField != null && { payloadField: input.payloadField }),
2420
+ ...(input.rangeKeyField != null && { rangeKeyField: input.rangeKeyField }),
2421
+ ...(input.rangeKeyType != null && { rangeKeyType: input.rangeKeyType }),
2422
+ ...(input.rangeKeyValue != null && { rangeKeyValue: input.rangeKeyValue }),
2423
+ ...(input.tableName != null && { tableName: input.tableName }),
2452
2424
  };
2453
2425
  };
2454
2426
  const serializeAws_restJson1DynamoDBv2Action = (input, context) => {
2455
2427
  return {
2456
- ...(input.payload !== undefined &&
2457
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2458
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
2428
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2429
+ ...(input.tableName != null && { tableName: input.tableName }),
2459
2430
  };
2460
2431
  };
2461
2432
  const serializeAws_restJson1EmailConfiguration = (input, context) => {
2462
2433
  return {
2463
- ...(input.content !== undefined &&
2464
- input.content !== null && { content: serializeAws_restJson1EmailContent(input.content, context) }),
2465
- ...(input.from !== undefined && input.from !== null && { from: input.from }),
2466
- ...(input.recipients !== undefined &&
2467
- input.recipients !== null && { recipients: serializeAws_restJson1EmailRecipients(input.recipients, context) }),
2434
+ ...(input.content != null && { content: serializeAws_restJson1EmailContent(input.content, context) }),
2435
+ ...(input.from != null && { from: input.from }),
2436
+ ...(input.recipients != null && { recipients: serializeAws_restJson1EmailRecipients(input.recipients, context) }),
2468
2437
  };
2469
2438
  };
2470
2439
  const serializeAws_restJson1EmailConfigurations = (input, context) => {
@@ -2479,23 +2448,20 @@ const serializeAws_restJson1EmailConfigurations = (input, context) => {
2479
2448
  };
2480
2449
  const serializeAws_restJson1EmailContent = (input, context) => {
2481
2450
  return {
2482
- ...(input.additionalMessage !== undefined &&
2483
- input.additionalMessage !== null && { additionalMessage: input.additionalMessage }),
2484
- ...(input.subject !== undefined && input.subject !== null && { subject: input.subject }),
2451
+ ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }),
2452
+ ...(input.subject != null && { subject: input.subject }),
2485
2453
  };
2486
2454
  };
2487
2455
  const serializeAws_restJson1EmailRecipients = (input, context) => {
2488
2456
  return {
2489
- ...(input.to !== undefined &&
2490
- input.to !== null && { to: serializeAws_restJson1RecipientDetails(input.to, context) }),
2457
+ ...(input.to != null && { to: serializeAws_restJson1RecipientDetails(input.to, context) }),
2491
2458
  };
2492
2459
  };
2493
2460
  const serializeAws_restJson1Event = (input, context) => {
2494
2461
  return {
2495
- ...(input.actions !== undefined &&
2496
- input.actions !== null && { actions: serializeAws_restJson1Actions(input.actions, context) }),
2497
- ...(input.condition !== undefined && input.condition !== null && { condition: input.condition }),
2498
- ...(input.eventName !== undefined && input.eventName !== null && { eventName: input.eventName }),
2462
+ ...(input.actions != null && { actions: serializeAws_restJson1Actions(input.actions, context) }),
2463
+ ...(input.condition != null && { condition: input.condition }),
2464
+ ...(input.eventName != null && { eventName: input.eventName }),
2499
2465
  };
2500
2466
  };
2501
2467
  const serializeAws_restJson1Events = (input, context) => {
@@ -2510,110 +2476,95 @@ const serializeAws_restJson1Events = (input, context) => {
2510
2476
  };
2511
2477
  const serializeAws_restJson1FirehoseAction = (input, context) => {
2512
2478
  return {
2513
- ...(input.deliveryStreamName !== undefined &&
2514
- input.deliveryStreamName !== null && { deliveryStreamName: input.deliveryStreamName }),
2515
- ...(input.payload !== undefined &&
2516
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2517
- ...(input.separator !== undefined && input.separator !== null && { separator: input.separator }),
2479
+ ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }),
2480
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2481
+ ...(input.separator != null && { separator: input.separator }),
2518
2482
  };
2519
2483
  };
2520
2484
  const serializeAws_restJson1InitializationConfiguration = (input, context) => {
2521
2485
  return {
2522
- ...(input.disabledOnInitialization !== undefined &&
2523
- input.disabledOnInitialization !== null && { disabledOnInitialization: input.disabledOnInitialization }),
2486
+ ...(input.disabledOnInitialization != null && { disabledOnInitialization: input.disabledOnInitialization }),
2524
2487
  };
2525
2488
  };
2526
2489
  const serializeAws_restJson1InputDefinition = (input, context) => {
2527
2490
  return {
2528
- ...(input.attributes !== undefined &&
2529
- input.attributes !== null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }),
2491
+ ...(input.attributes != null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }),
2530
2492
  };
2531
2493
  };
2532
2494
  const serializeAws_restJson1InputIdentifier = (input, context) => {
2533
2495
  return {
2534
- ...(input.iotEventsInputIdentifier !== undefined &&
2535
- input.iotEventsInputIdentifier !== null && {
2496
+ ...(input.iotEventsInputIdentifier != null && {
2536
2497
  iotEventsInputIdentifier: serializeAws_restJson1IotEventsInputIdentifier(input.iotEventsInputIdentifier, context),
2537
2498
  }),
2538
- ...(input.iotSiteWiseInputIdentifier !== undefined &&
2539
- input.iotSiteWiseInputIdentifier !== null && {
2499
+ ...(input.iotSiteWiseInputIdentifier != null && {
2540
2500
  iotSiteWiseInputIdentifier: serializeAws_restJson1IotSiteWiseInputIdentifier(input.iotSiteWiseInputIdentifier, context),
2541
2501
  }),
2542
2502
  };
2543
2503
  };
2544
2504
  const serializeAws_restJson1IotEventsAction = (input, context) => {
2545
2505
  return {
2546
- ...(input.inputName !== undefined && input.inputName !== null && { inputName: input.inputName }),
2547
- ...(input.payload !== undefined &&
2548
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2506
+ ...(input.inputName != null && { inputName: input.inputName }),
2507
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2549
2508
  };
2550
2509
  };
2551
2510
  const serializeAws_restJson1IotEventsInputIdentifier = (input, context) => {
2552
2511
  return {
2553
- ...(input.inputName !== undefined && input.inputName !== null && { inputName: input.inputName }),
2512
+ ...(input.inputName != null && { inputName: input.inputName }),
2554
2513
  };
2555
2514
  };
2556
2515
  const serializeAws_restJson1IotSiteWiseAction = (input, context) => {
2557
2516
  return {
2558
- ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }),
2559
- ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }),
2560
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
2561
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
2562
- ...(input.propertyValue !== undefined &&
2563
- input.propertyValue !== null && {
2517
+ ...(input.assetId != null && { assetId: input.assetId }),
2518
+ ...(input.entryId != null && { entryId: input.entryId }),
2519
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
2520
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
2521
+ ...(input.propertyValue != null && {
2564
2522
  propertyValue: serializeAws_restJson1AssetPropertyValue(input.propertyValue, context),
2565
2523
  }),
2566
2524
  };
2567
2525
  };
2568
2526
  const serializeAws_restJson1IotSiteWiseAssetModelPropertyIdentifier = (input, context) => {
2569
2527
  return {
2570
- ...(input.assetModelId !== undefined && input.assetModelId !== null && { assetModelId: input.assetModelId }),
2571
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
2528
+ ...(input.assetModelId != null && { assetModelId: input.assetModelId }),
2529
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
2572
2530
  };
2573
2531
  };
2574
2532
  const serializeAws_restJson1IotSiteWiseInputIdentifier = (input, context) => {
2575
2533
  return {
2576
- ...(input.iotSiteWiseAssetModelPropertyIdentifier !== undefined &&
2577
- input.iotSiteWiseAssetModelPropertyIdentifier !== null && {
2534
+ ...(input.iotSiteWiseAssetModelPropertyIdentifier != null && {
2578
2535
  iotSiteWiseAssetModelPropertyIdentifier: serializeAws_restJson1IotSiteWiseAssetModelPropertyIdentifier(input.iotSiteWiseAssetModelPropertyIdentifier, context),
2579
2536
  }),
2580
2537
  };
2581
2538
  };
2582
2539
  const serializeAws_restJson1IotTopicPublishAction = (input, context) => {
2583
2540
  return {
2584
- ...(input.mqttTopic !== undefined && input.mqttTopic !== null && { mqttTopic: input.mqttTopic }),
2585
- ...(input.payload !== undefined &&
2586
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2541
+ ...(input.mqttTopic != null && { mqttTopic: input.mqttTopic }),
2542
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2587
2543
  };
2588
2544
  };
2589
2545
  const serializeAws_restJson1LambdaAction = (input, context) => {
2590
2546
  return {
2591
- ...(input.functionArn !== undefined && input.functionArn !== null && { functionArn: input.functionArn }),
2592
- ...(input.payload !== undefined &&
2593
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2547
+ ...(input.functionArn != null && { functionArn: input.functionArn }),
2548
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2594
2549
  };
2595
2550
  };
2596
2551
  const serializeAws_restJson1LoggingOptions = (input, context) => {
2597
2552
  return {
2598
- ...(input.detectorDebugOptions !== undefined &&
2599
- input.detectorDebugOptions !== null && {
2553
+ ...(input.detectorDebugOptions != null && {
2600
2554
  detectorDebugOptions: serializeAws_restJson1DetectorDebugOptions(input.detectorDebugOptions, context),
2601
2555
  }),
2602
- ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
2603
- ...(input.level !== undefined && input.level !== null && { level: input.level }),
2604
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
2556
+ ...(input.enabled != null && { enabled: input.enabled }),
2557
+ ...(input.level != null && { level: input.level }),
2558
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
2605
2559
  };
2606
2560
  };
2607
2561
  const serializeAws_restJson1NotificationAction = (input, context) => {
2608
2562
  return {
2609
- ...(input.action !== undefined &&
2610
- input.action !== null && { action: serializeAws_restJson1NotificationTargetActions(input.action, context) }),
2611
- ...(input.emailConfigurations !== undefined &&
2612
- input.emailConfigurations !== null && {
2563
+ ...(input.action != null && { action: serializeAws_restJson1NotificationTargetActions(input.action, context) }),
2564
+ ...(input.emailConfigurations != null && {
2613
2565
  emailConfigurations: serializeAws_restJson1EmailConfigurations(input.emailConfigurations, context),
2614
2566
  }),
2615
- ...(input.smsConfigurations !== undefined &&
2616
- input.smsConfigurations !== null && {
2567
+ ...(input.smsConfigurations != null && {
2617
2568
  smsConfigurations: serializeAws_restJson1SMSConfigurations(input.smsConfigurations, context),
2618
2569
  }),
2619
2570
  };
@@ -2630,43 +2581,38 @@ const serializeAws_restJson1NotificationActions = (input, context) => {
2630
2581
  };
2631
2582
  const serializeAws_restJson1NotificationTargetActions = (input, context) => {
2632
2583
  return {
2633
- ...(input.lambdaAction !== undefined &&
2634
- input.lambdaAction !== null && { lambdaAction: serializeAws_restJson1LambdaAction(input.lambdaAction, context) }),
2584
+ ...(input.lambdaAction != null && {
2585
+ lambdaAction: serializeAws_restJson1LambdaAction(input.lambdaAction, context),
2586
+ }),
2635
2587
  };
2636
2588
  };
2637
2589
  const serializeAws_restJson1OnEnterLifecycle = (input, context) => {
2638
2590
  return {
2639
- ...(input.events !== undefined &&
2640
- input.events !== null && { events: serializeAws_restJson1Events(input.events, context) }),
2591
+ ...(input.events != null && { events: serializeAws_restJson1Events(input.events, context) }),
2641
2592
  };
2642
2593
  };
2643
2594
  const serializeAws_restJson1OnExitLifecycle = (input, context) => {
2644
2595
  return {
2645
- ...(input.events !== undefined &&
2646
- input.events !== null && { events: serializeAws_restJson1Events(input.events, context) }),
2596
+ ...(input.events != null && { events: serializeAws_restJson1Events(input.events, context) }),
2647
2597
  };
2648
2598
  };
2649
2599
  const serializeAws_restJson1OnInputLifecycle = (input, context) => {
2650
2600
  return {
2651
- ...(input.events !== undefined &&
2652
- input.events !== null && { events: serializeAws_restJson1Events(input.events, context) }),
2653
- ...(input.transitionEvents !== undefined &&
2654
- input.transitionEvents !== null && {
2601
+ ...(input.events != null && { events: serializeAws_restJson1Events(input.events, context) }),
2602
+ ...(input.transitionEvents != null && {
2655
2603
  transitionEvents: serializeAws_restJson1TransitionEvents(input.transitionEvents, context),
2656
2604
  }),
2657
2605
  };
2658
2606
  };
2659
2607
  const serializeAws_restJson1Payload = (input, context) => {
2660
2608
  return {
2661
- ...(input.contentExpression !== undefined &&
2662
- input.contentExpression !== null && { contentExpression: input.contentExpression }),
2663
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
2609
+ ...(input.contentExpression != null && { contentExpression: input.contentExpression }),
2610
+ ...(input.type != null && { type: input.type }),
2664
2611
  };
2665
2612
  };
2666
2613
  const serializeAws_restJson1RecipientDetail = (input, context) => {
2667
2614
  return {
2668
- ...(input.ssoIdentity !== undefined &&
2669
- input.ssoIdentity !== null && { ssoIdentity: serializeAws_restJson1SSOIdentity(input.ssoIdentity, context) }),
2615
+ ...(input.ssoIdentity != null && { ssoIdentity: serializeAws_restJson1SSOIdentity(input.ssoIdentity, context) }),
2670
2616
  };
2671
2617
  };
2672
2618
  const serializeAws_restJson1RecipientDetails = (input, context) => {
@@ -2681,38 +2627,34 @@ const serializeAws_restJson1RecipientDetails = (input, context) => {
2681
2627
  };
2682
2628
  const serializeAws_restJson1ResetTimerAction = (input, context) => {
2683
2629
  return {
2684
- ...(input.timerName !== undefined && input.timerName !== null && { timerName: input.timerName }),
2630
+ ...(input.timerName != null && { timerName: input.timerName }),
2685
2631
  };
2686
2632
  };
2687
2633
  const serializeAws_restJson1SetTimerAction = (input, context) => {
2688
2634
  return {
2689
- ...(input.durationExpression !== undefined &&
2690
- input.durationExpression !== null && { durationExpression: input.durationExpression }),
2691
- ...(input.seconds !== undefined && input.seconds !== null && { seconds: input.seconds }),
2692
- ...(input.timerName !== undefined && input.timerName !== null && { timerName: input.timerName }),
2635
+ ...(input.durationExpression != null && { durationExpression: input.durationExpression }),
2636
+ ...(input.seconds != null && { seconds: input.seconds }),
2637
+ ...(input.timerName != null && { timerName: input.timerName }),
2693
2638
  };
2694
2639
  };
2695
2640
  const serializeAws_restJson1SetVariableAction = (input, context) => {
2696
2641
  return {
2697
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2698
- ...(input.variableName !== undefined && input.variableName !== null && { variableName: input.variableName }),
2642
+ ...(input.value != null && { value: input.value }),
2643
+ ...(input.variableName != null && { variableName: input.variableName }),
2699
2644
  };
2700
2645
  };
2701
2646
  const serializeAws_restJson1SimpleRule = (input, context) => {
2702
2647
  return {
2703
- ...(input.comparisonOperator !== undefined &&
2704
- input.comparisonOperator !== null && { comparisonOperator: input.comparisonOperator }),
2705
- ...(input.inputProperty !== undefined && input.inputProperty !== null && { inputProperty: input.inputProperty }),
2706
- ...(input.threshold !== undefined && input.threshold !== null && { threshold: input.threshold }),
2648
+ ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }),
2649
+ ...(input.inputProperty != null && { inputProperty: input.inputProperty }),
2650
+ ...(input.threshold != null && { threshold: input.threshold }),
2707
2651
  };
2708
2652
  };
2709
2653
  const serializeAws_restJson1SMSConfiguration = (input, context) => {
2710
2654
  return {
2711
- ...(input.additionalMessage !== undefined &&
2712
- input.additionalMessage !== null && { additionalMessage: input.additionalMessage }),
2713
- ...(input.recipients !== undefined &&
2714
- input.recipients !== null && { recipients: serializeAws_restJson1RecipientDetails(input.recipients, context) }),
2715
- ...(input.senderId !== undefined && input.senderId !== null && { senderId: input.senderId }),
2655
+ ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }),
2656
+ ...(input.recipients != null && { recipients: serializeAws_restJson1RecipientDetails(input.recipients, context) }),
2657
+ ...(input.senderId != null && { senderId: input.senderId }),
2716
2658
  };
2717
2659
  };
2718
2660
  const serializeAws_restJson1SMSConfigurations = (input, context) => {
@@ -2727,35 +2669,29 @@ const serializeAws_restJson1SMSConfigurations = (input, context) => {
2727
2669
  };
2728
2670
  const serializeAws_restJson1SNSTopicPublishAction = (input, context) => {
2729
2671
  return {
2730
- ...(input.payload !== undefined &&
2731
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2732
- ...(input.targetArn !== undefined && input.targetArn !== null && { targetArn: input.targetArn }),
2672
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2673
+ ...(input.targetArn != null && { targetArn: input.targetArn }),
2733
2674
  };
2734
2675
  };
2735
2676
  const serializeAws_restJson1SqsAction = (input, context) => {
2736
2677
  return {
2737
- ...(input.payload !== undefined &&
2738
- input.payload !== null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2739
- ...(input.queueUrl !== undefined && input.queueUrl !== null && { queueUrl: input.queueUrl }),
2740
- ...(input.useBase64 !== undefined && input.useBase64 !== null && { useBase64: input.useBase64 }),
2678
+ ...(input.payload != null && { payload: serializeAws_restJson1Payload(input.payload, context) }),
2679
+ ...(input.queueUrl != null && { queueUrl: input.queueUrl }),
2680
+ ...(input.useBase64 != null && { useBase64: input.useBase64 }),
2741
2681
  };
2742
2682
  };
2743
2683
  const serializeAws_restJson1SSOIdentity = (input, context) => {
2744
2684
  return {
2745
- ...(input.identityStoreId !== undefined &&
2746
- input.identityStoreId !== null && { identityStoreId: input.identityStoreId }),
2747
- ...(input.userId !== undefined && input.userId !== null && { userId: input.userId }),
2685
+ ...(input.identityStoreId != null && { identityStoreId: input.identityStoreId }),
2686
+ ...(input.userId != null && { userId: input.userId }),
2748
2687
  };
2749
2688
  };
2750
2689
  const serializeAws_restJson1State = (input, context) => {
2751
2690
  return {
2752
- ...(input.onEnter !== undefined &&
2753
- input.onEnter !== null && { onEnter: serializeAws_restJson1OnEnterLifecycle(input.onEnter, context) }),
2754
- ...(input.onExit !== undefined &&
2755
- input.onExit !== null && { onExit: serializeAws_restJson1OnExitLifecycle(input.onExit, context) }),
2756
- ...(input.onInput !== undefined &&
2757
- input.onInput !== null && { onInput: serializeAws_restJson1OnInputLifecycle(input.onInput, context) }),
2758
- ...(input.stateName !== undefined && input.stateName !== null && { stateName: input.stateName }),
2691
+ ...(input.onEnter != null && { onEnter: serializeAws_restJson1OnEnterLifecycle(input.onEnter, context) }),
2692
+ ...(input.onExit != null && { onExit: serializeAws_restJson1OnExitLifecycle(input.onExit, context) }),
2693
+ ...(input.onInput != null && { onInput: serializeAws_restJson1OnInputLifecycle(input.onInput, context) }),
2694
+ ...(input.stateName != null && { stateName: input.stateName }),
2759
2695
  };
2760
2696
  };
2761
2697
  const serializeAws_restJson1States = (input, context) => {
@@ -2770,8 +2706,8 @@ const serializeAws_restJson1States = (input, context) => {
2770
2706
  };
2771
2707
  const serializeAws_restJson1Tag = (input, context) => {
2772
2708
  return {
2773
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
2774
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2709
+ ...(input.key != null && { key: input.key }),
2710
+ ...(input.value != null && { value: input.value }),
2775
2711
  };
2776
2712
  };
2777
2713
  const serializeAws_restJson1Tags = (input, context) => {
@@ -2786,11 +2722,10 @@ const serializeAws_restJson1Tags = (input, context) => {
2786
2722
  };
2787
2723
  const serializeAws_restJson1TransitionEvent = (input, context) => {
2788
2724
  return {
2789
- ...(input.actions !== undefined &&
2790
- input.actions !== null && { actions: serializeAws_restJson1Actions(input.actions, context) }),
2791
- ...(input.condition !== undefined && input.condition !== null && { condition: input.condition }),
2792
- ...(input.eventName !== undefined && input.eventName !== null && { eventName: input.eventName }),
2793
- ...(input.nextState !== undefined && input.nextState !== null && { nextState: input.nextState }),
2725
+ ...(input.actions != null && { actions: serializeAws_restJson1Actions(input.actions, context) }),
2726
+ ...(input.condition != null && { condition: input.condition }),
2727
+ ...(input.eventName != null && { eventName: input.eventName }),
2728
+ ...(input.nextState != null && { nextState: input.nextState }),
2794
2729
  };
2795
2730
  };
2796
2731
  const serializeAws_restJson1TransitionEvents = (input, context) => {
@@ -2810,45 +2745,21 @@ const deserializeAws_restJson1AcknowledgeFlow = (output, context) => {
2810
2745
  };
2811
2746
  const deserializeAws_restJson1Action = (output, context) => {
2812
2747
  return {
2813
- clearTimer: output.clearTimer !== undefined && output.clearTimer !== null
2814
- ? deserializeAws_restJson1ClearTimerAction(output.clearTimer, context)
2815
- : undefined,
2816
- dynamoDB: output.dynamoDB !== undefined && output.dynamoDB !== null
2817
- ? deserializeAws_restJson1DynamoDBAction(output.dynamoDB, context)
2818
- : undefined,
2819
- dynamoDBv2: output.dynamoDBv2 !== undefined && output.dynamoDBv2 !== null
2820
- ? deserializeAws_restJson1DynamoDBv2Action(output.dynamoDBv2, context)
2821
- : undefined,
2822
- firehose: output.firehose !== undefined && output.firehose !== null
2823
- ? deserializeAws_restJson1FirehoseAction(output.firehose, context)
2824
- : undefined,
2825
- iotEvents: output.iotEvents !== undefined && output.iotEvents !== null
2826
- ? deserializeAws_restJson1IotEventsAction(output.iotEvents, context)
2827
- : undefined,
2828
- iotSiteWise: output.iotSiteWise !== undefined && output.iotSiteWise !== null
2829
- ? deserializeAws_restJson1IotSiteWiseAction(output.iotSiteWise, context)
2830
- : undefined,
2831
- iotTopicPublish: output.iotTopicPublish !== undefined && output.iotTopicPublish !== null
2748
+ clearTimer: output.clearTimer != null ? deserializeAws_restJson1ClearTimerAction(output.clearTimer, context) : undefined,
2749
+ dynamoDB: output.dynamoDB != null ? deserializeAws_restJson1DynamoDBAction(output.dynamoDB, context) : undefined,
2750
+ dynamoDBv2: output.dynamoDBv2 != null ? deserializeAws_restJson1DynamoDBv2Action(output.dynamoDBv2, context) : undefined,
2751
+ firehose: output.firehose != null ? deserializeAws_restJson1FirehoseAction(output.firehose, context) : undefined,
2752
+ iotEvents: output.iotEvents != null ? deserializeAws_restJson1IotEventsAction(output.iotEvents, context) : undefined,
2753
+ iotSiteWise: output.iotSiteWise != null ? deserializeAws_restJson1IotSiteWiseAction(output.iotSiteWise, context) : undefined,
2754
+ iotTopicPublish: output.iotTopicPublish != null
2832
2755
  ? deserializeAws_restJson1IotTopicPublishAction(output.iotTopicPublish, context)
2833
2756
  : undefined,
2834
- lambda: output.lambda !== undefined && output.lambda !== null
2835
- ? deserializeAws_restJson1LambdaAction(output.lambda, context)
2836
- : undefined,
2837
- resetTimer: output.resetTimer !== undefined && output.resetTimer !== null
2838
- ? deserializeAws_restJson1ResetTimerAction(output.resetTimer, context)
2839
- : undefined,
2840
- setTimer: output.setTimer !== undefined && output.setTimer !== null
2841
- ? deserializeAws_restJson1SetTimerAction(output.setTimer, context)
2842
- : undefined,
2843
- setVariable: output.setVariable !== undefined && output.setVariable !== null
2844
- ? deserializeAws_restJson1SetVariableAction(output.setVariable, context)
2845
- : undefined,
2846
- sns: output.sns !== undefined && output.sns !== null
2847
- ? deserializeAws_restJson1SNSTopicPublishAction(output.sns, context)
2848
- : undefined,
2849
- sqs: output.sqs !== undefined && output.sqs !== null
2850
- ? deserializeAws_restJson1SqsAction(output.sqs, context)
2851
- : undefined,
2757
+ lambda: output.lambda != null ? deserializeAws_restJson1LambdaAction(output.lambda, context) : undefined,
2758
+ resetTimer: output.resetTimer != null ? deserializeAws_restJson1ResetTimerAction(output.resetTimer, context) : undefined,
2759
+ setTimer: output.setTimer != null ? deserializeAws_restJson1SetTimerAction(output.setTimer, context) : undefined,
2760
+ setVariable: output.setVariable != null ? deserializeAws_restJson1SetVariableAction(output.setVariable, context) : undefined,
2761
+ sns: output.sns != null ? deserializeAws_restJson1SNSTopicPublishAction(output.sns, context) : undefined,
2762
+ sqs: output.sqs != null ? deserializeAws_restJson1SqsAction(output.sqs, context) : undefined,
2852
2763
  };
2853
2764
  };
2854
2765
  const deserializeAws_restJson1Actions = (output, context) => {
@@ -2864,33 +2775,17 @@ const deserializeAws_restJson1Actions = (output, context) => {
2864
2775
  };
2865
2776
  const deserializeAws_restJson1AlarmAction = (output, context) => {
2866
2777
  return {
2867
- dynamoDB: output.dynamoDB !== undefined && output.dynamoDB !== null
2868
- ? deserializeAws_restJson1DynamoDBAction(output.dynamoDB, context)
2869
- : undefined,
2870
- dynamoDBv2: output.dynamoDBv2 !== undefined && output.dynamoDBv2 !== null
2871
- ? deserializeAws_restJson1DynamoDBv2Action(output.dynamoDBv2, context)
2872
- : undefined,
2873
- firehose: output.firehose !== undefined && output.firehose !== null
2874
- ? deserializeAws_restJson1FirehoseAction(output.firehose, context)
2875
- : undefined,
2876
- iotEvents: output.iotEvents !== undefined && output.iotEvents !== null
2877
- ? deserializeAws_restJson1IotEventsAction(output.iotEvents, context)
2878
- : undefined,
2879
- iotSiteWise: output.iotSiteWise !== undefined && output.iotSiteWise !== null
2880
- ? deserializeAws_restJson1IotSiteWiseAction(output.iotSiteWise, context)
2881
- : undefined,
2882
- iotTopicPublish: output.iotTopicPublish !== undefined && output.iotTopicPublish !== null
2778
+ dynamoDB: output.dynamoDB != null ? deserializeAws_restJson1DynamoDBAction(output.dynamoDB, context) : undefined,
2779
+ dynamoDBv2: output.dynamoDBv2 != null ? deserializeAws_restJson1DynamoDBv2Action(output.dynamoDBv2, context) : undefined,
2780
+ firehose: output.firehose != null ? deserializeAws_restJson1FirehoseAction(output.firehose, context) : undefined,
2781
+ iotEvents: output.iotEvents != null ? deserializeAws_restJson1IotEventsAction(output.iotEvents, context) : undefined,
2782
+ iotSiteWise: output.iotSiteWise != null ? deserializeAws_restJson1IotSiteWiseAction(output.iotSiteWise, context) : undefined,
2783
+ iotTopicPublish: output.iotTopicPublish != null
2883
2784
  ? deserializeAws_restJson1IotTopicPublishAction(output.iotTopicPublish, context)
2884
2785
  : undefined,
2885
- lambda: output.lambda !== undefined && output.lambda !== null
2886
- ? deserializeAws_restJson1LambdaAction(output.lambda, context)
2887
- : undefined,
2888
- sns: output.sns !== undefined && output.sns !== null
2889
- ? deserializeAws_restJson1SNSTopicPublishAction(output.sns, context)
2890
- : undefined,
2891
- sqs: output.sqs !== undefined && output.sqs !== null
2892
- ? deserializeAws_restJson1SqsAction(output.sqs, context)
2893
- : undefined,
2786
+ lambda: output.lambda != null ? deserializeAws_restJson1LambdaAction(output.lambda, context) : undefined,
2787
+ sns: output.sns != null ? deserializeAws_restJson1SNSTopicPublishAction(output.sns, context) : undefined,
2788
+ sqs: output.sqs != null ? deserializeAws_restJson1SqsAction(output.sqs, context) : undefined,
2894
2789
  };
2895
2790
  };
2896
2791
  const deserializeAws_restJson1AlarmActions = (output, context) => {
@@ -2906,19 +2801,17 @@ const deserializeAws_restJson1AlarmActions = (output, context) => {
2906
2801
  };
2907
2802
  const deserializeAws_restJson1AlarmCapabilities = (output, context) => {
2908
2803
  return {
2909
- acknowledgeFlow: output.acknowledgeFlow !== undefined && output.acknowledgeFlow !== null
2804
+ acknowledgeFlow: output.acknowledgeFlow != null
2910
2805
  ? deserializeAws_restJson1AcknowledgeFlow(output.acknowledgeFlow, context)
2911
2806
  : undefined,
2912
- initializationConfiguration: output.initializationConfiguration !== undefined && output.initializationConfiguration !== null
2807
+ initializationConfiguration: output.initializationConfiguration != null
2913
2808
  ? deserializeAws_restJson1InitializationConfiguration(output.initializationConfiguration, context)
2914
2809
  : undefined,
2915
2810
  };
2916
2811
  };
2917
2812
  const deserializeAws_restJson1AlarmEventActions = (output, context) => {
2918
2813
  return {
2919
- alarmActions: output.alarmActions !== undefined && output.alarmActions !== null
2920
- ? deserializeAws_restJson1AlarmActions(output.alarmActions, context)
2921
- : undefined,
2814
+ alarmActions: output.alarmActions != null ? deserializeAws_restJson1AlarmActions(output.alarmActions, context) : undefined,
2922
2815
  };
2923
2816
  };
2924
2817
  const deserializeAws_restJson1AlarmModelSummaries = (output, context) => {
@@ -2936,7 +2829,7 @@ const deserializeAws_restJson1AlarmModelSummary = (output, context) => {
2936
2829
  return {
2937
2830
  alarmModelDescription: (0, smithy_client_1.expectString)(output.alarmModelDescription),
2938
2831
  alarmModelName: (0, smithy_client_1.expectString)(output.alarmModelName),
2939
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2832
+ creationTime: output.creationTime != null
2940
2833
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2941
2834
  : undefined,
2942
2835
  };
@@ -2957,10 +2850,10 @@ const deserializeAws_restJson1AlarmModelVersionSummary = (output, context) => {
2957
2850
  alarmModelArn: (0, smithy_client_1.expectString)(output.alarmModelArn),
2958
2851
  alarmModelName: (0, smithy_client_1.expectString)(output.alarmModelName),
2959
2852
  alarmModelVersion: (0, smithy_client_1.expectString)(output.alarmModelVersion),
2960
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2853
+ creationTime: output.creationTime != null
2961
2854
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
2962
2855
  : undefined,
2963
- lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2856
+ lastUpdateTime: output.lastUpdateTime != null
2964
2857
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateTime)))
2965
2858
  : undefined,
2966
2859
  roleArn: (0, smithy_client_1.expectString)(output.roleArn),
@@ -2970,24 +2863,20 @@ const deserializeAws_restJson1AlarmModelVersionSummary = (output, context) => {
2970
2863
  };
2971
2864
  const deserializeAws_restJson1AlarmNotification = (output, context) => {
2972
2865
  return {
2973
- notificationActions: output.notificationActions !== undefined && output.notificationActions !== null
2866
+ notificationActions: output.notificationActions != null
2974
2867
  ? deserializeAws_restJson1NotificationActions(output.notificationActions, context)
2975
2868
  : undefined,
2976
2869
  };
2977
2870
  };
2978
2871
  const deserializeAws_restJson1AlarmRule = (output, context) => {
2979
2872
  return {
2980
- simpleRule: output.simpleRule !== undefined && output.simpleRule !== null
2981
- ? deserializeAws_restJson1SimpleRule(output.simpleRule, context)
2982
- : undefined,
2873
+ simpleRule: output.simpleRule != null ? deserializeAws_restJson1SimpleRule(output.simpleRule, context) : undefined,
2983
2874
  };
2984
2875
  };
2985
2876
  const deserializeAws_restJson1AnalysisResult = (output, context) => {
2986
2877
  return {
2987
2878
  level: (0, smithy_client_1.expectString)(output.level),
2988
- locations: output.locations !== undefined && output.locations !== null
2989
- ? deserializeAws_restJson1AnalysisResultLocations(output.locations, context)
2990
- : undefined,
2879
+ locations: output.locations != null ? deserializeAws_restJson1AnalysisResultLocations(output.locations, context) : undefined,
2991
2880
  message: (0, smithy_client_1.expectString)(output.message),
2992
2881
  type: (0, smithy_client_1.expectString)(output.type),
2993
2882
  };
@@ -3028,12 +2917,8 @@ const deserializeAws_restJson1AssetPropertyTimestamp = (output, context) => {
3028
2917
  const deserializeAws_restJson1AssetPropertyValue = (output, context) => {
3029
2918
  return {
3030
2919
  quality: (0, smithy_client_1.expectString)(output.quality),
3031
- timestamp: output.timestamp !== undefined && output.timestamp !== null
3032
- ? deserializeAws_restJson1AssetPropertyTimestamp(output.timestamp, context)
3033
- : undefined,
3034
- value: output.value !== undefined && output.value !== null
3035
- ? deserializeAws_restJson1AssetPropertyVariant(output.value, context)
3036
- : undefined,
2920
+ timestamp: output.timestamp != null ? deserializeAws_restJson1AssetPropertyTimestamp(output.timestamp, context) : undefined,
2921
+ value: output.value != null ? deserializeAws_restJson1AssetPropertyVariant(output.value, context) : undefined,
3037
2922
  };
3038
2923
  };
3039
2924
  const deserializeAws_restJson1AssetPropertyVariant = (output, context) => {
@@ -3084,17 +2969,17 @@ const deserializeAws_restJson1DetectorDebugOptions = (output, context) => {
3084
2969
  };
3085
2970
  const deserializeAws_restJson1DetectorModel = (output, context) => {
3086
2971
  return {
3087
- detectorModelConfiguration: output.detectorModelConfiguration !== undefined && output.detectorModelConfiguration !== null
2972
+ detectorModelConfiguration: output.detectorModelConfiguration != null
3088
2973
  ? deserializeAws_restJson1DetectorModelConfiguration(output.detectorModelConfiguration, context)
3089
2974
  : undefined,
3090
- detectorModelDefinition: output.detectorModelDefinition !== undefined && output.detectorModelDefinition !== null
2975
+ detectorModelDefinition: output.detectorModelDefinition != null
3091
2976
  ? deserializeAws_restJson1DetectorModelDefinition(output.detectorModelDefinition, context)
3092
2977
  : undefined,
3093
2978
  };
3094
2979
  };
3095
2980
  const deserializeAws_restJson1DetectorModelConfiguration = (output, context) => {
3096
2981
  return {
3097
- creationTime: output.creationTime !== undefined && output.creationTime !== null
2982
+ creationTime: output.creationTime != null
3098
2983
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3099
2984
  : undefined,
3100
2985
  detectorModelArn: (0, smithy_client_1.expectString)(output.detectorModelArn),
@@ -3103,7 +2988,7 @@ const deserializeAws_restJson1DetectorModelConfiguration = (output, context) =>
3103
2988
  detectorModelVersion: (0, smithy_client_1.expectString)(output.detectorModelVersion),
3104
2989
  evaluationMethod: (0, smithy_client_1.expectString)(output.evaluationMethod),
3105
2990
  key: (0, smithy_client_1.expectString)(output.key),
3106
- lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
2991
+ lastUpdateTime: output.lastUpdateTime != null
3107
2992
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateTime)))
3108
2993
  : undefined,
3109
2994
  roleArn: (0, smithy_client_1.expectString)(output.roleArn),
@@ -3113,9 +2998,7 @@ const deserializeAws_restJson1DetectorModelConfiguration = (output, context) =>
3113
2998
  const deserializeAws_restJson1DetectorModelDefinition = (output, context) => {
3114
2999
  return {
3115
3000
  initialStateName: (0, smithy_client_1.expectString)(output.initialStateName),
3116
- states: output.states !== undefined && output.states !== null
3117
- ? deserializeAws_restJson1States(output.states, context)
3118
- : undefined,
3001
+ states: output.states != null ? deserializeAws_restJson1States(output.states, context) : undefined,
3119
3002
  };
3120
3003
  };
3121
3004
  const deserializeAws_restJson1DetectorModelSummaries = (output, context) => {
@@ -3131,7 +3014,7 @@ const deserializeAws_restJson1DetectorModelSummaries = (output, context) => {
3131
3014
  };
3132
3015
  const deserializeAws_restJson1DetectorModelSummary = (output, context) => {
3133
3016
  return {
3134
- creationTime: output.creationTime !== undefined && output.creationTime !== null
3017
+ creationTime: output.creationTime != null
3135
3018
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3136
3019
  : undefined,
3137
3020
  detectorModelDescription: (0, smithy_client_1.expectString)(output.detectorModelDescription),
@@ -3151,14 +3034,14 @@ const deserializeAws_restJson1DetectorModelVersionSummaries = (output, context)
3151
3034
  };
3152
3035
  const deserializeAws_restJson1DetectorModelVersionSummary = (output, context) => {
3153
3036
  return {
3154
- creationTime: output.creationTime !== undefined && output.creationTime !== null
3037
+ creationTime: output.creationTime != null
3155
3038
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3156
3039
  : undefined,
3157
3040
  detectorModelArn: (0, smithy_client_1.expectString)(output.detectorModelArn),
3158
3041
  detectorModelName: (0, smithy_client_1.expectString)(output.detectorModelName),
3159
3042
  detectorModelVersion: (0, smithy_client_1.expectString)(output.detectorModelVersion),
3160
3043
  evaluationMethod: (0, smithy_client_1.expectString)(output.evaluationMethod),
3161
- lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
3044
+ lastUpdateTime: output.lastUpdateTime != null
3162
3045
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateTime)))
3163
3046
  : undefined,
3164
3047
  roleArn: (0, smithy_client_1.expectString)(output.roleArn),
@@ -3171,9 +3054,7 @@ const deserializeAws_restJson1DynamoDBAction = (output, context) => {
3171
3054
  hashKeyType: (0, smithy_client_1.expectString)(output.hashKeyType),
3172
3055
  hashKeyValue: (0, smithy_client_1.expectString)(output.hashKeyValue),
3173
3056
  operation: (0, smithy_client_1.expectString)(output.operation),
3174
- payload: output.payload !== undefined && output.payload !== null
3175
- ? deserializeAws_restJson1Payload(output.payload, context)
3176
- : undefined,
3057
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3177
3058
  payloadField: (0, smithy_client_1.expectString)(output.payloadField),
3178
3059
  rangeKeyField: (0, smithy_client_1.expectString)(output.rangeKeyField),
3179
3060
  rangeKeyType: (0, smithy_client_1.expectString)(output.rangeKeyType),
@@ -3183,21 +3064,15 @@ const deserializeAws_restJson1DynamoDBAction = (output, context) => {
3183
3064
  };
3184
3065
  const deserializeAws_restJson1DynamoDBv2Action = (output, context) => {
3185
3066
  return {
3186
- payload: output.payload !== undefined && output.payload !== null
3187
- ? deserializeAws_restJson1Payload(output.payload, context)
3188
- : undefined,
3067
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3189
3068
  tableName: (0, smithy_client_1.expectString)(output.tableName),
3190
3069
  };
3191
3070
  };
3192
3071
  const deserializeAws_restJson1EmailConfiguration = (output, context) => {
3193
3072
  return {
3194
- content: output.content !== undefined && output.content !== null
3195
- ? deserializeAws_restJson1EmailContent(output.content, context)
3196
- : undefined,
3073
+ content: output.content != null ? deserializeAws_restJson1EmailContent(output.content, context) : undefined,
3197
3074
  from: (0, smithy_client_1.expectString)(output.from),
3198
- recipients: output.recipients !== undefined && output.recipients !== null
3199
- ? deserializeAws_restJson1EmailRecipients(output.recipients, context)
3200
- : undefined,
3075
+ recipients: output.recipients != null ? deserializeAws_restJson1EmailRecipients(output.recipients, context) : undefined,
3201
3076
  };
3202
3077
  };
3203
3078
  const deserializeAws_restJson1EmailConfigurations = (output, context) => {
@@ -3219,16 +3094,12 @@ const deserializeAws_restJson1EmailContent = (output, context) => {
3219
3094
  };
3220
3095
  const deserializeAws_restJson1EmailRecipients = (output, context) => {
3221
3096
  return {
3222
- to: output.to !== undefined && output.to !== null
3223
- ? deserializeAws_restJson1RecipientDetails(output.to, context)
3224
- : undefined,
3097
+ to: output.to != null ? deserializeAws_restJson1RecipientDetails(output.to, context) : undefined,
3225
3098
  };
3226
3099
  };
3227
3100
  const deserializeAws_restJson1Event = (output, context) => {
3228
3101
  return {
3229
- actions: output.actions !== undefined && output.actions !== null
3230
- ? deserializeAws_restJson1Actions(output.actions, context)
3231
- : undefined,
3102
+ actions: output.actions != null ? deserializeAws_restJson1Actions(output.actions, context) : undefined,
3232
3103
  condition: (0, smithy_client_1.expectString)(output.condition),
3233
3104
  eventName: (0, smithy_client_1.expectString)(output.eventName),
3234
3105
  };
@@ -3247,9 +3118,7 @@ const deserializeAws_restJson1Events = (output, context) => {
3247
3118
  const deserializeAws_restJson1FirehoseAction = (output, context) => {
3248
3119
  return {
3249
3120
  deliveryStreamName: (0, smithy_client_1.expectString)(output.deliveryStreamName),
3250
- payload: output.payload !== undefined && output.payload !== null
3251
- ? deserializeAws_restJson1Payload(output.payload, context)
3252
- : undefined,
3121
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3253
3122
  separator: (0, smithy_client_1.expectString)(output.separator),
3254
3123
  };
3255
3124
  };
@@ -3260,23 +3129,23 @@ const deserializeAws_restJson1InitializationConfiguration = (output, context) =>
3260
3129
  };
3261
3130
  const deserializeAws_restJson1Input = (output, context) => {
3262
3131
  return {
3263
- inputConfiguration: output.inputConfiguration !== undefined && output.inputConfiguration !== null
3132
+ inputConfiguration: output.inputConfiguration != null
3264
3133
  ? deserializeAws_restJson1InputConfiguration(output.inputConfiguration, context)
3265
3134
  : undefined,
3266
- inputDefinition: output.inputDefinition !== undefined && output.inputDefinition !== null
3135
+ inputDefinition: output.inputDefinition != null
3267
3136
  ? deserializeAws_restJson1InputDefinition(output.inputDefinition, context)
3268
3137
  : undefined,
3269
3138
  };
3270
3139
  };
3271
3140
  const deserializeAws_restJson1InputConfiguration = (output, context) => {
3272
3141
  return {
3273
- creationTime: output.creationTime !== undefined && output.creationTime !== null
3142
+ creationTime: output.creationTime != null
3274
3143
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3275
3144
  : undefined,
3276
3145
  inputArn: (0, smithy_client_1.expectString)(output.inputArn),
3277
3146
  inputDescription: (0, smithy_client_1.expectString)(output.inputDescription),
3278
3147
  inputName: (0, smithy_client_1.expectString)(output.inputName),
3279
- lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
3148
+ lastUpdateTime: output.lastUpdateTime != null
3280
3149
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateTime)))
3281
3150
  : undefined,
3282
3151
  status: (0, smithy_client_1.expectString)(output.status),
@@ -3284,9 +3153,7 @@ const deserializeAws_restJson1InputConfiguration = (output, context) => {
3284
3153
  };
3285
3154
  const deserializeAws_restJson1InputDefinition = (output, context) => {
3286
3155
  return {
3287
- attributes: output.attributes !== undefined && output.attributes !== null
3288
- ? deserializeAws_restJson1Attributes(output.attributes, context)
3289
- : undefined,
3156
+ attributes: output.attributes != null ? deserializeAws_restJson1Attributes(output.attributes, context) : undefined,
3290
3157
  };
3291
3158
  };
3292
3159
  const deserializeAws_restJson1InputSummaries = (output, context) => {
@@ -3302,13 +3169,13 @@ const deserializeAws_restJson1InputSummaries = (output, context) => {
3302
3169
  };
3303
3170
  const deserializeAws_restJson1InputSummary = (output, context) => {
3304
3171
  return {
3305
- creationTime: output.creationTime !== undefined && output.creationTime !== null
3172
+ creationTime: output.creationTime != null
3306
3173
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTime)))
3307
3174
  : undefined,
3308
3175
  inputArn: (0, smithy_client_1.expectString)(output.inputArn),
3309
3176
  inputDescription: (0, smithy_client_1.expectString)(output.inputDescription),
3310
3177
  inputName: (0, smithy_client_1.expectString)(output.inputName),
3311
- lastUpdateTime: output.lastUpdateTime !== undefined && output.lastUpdateTime !== null
3178
+ lastUpdateTime: output.lastUpdateTime != null
3312
3179
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateTime)))
3313
3180
  : undefined,
3314
3181
  status: (0, smithy_client_1.expectString)(output.status),
@@ -3317,9 +3184,7 @@ const deserializeAws_restJson1InputSummary = (output, context) => {
3317
3184
  const deserializeAws_restJson1IotEventsAction = (output, context) => {
3318
3185
  return {
3319
3186
  inputName: (0, smithy_client_1.expectString)(output.inputName),
3320
- payload: output.payload !== undefined && output.payload !== null
3321
- ? deserializeAws_restJson1Payload(output.payload, context)
3322
- : undefined,
3187
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3323
3188
  };
3324
3189
  };
3325
3190
  const deserializeAws_restJson1IotSiteWiseAction = (output, context) => {
@@ -3328,7 +3193,7 @@ const deserializeAws_restJson1IotSiteWiseAction = (output, context) => {
3328
3193
  entryId: (0, smithy_client_1.expectString)(output.entryId),
3329
3194
  propertyAlias: (0, smithy_client_1.expectString)(output.propertyAlias),
3330
3195
  propertyId: (0, smithy_client_1.expectString)(output.propertyId),
3331
- propertyValue: output.propertyValue !== undefined && output.propertyValue !== null
3196
+ propertyValue: output.propertyValue != null
3332
3197
  ? deserializeAws_restJson1AssetPropertyValue(output.propertyValue, context)
3333
3198
  : undefined,
3334
3199
  };
@@ -3336,22 +3201,18 @@ const deserializeAws_restJson1IotSiteWiseAction = (output, context) => {
3336
3201
  const deserializeAws_restJson1IotTopicPublishAction = (output, context) => {
3337
3202
  return {
3338
3203
  mqttTopic: (0, smithy_client_1.expectString)(output.mqttTopic),
3339
- payload: output.payload !== undefined && output.payload !== null
3340
- ? deserializeAws_restJson1Payload(output.payload, context)
3341
- : undefined,
3204
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3342
3205
  };
3343
3206
  };
3344
3207
  const deserializeAws_restJson1LambdaAction = (output, context) => {
3345
3208
  return {
3346
3209
  functionArn: (0, smithy_client_1.expectString)(output.functionArn),
3347
- payload: output.payload !== undefined && output.payload !== null
3348
- ? deserializeAws_restJson1Payload(output.payload, context)
3349
- : undefined,
3210
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3350
3211
  };
3351
3212
  };
3352
3213
  const deserializeAws_restJson1LoggingOptions = (output, context) => {
3353
3214
  return {
3354
- detectorDebugOptions: output.detectorDebugOptions !== undefined && output.detectorDebugOptions !== null
3215
+ detectorDebugOptions: output.detectorDebugOptions != null
3355
3216
  ? deserializeAws_restJson1DetectorDebugOptions(output.detectorDebugOptions, context)
3356
3217
  : undefined,
3357
3218
  enabled: (0, smithy_client_1.expectBoolean)(output.enabled),
@@ -3361,13 +3222,11 @@ const deserializeAws_restJson1LoggingOptions = (output, context) => {
3361
3222
  };
3362
3223
  const deserializeAws_restJson1NotificationAction = (output, context) => {
3363
3224
  return {
3364
- action: output.action !== undefined && output.action !== null
3365
- ? deserializeAws_restJson1NotificationTargetActions(output.action, context)
3366
- : undefined,
3367
- emailConfigurations: output.emailConfigurations !== undefined && output.emailConfigurations !== null
3225
+ action: output.action != null ? deserializeAws_restJson1NotificationTargetActions(output.action, context) : undefined,
3226
+ emailConfigurations: output.emailConfigurations != null
3368
3227
  ? deserializeAws_restJson1EmailConfigurations(output.emailConfigurations, context)
3369
3228
  : undefined,
3370
- smsConfigurations: output.smsConfigurations !== undefined && output.smsConfigurations !== null
3229
+ smsConfigurations: output.smsConfigurations != null
3371
3230
  ? deserializeAws_restJson1SMSConfigurations(output.smsConfigurations, context)
3372
3231
  : undefined,
3373
3232
  };
@@ -3385,31 +3244,23 @@ const deserializeAws_restJson1NotificationActions = (output, context) => {
3385
3244
  };
3386
3245
  const deserializeAws_restJson1NotificationTargetActions = (output, context) => {
3387
3246
  return {
3388
- lambdaAction: output.lambdaAction !== undefined && output.lambdaAction !== null
3389
- ? deserializeAws_restJson1LambdaAction(output.lambdaAction, context)
3390
- : undefined,
3247
+ lambdaAction: output.lambdaAction != null ? deserializeAws_restJson1LambdaAction(output.lambdaAction, context) : undefined,
3391
3248
  };
3392
3249
  };
3393
3250
  const deserializeAws_restJson1OnEnterLifecycle = (output, context) => {
3394
3251
  return {
3395
- events: output.events !== undefined && output.events !== null
3396
- ? deserializeAws_restJson1Events(output.events, context)
3397
- : undefined,
3252
+ events: output.events != null ? deserializeAws_restJson1Events(output.events, context) : undefined,
3398
3253
  };
3399
3254
  };
3400
3255
  const deserializeAws_restJson1OnExitLifecycle = (output, context) => {
3401
3256
  return {
3402
- events: output.events !== undefined && output.events !== null
3403
- ? deserializeAws_restJson1Events(output.events, context)
3404
- : undefined,
3257
+ events: output.events != null ? deserializeAws_restJson1Events(output.events, context) : undefined,
3405
3258
  };
3406
3259
  };
3407
3260
  const deserializeAws_restJson1OnInputLifecycle = (output, context) => {
3408
3261
  return {
3409
- events: output.events !== undefined && output.events !== null
3410
- ? deserializeAws_restJson1Events(output.events, context)
3411
- : undefined,
3412
- transitionEvents: output.transitionEvents !== undefined && output.transitionEvents !== null
3262
+ events: output.events != null ? deserializeAws_restJson1Events(output.events, context) : undefined,
3263
+ transitionEvents: output.transitionEvents != null
3413
3264
  ? deserializeAws_restJson1TransitionEvents(output.transitionEvents, context)
3414
3265
  : undefined,
3415
3266
  };
@@ -3422,9 +3273,7 @@ const deserializeAws_restJson1Payload = (output, context) => {
3422
3273
  };
3423
3274
  const deserializeAws_restJson1RecipientDetail = (output, context) => {
3424
3275
  return {
3425
- ssoIdentity: output.ssoIdentity !== undefined && output.ssoIdentity !== null
3426
- ? deserializeAws_restJson1SSOIdentity(output.ssoIdentity, context)
3427
- : undefined,
3276
+ ssoIdentity: output.ssoIdentity != null ? deserializeAws_restJson1SSOIdentity(output.ssoIdentity, context) : undefined,
3428
3277
  };
3429
3278
  };
3430
3279
  const deserializeAws_restJson1RecipientDetails = (output, context) => {
@@ -3483,9 +3332,7 @@ const deserializeAws_restJson1SimpleRule = (output, context) => {
3483
3332
  const deserializeAws_restJson1SMSConfiguration = (output, context) => {
3484
3333
  return {
3485
3334
  additionalMessage: (0, smithy_client_1.expectString)(output.additionalMessage),
3486
- recipients: output.recipients !== undefined && output.recipients !== null
3487
- ? deserializeAws_restJson1RecipientDetails(output.recipients, context)
3488
- : undefined,
3335
+ recipients: output.recipients != null ? deserializeAws_restJson1RecipientDetails(output.recipients, context) : undefined,
3489
3336
  senderId: (0, smithy_client_1.expectString)(output.senderId),
3490
3337
  };
3491
3338
  };
@@ -3502,17 +3349,13 @@ const deserializeAws_restJson1SMSConfigurations = (output, context) => {
3502
3349
  };
3503
3350
  const deserializeAws_restJson1SNSTopicPublishAction = (output, context) => {
3504
3351
  return {
3505
- payload: output.payload !== undefined && output.payload !== null
3506
- ? deserializeAws_restJson1Payload(output.payload, context)
3507
- : undefined,
3352
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3508
3353
  targetArn: (0, smithy_client_1.expectString)(output.targetArn),
3509
3354
  };
3510
3355
  };
3511
3356
  const deserializeAws_restJson1SqsAction = (output, context) => {
3512
3357
  return {
3513
- payload: output.payload !== undefined && output.payload !== null
3514
- ? deserializeAws_restJson1Payload(output.payload, context)
3515
- : undefined,
3358
+ payload: output.payload != null ? deserializeAws_restJson1Payload(output.payload, context) : undefined,
3516
3359
  queueUrl: (0, smithy_client_1.expectString)(output.queueUrl),
3517
3360
  useBase64: (0, smithy_client_1.expectBoolean)(output.useBase64),
3518
3361
  };
@@ -3525,15 +3368,9 @@ const deserializeAws_restJson1SSOIdentity = (output, context) => {
3525
3368
  };
3526
3369
  const deserializeAws_restJson1State = (output, context) => {
3527
3370
  return {
3528
- onEnter: output.onEnter !== undefined && output.onEnter !== null
3529
- ? deserializeAws_restJson1OnEnterLifecycle(output.onEnter, context)
3530
- : undefined,
3531
- onExit: output.onExit !== undefined && output.onExit !== null
3532
- ? deserializeAws_restJson1OnExitLifecycle(output.onExit, context)
3533
- : undefined,
3534
- onInput: output.onInput !== undefined && output.onInput !== null
3535
- ? deserializeAws_restJson1OnInputLifecycle(output.onInput, context)
3536
- : undefined,
3371
+ onEnter: output.onEnter != null ? deserializeAws_restJson1OnEnterLifecycle(output.onEnter, context) : undefined,
3372
+ onExit: output.onExit != null ? deserializeAws_restJson1OnExitLifecycle(output.onExit, context) : undefined,
3373
+ onInput: output.onInput != null ? deserializeAws_restJson1OnInputLifecycle(output.onInput, context) : undefined,
3537
3374
  stateName: (0, smithy_client_1.expectString)(output.stateName),
3538
3375
  };
3539
3376
  };
@@ -3567,9 +3404,7 @@ const deserializeAws_restJson1Tags = (output, context) => {
3567
3404
  };
3568
3405
  const deserializeAws_restJson1TransitionEvent = (output, context) => {
3569
3406
  return {
3570
- actions: output.actions !== undefined && output.actions !== null
3571
- ? deserializeAws_restJson1Actions(output.actions, context)
3572
- : undefined,
3407
+ actions: output.actions != null ? deserializeAws_restJson1Actions(output.actions, context) : undefined,
3573
3408
  condition: (0, smithy_client_1.expectString)(output.condition),
3574
3409
  eventName: (0, smithy_client_1.expectString)(output.eventName),
3575
3410
  nextState: (0, smithy_client_1.expectString)(output.nextState),
@@ -3635,5 +3470,4 @@ const loadRestJsonErrorCode = (output, data) => {
3635
3470
  if (data["__type"] !== undefined) {
3636
3471
  return sanitizeErrorCode(data["__type"]);
3637
3472
  }
3638
- return "";
3639
3473
  };