@aws-sdk/client-codeguru-reviewer 3.118.0 → 3.127.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.
@@ -16,11 +16,9 @@ export var serializeAws_restJson1AssociateRepositoryCommand = function (input, c
16
16
  "content-type": "application/json",
17
17
  };
18
18
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/associations";
19
- body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.KMSKeyDetails !== undefined &&
20
- input.KMSKeyDetails !== null && {
19
+ body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.KMSKeyDetails != null && {
21
20
  KMSKeyDetails: serializeAws_restJson1KMSKeyDetails(input.KMSKeyDetails, context),
22
- })), (input.Repository !== undefined &&
23
- input.Repository !== null && { Repository: serializeAws_restJson1Repository(input.Repository, context) })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
21
+ })), (input.Repository != null && { Repository: serializeAws_restJson1Repository(input.Repository, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
24
22
  return [2, new __HttpRequest({
25
23
  protocol: protocol,
26
24
  hostname: hostname,
@@ -45,9 +43,7 @@ export var serializeAws_restJson1CreateCodeReviewCommand = function (input, cont
45
43
  "content-type": "application/json",
46
44
  };
47
45
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/codereviews";
48
- body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.RepositoryAssociationArn !== undefined &&
49
- input.RepositoryAssociationArn !== null && { RepositoryAssociationArn: input.RepositoryAssociationArn })), (input.Type !== undefined &&
50
- input.Type !== null && { Type: serializeAws_restJson1CodeReviewType(input.Type, context) })));
46
+ body = JSON.stringify(__assign(__assign(__assign({ ClientRequestToken: (_c = input.ClientRequestToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Name != null && { Name: input.Name })), (input.RepositoryAssociationArn != null && { RepositoryAssociationArn: input.RepositoryAssociationArn })), (input.Type != null && { Type: serializeAws_restJson1CodeReviewType(input.Type, context) })));
51
47
  return [2, new __HttpRequest({
52
48
  protocol: protocol,
53
49
  hostname: hostname,
@@ -350,9 +346,7 @@ export var serializeAws_restJson1PutRecommendationFeedbackCommand = function (in
350
346
  "content-type": "application/json",
351
347
  };
352
348
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/feedback";
353
- body = JSON.stringify(__assign(__assign(__assign({}, (input.CodeReviewArn !== undefined && input.CodeReviewArn !== null && { CodeReviewArn: input.CodeReviewArn })), (input.Reactions !== undefined &&
354
- input.Reactions !== null && { Reactions: serializeAws_restJson1Reactions(input.Reactions, context) })), (input.RecommendationId !== undefined &&
355
- input.RecommendationId !== null && { RecommendationId: input.RecommendationId })));
349
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.CodeReviewArn != null && { CodeReviewArn: input.CodeReviewArn })), (input.Reactions != null && { Reactions: serializeAws_restJson1Reactions(input.Reactions, context) })), (input.RecommendationId != null && { RecommendationId: input.RecommendationId })));
356
350
  return [2, new __HttpRequest({
357
351
  protocol: protocol,
358
352
  hostname: hostname,
@@ -386,7 +380,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
386
380
  else {
387
381
  throw new Error("No value provided for input HTTP label: resourceArn.");
388
382
  }
389
- body = JSON.stringify(__assign({}, (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
383
+ body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
390
384
  return [2, new __HttpRequest({
391
385
  protocol: protocol,
392
386
  hostname: hostname,
@@ -461,7 +455,7 @@ export var deserializeAws_restJson1AssociateRepositoryCommand = function (output
461
455
  });
462
456
  }); };
463
457
  var deserializeAws_restJson1AssociateRepositoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
464
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
458
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
465
459
  var _c;
466
460
  return __generator(this, function (_d) {
467
461
  switch (_d.label) {
@@ -471,7 +465,6 @@ var deserializeAws_restJson1AssociateRepositoryCommandError = function (output,
471
465
  return [4, parseBody(output.body, context)];
472
466
  case 1:
473
467
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
474
- errorCode = "UnknownError";
475
468
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
476
469
  _b = errorCode;
477
470
  switch (_b) {
@@ -499,10 +492,12 @@ var deserializeAws_restJson1AssociateRepositoryCommandError = function (output,
499
492
  case 11: throw _d.sent();
500
493
  case 12:
501
494
  parsedBody = parsedOutput.body;
495
+ $metadata = deserializeMetadata(output);
496
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
502
497
  response = new __BaseException({
503
- name: parsedBody.code || parsedBody.Code || errorCode,
498
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
504
499
  $fault: "client",
505
- $metadata: deserializeMetadata(output),
500
+ $metadata: $metadata,
506
501
  });
507
502
  throw __decorateServiceException(response, parsedBody);
508
503
  }
@@ -533,7 +528,7 @@ export var deserializeAws_restJson1CreateCodeReviewCommand = function (output, c
533
528
  });
534
529
  }); };
535
530
  var deserializeAws_restJson1CreateCodeReviewCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
536
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
531
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
537
532
  var _c;
538
533
  return __generator(this, function (_d) {
539
534
  switch (_d.label) {
@@ -543,7 +538,6 @@ var deserializeAws_restJson1CreateCodeReviewCommandError = function (output, con
543
538
  return [4, parseBody(output.body, context)];
544
539
  case 1:
545
540
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
546
- errorCode = "UnknownError";
547
541
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
548
542
  _b = errorCode;
549
543
  switch (_b) {
@@ -575,10 +569,12 @@ var deserializeAws_restJson1CreateCodeReviewCommandError = function (output, con
575
569
  case 13: throw _d.sent();
576
570
  case 14:
577
571
  parsedBody = parsedOutput.body;
572
+ $metadata = deserializeMetadata(output);
573
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
578
574
  response = new __BaseException({
579
- name: parsedBody.code || parsedBody.Code || errorCode,
575
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
580
576
  $fault: "client",
581
- $metadata: deserializeMetadata(output),
577
+ $metadata: $metadata,
582
578
  });
583
579
  throw __decorateServiceException(response, parsedBody);
584
580
  }
@@ -609,7 +605,7 @@ export var deserializeAws_restJson1DescribeCodeReviewCommand = function (output,
609
605
  });
610
606
  }); };
611
607
  var deserializeAws_restJson1DescribeCodeReviewCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
612
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
608
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
613
609
  var _c;
614
610
  return __generator(this, function (_d) {
615
611
  switch (_d.label) {
@@ -619,7 +615,6 @@ var deserializeAws_restJson1DescribeCodeReviewCommandError = function (output, c
619
615
  return [4, parseBody(output.body, context)];
620
616
  case 1:
621
617
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
622
- errorCode = "UnknownError";
623
618
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
619
  _b = errorCode;
625
620
  switch (_b) {
@@ -647,10 +642,12 @@ var deserializeAws_restJson1DescribeCodeReviewCommandError = function (output, c
647
642
  case 11: throw _d.sent();
648
643
  case 12:
649
644
  parsedBody = parsedOutput.body;
645
+ $metadata = deserializeMetadata(output);
646
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
650
647
  response = new __BaseException({
651
- name: parsedBody.code || parsedBody.Code || errorCode,
648
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
652
649
  $fault: "client",
653
- $metadata: deserializeMetadata(output),
650
+ $metadata: $metadata,
654
651
  });
655
652
  throw __decorateServiceException(response, parsedBody);
656
653
  }
@@ -681,7 +678,7 @@ export var deserializeAws_restJson1DescribeRecommendationFeedbackCommand = funct
681
678
  });
682
679
  }); };
683
680
  var deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
684
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
681
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
685
682
  var _c;
686
683
  return __generator(this, function (_d) {
687
684
  switch (_d.label) {
@@ -691,7 +688,6 @@ var deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = functio
691
688
  return [4, parseBody(output.body, context)];
692
689
  case 1:
693
690
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
694
- errorCode = "UnknownError";
695
691
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
692
  _b = errorCode;
697
693
  switch (_b) {
@@ -719,10 +715,12 @@ var deserializeAws_restJson1DescribeRecommendationFeedbackCommandError = functio
719
715
  case 11: throw _d.sent();
720
716
  case 12:
721
717
  parsedBody = parsedOutput.body;
718
+ $metadata = deserializeMetadata(output);
719
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
722
720
  response = new __BaseException({
723
- name: parsedBody.code || parsedBody.Code || errorCode,
721
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
724
722
  $fault: "client",
725
- $metadata: deserializeMetadata(output),
723
+ $metadata: $metadata,
726
724
  });
727
725
  throw __decorateServiceException(response, parsedBody);
728
726
  }
@@ -757,7 +755,7 @@ export var deserializeAws_restJson1DescribeRepositoryAssociationCommand = functi
757
755
  });
758
756
  }); };
759
757
  var deserializeAws_restJson1DescribeRepositoryAssociationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
760
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
758
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
761
759
  var _c;
762
760
  return __generator(this, function (_d) {
763
761
  switch (_d.label) {
@@ -767,7 +765,6 @@ var deserializeAws_restJson1DescribeRepositoryAssociationCommandError = function
767
765
  return [4, parseBody(output.body, context)];
768
766
  case 1:
769
767
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
770
- errorCode = "UnknownError";
771
768
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
772
769
  _b = errorCode;
773
770
  switch (_b) {
@@ -795,10 +792,12 @@ var deserializeAws_restJson1DescribeRepositoryAssociationCommandError = function
795
792
  case 11: throw _d.sent();
796
793
  case 12:
797
794
  parsedBody = parsedOutput.body;
795
+ $metadata = deserializeMetadata(output);
796
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
798
797
  response = new __BaseException({
799
- name: parsedBody.code || parsedBody.Code || errorCode,
798
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
800
799
  $fault: "client",
801
- $metadata: deserializeMetadata(output),
800
+ $metadata: $metadata,
802
801
  });
803
802
  throw __decorateServiceException(response, parsedBody);
804
803
  }
@@ -833,7 +832,7 @@ export var deserializeAws_restJson1DisassociateRepositoryCommand = function (out
833
832
  });
834
833
  }); };
835
834
  var deserializeAws_restJson1DisassociateRepositoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
836
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
835
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
837
836
  var _c;
838
837
  return __generator(this, function (_d) {
839
838
  switch (_d.label) {
@@ -843,7 +842,6 @@ var deserializeAws_restJson1DisassociateRepositoryCommandError = function (outpu
843
842
  return [4, parseBody(output.body, context)];
844
843
  case 1:
845
844
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
846
- errorCode = "UnknownError";
847
845
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
848
846
  _b = errorCode;
849
847
  switch (_b) {
@@ -875,10 +873,12 @@ var deserializeAws_restJson1DisassociateRepositoryCommandError = function (outpu
875
873
  case 13: throw _d.sent();
876
874
  case 14:
877
875
  parsedBody = parsedOutput.body;
876
+ $metadata = deserializeMetadata(output);
877
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
878
878
  response = new __BaseException({
879
- name: parsedBody.code || parsedBody.Code || errorCode,
879
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
880
880
  $fault: "client",
881
- $metadata: deserializeMetadata(output),
881
+ $metadata: $metadata,
882
882
  });
883
883
  throw __decorateServiceException(response, parsedBody);
884
884
  }
@@ -913,7 +913,7 @@ export var deserializeAws_restJson1ListCodeReviewsCommand = function (output, co
913
913
  });
914
914
  }); };
915
915
  var deserializeAws_restJson1ListCodeReviewsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
916
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
916
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
917
917
  var _c;
918
918
  return __generator(this, function (_d) {
919
919
  switch (_d.label) {
@@ -923,7 +923,6 @@ var deserializeAws_restJson1ListCodeReviewsCommandError = function (output, cont
923
923
  return [4, parseBody(output.body, context)];
924
924
  case 1:
925
925
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
926
- errorCode = "UnknownError";
927
926
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
928
927
  _b = errorCode;
929
928
  switch (_b) {
@@ -947,10 +946,12 @@ var deserializeAws_restJson1ListCodeReviewsCommandError = function (output, cont
947
946
  case 9: throw _d.sent();
948
947
  case 10:
949
948
  parsedBody = parsedOutput.body;
949
+ $metadata = deserializeMetadata(output);
950
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
950
951
  response = new __BaseException({
951
- name: parsedBody.code || parsedBody.Code || errorCode,
952
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
952
953
  $fault: "client",
953
- $metadata: deserializeMetadata(output),
954
+ $metadata: $metadata,
954
955
  });
955
956
  throw __decorateServiceException(response, parsedBody);
956
957
  }
@@ -985,7 +986,7 @@ export var deserializeAws_restJson1ListRecommendationFeedbackCommand = function
985
986
  });
986
987
  }); };
987
988
  var deserializeAws_restJson1ListRecommendationFeedbackCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
988
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
989
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
989
990
  var _c;
990
991
  return __generator(this, function (_d) {
991
992
  switch (_d.label) {
@@ -995,7 +996,6 @@ var deserializeAws_restJson1ListRecommendationFeedbackCommandError = function (o
995
996
  return [4, parseBody(output.body, context)];
996
997
  case 1:
997
998
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
998
- errorCode = "UnknownError";
999
999
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1000
1000
  _b = errorCode;
1001
1001
  switch (_b) {
@@ -1023,10 +1023,12 @@ var deserializeAws_restJson1ListRecommendationFeedbackCommandError = function (o
1023
1023
  case 11: throw _d.sent();
1024
1024
  case 12:
1025
1025
  parsedBody = parsedOutput.body;
1026
+ $metadata = deserializeMetadata(output);
1027
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1026
1028
  response = new __BaseException({
1027
- name: parsedBody.code || parsedBody.Code || errorCode,
1029
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1028
1030
  $fault: "client",
1029
- $metadata: deserializeMetadata(output),
1031
+ $metadata: $metadata,
1030
1032
  });
1031
1033
  throw __decorateServiceException(response, parsedBody);
1032
1034
  }
@@ -1061,7 +1063,7 @@ export var deserializeAws_restJson1ListRecommendationsCommand = function (output
1061
1063
  });
1062
1064
  }); };
1063
1065
  var deserializeAws_restJson1ListRecommendationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1064
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1066
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1065
1067
  var _c;
1066
1068
  return __generator(this, function (_d) {
1067
1069
  switch (_d.label) {
@@ -1071,7 +1073,6 @@ var deserializeAws_restJson1ListRecommendationsCommandError = function (output,
1071
1073
  return [4, parseBody(output.body, context)];
1072
1074
  case 1:
1073
1075
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1074
- errorCode = "UnknownError";
1075
1076
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1076
1077
  _b = errorCode;
1077
1078
  switch (_b) {
@@ -1099,10 +1100,12 @@ var deserializeAws_restJson1ListRecommendationsCommandError = function (output,
1099
1100
  case 11: throw _d.sent();
1100
1101
  case 12:
1101
1102
  parsedBody = parsedOutput.body;
1103
+ $metadata = deserializeMetadata(output);
1104
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1102
1105
  response = new __BaseException({
1103
- name: parsedBody.code || parsedBody.Code || errorCode,
1106
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1104
1107
  $fault: "client",
1105
- $metadata: deserializeMetadata(output),
1108
+ $metadata: $metadata,
1106
1109
  });
1107
1110
  throw __decorateServiceException(response, parsedBody);
1108
1111
  }
@@ -1137,7 +1140,7 @@ export var deserializeAws_restJson1ListRepositoryAssociationsCommand = function
1137
1140
  });
1138
1141
  }); };
1139
1142
  var deserializeAws_restJson1ListRepositoryAssociationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1140
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1143
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1141
1144
  var _c;
1142
1145
  return __generator(this, function (_d) {
1143
1146
  switch (_d.label) {
@@ -1147,7 +1150,6 @@ var deserializeAws_restJson1ListRepositoryAssociationsCommandError = function (o
1147
1150
  return [4, parseBody(output.body, context)];
1148
1151
  case 1:
1149
1152
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1150
- errorCode = "UnknownError";
1151
1153
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1152
1154
  _b = errorCode;
1153
1155
  switch (_b) {
@@ -1167,10 +1169,12 @@ var deserializeAws_restJson1ListRepositoryAssociationsCommandError = function (o
1167
1169
  case 7: throw _d.sent();
1168
1170
  case 8:
1169
1171
  parsedBody = parsedOutput.body;
1172
+ $metadata = deserializeMetadata(output);
1173
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1170
1174
  response = new __BaseException({
1171
- name: parsedBody.code || parsedBody.Code || errorCode,
1175
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1172
1176
  $fault: "client",
1173
- $metadata: deserializeMetadata(output),
1177
+ $metadata: $metadata,
1174
1178
  });
1175
1179
  throw __decorateServiceException(response, parsedBody);
1176
1180
  }
@@ -1201,7 +1205,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
1201
1205
  });
1202
1206
  }); };
1203
1207
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1204
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1208
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1205
1209
  var _c;
1206
1210
  return __generator(this, function (_d) {
1207
1211
  switch (_d.label) {
@@ -1211,7 +1215,6 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1211
1215
  return [4, parseBody(output.body, context)];
1212
1216
  case 1:
1213
1217
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1214
- errorCode = "UnknownError";
1215
1218
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1216
1219
  _b = errorCode;
1217
1220
  switch (_b) {
@@ -1231,10 +1234,12 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1231
1234
  case 7: throw _d.sent();
1232
1235
  case 8:
1233
1236
  parsedBody = parsedOutput.body;
1237
+ $metadata = deserializeMetadata(output);
1238
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1234
1239
  response = new __BaseException({
1235
- name: parsedBody.code || parsedBody.Code || errorCode,
1240
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1236
1241
  $fault: "client",
1237
- $metadata: deserializeMetadata(output),
1242
+ $metadata: $metadata,
1238
1243
  });
1239
1244
  throw __decorateServiceException(response, parsedBody);
1240
1245
  }
@@ -1259,7 +1264,7 @@ export var deserializeAws_restJson1PutRecommendationFeedbackCommand = function (
1259
1264
  });
1260
1265
  }); };
1261
1266
  var deserializeAws_restJson1PutRecommendationFeedbackCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1262
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1267
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1263
1268
  var _c;
1264
1269
  return __generator(this, function (_d) {
1265
1270
  switch (_d.label) {
@@ -1269,7 +1274,6 @@ var deserializeAws_restJson1PutRecommendationFeedbackCommandError = function (ou
1269
1274
  return [4, parseBody(output.body, context)];
1270
1275
  case 1:
1271
1276
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1272
- errorCode = "UnknownError";
1273
1277
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1274
1278
  _b = errorCode;
1275
1279
  switch (_b) {
@@ -1297,10 +1301,12 @@ var deserializeAws_restJson1PutRecommendationFeedbackCommandError = function (ou
1297
1301
  case 11: throw _d.sent();
1298
1302
  case 12:
1299
1303
  parsedBody = parsedOutput.body;
1304
+ $metadata = deserializeMetadata(output);
1305
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1300
1306
  response = new __BaseException({
1301
- name: parsedBody.code || parsedBody.Code || errorCode,
1307
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1302
1308
  $fault: "client",
1303
- $metadata: deserializeMetadata(output),
1309
+ $metadata: $metadata,
1304
1310
  });
1305
1311
  throw __decorateServiceException(response, parsedBody);
1306
1312
  }
@@ -1325,7 +1331,7 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
1325
1331
  });
1326
1332
  }); };
1327
1333
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1328
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1334
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1329
1335
  var _c;
1330
1336
  return __generator(this, function (_d) {
1331
1337
  switch (_d.label) {
@@ -1335,7 +1341,6 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1335
1341
  return [4, parseBody(output.body, context)];
1336
1342
  case 1:
1337
1343
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1338
- errorCode = "UnknownError";
1339
1344
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1340
1345
  _b = errorCode;
1341
1346
  switch (_b) {
@@ -1355,10 +1360,12 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1355
1360
  case 7: throw _d.sent();
1356
1361
  case 8:
1357
1362
  parsedBody = parsedOutput.body;
1363
+ $metadata = deserializeMetadata(output);
1364
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1358
1365
  response = new __BaseException({
1359
- name: parsedBody.code || parsedBody.Code || errorCode,
1366
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1360
1367
  $fault: "client",
1361
- $metadata: deserializeMetadata(output),
1368
+ $metadata: $metadata,
1362
1369
  });
1363
1370
  throw __decorateServiceException(response, parsedBody);
1364
1371
  }
@@ -1383,7 +1390,7 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
1383
1390
  });
1384
1391
  }); };
1385
1392
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1386
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1393
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1387
1394
  var _c;
1388
1395
  return __generator(this, function (_d) {
1389
1396
  switch (_d.label) {
@@ -1393,7 +1400,6 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
1393
1400
  return [4, parseBody(output.body, context)];
1394
1401
  case 1:
1395
1402
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1396
- errorCode = "UnknownError";
1397
1403
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1398
1404
  _b = errorCode;
1399
1405
  switch (_b) {
@@ -1413,10 +1419,12 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
1413
1419
  case 7: throw _d.sent();
1414
1420
  case 8:
1415
1421
  parsedBody = parsedOutput.body;
1422
+ $metadata = deserializeMetadata(output);
1423
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1416
1424
  response = new __BaseException({
1417
- name: parsedBody.code || parsedBody.Code || errorCode,
1425
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1418
1426
  $fault: "client",
1419
- $metadata: deserializeMetadata(output),
1427
+ $metadata: $metadata,
1420
1428
  });
1421
1429
  throw __decorateServiceException(response, parsedBody);
1422
1430
  }
@@ -1517,40 +1525,31 @@ var serializeAws_restJson1AnalysisTypes = function (input, context) {
1517
1525
  });
1518
1526
  };
1519
1527
  var serializeAws_restJson1BranchDiffSourceCodeType = function (input, context) {
1520
- return __assign(__assign({}, (input.DestinationBranchName !== undefined &&
1521
- input.DestinationBranchName !== null && { DestinationBranchName: input.DestinationBranchName })), (input.SourceBranchName !== undefined &&
1522
- input.SourceBranchName !== null && { SourceBranchName: input.SourceBranchName }));
1528
+ return __assign(__assign({}, (input.DestinationBranchName != null && { DestinationBranchName: input.DestinationBranchName })), (input.SourceBranchName != null && { SourceBranchName: input.SourceBranchName }));
1523
1529
  };
1524
1530
  var serializeAws_restJson1CodeArtifacts = function (input, context) {
1525
- return __assign(__assign({}, (input.BuildArtifactsObjectKey !== undefined &&
1526
- input.BuildArtifactsObjectKey !== null && { BuildArtifactsObjectKey: input.BuildArtifactsObjectKey })), (input.SourceCodeArtifactsObjectKey !== undefined &&
1527
- input.SourceCodeArtifactsObjectKey !== null && {
1531
+ return __assign(__assign({}, (input.BuildArtifactsObjectKey != null && { BuildArtifactsObjectKey: input.BuildArtifactsObjectKey })), (input.SourceCodeArtifactsObjectKey != null && {
1528
1532
  SourceCodeArtifactsObjectKey: input.SourceCodeArtifactsObjectKey,
1529
1533
  }));
1530
1534
  };
1531
1535
  var serializeAws_restJson1CodeCommitRepository = function (input, context) {
1532
- return __assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1536
+ return __assign({}, (input.Name != null && { Name: input.Name }));
1533
1537
  };
1534
1538
  var serializeAws_restJson1CodeReviewType = function (input, context) {
1535
- return __assign(__assign({}, (input.AnalysisTypes !== undefined &&
1536
- input.AnalysisTypes !== null && {
1539
+ return __assign(__assign({}, (input.AnalysisTypes != null && {
1537
1540
  AnalysisTypes: serializeAws_restJson1AnalysisTypes(input.AnalysisTypes, context),
1538
- })), (input.RepositoryAnalysis !== undefined &&
1539
- input.RepositoryAnalysis !== null && {
1541
+ })), (input.RepositoryAnalysis != null && {
1540
1542
  RepositoryAnalysis: serializeAws_restJson1RepositoryAnalysis(input.RepositoryAnalysis, context),
1541
1543
  }));
1542
1544
  };
1543
1545
  var serializeAws_restJson1CommitDiffSourceCodeType = function (input, context) {
1544
- return __assign(__assign(__assign({}, (input.DestinationCommit !== undefined &&
1545
- input.DestinationCommit !== null && { DestinationCommit: input.DestinationCommit })), (input.MergeBaseCommit !== undefined &&
1546
- input.MergeBaseCommit !== null && { MergeBaseCommit: input.MergeBaseCommit })), (input.SourceCommit !== undefined && input.SourceCommit !== null && { SourceCommit: input.SourceCommit }));
1546
+ return __assign(__assign(__assign({}, (input.DestinationCommit != null && { DestinationCommit: input.DestinationCommit })), (input.MergeBaseCommit != null && { MergeBaseCommit: input.MergeBaseCommit })), (input.SourceCommit != null && { SourceCommit: input.SourceCommit }));
1547
1547
  };
1548
1548
  var serializeAws_restJson1EventInfo = function (input, context) {
1549
- return __assign(__assign({}, (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.State !== undefined && input.State !== null && { State: input.State }));
1549
+ return __assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.State != null && { State: input.State }));
1550
1550
  };
1551
1551
  var serializeAws_restJson1KMSKeyDetails = function (input, context) {
1552
- return __assign(__assign({}, (input.EncryptionOption !== undefined &&
1553
- input.EncryptionOption !== null && { EncryptionOption: input.EncryptionOption })), (input.KMSKeyId !== undefined && input.KMSKeyId !== null && { KMSKeyId: input.KMSKeyId }));
1552
+ return __assign(__assign({}, (input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption })), (input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }));
1554
1553
  };
1555
1554
  var serializeAws_restJson1Reactions = function (input, context) {
1556
1555
  return input
@@ -1563,62 +1562,48 @@ var serializeAws_restJson1Reactions = function (input, context) {
1563
1562
  });
1564
1563
  };
1565
1564
  var serializeAws_restJson1Repository = function (input, context) {
1566
- return __assign(__assign(__assign(__assign({}, (input.Bitbucket !== undefined &&
1567
- input.Bitbucket !== null && {
1565
+ return __assign(__assign(__assign(__assign({}, (input.Bitbucket != null && {
1568
1566
  Bitbucket: serializeAws_restJson1ThirdPartySourceRepository(input.Bitbucket, context),
1569
- })), (input.CodeCommit !== undefined &&
1570
- input.CodeCommit !== null && {
1567
+ })), (input.CodeCommit != null && {
1571
1568
  CodeCommit: serializeAws_restJson1CodeCommitRepository(input.CodeCommit, context),
1572
- })), (input.GitHubEnterpriseServer !== undefined &&
1573
- input.GitHubEnterpriseServer !== null && {
1569
+ })), (input.GitHubEnterpriseServer != null && {
1574
1570
  GitHubEnterpriseServer: serializeAws_restJson1ThirdPartySourceRepository(input.GitHubEnterpriseServer, context),
1575
- })), (input.S3Bucket !== undefined &&
1576
- input.S3Bucket !== null && { S3Bucket: serializeAws_restJson1S3Repository(input.S3Bucket, context) }));
1571
+ })), (input.S3Bucket != null && { S3Bucket: serializeAws_restJson1S3Repository(input.S3Bucket, context) }));
1577
1572
  };
1578
1573
  var serializeAws_restJson1RepositoryAnalysis = function (input, context) {
1579
- return __assign(__assign({}, (input.RepositoryHead !== undefined &&
1580
- input.RepositoryHead !== null && {
1574
+ return __assign(__assign({}, (input.RepositoryHead != null && {
1581
1575
  RepositoryHead: serializeAws_restJson1RepositoryHeadSourceCodeType(input.RepositoryHead, context),
1582
- })), (input.SourceCodeType !== undefined &&
1583
- input.SourceCodeType !== null && {
1576
+ })), (input.SourceCodeType != null && {
1584
1577
  SourceCodeType: serializeAws_restJson1SourceCodeType(input.SourceCodeType, context),
1585
1578
  }));
1586
1579
  };
1587
1580
  var serializeAws_restJson1RepositoryHeadSourceCodeType = function (input, context) {
1588
- return __assign({}, (input.BranchName !== undefined && input.BranchName !== null && { BranchName: input.BranchName }));
1581
+ return __assign({}, (input.BranchName != null && { BranchName: input.BranchName }));
1589
1582
  };
1590
1583
  var serializeAws_restJson1RequestMetadata = function (input, context) {
1591
- return __assign(__assign(__assign(__assign({}, (input.EventInfo !== undefined &&
1592
- input.EventInfo !== null && { EventInfo: serializeAws_restJson1EventInfo(input.EventInfo, context) })), (input.RequestId !== undefined && input.RequestId !== null && { RequestId: input.RequestId })), (input.Requester !== undefined && input.Requester !== null && { Requester: input.Requester })), (input.VendorName !== undefined && input.VendorName !== null && { VendorName: input.VendorName }));
1584
+ return __assign(__assign(__assign(__assign({}, (input.EventInfo != null && { EventInfo: serializeAws_restJson1EventInfo(input.EventInfo, context) })), (input.RequestId != null && { RequestId: input.RequestId })), (input.Requester != null && { Requester: input.Requester })), (input.VendorName != null && { VendorName: input.VendorName }));
1593
1585
  };
1594
1586
  var serializeAws_restJson1S3BucketRepository = function (input, context) {
1595
- return __assign(__assign({}, (input.Details !== undefined &&
1596
- input.Details !== null && { Details: serializeAws_restJson1S3RepositoryDetails(input.Details, context) })), (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1587
+ return __assign(__assign({}, (input.Details != null && { Details: serializeAws_restJson1S3RepositoryDetails(input.Details, context) })), (input.Name != null && { Name: input.Name }));
1597
1588
  };
1598
1589
  var serializeAws_restJson1S3Repository = function (input, context) {
1599
- return __assign(__assign({}, (input.BucketName !== undefined && input.BucketName !== null && { BucketName: input.BucketName })), (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1590
+ return __assign(__assign({}, (input.BucketName != null && { BucketName: input.BucketName })), (input.Name != null && { Name: input.Name }));
1600
1591
  };
1601
1592
  var serializeAws_restJson1S3RepositoryDetails = function (input, context) {
1602
- return __assign(__assign({}, (input.BucketName !== undefined && input.BucketName !== null && { BucketName: input.BucketName })), (input.CodeArtifacts !== undefined &&
1603
- input.CodeArtifacts !== null && {
1593
+ return __assign(__assign({}, (input.BucketName != null && { BucketName: input.BucketName })), (input.CodeArtifacts != null && {
1604
1594
  CodeArtifacts: serializeAws_restJson1CodeArtifacts(input.CodeArtifacts, context),
1605
1595
  }));
1606
1596
  };
1607
1597
  var serializeAws_restJson1SourceCodeType = function (input, context) {
1608
- return __assign(__assign(__assign(__assign(__assign({}, (input.BranchDiff !== undefined &&
1609
- input.BranchDiff !== null && {
1598
+ return __assign(__assign(__assign(__assign(__assign({}, (input.BranchDiff != null && {
1610
1599
  BranchDiff: serializeAws_restJson1BranchDiffSourceCodeType(input.BranchDiff, context),
1611
- })), (input.CommitDiff !== undefined &&
1612
- input.CommitDiff !== null && {
1600
+ })), (input.CommitDiff != null && {
1613
1601
  CommitDiff: serializeAws_restJson1CommitDiffSourceCodeType(input.CommitDiff, context),
1614
- })), (input.RepositoryHead !== undefined &&
1615
- input.RepositoryHead !== null && {
1602
+ })), (input.RepositoryHead != null && {
1616
1603
  RepositoryHead: serializeAws_restJson1RepositoryHeadSourceCodeType(input.RepositoryHead, context),
1617
- })), (input.RequestMetadata !== undefined &&
1618
- input.RequestMetadata !== null && {
1604
+ })), (input.RequestMetadata != null && {
1619
1605
  RequestMetadata: serializeAws_restJson1RequestMetadata(input.RequestMetadata, context),
1620
- })), (input.S3BucketRepository !== undefined &&
1621
- input.S3BucketRepository !== null && {
1606
+ })), (input.S3BucketRepository != null && {
1622
1607
  S3BucketRepository: serializeAws_restJson1S3BucketRepository(input.S3BucketRepository, context),
1623
1608
  }));
1624
1609
  };
@@ -1633,7 +1618,7 @@ var serializeAws_restJson1TagMap = function (input, context) {
1633
1618
  }, {});
1634
1619
  };
1635
1620
  var serializeAws_restJson1ThirdPartySourceRepository = function (input, context) {
1636
- return __assign(__assign(__assign({}, (input.ConnectionArn !== undefined && input.ConnectionArn !== null && { ConnectionArn: input.ConnectionArn })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Owner !== undefined && input.Owner !== null && { Owner: input.Owner }));
1621
+ return __assign(__assign(__assign({}, (input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn })), (input.Name != null && { Name: input.Name })), (input.Owner != null && { Owner: input.Owner }));
1637
1622
  };
1638
1623
  var deserializeAws_restJson1AnalysisTypes = function (output, context) {
1639
1624
  var retVal = (output || [])
@@ -1660,27 +1645,23 @@ var deserializeAws_restJson1CodeArtifacts = function (output, context) {
1660
1645
  };
1661
1646
  var deserializeAws_restJson1CodeReview = function (output, context) {
1662
1647
  return {
1663
- AnalysisTypes: output.AnalysisTypes !== undefined && output.AnalysisTypes !== null
1664
- ? deserializeAws_restJson1AnalysisTypes(output.AnalysisTypes, context)
1665
- : undefined,
1648
+ AnalysisTypes: output.AnalysisTypes != null ? deserializeAws_restJson1AnalysisTypes(output.AnalysisTypes, context) : undefined,
1666
1649
  AssociationArn: __expectString(output.AssociationArn),
1667
1650
  CodeReviewArn: __expectString(output.CodeReviewArn),
1668
1651
  ConfigFileState: __expectString(output.ConfigFileState),
1669
- CreatedTimeStamp: output.CreatedTimeStamp !== undefined && output.CreatedTimeStamp !== null
1652
+ CreatedTimeStamp: output.CreatedTimeStamp != null
1670
1653
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp)))
1671
1654
  : undefined,
1672
- LastUpdatedTimeStamp: output.LastUpdatedTimeStamp !== undefined && output.LastUpdatedTimeStamp !== null
1655
+ LastUpdatedTimeStamp: output.LastUpdatedTimeStamp != null
1673
1656
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp)))
1674
1657
  : undefined,
1675
- Metrics: output.Metrics !== undefined && output.Metrics !== null
1676
- ? deserializeAws_restJson1Metrics(output.Metrics, context)
1677
- : undefined,
1658
+ Metrics: output.Metrics != null ? deserializeAws_restJson1Metrics(output.Metrics, context) : undefined,
1678
1659
  Name: __expectString(output.Name),
1679
1660
  Owner: __expectString(output.Owner),
1680
1661
  ProviderType: __expectString(output.ProviderType),
1681
1662
  PullRequestId: __expectString(output.PullRequestId),
1682
1663
  RepositoryName: __expectString(output.RepositoryName),
1683
- SourceCodeType: output.SourceCodeType !== undefined && output.SourceCodeType !== null
1664
+ SourceCodeType: output.SourceCodeType != null
1684
1665
  ? deserializeAws_restJson1SourceCodeType(output.SourceCodeType, context)
1685
1666
  : undefined,
1686
1667
  State: __expectString(output.State),
@@ -1702,13 +1683,13 @@ var deserializeAws_restJson1CodeReviewSummaries = function (output, context) {
1702
1683
  var deserializeAws_restJson1CodeReviewSummary = function (output, context) {
1703
1684
  return {
1704
1685
  CodeReviewArn: __expectString(output.CodeReviewArn),
1705
- CreatedTimeStamp: output.CreatedTimeStamp !== undefined && output.CreatedTimeStamp !== null
1686
+ CreatedTimeStamp: output.CreatedTimeStamp != null
1706
1687
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp)))
1707
1688
  : undefined,
1708
- LastUpdatedTimeStamp: output.LastUpdatedTimeStamp !== undefined && output.LastUpdatedTimeStamp !== null
1689
+ LastUpdatedTimeStamp: output.LastUpdatedTimeStamp != null
1709
1690
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp)))
1710
1691
  : undefined,
1711
- MetricsSummary: output.MetricsSummary !== undefined && output.MetricsSummary !== null
1692
+ MetricsSummary: output.MetricsSummary != null
1712
1693
  ? deserializeAws_restJson1MetricsSummary(output.MetricsSummary, context)
1713
1694
  : undefined,
1714
1695
  Name: __expectString(output.Name),
@@ -1716,7 +1697,7 @@ var deserializeAws_restJson1CodeReviewSummary = function (output, context) {
1716
1697
  ProviderType: __expectString(output.ProviderType),
1717
1698
  PullRequestId: __expectString(output.PullRequestId),
1718
1699
  RepositoryName: __expectString(output.RepositoryName),
1719
- SourceCodeType: output.SourceCodeType !== undefined && output.SourceCodeType !== null
1700
+ SourceCodeType: output.SourceCodeType != null
1720
1701
  ? deserializeAws_restJson1SourceCodeType(output.SourceCodeType, context)
1721
1702
  : undefined,
1722
1703
  State: __expectString(output.State),
@@ -1770,15 +1751,13 @@ var deserializeAws_restJson1Reactions = function (output, context) {
1770
1751
  var deserializeAws_restJson1RecommendationFeedback = function (output, context) {
1771
1752
  return {
1772
1753
  CodeReviewArn: __expectString(output.CodeReviewArn),
1773
- CreatedTimeStamp: output.CreatedTimeStamp !== undefined && output.CreatedTimeStamp !== null
1754
+ CreatedTimeStamp: output.CreatedTimeStamp != null
1774
1755
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp)))
1775
1756
  : undefined,
1776
- LastUpdatedTimeStamp: output.LastUpdatedTimeStamp !== undefined && output.LastUpdatedTimeStamp !== null
1757
+ LastUpdatedTimeStamp: output.LastUpdatedTimeStamp != null
1777
1758
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp)))
1778
1759
  : undefined,
1779
- Reactions: output.Reactions !== undefined && output.Reactions !== null
1780
- ? deserializeAws_restJson1Reactions(output.Reactions, context)
1781
- : undefined,
1760
+ Reactions: output.Reactions != null ? deserializeAws_restJson1Reactions(output.Reactions, context) : undefined,
1782
1761
  RecommendationId: __expectString(output.RecommendationId),
1783
1762
  UserId: __expectString(output.UserId),
1784
1763
  };
@@ -1796,9 +1775,7 @@ var deserializeAws_restJson1RecommendationFeedbackSummaries = function (output,
1796
1775
  };
1797
1776
  var deserializeAws_restJson1RecommendationFeedbackSummary = function (output, context) {
1798
1777
  return {
1799
- Reactions: output.Reactions !== undefined && output.Reactions !== null
1800
- ? deserializeAws_restJson1Reactions(output.Reactions, context)
1801
- : undefined,
1778
+ Reactions: output.Reactions != null ? deserializeAws_restJson1Reactions(output.Reactions, context) : undefined,
1802
1779
  RecommendationId: __expectString(output.RecommendationId),
1803
1780
  UserId: __expectString(output.UserId),
1804
1781
  };
@@ -1821,9 +1798,7 @@ var deserializeAws_restJson1RecommendationSummary = function (output, context) {
1821
1798
  FilePath: __expectString(output.FilePath),
1822
1799
  RecommendationCategory: __expectString(output.RecommendationCategory),
1823
1800
  RecommendationId: __expectString(output.RecommendationId),
1824
- RuleMetadata: output.RuleMetadata !== undefined && output.RuleMetadata !== null
1825
- ? deserializeAws_restJson1RuleMetadata(output.RuleMetadata, context)
1826
- : undefined,
1801
+ RuleMetadata: output.RuleMetadata != null ? deserializeAws_restJson1RuleMetadata(output.RuleMetadata, context) : undefined,
1827
1802
  Severity: __expectString(output.Severity),
1828
1803
  StartLine: __expectInt32(output.StartLine),
1829
1804
  };
@@ -1833,19 +1808,17 @@ var deserializeAws_restJson1RepositoryAssociation = function (output, context) {
1833
1808
  AssociationArn: __expectString(output.AssociationArn),
1834
1809
  AssociationId: __expectString(output.AssociationId),
1835
1810
  ConnectionArn: __expectString(output.ConnectionArn),
1836
- CreatedTimeStamp: output.CreatedTimeStamp !== undefined && output.CreatedTimeStamp !== null
1811
+ CreatedTimeStamp: output.CreatedTimeStamp != null
1837
1812
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp)))
1838
1813
  : undefined,
1839
- KMSKeyDetails: output.KMSKeyDetails !== undefined && output.KMSKeyDetails !== null
1840
- ? deserializeAws_restJson1KMSKeyDetails(output.KMSKeyDetails, context)
1841
- : undefined,
1842
- LastUpdatedTimeStamp: output.LastUpdatedTimeStamp !== undefined && output.LastUpdatedTimeStamp !== null
1814
+ KMSKeyDetails: output.KMSKeyDetails != null ? deserializeAws_restJson1KMSKeyDetails(output.KMSKeyDetails, context) : undefined,
1815
+ LastUpdatedTimeStamp: output.LastUpdatedTimeStamp != null
1843
1816
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp)))
1844
1817
  : undefined,
1845
1818
  Name: __expectString(output.Name),
1846
1819
  Owner: __expectString(output.Owner),
1847
1820
  ProviderType: __expectString(output.ProviderType),
1848
- S3RepositoryDetails: output.S3RepositoryDetails !== undefined && output.S3RepositoryDetails !== null
1821
+ S3RepositoryDetails: output.S3RepositoryDetails != null
1849
1822
  ? deserializeAws_restJson1S3RepositoryDetails(output.S3RepositoryDetails, context)
1850
1823
  : undefined,
1851
1824
  State: __expectString(output.State),
@@ -1868,7 +1841,7 @@ var deserializeAws_restJson1RepositoryAssociationSummary = function (output, con
1868
1841
  AssociationArn: __expectString(output.AssociationArn),
1869
1842
  AssociationId: __expectString(output.AssociationId),
1870
1843
  ConnectionArn: __expectString(output.ConnectionArn),
1871
- LastUpdatedTimeStamp: output.LastUpdatedTimeStamp !== undefined && output.LastUpdatedTimeStamp !== null
1844
+ LastUpdatedTimeStamp: output.LastUpdatedTimeStamp != null
1872
1845
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp)))
1873
1846
  : undefined,
1874
1847
  Name: __expectString(output.Name),
@@ -1884,9 +1857,7 @@ var deserializeAws_restJson1RepositoryHeadSourceCodeType = function (output, con
1884
1857
  };
1885
1858
  var deserializeAws_restJson1RequestMetadata = function (output, context) {
1886
1859
  return {
1887
- EventInfo: output.EventInfo !== undefined && output.EventInfo !== null
1888
- ? deserializeAws_restJson1EventInfo(output.EventInfo, context)
1889
- : undefined,
1860
+ EventInfo: output.EventInfo != null ? deserializeAws_restJson1EventInfo(output.EventInfo, context) : undefined,
1890
1861
  RequestId: __expectString(output.RequestId),
1891
1862
  Requester: __expectString(output.Requester),
1892
1863
  VendorName: __expectString(output.VendorName),
@@ -1897,9 +1868,7 @@ var deserializeAws_restJson1RuleMetadata = function (output, context) {
1897
1868
  LongDescription: __expectString(output.LongDescription),
1898
1869
  RuleId: __expectString(output.RuleId),
1899
1870
  RuleName: __expectString(output.RuleName),
1900
- RuleTags: output.RuleTags !== undefined && output.RuleTags !== null
1901
- ? deserializeAws_restJson1RuleTags(output.RuleTags, context)
1902
- : undefined,
1871
+ RuleTags: output.RuleTags != null ? deserializeAws_restJson1RuleTags(output.RuleTags, context) : undefined,
1903
1872
  ShortDescription: __expectString(output.ShortDescription),
1904
1873
  };
1905
1874
  };
@@ -1916,35 +1885,31 @@ var deserializeAws_restJson1RuleTags = function (output, context) {
1916
1885
  };
1917
1886
  var deserializeAws_restJson1S3BucketRepository = function (output, context) {
1918
1887
  return {
1919
- Details: output.Details !== undefined && output.Details !== null
1920
- ? deserializeAws_restJson1S3RepositoryDetails(output.Details, context)
1921
- : undefined,
1888
+ Details: output.Details != null ? deserializeAws_restJson1S3RepositoryDetails(output.Details, context) : undefined,
1922
1889
  Name: __expectString(output.Name),
1923
1890
  };
1924
1891
  };
1925
1892
  var deserializeAws_restJson1S3RepositoryDetails = function (output, context) {
1926
1893
  return {
1927
1894
  BucketName: __expectString(output.BucketName),
1928
- CodeArtifacts: output.CodeArtifacts !== undefined && output.CodeArtifacts !== null
1929
- ? deserializeAws_restJson1CodeArtifacts(output.CodeArtifacts, context)
1930
- : undefined,
1895
+ CodeArtifacts: output.CodeArtifacts != null ? deserializeAws_restJson1CodeArtifacts(output.CodeArtifacts, context) : undefined,
1931
1896
  };
1932
1897
  };
1933
1898
  var deserializeAws_restJson1SourceCodeType = function (output, context) {
1934
1899
  return {
1935
- BranchDiff: output.BranchDiff !== undefined && output.BranchDiff !== null
1900
+ BranchDiff: output.BranchDiff != null
1936
1901
  ? deserializeAws_restJson1BranchDiffSourceCodeType(output.BranchDiff, context)
1937
1902
  : undefined,
1938
- CommitDiff: output.CommitDiff !== undefined && output.CommitDiff !== null
1903
+ CommitDiff: output.CommitDiff != null
1939
1904
  ? deserializeAws_restJson1CommitDiffSourceCodeType(output.CommitDiff, context)
1940
1905
  : undefined,
1941
- RepositoryHead: output.RepositoryHead !== undefined && output.RepositoryHead !== null
1906
+ RepositoryHead: output.RepositoryHead != null
1942
1907
  ? deserializeAws_restJson1RepositoryHeadSourceCodeType(output.RepositoryHead, context)
1943
1908
  : undefined,
1944
- RequestMetadata: output.RequestMetadata !== undefined && output.RequestMetadata !== null
1909
+ RequestMetadata: output.RequestMetadata != null
1945
1910
  ? deserializeAws_restJson1RequestMetadata(output.RequestMetadata, context)
1946
1911
  : undefined,
1947
- S3BucketRepository: output.S3BucketRepository !== undefined && output.S3BucketRepository !== null
1912
+ S3BucketRepository: output.S3BucketRepository != null
1948
1913
  ? deserializeAws_restJson1S3BucketRepository(output.S3BucketRepository, context)
1949
1914
  : undefined,
1950
1915
  };
@@ -2015,5 +1980,4 @@ var loadRestJsonErrorCode = function (output, data) {
2015
1980
  if (data["__type"] !== undefined) {
2016
1981
  return sanitizeErrorCode(data["__type"]);
2017
1982
  }
2018
- return "";
2019
1983
  };