@aws-sdk/client-savingsplans 3.141.0 → 3.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
6
6
  import { SavingsplansServiceException as __BaseException } from "../models/SavingsplansServiceException";
@@ -261,24 +261,23 @@ export var deserializeAws_restJson1CreateSavingsPlanCommand = function (output,
261
261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
262
262
  return [2, deserializeAws_restJson1CreateSavingsPlanCommandError(output, context)];
263
263
  }
264
- contents = {
264
+ contents = map({
265
265
  $metadata: deserializeMetadata(output),
266
- savingsPlanId: undefined,
267
- };
266
+ });
268
267
  _a = __expectNonNull;
269
268
  _b = __expectObject;
270
269
  return [4, parseBody(output.body, context)];
271
270
  case 1:
272
271
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
273
- if (data.savingsPlanId !== undefined && data.savingsPlanId !== null) {
272
+ if (data.savingsPlanId != null) {
274
273
  contents.savingsPlanId = __expectString(data.savingsPlanId);
275
274
  }
276
- return [2, Promise.resolve(contents)];
275
+ return [2, contents];
277
276
  }
278
277
  });
279
278
  }); };
280
279
  var deserializeAws_restJson1CreateSavingsPlanCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
281
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
280
+ var parsedOutput, _a, errorCode, _b, parsedBody;
282
281
  var _c;
283
282
  return __generator(this, function (_d) {
284
283
  switch (_d.label) {
@@ -311,14 +310,14 @@ var deserializeAws_restJson1CreateSavingsPlanCommandError = function (output, co
311
310
  case 9: throw _d.sent();
312
311
  case 10:
313
312
  parsedBody = parsedOutput.body;
314
- $metadata = deserializeMetadata(output);
315
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
316
- response = new __BaseException({
317
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
318
- $fault: "client",
319
- $metadata: $metadata,
313
+ throwDefaultError({
314
+ output: output,
315
+ parsedBody: parsedBody,
316
+ exceptionCtor: __BaseException,
317
+ errorCode: errorCode,
320
318
  });
321
- throw __decorateServiceException(response, parsedBody);
319
+ _d.label = 11;
320
+ case 11: return [2];
322
321
  }
323
322
  });
324
323
  }); };
@@ -330,18 +329,18 @@ export var deserializeAws_restJson1DeleteQueuedSavingsPlanCommand = function (ou
330
329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
331
330
  return [2, deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError(output, context)];
332
331
  }
333
- contents = {
332
+ contents = map({
334
333
  $metadata: deserializeMetadata(output),
335
- };
334
+ });
336
335
  return [4, collectBody(output.body, context)];
337
336
  case 1:
338
337
  _a.sent();
339
- return [2, Promise.resolve(contents)];
338
+ return [2, contents];
340
339
  }
341
340
  });
342
341
  }); };
343
342
  var deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
344
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
343
+ var parsedOutput, _a, errorCode, _b, parsedBody;
345
344
  var _c;
346
345
  return __generator(this, function (_d) {
347
346
  switch (_d.label) {
@@ -374,14 +373,14 @@ var deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError = function (outp
374
373
  case 9: throw _d.sent();
375
374
  case 10:
376
375
  parsedBody = parsedOutput.body;
377
- $metadata = deserializeMetadata(output);
378
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
379
- response = new __BaseException({
380
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
381
- $fault: "client",
382
- $metadata: $metadata,
376
+ throwDefaultError({
377
+ output: output,
378
+ parsedBody: parsedBody,
379
+ exceptionCtor: __BaseException,
380
+ errorCode: errorCode,
383
381
  });
384
- throw __decorateServiceException(response, parsedBody);
382
+ _d.label = 11;
383
+ case 11: return [2];
385
384
  }
386
385
  });
387
386
  }); };
@@ -393,32 +392,29 @@ export var deserializeAws_restJson1DescribeSavingsPlanRatesCommand = function (o
393
392
  if (output.statusCode !== 200 && output.statusCode >= 300) {
394
393
  return [2, deserializeAws_restJson1DescribeSavingsPlanRatesCommandError(output, context)];
395
394
  }
396
- contents = {
395
+ contents = map({
397
396
  $metadata: deserializeMetadata(output),
398
- nextToken: undefined,
399
- savingsPlanId: undefined,
400
- searchResults: undefined,
401
- };
397
+ });
402
398
  _a = __expectNonNull;
403
399
  _b = __expectObject;
404
400
  return [4, parseBody(output.body, context)];
405
401
  case 1:
406
402
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
407
- if (data.nextToken !== undefined && data.nextToken !== null) {
403
+ if (data.nextToken != null) {
408
404
  contents.nextToken = __expectString(data.nextToken);
409
405
  }
410
- if (data.savingsPlanId !== undefined && data.savingsPlanId !== null) {
406
+ if (data.savingsPlanId != null) {
411
407
  contents.savingsPlanId = __expectString(data.savingsPlanId);
412
408
  }
413
- if (data.searchResults !== undefined && data.searchResults !== null) {
409
+ if (data.searchResults != null) {
414
410
  contents.searchResults = deserializeAws_restJson1SavingsPlanRateList(data.searchResults, context);
415
411
  }
416
- return [2, Promise.resolve(contents)];
412
+ return [2, contents];
417
413
  }
418
414
  });
419
415
  }); };
420
416
  var deserializeAws_restJson1DescribeSavingsPlanRatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
421
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
417
+ var parsedOutput, _a, errorCode, _b, parsedBody;
422
418
  var _c;
423
419
  return __generator(this, function (_d) {
424
420
  switch (_d.label) {
@@ -443,14 +439,14 @@ var deserializeAws_restJson1DescribeSavingsPlanRatesCommandError = function (out
443
439
  case 5: throw _d.sent();
444
440
  case 6:
445
441
  parsedBody = parsedOutput.body;
446
- $metadata = deserializeMetadata(output);
447
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
448
- response = new __BaseException({
449
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
450
- $fault: "client",
451
- $metadata: $metadata,
442
+ throwDefaultError({
443
+ output: output,
444
+ parsedBody: parsedBody,
445
+ exceptionCtor: __BaseException,
446
+ errorCode: errorCode,
452
447
  });
453
- throw __decorateServiceException(response, parsedBody);
448
+ _d.label = 7;
449
+ case 7: return [2];
454
450
  }
455
451
  });
456
452
  }); };
@@ -462,28 +458,26 @@ export var deserializeAws_restJson1DescribeSavingsPlansCommand = function (outpu
462
458
  if (output.statusCode !== 200 && output.statusCode >= 300) {
463
459
  return [2, deserializeAws_restJson1DescribeSavingsPlansCommandError(output, context)];
464
460
  }
465
- contents = {
461
+ contents = map({
466
462
  $metadata: deserializeMetadata(output),
467
- nextToken: undefined,
468
- savingsPlans: undefined,
469
- };
463
+ });
470
464
  _a = __expectNonNull;
471
465
  _b = __expectObject;
472
466
  return [4, parseBody(output.body, context)];
473
467
  case 1:
474
468
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
475
- if (data.nextToken !== undefined && data.nextToken !== null) {
469
+ if (data.nextToken != null) {
476
470
  contents.nextToken = __expectString(data.nextToken);
477
471
  }
478
- if (data.savingsPlans !== undefined && data.savingsPlans !== null) {
472
+ if (data.savingsPlans != null) {
479
473
  contents.savingsPlans = deserializeAws_restJson1SavingsPlanList(data.savingsPlans, context);
480
474
  }
481
- return [2, Promise.resolve(contents)];
475
+ return [2, contents];
482
476
  }
483
477
  });
484
478
  }); };
485
479
  var deserializeAws_restJson1DescribeSavingsPlansCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
486
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
480
+ var parsedOutput, _a, errorCode, _b, parsedBody;
487
481
  var _c;
488
482
  return __generator(this, function (_d) {
489
483
  switch (_d.label) {
@@ -508,14 +502,14 @@ var deserializeAws_restJson1DescribeSavingsPlansCommandError = function (output,
508
502
  case 5: throw _d.sent();
509
503
  case 6:
510
504
  parsedBody = parsedOutput.body;
511
- $metadata = deserializeMetadata(output);
512
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
513
- response = new __BaseException({
514
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
515
- $fault: "client",
516
- $metadata: $metadata,
505
+ throwDefaultError({
506
+ output: output,
507
+ parsedBody: parsedBody,
508
+ exceptionCtor: __BaseException,
509
+ errorCode: errorCode,
517
510
  });
518
- throw __decorateServiceException(response, parsedBody);
511
+ _d.label = 7;
512
+ case 7: return [2];
519
513
  }
520
514
  });
521
515
  }); };
@@ -527,28 +521,26 @@ export var deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand = fu
527
521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
528
522
  return [2, deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError(output, context)];
529
523
  }
530
- contents = {
524
+ contents = map({
531
525
  $metadata: deserializeMetadata(output),
532
- nextToken: undefined,
533
- searchResults: undefined,
534
- };
526
+ });
535
527
  _a = __expectNonNull;
536
528
  _b = __expectObject;
537
529
  return [4, parseBody(output.body, context)];
538
530
  case 1:
539
531
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
540
- if (data.nextToken !== undefined && data.nextToken !== null) {
532
+ if (data.nextToken != null) {
541
533
  contents.nextToken = __expectString(data.nextToken);
542
534
  }
543
- if (data.searchResults !== undefined && data.searchResults !== null) {
535
+ if (data.searchResults != null) {
544
536
  contents.searchResults = deserializeAws_restJson1SavingsPlanOfferingRatesList(data.searchResults, context);
545
537
  }
546
- return [2, Promise.resolve(contents)];
538
+ return [2, contents];
547
539
  }
548
540
  });
549
541
  }); };
550
542
  var deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
551
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
543
+ var parsedOutput, _a, errorCode, _b, parsedBody;
552
544
  var _c;
553
545
  return __generator(this, function (_d) {
554
546
  switch (_d.label) {
@@ -573,14 +565,14 @@ var deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError = func
573
565
  case 5: throw _d.sent();
574
566
  case 6:
575
567
  parsedBody = parsedOutput.body;
576
- $metadata = deserializeMetadata(output);
577
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
578
- response = new __BaseException({
579
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
580
- $fault: "client",
581
- $metadata: $metadata,
568
+ throwDefaultError({
569
+ output: output,
570
+ parsedBody: parsedBody,
571
+ exceptionCtor: __BaseException,
572
+ errorCode: errorCode,
582
573
  });
583
- throw __decorateServiceException(response, parsedBody);
574
+ _d.label = 7;
575
+ case 7: return [2];
584
576
  }
585
577
  });
586
578
  }); };
@@ -592,28 +584,26 @@ export var deserializeAws_restJson1DescribeSavingsPlansOfferingsCommand = functi
592
584
  if (output.statusCode !== 200 && output.statusCode >= 300) {
593
585
  return [2, deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError(output, context)];
594
586
  }
595
- contents = {
587
+ contents = map({
596
588
  $metadata: deserializeMetadata(output),
597
- nextToken: undefined,
598
- searchResults: undefined,
599
- };
589
+ });
600
590
  _a = __expectNonNull;
601
591
  _b = __expectObject;
602
592
  return [4, parseBody(output.body, context)];
603
593
  case 1:
604
594
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
605
- if (data.nextToken !== undefined && data.nextToken !== null) {
595
+ if (data.nextToken != null) {
606
596
  contents.nextToken = __expectString(data.nextToken);
607
597
  }
608
- if (data.searchResults !== undefined && data.searchResults !== null) {
598
+ if (data.searchResults != null) {
609
599
  contents.searchResults = deserializeAws_restJson1SavingsPlanOfferingsList(data.searchResults, context);
610
600
  }
611
- return [2, Promise.resolve(contents)];
601
+ return [2, contents];
612
602
  }
613
603
  });
614
604
  }); };
615
605
  var deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
616
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
606
+ var parsedOutput, _a, errorCode, _b, parsedBody;
617
607
  var _c;
618
608
  return __generator(this, function (_d) {
619
609
  switch (_d.label) {
@@ -638,14 +628,14 @@ var deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError = function
638
628
  case 5: throw _d.sent();
639
629
  case 6:
640
630
  parsedBody = parsedOutput.body;
641
- $metadata = deserializeMetadata(output);
642
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
643
- response = new __BaseException({
644
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
645
- $fault: "client",
646
- $metadata: $metadata,
631
+ throwDefaultError({
632
+ output: output,
633
+ parsedBody: parsedBody,
634
+ exceptionCtor: __BaseException,
635
+ errorCode: errorCode,
647
636
  });
648
- throw __decorateServiceException(response, parsedBody);
637
+ _d.label = 7;
638
+ case 7: return [2];
649
639
  }
650
640
  });
651
641
  }); };
@@ -657,24 +647,23 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
657
647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
658
648
  return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
659
649
  }
660
- contents = {
650
+ contents = map({
661
651
  $metadata: deserializeMetadata(output),
662
- tags: undefined,
663
- };
652
+ });
664
653
  _a = __expectNonNull;
665
654
  _b = __expectObject;
666
655
  return [4, parseBody(output.body, context)];
667
656
  case 1:
668
657
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
669
- if (data.tags !== undefined && data.tags !== null) {
658
+ if (data.tags != null) {
670
659
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
671
660
  }
672
- return [2, Promise.resolve(contents)];
661
+ return [2, contents];
673
662
  }
674
663
  });
675
664
  }); };
676
665
  var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
677
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
666
+ var parsedOutput, _a, errorCode, _b, parsedBody;
678
667
  var _c;
679
668
  return __generator(this, function (_d) {
680
669
  switch (_d.label) {
@@ -703,14 +692,14 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
703
692
  case 7: throw _d.sent();
704
693
  case 8:
705
694
  parsedBody = parsedOutput.body;
706
- $metadata = deserializeMetadata(output);
707
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
708
- response = new __BaseException({
709
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
710
- $fault: "client",
711
- $metadata: $metadata,
695
+ throwDefaultError({
696
+ output: output,
697
+ parsedBody: parsedBody,
698
+ exceptionCtor: __BaseException,
699
+ errorCode: errorCode,
712
700
  });
713
- throw __decorateServiceException(response, parsedBody);
701
+ _d.label = 9;
702
+ case 9: return [2];
714
703
  }
715
704
  });
716
705
  }); };
@@ -722,18 +711,18 @@ export var deserializeAws_restJson1TagResourceCommand = function (output, contex
722
711
  if (output.statusCode !== 200 && output.statusCode >= 300) {
723
712
  return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
724
713
  }
725
- contents = {
714
+ contents = map({
726
715
  $metadata: deserializeMetadata(output),
727
- };
716
+ });
728
717
  return [4, collectBody(output.body, context)];
729
718
  case 1:
730
719
  _a.sent();
731
- return [2, Promise.resolve(contents)];
720
+ return [2, contents];
732
721
  }
733
722
  });
734
723
  }); };
735
724
  var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
736
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
725
+ var parsedOutput, _a, errorCode, _b, parsedBody;
737
726
  var _c;
738
727
  return __generator(this, function (_d) {
739
728
  switch (_d.label) {
@@ -766,14 +755,14 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
766
755
  case 9: throw _d.sent();
767
756
  case 10:
768
757
  parsedBody = parsedOutput.body;
769
- $metadata = deserializeMetadata(output);
770
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
771
- response = new __BaseException({
772
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
773
- $fault: "client",
774
- $metadata: $metadata,
758
+ throwDefaultError({
759
+ output: output,
760
+ parsedBody: parsedBody,
761
+ exceptionCtor: __BaseException,
762
+ errorCode: errorCode,
775
763
  });
776
- throw __decorateServiceException(response, parsedBody);
764
+ _d.label = 11;
765
+ case 11: return [2];
777
766
  }
778
767
  });
779
768
  }); };
@@ -785,18 +774,18 @@ export var deserializeAws_restJson1UntagResourceCommand = function (output, cont
785
774
  if (output.statusCode !== 200 && output.statusCode >= 300) {
786
775
  return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
787
776
  }
788
- contents = {
777
+ contents = map({
789
778
  $metadata: deserializeMetadata(output),
790
- };
779
+ });
791
780
  return [4, collectBody(output.body, context)];
792
781
  case 1:
793
782
  _a.sent();
794
- return [2, Promise.resolve(contents)];
783
+ return [2, contents];
795
784
  }
796
785
  });
797
786
  }); };
798
787
  var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
799
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
788
+ var parsedOutput, _a, errorCode, _b, parsedBody;
800
789
  var _c;
801
790
  return __generator(this, function (_d) {
802
791
  switch (_d.label) {
@@ -825,23 +814,24 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
825
814
  case 7: throw _d.sent();
826
815
  case 8:
827
816
  parsedBody = parsedOutput.body;
828
- $metadata = deserializeMetadata(output);
829
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
830
- response = new __BaseException({
831
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
832
- $fault: "client",
833
- $metadata: $metadata,
817
+ throwDefaultError({
818
+ output: output,
819
+ parsedBody: parsedBody,
820
+ exceptionCtor: __BaseException,
821
+ errorCode: errorCode,
834
822
  });
835
- throw __decorateServiceException(response, parsedBody);
823
+ _d.label = 9;
824
+ case 9: return [2];
836
825
  }
837
826
  });
838
827
  }); };
828
+ var map = __map;
839
829
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
840
830
  var contents, data, exception;
841
831
  return __generator(this, function (_a) {
842
- contents = {};
832
+ contents = map({});
843
833
  data = parsedOutput.body;
844
- if (data.message !== undefined && data.message !== null) {
834
+ if (data.message != null) {
845
835
  contents.message = __expectString(data.message);
846
836
  }
847
837
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -851,9 +841,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
851
841
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
852
842
  var contents, data, exception;
853
843
  return __generator(this, function (_a) {
854
- contents = {};
844
+ contents = map({});
855
845
  data = parsedOutput.body;
856
- if (data.message !== undefined && data.message !== null) {
846
+ if (data.message != null) {
857
847
  contents.message = __expectString(data.message);
858
848
  }
859
849
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -863,9 +853,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
863
853
  var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
864
854
  var contents, data, exception;
865
855
  return __generator(this, function (_a) {
866
- contents = {};
856
+ contents = map({});
867
857
  data = parsedOutput.body;
868
- if (data.message !== undefined && data.message !== null) {
858
+ if (data.message != null) {
869
859
  contents.message = __expectString(data.message);
870
860
  }
871
861
  exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -875,9 +865,9 @@ var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (pa
875
865
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
876
866
  var contents, data, exception;
877
867
  return __generator(this, function (_a) {
878
- contents = {};
868
+ contents = map({});
879
869
  data = parsedOutput.body;
880
- if (data.message !== undefined && data.message !== null) {
870
+ if (data.message != null) {
881
871
  contents.message = __expectString(data.message);
882
872
  }
883
873
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -888,9 +878,6 @@ var serializeAws_restJson1CurrencyList = function (input, context) {
888
878
  return input
889
879
  .filter(function (e) { return e != null; })
890
880
  .map(function (entry) {
891
- if (entry === null) {
892
- return null;
893
- }
894
881
  return entry;
895
882
  });
896
883
  };
@@ -898,9 +885,6 @@ var serializeAws_restJson1DurationsList = function (input, context) {
898
885
  return input
899
886
  .filter(function (e) { return e != null; })
900
887
  .map(function (entry) {
901
- if (entry === null) {
902
- return null;
903
- }
904
888
  return entry;
905
889
  });
906
890
  };
@@ -908,9 +892,6 @@ var serializeAws_restJson1FilterValuesList = function (input, context) {
908
892
  return input
909
893
  .filter(function (e) { return e != null; })
910
894
  .map(function (entry) {
911
- if (entry === null) {
912
- return null;
913
- }
914
895
  return entry;
915
896
  });
916
897
  };
@@ -918,9 +899,6 @@ var serializeAws_restJson1ListOfStrings = function (input, context) {
918
899
  return input
919
900
  .filter(function (e) { return e != null; })
920
901
  .map(function (entry) {
921
- if (entry === null) {
922
- return null;
923
- }
924
902
  return entry;
925
903
  });
926
904
  };
@@ -928,9 +906,6 @@ var serializeAws_restJson1SavingsPlanArnList = function (input, context) {
928
906
  return input
929
907
  .filter(function (e) { return e != null; })
930
908
  .map(function (entry) {
931
- if (entry === null) {
932
- return null;
933
- }
934
909
  return entry;
935
910
  });
936
911
  };
@@ -938,9 +913,6 @@ var serializeAws_restJson1SavingsPlanDescriptionsList = function (input, context
938
913
  return input
939
914
  .filter(function (e) { return e != null; })
940
915
  .map(function (entry) {
941
- if (entry === null) {
942
- return null;
943
- }
944
916
  return entry;
945
917
  });
946
918
  };
@@ -951,9 +923,6 @@ var serializeAws_restJson1SavingsPlanFilterList = function (input, context) {
951
923
  return input
952
924
  .filter(function (e) { return e != null; })
953
925
  .map(function (entry) {
954
- if (entry === null) {
955
- return null;
956
- }
957
926
  return serializeAws_restJson1SavingsPlanFilter(entry, context);
958
927
  });
959
928
  };
@@ -961,9 +930,6 @@ var serializeAws_restJson1SavingsPlanIdList = function (input, context) {
961
930
  return input
962
931
  .filter(function (e) { return e != null; })
963
932
  .map(function (entry) {
964
- if (entry === null) {
965
- return null;
966
- }
967
933
  return entry;
968
934
  });
969
935
  };
@@ -974,9 +940,6 @@ var serializeAws_restJson1SavingsPlanOfferingFiltersList = function (input, cont
974
940
  return input
975
941
  .filter(function (e) { return e != null; })
976
942
  .map(function (entry) {
977
- if (entry === null) {
978
- return null;
979
- }
980
943
  return serializeAws_restJson1SavingsPlanOfferingFilterElement(entry, context);
981
944
  });
982
945
  };
@@ -987,9 +950,6 @@ var serializeAws_restJson1SavingsPlanOfferingRateFiltersList = function (input,
987
950
  return input
988
951
  .filter(function (e) { return e != null; })
989
952
  .map(function (entry) {
990
- if (entry === null) {
991
- return null;
992
- }
993
953
  return serializeAws_restJson1SavingsPlanOfferingRateFilterElement(entry, context);
994
954
  });
995
955
  };
@@ -997,9 +957,6 @@ var serializeAws_restJson1SavingsPlanOperationList = function (input, context) {
997
957
  return input
998
958
  .filter(function (e) { return e != null; })
999
959
  .map(function (entry) {
1000
- if (entry === null) {
1001
- return null;
1002
- }
1003
960
  return entry;
1004
961
  });
1005
962
  };
@@ -1007,9 +964,6 @@ var serializeAws_restJson1SavingsPlanPaymentOptionList = function (input, contex
1007
964
  return input
1008
965
  .filter(function (e) { return e != null; })
1009
966
  .map(function (entry) {
1010
- if (entry === null) {
1011
- return null;
1012
- }
1013
967
  return entry;
1014
968
  });
1015
969
  };
@@ -1017,9 +971,6 @@ var serializeAws_restJson1SavingsPlanProductTypeList = function (input, context)
1017
971
  return input
1018
972
  .filter(function (e) { return e != null; })
1019
973
  .map(function (entry) {
1020
- if (entry === null) {
1021
- return null;
1022
- }
1023
974
  return entry;
1024
975
  });
1025
976
  };
@@ -1030,9 +981,6 @@ var serializeAws_restJson1SavingsPlanRateFilterList = function (input, context)
1030
981
  return input
1031
982
  .filter(function (e) { return e != null; })
1032
983
  .map(function (entry) {
1033
- if (entry === null) {
1034
- return null;
1035
- }
1036
984
  return serializeAws_restJson1SavingsPlanRateFilter(entry, context);
1037
985
  });
1038
986
  };
@@ -1040,9 +988,6 @@ var serializeAws_restJson1SavingsPlanRateOperationList = function (input, contex
1040
988
  return input
1041
989
  .filter(function (e) { return e != null; })
1042
990
  .map(function (entry) {
1043
- if (entry === null) {
1044
- return null;
1045
- }
1046
991
  return entry;
1047
992
  });
1048
993
  };
@@ -1050,9 +995,6 @@ var serializeAws_restJson1SavingsPlanRateServiceCodeList = function (input, cont
1050
995
  return input
1051
996
  .filter(function (e) { return e != null; })
1052
997
  .map(function (entry) {
1053
- if (entry === null) {
1054
- return null;
1055
- }
1056
998
  return entry;
1057
999
  });
1058
1000
  };
@@ -1060,9 +1002,6 @@ var serializeAws_restJson1SavingsPlanRateUsageTypeList = function (input, contex
1060
1002
  return input
1061
1003
  .filter(function (e) { return e != null; })
1062
1004
  .map(function (entry) {
1063
- if (entry === null) {
1064
- return null;
1065
- }
1066
1005
  return entry;
1067
1006
  });
1068
1007
  };
@@ -1070,9 +1009,6 @@ var serializeAws_restJson1SavingsPlanServiceCodeList = function (input, context)
1070
1009
  return input
1071
1010
  .filter(function (e) { return e != null; })
1072
1011
  .map(function (entry) {
1073
- if (entry === null) {
1074
- return null;
1075
- }
1076
1012
  return entry;
1077
1013
  });
1078
1014
  };
@@ -1080,9 +1016,6 @@ var serializeAws_restJson1SavingsPlanStateList = function (input, context) {
1080
1016
  return input
1081
1017
  .filter(function (e) { return e != null; })
1082
1018
  .map(function (entry) {
1083
- if (entry === null) {
1084
- return null;
1085
- }
1086
1019
  return entry;
1087
1020
  });
1088
1021
  };
@@ -1090,9 +1023,6 @@ var serializeAws_restJson1SavingsPlanTypeList = function (input, context) {
1090
1023
  return input
1091
1024
  .filter(function (e) { return e != null; })
1092
1025
  .map(function (entry) {
1093
- if (entry === null) {
1094
- return null;
1095
- }
1096
1026
  return entry;
1097
1027
  });
1098
1028
  };
@@ -1100,9 +1030,6 @@ var serializeAws_restJson1SavingsPlanUsageTypeList = function (input, context) {
1100
1030
  return input
1101
1031
  .filter(function (e) { return e != null; })
1102
1032
  .map(function (entry) {
1103
- if (entry === null) {
1104
- return null;
1105
- }
1106
1033
  return entry;
1107
1034
  });
1108
1035
  };
@@ -1110,9 +1037,6 @@ var serializeAws_restJson1TagKeyList = function (input, context) {
1110
1037
  return input
1111
1038
  .filter(function (e) { return e != null; })
1112
1039
  .map(function (entry) {
1113
- if (entry === null) {
1114
- return null;
1115
- }
1116
1040
  return entry;
1117
1041
  });
1118
1042
  };
@@ -1130,9 +1054,6 @@ var serializeAws_restJson1UUIDs = function (input, context) {
1130
1054
  return input
1131
1055
  .filter(function (e) { return e != null; })
1132
1056
  .map(function (entry) {
1133
- if (entry === null) {
1134
- return null;
1135
- }
1136
1057
  return entry;
1137
1058
  });
1138
1059
  };