@aws-sdk/client-dlm 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,11 +14,9 @@ export var serializeAws_restJson1CreateLifecyclePolicyCommand = function (input,
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies";
17
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.ExecutionRoleArn !== undefined &&
18
- input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails !== undefined &&
19
- input.PolicyDetails !== null && {
17
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails != null && {
20
18
  PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
21
- })), (input.State !== undefined && input.State !== null && { State: input.State })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
19
+ })), (input.State != null && { State: input.State })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
22
20
  return [2, new __HttpRequest({
23
21
  protocol: protocol,
24
22
  hostname: hostname,
@@ -170,7 +168,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
170
168
  else {
171
169
  throw new Error("No value provided for input HTTP label: ResourceArn.");
172
170
  }
173
- body = JSON.stringify(__assign({}, (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
171
+ body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
174
172
  return [2, new __HttpRequest({
175
173
  protocol: protocol,
176
174
  hostname: hostname,
@@ -237,11 +235,9 @@ export var serializeAws_restJson1UpdateLifecyclePolicyCommand = function (input,
237
235
  else {
238
236
  throw new Error("No value provided for input HTTP label: PolicyId.");
239
237
  }
240
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.ExecutionRoleArn !== undefined &&
241
- input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails !== undefined &&
242
- input.PolicyDetails !== null && {
238
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails != null && {
243
239
  PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
244
- })), (input.State !== undefined && input.State !== null && { State: input.State })));
240
+ })), (input.State != null && { State: input.State })));
245
241
  return [2, new __HttpRequest({
246
242
  protocol: protocol,
247
243
  hostname: hostname,
@@ -279,7 +275,7 @@ export var deserializeAws_restJson1CreateLifecyclePolicyCommand = function (outp
279
275
  });
280
276
  }); };
281
277
  var deserializeAws_restJson1CreateLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
282
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
278
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
283
279
  var _c;
284
280
  return __generator(this, function (_d) {
285
281
  switch (_d.label) {
@@ -289,7 +285,6 @@ var deserializeAws_restJson1CreateLifecyclePolicyCommandError = function (output
289
285
  return [4, parseBody(output.body, context)];
290
286
  case 1:
291
287
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
292
- errorCode = "UnknownError";
293
288
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
294
289
  _b = errorCode;
295
290
  switch (_b) {
@@ -309,10 +304,12 @@ var deserializeAws_restJson1CreateLifecyclePolicyCommandError = function (output
309
304
  case 7: throw _d.sent();
310
305
  case 8:
311
306
  parsedBody = parsedOutput.body;
307
+ $metadata = deserializeMetadata(output);
308
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
312
309
  response = new __BaseException({
313
- name: parsedBody.code || parsedBody.Code || errorCode,
310
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
314
311
  $fault: "client",
315
- $metadata: deserializeMetadata(output),
312
+ $metadata: $metadata,
316
313
  });
317
314
  throw __decorateServiceException(response, parsedBody);
318
315
  }
@@ -337,7 +334,7 @@ export var deserializeAws_restJson1DeleteLifecyclePolicyCommand = function (outp
337
334
  });
338
335
  }); };
339
336
  var deserializeAws_restJson1DeleteLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
340
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
337
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
341
338
  var _c;
342
339
  return __generator(this, function (_d) {
343
340
  switch (_d.label) {
@@ -347,7 +344,6 @@ var deserializeAws_restJson1DeleteLifecyclePolicyCommandError = function (output
347
344
  return [4, parseBody(output.body, context)];
348
345
  case 1:
349
346
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
350
- errorCode = "UnknownError";
351
347
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
348
  _b = errorCode;
353
349
  switch (_b) {
@@ -367,10 +363,12 @@ var deserializeAws_restJson1DeleteLifecyclePolicyCommandError = function (output
367
363
  case 7: throw _d.sent();
368
364
  case 8:
369
365
  parsedBody = parsedOutput.body;
366
+ $metadata = deserializeMetadata(output);
367
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
370
368
  response = new __BaseException({
371
- name: parsedBody.code || parsedBody.Code || errorCode,
369
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
372
370
  $fault: "client",
373
- $metadata: deserializeMetadata(output),
371
+ $metadata: $metadata,
374
372
  });
375
373
  throw __decorateServiceException(response, parsedBody);
376
374
  }
@@ -401,7 +399,7 @@ export var deserializeAws_restJson1GetLifecyclePoliciesCommand = function (outpu
401
399
  });
402
400
  }); };
403
401
  var deserializeAws_restJson1GetLifecyclePoliciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
404
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
402
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
405
403
  var _c;
406
404
  return __generator(this, function (_d) {
407
405
  switch (_d.label) {
@@ -411,7 +409,6 @@ var deserializeAws_restJson1GetLifecyclePoliciesCommandError = function (output,
411
409
  return [4, parseBody(output.body, context)];
412
410
  case 1:
413
411
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
414
- errorCode = "UnknownError";
415
412
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
416
413
  _b = errorCode;
417
414
  switch (_b) {
@@ -435,10 +432,12 @@ var deserializeAws_restJson1GetLifecyclePoliciesCommandError = function (output,
435
432
  case 9: throw _d.sent();
436
433
  case 10:
437
434
  parsedBody = parsedOutput.body;
435
+ $metadata = deserializeMetadata(output);
436
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
438
437
  response = new __BaseException({
439
- name: parsedBody.code || parsedBody.Code || errorCode,
438
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
440
439
  $fault: "client",
441
- $metadata: deserializeMetadata(output),
440
+ $metadata: $metadata,
442
441
  });
443
442
  throw __decorateServiceException(response, parsedBody);
444
443
  }
@@ -469,7 +468,7 @@ export var deserializeAws_restJson1GetLifecyclePolicyCommand = function (output,
469
468
  });
470
469
  }); };
471
470
  var deserializeAws_restJson1GetLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
472
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
471
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
473
472
  var _c;
474
473
  return __generator(this, function (_d) {
475
474
  switch (_d.label) {
@@ -479,7 +478,6 @@ var deserializeAws_restJson1GetLifecyclePolicyCommandError = function (output, c
479
478
  return [4, parseBody(output.body, context)];
480
479
  case 1:
481
480
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
482
- errorCode = "UnknownError";
483
481
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
484
482
  _b = errorCode;
485
483
  switch (_b) {
@@ -499,10 +497,12 @@ var deserializeAws_restJson1GetLifecyclePolicyCommandError = function (output, c
499
497
  case 7: throw _d.sent();
500
498
  case 8:
501
499
  parsedBody = parsedOutput.body;
500
+ $metadata = deserializeMetadata(output);
501
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
502
502
  response = new __BaseException({
503
- name: parsedBody.code || parsedBody.Code || errorCode,
503
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
504
504
  $fault: "client",
505
- $metadata: deserializeMetadata(output),
505
+ $metadata: $metadata,
506
506
  });
507
507
  throw __decorateServiceException(response, parsedBody);
508
508
  }
@@ -533,7 +533,7 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
533
533
  });
534
534
  }); };
535
535
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
536
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
536
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
537
537
  var _c;
538
538
  return __generator(this, function (_d) {
539
539
  switch (_d.label) {
@@ -543,7 +543,6 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
543
543
  return [4, parseBody(output.body, context)];
544
544
  case 1:
545
545
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
546
- errorCode = "UnknownError";
547
546
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
548
547
  _b = errorCode;
549
548
  switch (_b) {
@@ -563,10 +562,12 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
563
562
  case 7: throw _d.sent();
564
563
  case 8:
565
564
  parsedBody = parsedOutput.body;
565
+ $metadata = deserializeMetadata(output);
566
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
566
567
  response = new __BaseException({
567
- name: parsedBody.code || parsedBody.Code || errorCode,
568
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
568
569
  $fault: "client",
569
- $metadata: deserializeMetadata(output),
570
+ $metadata: $metadata,
570
571
  });
571
572
  throw __decorateServiceException(response, parsedBody);
572
573
  }
@@ -591,7 +592,7 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
591
592
  });
592
593
  }); };
593
594
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
594
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
595
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
595
596
  var _c;
596
597
  return __generator(this, function (_d) {
597
598
  switch (_d.label) {
@@ -601,7 +602,6 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
601
602
  return [4, parseBody(output.body, context)];
602
603
  case 1:
603
604
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
604
- errorCode = "UnknownError";
605
605
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
606
606
  _b = errorCode;
607
607
  switch (_b) {
@@ -621,10 +621,12 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
621
621
  case 7: throw _d.sent();
622
622
  case 8:
623
623
  parsedBody = parsedOutput.body;
624
+ $metadata = deserializeMetadata(output);
625
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
624
626
  response = new __BaseException({
625
- name: parsedBody.code || parsedBody.Code || errorCode,
627
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
626
628
  $fault: "client",
627
- $metadata: deserializeMetadata(output),
629
+ $metadata: $metadata,
628
630
  });
629
631
  throw __decorateServiceException(response, parsedBody);
630
632
  }
@@ -649,7 +651,7 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
649
651
  });
650
652
  }); };
651
653
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
652
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
654
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
653
655
  var _c;
654
656
  return __generator(this, function (_d) {
655
657
  switch (_d.label) {
@@ -659,7 +661,6 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
659
661
  return [4, parseBody(output.body, context)];
660
662
  case 1:
661
663
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
662
- errorCode = "UnknownError";
663
664
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
664
665
  _b = errorCode;
665
666
  switch (_b) {
@@ -679,10 +680,12 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
679
680
  case 7: throw _d.sent();
680
681
  case 8:
681
682
  parsedBody = parsedOutput.body;
683
+ $metadata = deserializeMetadata(output);
684
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
682
685
  response = new __BaseException({
683
- name: parsedBody.code || parsedBody.Code || errorCode,
686
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
684
687
  $fault: "client",
685
- $metadata: deserializeMetadata(output),
688
+ $metadata: $metadata,
686
689
  });
687
690
  throw __decorateServiceException(response, parsedBody);
688
691
  }
@@ -707,7 +710,7 @@ export var deserializeAws_restJson1UpdateLifecyclePolicyCommand = function (outp
707
710
  });
708
711
  }); };
709
712
  var deserializeAws_restJson1UpdateLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
710
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
713
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
711
714
  var _c;
712
715
  return __generator(this, function (_d) {
713
716
  switch (_d.label) {
@@ -717,7 +720,6 @@ var deserializeAws_restJson1UpdateLifecyclePolicyCommandError = function (output
717
720
  return [4, parseBody(output.body, context)];
718
721
  case 1:
719
722
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
720
- errorCode = "UnknownError";
721
723
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
722
724
  _b = errorCode;
723
725
  switch (_b) {
@@ -741,10 +743,12 @@ var deserializeAws_restJson1UpdateLifecyclePolicyCommandError = function (output
741
743
  case 9: throw _d.sent();
742
744
  case 10:
743
745
  parsedBody = parsedOutput.body;
746
+ $metadata = deserializeMetadata(output);
747
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
744
748
  response = new __BaseException({
745
- name: parsedBody.code || parsedBody.Code || errorCode,
749
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
746
750
  $fault: "client",
747
- $metadata: deserializeMetadata(output),
751
+ $metadata: $metadata,
748
752
  });
749
753
  throw __decorateServiceException(response, parsedBody);
750
754
  }
@@ -826,10 +830,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
826
830
  });
827
831
  }); };
828
832
  var serializeAws_restJson1Action = function (input, context) {
829
- return __assign(__assign({}, (input.CrossRegionCopy !== undefined &&
830
- input.CrossRegionCopy !== null && {
833
+ return __assign(__assign({}, (input.CrossRegionCopy != null && {
831
834
  CrossRegionCopy: serializeAws_restJson1CrossRegionCopyActionList(input.CrossRegionCopy, context),
832
- })), (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
835
+ })), (input.Name != null && { Name: input.Name }));
833
836
  };
834
837
  var serializeAws_restJson1ActionList = function (input, context) {
835
838
  return input
@@ -852,18 +855,14 @@ var serializeAws_restJson1AvailabilityZoneList = function (input, context) {
852
855
  });
853
856
  };
854
857
  var serializeAws_restJson1CreateRule = function (input, context) {
855
- return __assign(__assign(__assign(__assign(__assign({}, (input.CronExpression !== undefined &&
856
- input.CronExpression !== null && { CronExpression: input.CronExpression })), (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit })), (input.Location !== undefined && input.Location !== null && { Location: input.Location })), (input.Times !== undefined &&
857
- input.Times !== null && { Times: serializeAws_restJson1TimesList(input.Times, context) }));
858
+ return __assign(__assign(__assign(__assign(__assign({}, (input.CronExpression != null && { CronExpression: input.CronExpression })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit })), (input.Location != null && { Location: input.Location })), (input.Times != null && { Times: serializeAws_restJson1TimesList(input.Times, context) }));
858
859
  };
859
860
  var serializeAws_restJson1CrossRegionCopyAction = function (input, context) {
860
- return __assign(__assign(__assign({}, (input.EncryptionConfiguration !== undefined &&
861
- input.EncryptionConfiguration !== null && {
861
+ return __assign(__assign(__assign({}, (input.EncryptionConfiguration != null && {
862
862
  EncryptionConfiguration: serializeAws_restJson1EncryptionConfiguration(input.EncryptionConfiguration, context),
863
- })), (input.RetainRule !== undefined &&
864
- input.RetainRule !== null && {
863
+ })), (input.RetainRule != null && {
865
864
  RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
866
- })), (input.Target !== undefined && input.Target !== null && { Target: input.Target }));
865
+ })), (input.Target != null && { Target: input.Target }));
867
866
  };
868
867
  var serializeAws_restJson1CrossRegionCopyActionList = function (input, context) {
869
868
  return input
@@ -876,19 +875,17 @@ var serializeAws_restJson1CrossRegionCopyActionList = function (input, context)
876
875
  });
877
876
  };
878
877
  var serializeAws_restJson1CrossRegionCopyDeprecateRule = function (input, context) {
879
- return __assign(__assign({}, (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit }));
878
+ return __assign(__assign({}, (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
880
879
  };
881
880
  var serializeAws_restJson1CrossRegionCopyRetainRule = function (input, context) {
882
- return __assign(__assign({}, (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit }));
881
+ return __assign(__assign({}, (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
883
882
  };
884
883
  var serializeAws_restJson1CrossRegionCopyRule = function (input, context) {
885
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CmkArn !== undefined && input.CmkArn !== null && { CmkArn: input.CmkArn })), (input.CopyTags !== undefined && input.CopyTags !== null && { CopyTags: input.CopyTags })), (input.DeprecateRule !== undefined &&
886
- input.DeprecateRule !== null && {
884
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CmkArn != null && { CmkArn: input.CmkArn })), (input.CopyTags != null && { CopyTags: input.CopyTags })), (input.DeprecateRule != null && {
887
885
  DeprecateRule: serializeAws_restJson1CrossRegionCopyDeprecateRule(input.DeprecateRule, context),
888
- })), (input.Encrypted !== undefined && input.Encrypted !== null && { Encrypted: input.Encrypted })), (input.RetainRule !== undefined &&
889
- input.RetainRule !== null && {
886
+ })), (input.Encrypted != null && { Encrypted: input.Encrypted })), (input.RetainRule != null && {
890
887
  RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
891
- })), (input.Target !== undefined && input.Target !== null && { Target: input.Target })), (input.TargetRegion !== undefined && input.TargetRegion !== null && { TargetRegion: input.TargetRegion }));
888
+ })), (input.Target != null && { Target: input.Target })), (input.TargetRegion != null && { TargetRegion: input.TargetRegion }));
892
889
  };
893
890
  var serializeAws_restJson1CrossRegionCopyRules = function (input, context) {
894
891
  return input
@@ -901,45 +898,33 @@ var serializeAws_restJson1CrossRegionCopyRules = function (input, context) {
901
898
  });
902
899
  };
903
900
  var serializeAws_restJson1DeprecateRule = function (input, context) {
904
- return __assign(__assign(__assign({}, (input.Count !== undefined && input.Count !== null && { Count: input.Count })), (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit }));
901
+ return __assign(__assign(__assign({}, (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
905
902
  };
906
903
  var serializeAws_restJson1EncryptionConfiguration = function (input, context) {
907
- return __assign(__assign({}, (input.CmkArn !== undefined && input.CmkArn !== null && { CmkArn: input.CmkArn })), (input.Encrypted !== undefined && input.Encrypted !== null && { Encrypted: input.Encrypted }));
904
+ return __assign(__assign({}, (input.CmkArn != null && { CmkArn: input.CmkArn })), (input.Encrypted != null && { Encrypted: input.Encrypted }));
908
905
  };
909
906
  var serializeAws_restJson1EventParameters = function (input, context) {
910
- return __assign(__assign(__assign({}, (input.DescriptionRegex !== undefined &&
911
- input.DescriptionRegex !== null && { DescriptionRegex: input.DescriptionRegex })), (input.EventType !== undefined && input.EventType !== null && { EventType: input.EventType })), (input.SnapshotOwner !== undefined &&
912
- input.SnapshotOwner !== null && {
907
+ return __assign(__assign(__assign({}, (input.DescriptionRegex != null && { DescriptionRegex: input.DescriptionRegex })), (input.EventType != null && { EventType: input.EventType })), (input.SnapshotOwner != null && {
913
908
  SnapshotOwner: serializeAws_restJson1SnapshotOwnerList(input.SnapshotOwner, context),
914
909
  }));
915
910
  };
916
911
  var serializeAws_restJson1EventSource = function (input, context) {
917
- return __assign(__assign({}, (input.Parameters !== undefined &&
918
- input.Parameters !== null && { Parameters: serializeAws_restJson1EventParameters(input.Parameters, context) })), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
912
+ return __assign(__assign({}, (input.Parameters != null && { Parameters: serializeAws_restJson1EventParameters(input.Parameters, context) })), (input.Type != null && { Type: input.Type }));
919
913
  };
920
914
  var serializeAws_restJson1FastRestoreRule = function (input, context) {
921
- return __assign(__assign(__assign(__assign({}, (input.AvailabilityZones !== undefined &&
922
- input.AvailabilityZones !== null && {
915
+ return __assign(__assign(__assign(__assign({}, (input.AvailabilityZones != null && {
923
916
  AvailabilityZones: serializeAws_restJson1AvailabilityZoneList(input.AvailabilityZones, context),
924
- })), (input.Count !== undefined && input.Count !== null && { Count: input.Count })), (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit }));
917
+ })), (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
925
918
  };
926
919
  var serializeAws_restJson1_Parameters = function (input, context) {
927
- return __assign(__assign({}, (input.ExcludeBootVolume !== undefined &&
928
- input.ExcludeBootVolume !== null && { ExcludeBootVolume: input.ExcludeBootVolume })), (input.NoReboot !== undefined && input.NoReboot !== null && { NoReboot: input.NoReboot }));
920
+ return __assign(__assign({}, (input.ExcludeBootVolume != null && { ExcludeBootVolume: input.ExcludeBootVolume })), (input.NoReboot != null && { NoReboot: input.NoReboot }));
929
921
  };
930
922
  var serializeAws_restJson1PolicyDetails = function (input, context) {
931
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Actions !== undefined &&
932
- input.Actions !== null && { Actions: serializeAws_restJson1ActionList(input.Actions, context) })), (input.EventSource !== undefined &&
933
- input.EventSource !== null && { EventSource: serializeAws_restJson1EventSource(input.EventSource, context) })), (input.Parameters !== undefined &&
934
- input.Parameters !== null && { Parameters: serializeAws_restJson1_Parameters(input.Parameters, context) })), (input.PolicyType !== undefined && input.PolicyType !== null && { PolicyType: input.PolicyType })), (input.ResourceLocations !== undefined &&
935
- input.ResourceLocations !== null && {
923
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Actions != null && { Actions: serializeAws_restJson1ActionList(input.Actions, context) })), (input.EventSource != null && { EventSource: serializeAws_restJson1EventSource(input.EventSource, context) })), (input.Parameters != null && { Parameters: serializeAws_restJson1_Parameters(input.Parameters, context) })), (input.PolicyType != null && { PolicyType: input.PolicyType })), (input.ResourceLocations != null && {
936
924
  ResourceLocations: serializeAws_restJson1ResourceLocationList(input.ResourceLocations, context),
937
- })), (input.ResourceTypes !== undefined &&
938
- input.ResourceTypes !== null && {
925
+ })), (input.ResourceTypes != null && {
939
926
  ResourceTypes: serializeAws_restJson1ResourceTypeValuesList(input.ResourceTypes, context),
940
- })), (input.Schedules !== undefined &&
941
- input.Schedules !== null && { Schedules: serializeAws_restJson1ScheduleList(input.Schedules, context) })), (input.TargetTags !== undefined &&
942
- input.TargetTags !== null && { TargetTags: serializeAws_restJson1TargetTagList(input.TargetTags, context) }));
927
+ })), (input.Schedules != null && { Schedules: serializeAws_restJson1ScheduleList(input.Schedules, context) })), (input.TargetTags != null && { TargetTags: serializeAws_restJson1TargetTagList(input.TargetTags, context) }));
943
928
  };
944
929
  var serializeAws_restJson1ResourceLocationList = function (input, context) {
945
930
  return input
@@ -962,24 +947,16 @@ var serializeAws_restJson1ResourceTypeValuesList = function (input, context) {
962
947
  });
963
948
  };
964
949
  var serializeAws_restJson1RetainRule = function (input, context) {
965
- return __assign(__assign(__assign({}, (input.Count !== undefined && input.Count !== null && { Count: input.Count })), (input.Interval !== undefined && input.Interval !== null && { Interval: input.Interval })), (input.IntervalUnit !== undefined && input.IntervalUnit !== null && { IntervalUnit: input.IntervalUnit }));
950
+ return __assign(__assign(__assign({}, (input.Count != null && { Count: input.Count })), (input.Interval != null && { Interval: input.Interval })), (input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }));
966
951
  };
967
952
  var serializeAws_restJson1Schedule = function (input, context) {
968
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CopyTags !== undefined && input.CopyTags !== null && { CopyTags: input.CopyTags })), (input.CreateRule !== undefined &&
969
- input.CreateRule !== null && { CreateRule: serializeAws_restJson1CreateRule(input.CreateRule, context) })), (input.CrossRegionCopyRules !== undefined &&
970
- input.CrossRegionCopyRules !== null && {
953
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CopyTags != null && { CopyTags: input.CopyTags })), (input.CreateRule != null && { CreateRule: serializeAws_restJson1CreateRule(input.CreateRule, context) })), (input.CrossRegionCopyRules != null && {
971
954
  CrossRegionCopyRules: serializeAws_restJson1CrossRegionCopyRules(input.CrossRegionCopyRules, context),
972
- })), (input.DeprecateRule !== undefined &&
973
- input.DeprecateRule !== null && {
955
+ })), (input.DeprecateRule != null && {
974
956
  DeprecateRule: serializeAws_restJson1DeprecateRule(input.DeprecateRule, context),
975
- })), (input.FastRestoreRule !== undefined &&
976
- input.FastRestoreRule !== null && {
957
+ })), (input.FastRestoreRule != null && {
977
958
  FastRestoreRule: serializeAws_restJson1FastRestoreRule(input.FastRestoreRule, context),
978
- })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.RetainRule !== undefined &&
979
- input.RetainRule !== null && { RetainRule: serializeAws_restJson1RetainRule(input.RetainRule, context) })), (input.ShareRules !== undefined &&
980
- input.ShareRules !== null && { ShareRules: serializeAws_restJson1ShareRules(input.ShareRules, context) })), (input.TagsToAdd !== undefined &&
981
- input.TagsToAdd !== null && { TagsToAdd: serializeAws_restJson1TagsToAddList(input.TagsToAdd, context) })), (input.VariableTags !== undefined &&
982
- input.VariableTags !== null && {
959
+ })), (input.Name != null && { Name: input.Name })), (input.RetainRule != null && { RetainRule: serializeAws_restJson1RetainRule(input.RetainRule, context) })), (input.ShareRules != null && { ShareRules: serializeAws_restJson1ShareRules(input.ShareRules, context) })), (input.TagsToAdd != null && { TagsToAdd: serializeAws_restJson1TagsToAddList(input.TagsToAdd, context) })), (input.VariableTags != null && {
983
960
  VariableTags: serializeAws_restJson1VariableTagsList(input.VariableTags, context),
984
961
  }));
985
962
  };
@@ -994,12 +971,9 @@ var serializeAws_restJson1ScheduleList = function (input, context) {
994
971
  });
995
972
  };
996
973
  var serializeAws_restJson1ShareRule = function (input, context) {
997
- return __assign(__assign(__assign({}, (input.TargetAccounts !== undefined &&
998
- input.TargetAccounts !== null && {
974
+ return __assign(__assign(__assign({}, (input.TargetAccounts != null && {
999
975
  TargetAccounts: serializeAws_restJson1ShareTargetAccountList(input.TargetAccounts, context),
1000
- })), (input.UnshareInterval !== undefined &&
1001
- input.UnshareInterval !== null && { UnshareInterval: input.UnshareInterval })), (input.UnshareIntervalUnit !== undefined &&
1002
- input.UnshareIntervalUnit !== null && { UnshareIntervalUnit: input.UnshareIntervalUnit }));
976
+ })), (input.UnshareInterval != null && { UnshareInterval: input.UnshareInterval })), (input.UnshareIntervalUnit != null && { UnshareIntervalUnit: input.UnshareIntervalUnit }));
1003
977
  };
1004
978
  var serializeAws_restJson1ShareRules = function (input, context) {
1005
979
  return input
@@ -1032,7 +1006,7 @@ var serializeAws_restJson1SnapshotOwnerList = function (input, context) {
1032
1006
  });
1033
1007
  };
1034
1008
  var serializeAws_restJson1Tag = function (input, context) {
1035
- return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
1009
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1036
1010
  };
1037
1011
  var serializeAws_restJson1TagMap = function (input, context) {
1038
1012
  return Object.entries(input).reduce(function (acc, _a) {
@@ -1086,7 +1060,7 @@ var serializeAws_restJson1VariableTagsList = function (input, context) {
1086
1060
  };
1087
1061
  var deserializeAws_restJson1Action = function (output, context) {
1088
1062
  return {
1089
- CrossRegionCopy: output.CrossRegionCopy !== undefined && output.CrossRegionCopy !== null
1063
+ CrossRegionCopy: output.CrossRegionCopy != null
1090
1064
  ? deserializeAws_restJson1CrossRegionCopyActionList(output.CrossRegionCopy, context)
1091
1065
  : undefined,
1092
1066
  Name: __expectString(output.Name),
@@ -1120,17 +1094,15 @@ var deserializeAws_restJson1CreateRule = function (output, context) {
1120
1094
  Interval: __expectInt32(output.Interval),
1121
1095
  IntervalUnit: __expectString(output.IntervalUnit),
1122
1096
  Location: __expectString(output.Location),
1123
- Times: output.Times !== undefined && output.Times !== null
1124
- ? deserializeAws_restJson1TimesList(output.Times, context)
1125
- : undefined,
1097
+ Times: output.Times != null ? deserializeAws_restJson1TimesList(output.Times, context) : undefined,
1126
1098
  };
1127
1099
  };
1128
1100
  var deserializeAws_restJson1CrossRegionCopyAction = function (output, context) {
1129
1101
  return {
1130
- EncryptionConfiguration: output.EncryptionConfiguration !== undefined && output.EncryptionConfiguration !== null
1102
+ EncryptionConfiguration: output.EncryptionConfiguration != null
1131
1103
  ? deserializeAws_restJson1EncryptionConfiguration(output.EncryptionConfiguration, context)
1132
1104
  : undefined,
1133
- RetainRule: output.RetainRule !== undefined && output.RetainRule !== null
1105
+ RetainRule: output.RetainRule != null
1134
1106
  ? deserializeAws_restJson1CrossRegionCopyRetainRule(output.RetainRule, context)
1135
1107
  : undefined,
1136
1108
  Target: __expectString(output.Target),
@@ -1163,11 +1135,11 @@ var deserializeAws_restJson1CrossRegionCopyRule = function (output, context) {
1163
1135
  return {
1164
1136
  CmkArn: __expectString(output.CmkArn),
1165
1137
  CopyTags: __expectBoolean(output.CopyTags),
1166
- DeprecateRule: output.DeprecateRule !== undefined && output.DeprecateRule !== null
1138
+ DeprecateRule: output.DeprecateRule != null
1167
1139
  ? deserializeAws_restJson1CrossRegionCopyDeprecateRule(output.DeprecateRule, context)
1168
1140
  : undefined,
1169
1141
  Encrypted: __expectBoolean(output.Encrypted),
1170
- RetainRule: output.RetainRule !== undefined && output.RetainRule !== null
1142
+ RetainRule: output.RetainRule != null
1171
1143
  ? deserializeAws_restJson1CrossRegionCopyRetainRule(output.RetainRule, context)
1172
1144
  : undefined,
1173
1145
  Target: __expectString(output.Target),
@@ -1202,22 +1174,20 @@ var deserializeAws_restJson1EventParameters = function (output, context) {
1202
1174
  return {
1203
1175
  DescriptionRegex: __expectString(output.DescriptionRegex),
1204
1176
  EventType: __expectString(output.EventType),
1205
- SnapshotOwner: output.SnapshotOwner !== undefined && output.SnapshotOwner !== null
1177
+ SnapshotOwner: output.SnapshotOwner != null
1206
1178
  ? deserializeAws_restJson1SnapshotOwnerList(output.SnapshotOwner, context)
1207
1179
  : undefined,
1208
1180
  };
1209
1181
  };
1210
1182
  var deserializeAws_restJson1EventSource = function (output, context) {
1211
1183
  return {
1212
- Parameters: output.Parameters !== undefined && output.Parameters !== null
1213
- ? deserializeAws_restJson1EventParameters(output.Parameters, context)
1214
- : undefined,
1184
+ Parameters: output.Parameters != null ? deserializeAws_restJson1EventParameters(output.Parameters, context) : undefined,
1215
1185
  Type: __expectString(output.Type),
1216
1186
  };
1217
1187
  };
1218
1188
  var deserializeAws_restJson1FastRestoreRule = function (output, context) {
1219
1189
  return {
1220
- AvailabilityZones: output.AvailabilityZones !== undefined && output.AvailabilityZones !== null
1190
+ AvailabilityZones: output.AvailabilityZones != null
1221
1191
  ? deserializeAws_restJson1AvailabilityZoneList(output.AvailabilityZones, context)
1222
1192
  : undefined,
1223
1193
  Count: __expectInt32(output.Count),
@@ -1227,24 +1197,20 @@ var deserializeAws_restJson1FastRestoreRule = function (output, context) {
1227
1197
  };
1228
1198
  var deserializeAws_restJson1LifecyclePolicy = function (output, context) {
1229
1199
  return {
1230
- DateCreated: output.DateCreated !== undefined && output.DateCreated !== null
1200
+ DateCreated: output.DateCreated != null
1231
1201
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated)))
1232
1202
  : undefined,
1233
- DateModified: output.DateModified !== undefined && output.DateModified !== null
1203
+ DateModified: output.DateModified != null
1234
1204
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified)))
1235
1205
  : undefined,
1236
1206
  Description: __expectString(output.Description),
1237
1207
  ExecutionRoleArn: __expectString(output.ExecutionRoleArn),
1238
1208
  PolicyArn: __expectString(output.PolicyArn),
1239
- PolicyDetails: output.PolicyDetails !== undefined && output.PolicyDetails !== null
1240
- ? deserializeAws_restJson1PolicyDetails(output.PolicyDetails, context)
1241
- : undefined,
1209
+ PolicyDetails: output.PolicyDetails != null ? deserializeAws_restJson1PolicyDetails(output.PolicyDetails, context) : undefined,
1242
1210
  PolicyId: __expectString(output.PolicyId),
1243
1211
  State: __expectString(output.State),
1244
1212
  StatusMessage: __expectString(output.StatusMessage),
1245
- Tags: output.Tags !== undefined && output.Tags !== null
1246
- ? deserializeAws_restJson1TagMap(output.Tags, context)
1247
- : undefined,
1213
+ Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
1248
1214
  };
1249
1215
  };
1250
1216
  var deserializeAws_restJson1LifecyclePolicySummary = function (output, context) {
@@ -1253,9 +1219,7 @@ var deserializeAws_restJson1LifecyclePolicySummary = function (output, context)
1253
1219
  PolicyId: __expectString(output.PolicyId),
1254
1220
  PolicyType: __expectString(output.PolicyType),
1255
1221
  State: __expectString(output.State),
1256
- Tags: output.Tags !== undefined && output.Tags !== null
1257
- ? deserializeAws_restJson1TagMap(output.Tags, context)
1258
- : undefined,
1222
+ Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
1259
1223
  };
1260
1224
  };
1261
1225
  var deserializeAws_restJson1LifecyclePolicySummaryList = function (output, context) {
@@ -1288,28 +1252,18 @@ var deserializeAws_restJson1_Parameters = function (output, context) {
1288
1252
  };
1289
1253
  var deserializeAws_restJson1PolicyDetails = function (output, context) {
1290
1254
  return {
1291
- Actions: output.Actions !== undefined && output.Actions !== null
1292
- ? deserializeAws_restJson1ActionList(output.Actions, context)
1293
- : undefined,
1294
- EventSource: output.EventSource !== undefined && output.EventSource !== null
1295
- ? deserializeAws_restJson1EventSource(output.EventSource, context)
1296
- : undefined,
1297
- Parameters: output.Parameters !== undefined && output.Parameters !== null
1298
- ? deserializeAws_restJson1_Parameters(output.Parameters, context)
1299
- : undefined,
1255
+ Actions: output.Actions != null ? deserializeAws_restJson1ActionList(output.Actions, context) : undefined,
1256
+ EventSource: output.EventSource != null ? deserializeAws_restJson1EventSource(output.EventSource, context) : undefined,
1257
+ Parameters: output.Parameters != null ? deserializeAws_restJson1_Parameters(output.Parameters, context) : undefined,
1300
1258
  PolicyType: __expectString(output.PolicyType),
1301
- ResourceLocations: output.ResourceLocations !== undefined && output.ResourceLocations !== null
1259
+ ResourceLocations: output.ResourceLocations != null
1302
1260
  ? deserializeAws_restJson1ResourceLocationList(output.ResourceLocations, context)
1303
1261
  : undefined,
1304
- ResourceTypes: output.ResourceTypes !== undefined && output.ResourceTypes !== null
1262
+ ResourceTypes: output.ResourceTypes != null
1305
1263
  ? deserializeAws_restJson1ResourceTypeValuesList(output.ResourceTypes, context)
1306
1264
  : undefined,
1307
- Schedules: output.Schedules !== undefined && output.Schedules !== null
1308
- ? deserializeAws_restJson1ScheduleList(output.Schedules, context)
1309
- : undefined,
1310
- TargetTags: output.TargetTags !== undefined && output.TargetTags !== null
1311
- ? deserializeAws_restJson1TargetTagList(output.TargetTags, context)
1312
- : undefined,
1265
+ Schedules: output.Schedules != null ? deserializeAws_restJson1ScheduleList(output.Schedules, context) : undefined,
1266
+ TargetTags: output.TargetTags != null ? deserializeAws_restJson1TargetTagList(output.TargetTags, context) : undefined,
1313
1267
  };
1314
1268
  };
1315
1269
  var deserializeAws_restJson1PolicyIdList = function (output, context) {
@@ -1355,31 +1309,19 @@ var deserializeAws_restJson1RetainRule = function (output, context) {
1355
1309
  var deserializeAws_restJson1Schedule = function (output, context) {
1356
1310
  return {
1357
1311
  CopyTags: __expectBoolean(output.CopyTags),
1358
- CreateRule: output.CreateRule !== undefined && output.CreateRule !== null
1359
- ? deserializeAws_restJson1CreateRule(output.CreateRule, context)
1360
- : undefined,
1361
- CrossRegionCopyRules: output.CrossRegionCopyRules !== undefined && output.CrossRegionCopyRules !== null
1312
+ CreateRule: output.CreateRule != null ? deserializeAws_restJson1CreateRule(output.CreateRule, context) : undefined,
1313
+ CrossRegionCopyRules: output.CrossRegionCopyRules != null
1362
1314
  ? deserializeAws_restJson1CrossRegionCopyRules(output.CrossRegionCopyRules, context)
1363
1315
  : undefined,
1364
- DeprecateRule: output.DeprecateRule !== undefined && output.DeprecateRule !== null
1365
- ? deserializeAws_restJson1DeprecateRule(output.DeprecateRule, context)
1366
- : undefined,
1367
- FastRestoreRule: output.FastRestoreRule !== undefined && output.FastRestoreRule !== null
1316
+ DeprecateRule: output.DeprecateRule != null ? deserializeAws_restJson1DeprecateRule(output.DeprecateRule, context) : undefined,
1317
+ FastRestoreRule: output.FastRestoreRule != null
1368
1318
  ? deserializeAws_restJson1FastRestoreRule(output.FastRestoreRule, context)
1369
1319
  : undefined,
1370
1320
  Name: __expectString(output.Name),
1371
- RetainRule: output.RetainRule !== undefined && output.RetainRule !== null
1372
- ? deserializeAws_restJson1RetainRule(output.RetainRule, context)
1373
- : undefined,
1374
- ShareRules: output.ShareRules !== undefined && output.ShareRules !== null
1375
- ? deserializeAws_restJson1ShareRules(output.ShareRules, context)
1376
- : undefined,
1377
- TagsToAdd: output.TagsToAdd !== undefined && output.TagsToAdd !== null
1378
- ? deserializeAws_restJson1TagsToAddList(output.TagsToAdd, context)
1379
- : undefined,
1380
- VariableTags: output.VariableTags !== undefined && output.VariableTags !== null
1381
- ? deserializeAws_restJson1VariableTagsList(output.VariableTags, context)
1382
- : undefined,
1321
+ RetainRule: output.RetainRule != null ? deserializeAws_restJson1RetainRule(output.RetainRule, context) : undefined,
1322
+ ShareRules: output.ShareRules != null ? deserializeAws_restJson1ShareRules(output.ShareRules, context) : undefined,
1323
+ TagsToAdd: output.TagsToAdd != null ? deserializeAws_restJson1TagsToAddList(output.TagsToAdd, context) : undefined,
1324
+ VariableTags: output.VariableTags != null ? deserializeAws_restJson1VariableTagsList(output.VariableTags, context) : undefined,
1383
1325
  };
1384
1326
  };
1385
1327
  var deserializeAws_restJson1ScheduleList = function (output, context) {
@@ -1395,7 +1337,7 @@ var deserializeAws_restJson1ScheduleList = function (output, context) {
1395
1337
  };
1396
1338
  var deserializeAws_restJson1ShareRule = function (output, context) {
1397
1339
  return {
1398
- TargetAccounts: output.TargetAccounts !== undefined && output.TargetAccounts !== null
1340
+ TargetAccounts: output.TargetAccounts != null
1399
1341
  ? deserializeAws_restJson1ShareTargetAccountList(output.TargetAccounts, context)
1400
1342
  : undefined,
1401
1343
  UnshareInterval: __expectInt32(output.UnshareInterval),
@@ -1551,5 +1493,4 @@ var loadRestJsonErrorCode = function (output, data) {
1551
1493
  if (data["__type"] !== undefined) {
1552
1494
  return sanitizeErrorCode(data["__type"]);
1553
1495
  }
1554
- return "";
1555
1496
  };