@aws-sdk/client-savingsplans 3.141.0 → 3.142.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.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +92 -198
- package/dist-es/protocols/Aws_restJson1.js +120 -199
- package/package.json +6 -6
|
@@ -268,15 +268,14 @@ const deserializeAws_restJson1CreateSavingsPlanCommand = async (output, context)
|
|
|
268
268
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
269
269
|
return deserializeAws_restJson1CreateSavingsPlanCommandError(output, context);
|
|
270
270
|
}
|
|
271
|
-
const contents = {
|
|
271
|
+
const contents = map({
|
|
272
272
|
$metadata: deserializeMetadata(output),
|
|
273
|
-
|
|
274
|
-
};
|
|
273
|
+
});
|
|
275
274
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
276
|
-
if (data.savingsPlanId
|
|
275
|
+
if (data.savingsPlanId != null) {
|
|
277
276
|
contents.savingsPlanId = (0, smithy_client_1.expectString)(data.savingsPlanId);
|
|
278
277
|
}
|
|
279
|
-
return
|
|
278
|
+
return contents;
|
|
280
279
|
};
|
|
281
280
|
exports.deserializeAws_restJson1CreateSavingsPlanCommand = deserializeAws_restJson1CreateSavingsPlanCommand;
|
|
282
281
|
const deserializeAws_restJson1CreateSavingsPlanCommandError = async (output, context) => {
|
|
@@ -284,7 +283,6 @@ const deserializeAws_restJson1CreateSavingsPlanCommandError = async (output, con
|
|
|
284
283
|
...output,
|
|
285
284
|
body: await parseBody(output.body, context),
|
|
286
285
|
};
|
|
287
|
-
let response;
|
|
288
286
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
289
287
|
switch (errorCode) {
|
|
290
288
|
case "InternalServerException":
|
|
@@ -301,25 +299,23 @@ const deserializeAws_restJson1CreateSavingsPlanCommandError = async (output, con
|
|
|
301
299
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
302
300
|
default:
|
|
303
301
|
const parsedBody = parsedOutput.body;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
$metadata,
|
|
302
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
303
|
+
output,
|
|
304
|
+
parsedBody,
|
|
305
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
306
|
+
errorCode,
|
|
310
307
|
});
|
|
311
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
312
308
|
}
|
|
313
309
|
};
|
|
314
310
|
const deserializeAws_restJson1DeleteQueuedSavingsPlanCommand = async (output, context) => {
|
|
315
311
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
316
312
|
return deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError(output, context);
|
|
317
313
|
}
|
|
318
|
-
const contents = {
|
|
314
|
+
const contents = map({
|
|
319
315
|
$metadata: deserializeMetadata(output),
|
|
320
|
-
};
|
|
316
|
+
});
|
|
321
317
|
await collectBody(output.body, context);
|
|
322
|
-
return
|
|
318
|
+
return contents;
|
|
323
319
|
};
|
|
324
320
|
exports.deserializeAws_restJson1DeleteQueuedSavingsPlanCommand = deserializeAws_restJson1DeleteQueuedSavingsPlanCommand;
|
|
325
321
|
const deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError = async (output, context) => {
|
|
@@ -327,7 +323,6 @@ const deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError = async (outpu
|
|
|
327
323
|
...output,
|
|
328
324
|
body: await parseBody(output.body, context),
|
|
329
325
|
};
|
|
330
|
-
let response;
|
|
331
326
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
332
327
|
switch (errorCode) {
|
|
333
328
|
case "InternalServerException":
|
|
@@ -344,37 +339,32 @@ const deserializeAws_restJson1DeleteQueuedSavingsPlanCommandError = async (outpu
|
|
|
344
339
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
345
340
|
default:
|
|
346
341
|
const parsedBody = parsedOutput.body;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
$metadata,
|
|
342
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
343
|
+
output,
|
|
344
|
+
parsedBody,
|
|
345
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
346
|
+
errorCode,
|
|
353
347
|
});
|
|
354
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
355
348
|
}
|
|
356
349
|
};
|
|
357
350
|
const deserializeAws_restJson1DescribeSavingsPlanRatesCommand = async (output, context) => {
|
|
358
351
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
359
352
|
return deserializeAws_restJson1DescribeSavingsPlanRatesCommandError(output, context);
|
|
360
353
|
}
|
|
361
|
-
const contents = {
|
|
354
|
+
const contents = map({
|
|
362
355
|
$metadata: deserializeMetadata(output),
|
|
363
|
-
|
|
364
|
-
savingsPlanId: undefined,
|
|
365
|
-
searchResults: undefined,
|
|
366
|
-
};
|
|
356
|
+
});
|
|
367
357
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
368
|
-
if (data.nextToken
|
|
358
|
+
if (data.nextToken != null) {
|
|
369
359
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
370
360
|
}
|
|
371
|
-
if (data.savingsPlanId
|
|
361
|
+
if (data.savingsPlanId != null) {
|
|
372
362
|
contents.savingsPlanId = (0, smithy_client_1.expectString)(data.savingsPlanId);
|
|
373
363
|
}
|
|
374
|
-
if (data.searchResults
|
|
364
|
+
if (data.searchResults != null) {
|
|
375
365
|
contents.searchResults = deserializeAws_restJson1SavingsPlanRateList(data.searchResults, context);
|
|
376
366
|
}
|
|
377
|
-
return
|
|
367
|
+
return contents;
|
|
378
368
|
};
|
|
379
369
|
exports.deserializeAws_restJson1DescribeSavingsPlanRatesCommand = deserializeAws_restJson1DescribeSavingsPlanRatesCommand;
|
|
380
370
|
const deserializeAws_restJson1DescribeSavingsPlanRatesCommandError = async (output, context) => {
|
|
@@ -382,7 +372,6 @@ const deserializeAws_restJson1DescribeSavingsPlanRatesCommandError = async (outp
|
|
|
382
372
|
...output,
|
|
383
373
|
body: await parseBody(output.body, context),
|
|
384
374
|
};
|
|
385
|
-
let response;
|
|
386
375
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
387
376
|
switch (errorCode) {
|
|
388
377
|
case "ResourceNotFoundException":
|
|
@@ -393,33 +382,29 @@ const deserializeAws_restJson1DescribeSavingsPlanRatesCommandError = async (outp
|
|
|
393
382
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
394
383
|
default:
|
|
395
384
|
const parsedBody = parsedOutput.body;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
$metadata,
|
|
385
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
386
|
+
output,
|
|
387
|
+
parsedBody,
|
|
388
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
389
|
+
errorCode,
|
|
402
390
|
});
|
|
403
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
404
391
|
}
|
|
405
392
|
};
|
|
406
393
|
const deserializeAws_restJson1DescribeSavingsPlansCommand = async (output, context) => {
|
|
407
394
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
408
395
|
return deserializeAws_restJson1DescribeSavingsPlansCommandError(output, context);
|
|
409
396
|
}
|
|
410
|
-
const contents = {
|
|
397
|
+
const contents = map({
|
|
411
398
|
$metadata: deserializeMetadata(output),
|
|
412
|
-
|
|
413
|
-
savingsPlans: undefined,
|
|
414
|
-
};
|
|
399
|
+
});
|
|
415
400
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
416
|
-
if (data.nextToken
|
|
401
|
+
if (data.nextToken != null) {
|
|
417
402
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
418
403
|
}
|
|
419
|
-
if (data.savingsPlans
|
|
404
|
+
if (data.savingsPlans != null) {
|
|
420
405
|
contents.savingsPlans = deserializeAws_restJson1SavingsPlanList(data.savingsPlans, context);
|
|
421
406
|
}
|
|
422
|
-
return
|
|
407
|
+
return contents;
|
|
423
408
|
};
|
|
424
409
|
exports.deserializeAws_restJson1DescribeSavingsPlansCommand = deserializeAws_restJson1DescribeSavingsPlansCommand;
|
|
425
410
|
const deserializeAws_restJson1DescribeSavingsPlansCommandError = async (output, context) => {
|
|
@@ -427,7 +412,6 @@ const deserializeAws_restJson1DescribeSavingsPlansCommandError = async (output,
|
|
|
427
412
|
...output,
|
|
428
413
|
body: await parseBody(output.body, context),
|
|
429
414
|
};
|
|
430
|
-
let response;
|
|
431
415
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
432
416
|
switch (errorCode) {
|
|
433
417
|
case "InternalServerException":
|
|
@@ -438,33 +422,29 @@ const deserializeAws_restJson1DescribeSavingsPlansCommandError = async (output,
|
|
|
438
422
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
439
423
|
default:
|
|
440
424
|
const parsedBody = parsedOutput.body;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
$metadata,
|
|
425
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
426
|
+
output,
|
|
427
|
+
parsedBody,
|
|
428
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
429
|
+
errorCode,
|
|
447
430
|
});
|
|
448
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
449
431
|
}
|
|
450
432
|
};
|
|
451
433
|
const deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand = async (output, context) => {
|
|
452
434
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
453
435
|
return deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError(output, context);
|
|
454
436
|
}
|
|
455
|
-
const contents = {
|
|
437
|
+
const contents = map({
|
|
456
438
|
$metadata: deserializeMetadata(output),
|
|
457
|
-
|
|
458
|
-
searchResults: undefined,
|
|
459
|
-
};
|
|
439
|
+
});
|
|
460
440
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
461
|
-
if (data.nextToken
|
|
441
|
+
if (data.nextToken != null) {
|
|
462
442
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
463
443
|
}
|
|
464
|
-
if (data.searchResults
|
|
444
|
+
if (data.searchResults != null) {
|
|
465
445
|
contents.searchResults = deserializeAws_restJson1SavingsPlanOfferingRatesList(data.searchResults, context);
|
|
466
446
|
}
|
|
467
|
-
return
|
|
447
|
+
return contents;
|
|
468
448
|
};
|
|
469
449
|
exports.deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand = deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommand;
|
|
470
450
|
const deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError = async (output, context) => {
|
|
@@ -472,7 +452,6 @@ const deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError = as
|
|
|
472
452
|
...output,
|
|
473
453
|
body: await parseBody(output.body, context),
|
|
474
454
|
};
|
|
475
|
-
let response;
|
|
476
455
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
477
456
|
switch (errorCode) {
|
|
478
457
|
case "InternalServerException":
|
|
@@ -483,33 +462,29 @@ const deserializeAws_restJson1DescribeSavingsPlansOfferingRatesCommandError = as
|
|
|
483
462
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
484
463
|
default:
|
|
485
464
|
const parsedBody = parsedOutput.body;
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
$metadata,
|
|
465
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
466
|
+
output,
|
|
467
|
+
parsedBody,
|
|
468
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
469
|
+
errorCode,
|
|
492
470
|
});
|
|
493
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
494
471
|
}
|
|
495
472
|
};
|
|
496
473
|
const deserializeAws_restJson1DescribeSavingsPlansOfferingsCommand = async (output, context) => {
|
|
497
474
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
498
475
|
return deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError(output, context);
|
|
499
476
|
}
|
|
500
|
-
const contents = {
|
|
477
|
+
const contents = map({
|
|
501
478
|
$metadata: deserializeMetadata(output),
|
|
502
|
-
|
|
503
|
-
searchResults: undefined,
|
|
504
|
-
};
|
|
479
|
+
});
|
|
505
480
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
506
|
-
if (data.nextToken
|
|
481
|
+
if (data.nextToken != null) {
|
|
507
482
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
508
483
|
}
|
|
509
|
-
if (data.searchResults
|
|
484
|
+
if (data.searchResults != null) {
|
|
510
485
|
contents.searchResults = deserializeAws_restJson1SavingsPlanOfferingsList(data.searchResults, context);
|
|
511
486
|
}
|
|
512
|
-
return
|
|
487
|
+
return contents;
|
|
513
488
|
};
|
|
514
489
|
exports.deserializeAws_restJson1DescribeSavingsPlansOfferingsCommand = deserializeAws_restJson1DescribeSavingsPlansOfferingsCommand;
|
|
515
490
|
const deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError = async (output, context) => {
|
|
@@ -517,7 +492,6 @@ const deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError = async
|
|
|
517
492
|
...output,
|
|
518
493
|
body: await parseBody(output.body, context),
|
|
519
494
|
};
|
|
520
|
-
let response;
|
|
521
495
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
522
496
|
switch (errorCode) {
|
|
523
497
|
case "InternalServerException":
|
|
@@ -528,29 +502,26 @@ const deserializeAws_restJson1DescribeSavingsPlansOfferingsCommandError = async
|
|
|
528
502
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
529
503
|
default:
|
|
530
504
|
const parsedBody = parsedOutput.body;
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
$metadata,
|
|
505
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
506
|
+
output,
|
|
507
|
+
parsedBody,
|
|
508
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
509
|
+
errorCode,
|
|
537
510
|
});
|
|
538
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
539
511
|
}
|
|
540
512
|
};
|
|
541
513
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
542
514
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
543
515
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
544
516
|
}
|
|
545
|
-
const contents = {
|
|
517
|
+
const contents = map({
|
|
546
518
|
$metadata: deserializeMetadata(output),
|
|
547
|
-
|
|
548
|
-
};
|
|
519
|
+
});
|
|
549
520
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
550
|
-
if (data.tags
|
|
521
|
+
if (data.tags != null) {
|
|
551
522
|
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
552
523
|
}
|
|
553
|
-
return
|
|
524
|
+
return contents;
|
|
554
525
|
};
|
|
555
526
|
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
556
527
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -558,7 +529,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
558
529
|
...output,
|
|
559
530
|
body: await parseBody(output.body, context),
|
|
560
531
|
};
|
|
561
|
-
let response;
|
|
562
532
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
563
533
|
switch (errorCode) {
|
|
564
534
|
case "InternalServerException":
|
|
@@ -572,25 +542,23 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
572
542
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
573
543
|
default:
|
|
574
544
|
const parsedBody = parsedOutput.body;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
$metadata,
|
|
545
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
546
|
+
output,
|
|
547
|
+
parsedBody,
|
|
548
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
549
|
+
errorCode,
|
|
581
550
|
});
|
|
582
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
583
551
|
}
|
|
584
552
|
};
|
|
585
553
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
586
554
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
587
555
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
588
556
|
}
|
|
589
|
-
const contents = {
|
|
557
|
+
const contents = map({
|
|
590
558
|
$metadata: deserializeMetadata(output),
|
|
591
|
-
};
|
|
559
|
+
});
|
|
592
560
|
await collectBody(output.body, context);
|
|
593
|
-
return
|
|
561
|
+
return contents;
|
|
594
562
|
};
|
|
595
563
|
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
596
564
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
@@ -598,7 +566,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
598
566
|
...output,
|
|
599
567
|
body: await parseBody(output.body, context),
|
|
600
568
|
};
|
|
601
|
-
let response;
|
|
602
569
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
603
570
|
switch (errorCode) {
|
|
604
571
|
case "InternalServerException":
|
|
@@ -615,25 +582,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
615
582
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
616
583
|
default:
|
|
617
584
|
const parsedBody = parsedOutput.body;
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
$metadata,
|
|
585
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
586
|
+
output,
|
|
587
|
+
parsedBody,
|
|
588
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
589
|
+
errorCode,
|
|
624
590
|
});
|
|
625
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
626
591
|
}
|
|
627
592
|
};
|
|
628
593
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
629
594
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
630
595
|
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
631
596
|
}
|
|
632
|
-
const contents = {
|
|
597
|
+
const contents = map({
|
|
633
598
|
$metadata: deserializeMetadata(output),
|
|
634
|
-
};
|
|
599
|
+
});
|
|
635
600
|
await collectBody(output.body, context);
|
|
636
|
-
return
|
|
601
|
+
return contents;
|
|
637
602
|
};
|
|
638
603
|
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
639
604
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
@@ -641,7 +606,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
641
606
|
...output,
|
|
642
607
|
body: await parseBody(output.body, context),
|
|
643
608
|
};
|
|
644
|
-
let response;
|
|
645
609
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
646
610
|
switch (errorCode) {
|
|
647
611
|
case "InternalServerException":
|
|
@@ -655,20 +619,19 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
655
619
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
656
620
|
default:
|
|
657
621
|
const parsedBody = parsedOutput.body;
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
$metadata,
|
|
622
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
623
|
+
output,
|
|
624
|
+
parsedBody,
|
|
625
|
+
exceptionCtor: SavingsplansServiceException_1.SavingsplansServiceException,
|
|
626
|
+
errorCode,
|
|
664
627
|
});
|
|
665
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
666
628
|
}
|
|
667
629
|
};
|
|
630
|
+
const map = smithy_client_1.map;
|
|
668
631
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
669
|
-
const contents = {};
|
|
632
|
+
const contents = map({});
|
|
670
633
|
const data = parsedOutput.body;
|
|
671
|
-
if (data.message
|
|
634
|
+
if (data.message != null) {
|
|
672
635
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
673
636
|
}
|
|
674
637
|
const exception = new models_0_1.InternalServerException({
|
|
@@ -678,9 +641,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
678
641
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
679
642
|
};
|
|
680
643
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
681
|
-
const contents = {};
|
|
644
|
+
const contents = map({});
|
|
682
645
|
const data = parsedOutput.body;
|
|
683
|
-
if (data.message
|
|
646
|
+
if (data.message != null) {
|
|
684
647
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
685
648
|
}
|
|
686
649
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -690,9 +653,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
690
653
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
691
654
|
};
|
|
692
655
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
693
|
-
const contents = {};
|
|
656
|
+
const contents = map({});
|
|
694
657
|
const data = parsedOutput.body;
|
|
695
|
-
if (data.message
|
|
658
|
+
if (data.message != null) {
|
|
696
659
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
697
660
|
}
|
|
698
661
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
@@ -702,9 +665,9 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
702
665
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
703
666
|
};
|
|
704
667
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
705
|
-
const contents = {};
|
|
668
|
+
const contents = map({});
|
|
706
669
|
const data = parsedOutput.body;
|
|
707
|
-
if (data.message
|
|
670
|
+
if (data.message != null) {
|
|
708
671
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
709
672
|
}
|
|
710
673
|
const exception = new models_0_1.ValidationException({
|
|
@@ -717,9 +680,6 @@ const serializeAws_restJson1CurrencyList = (input, context) => {
|
|
|
717
680
|
return input
|
|
718
681
|
.filter((e) => e != null)
|
|
719
682
|
.map((entry) => {
|
|
720
|
-
if (entry === null) {
|
|
721
|
-
return null;
|
|
722
|
-
}
|
|
723
683
|
return entry;
|
|
724
684
|
});
|
|
725
685
|
};
|
|
@@ -727,9 +687,6 @@ const serializeAws_restJson1DurationsList = (input, context) => {
|
|
|
727
687
|
return input
|
|
728
688
|
.filter((e) => e != null)
|
|
729
689
|
.map((entry) => {
|
|
730
|
-
if (entry === null) {
|
|
731
|
-
return null;
|
|
732
|
-
}
|
|
733
690
|
return entry;
|
|
734
691
|
});
|
|
735
692
|
};
|
|
@@ -737,9 +694,6 @@ const serializeAws_restJson1FilterValuesList = (input, context) => {
|
|
|
737
694
|
return input
|
|
738
695
|
.filter((e) => e != null)
|
|
739
696
|
.map((entry) => {
|
|
740
|
-
if (entry === null) {
|
|
741
|
-
return null;
|
|
742
|
-
}
|
|
743
697
|
return entry;
|
|
744
698
|
});
|
|
745
699
|
};
|
|
@@ -747,9 +701,6 @@ const serializeAws_restJson1ListOfStrings = (input, context) => {
|
|
|
747
701
|
return input
|
|
748
702
|
.filter((e) => e != null)
|
|
749
703
|
.map((entry) => {
|
|
750
|
-
if (entry === null) {
|
|
751
|
-
return null;
|
|
752
|
-
}
|
|
753
704
|
return entry;
|
|
754
705
|
});
|
|
755
706
|
};
|
|
@@ -757,9 +708,6 @@ const serializeAws_restJson1SavingsPlanArnList = (input, context) => {
|
|
|
757
708
|
return input
|
|
758
709
|
.filter((e) => e != null)
|
|
759
710
|
.map((entry) => {
|
|
760
|
-
if (entry === null) {
|
|
761
|
-
return null;
|
|
762
|
-
}
|
|
763
711
|
return entry;
|
|
764
712
|
});
|
|
765
713
|
};
|
|
@@ -767,9 +715,6 @@ const serializeAws_restJson1SavingsPlanDescriptionsList = (input, context) => {
|
|
|
767
715
|
return input
|
|
768
716
|
.filter((e) => e != null)
|
|
769
717
|
.map((entry) => {
|
|
770
|
-
if (entry === null) {
|
|
771
|
-
return null;
|
|
772
|
-
}
|
|
773
718
|
return entry;
|
|
774
719
|
});
|
|
775
720
|
};
|
|
@@ -783,9 +728,6 @@ const serializeAws_restJson1SavingsPlanFilterList = (input, context) => {
|
|
|
783
728
|
return input
|
|
784
729
|
.filter((e) => e != null)
|
|
785
730
|
.map((entry) => {
|
|
786
|
-
if (entry === null) {
|
|
787
|
-
return null;
|
|
788
|
-
}
|
|
789
731
|
return serializeAws_restJson1SavingsPlanFilter(entry, context);
|
|
790
732
|
});
|
|
791
733
|
};
|
|
@@ -793,9 +735,6 @@ const serializeAws_restJson1SavingsPlanIdList = (input, context) => {
|
|
|
793
735
|
return input
|
|
794
736
|
.filter((e) => e != null)
|
|
795
737
|
.map((entry) => {
|
|
796
|
-
if (entry === null) {
|
|
797
|
-
return null;
|
|
798
|
-
}
|
|
799
738
|
return entry;
|
|
800
739
|
});
|
|
801
740
|
};
|
|
@@ -809,9 +748,6 @@ const serializeAws_restJson1SavingsPlanOfferingFiltersList = (input, context) =>
|
|
|
809
748
|
return input
|
|
810
749
|
.filter((e) => e != null)
|
|
811
750
|
.map((entry) => {
|
|
812
|
-
if (entry === null) {
|
|
813
|
-
return null;
|
|
814
|
-
}
|
|
815
751
|
return serializeAws_restJson1SavingsPlanOfferingFilterElement(entry, context);
|
|
816
752
|
});
|
|
817
753
|
};
|
|
@@ -825,9 +761,6 @@ const serializeAws_restJson1SavingsPlanOfferingRateFiltersList = (input, context
|
|
|
825
761
|
return input
|
|
826
762
|
.filter((e) => e != null)
|
|
827
763
|
.map((entry) => {
|
|
828
|
-
if (entry === null) {
|
|
829
|
-
return null;
|
|
830
|
-
}
|
|
831
764
|
return serializeAws_restJson1SavingsPlanOfferingRateFilterElement(entry, context);
|
|
832
765
|
});
|
|
833
766
|
};
|
|
@@ -835,9 +768,6 @@ const serializeAws_restJson1SavingsPlanOperationList = (input, context) => {
|
|
|
835
768
|
return input
|
|
836
769
|
.filter((e) => e != null)
|
|
837
770
|
.map((entry) => {
|
|
838
|
-
if (entry === null) {
|
|
839
|
-
return null;
|
|
840
|
-
}
|
|
841
771
|
return entry;
|
|
842
772
|
});
|
|
843
773
|
};
|
|
@@ -845,9 +775,6 @@ const serializeAws_restJson1SavingsPlanPaymentOptionList = (input, context) => {
|
|
|
845
775
|
return input
|
|
846
776
|
.filter((e) => e != null)
|
|
847
777
|
.map((entry) => {
|
|
848
|
-
if (entry === null) {
|
|
849
|
-
return null;
|
|
850
|
-
}
|
|
851
778
|
return entry;
|
|
852
779
|
});
|
|
853
780
|
};
|
|
@@ -855,9 +782,6 @@ const serializeAws_restJson1SavingsPlanProductTypeList = (input, context) => {
|
|
|
855
782
|
return input
|
|
856
783
|
.filter((e) => e != null)
|
|
857
784
|
.map((entry) => {
|
|
858
|
-
if (entry === null) {
|
|
859
|
-
return null;
|
|
860
|
-
}
|
|
861
785
|
return entry;
|
|
862
786
|
});
|
|
863
787
|
};
|
|
@@ -871,9 +795,6 @@ const serializeAws_restJson1SavingsPlanRateFilterList = (input, context) => {
|
|
|
871
795
|
return input
|
|
872
796
|
.filter((e) => e != null)
|
|
873
797
|
.map((entry) => {
|
|
874
|
-
if (entry === null) {
|
|
875
|
-
return null;
|
|
876
|
-
}
|
|
877
798
|
return serializeAws_restJson1SavingsPlanRateFilter(entry, context);
|
|
878
799
|
});
|
|
879
800
|
};
|
|
@@ -881,9 +802,6 @@ const serializeAws_restJson1SavingsPlanRateOperationList = (input, context) => {
|
|
|
881
802
|
return input
|
|
882
803
|
.filter((e) => e != null)
|
|
883
804
|
.map((entry) => {
|
|
884
|
-
if (entry === null) {
|
|
885
|
-
return null;
|
|
886
|
-
}
|
|
887
805
|
return entry;
|
|
888
806
|
});
|
|
889
807
|
};
|
|
@@ -891,9 +809,6 @@ const serializeAws_restJson1SavingsPlanRateServiceCodeList = (input, context) =>
|
|
|
891
809
|
return input
|
|
892
810
|
.filter((e) => e != null)
|
|
893
811
|
.map((entry) => {
|
|
894
|
-
if (entry === null) {
|
|
895
|
-
return null;
|
|
896
|
-
}
|
|
897
812
|
return entry;
|
|
898
813
|
});
|
|
899
814
|
};
|
|
@@ -901,9 +816,6 @@ const serializeAws_restJson1SavingsPlanRateUsageTypeList = (input, context) => {
|
|
|
901
816
|
return input
|
|
902
817
|
.filter((e) => e != null)
|
|
903
818
|
.map((entry) => {
|
|
904
|
-
if (entry === null) {
|
|
905
|
-
return null;
|
|
906
|
-
}
|
|
907
819
|
return entry;
|
|
908
820
|
});
|
|
909
821
|
};
|
|
@@ -911,9 +823,6 @@ const serializeAws_restJson1SavingsPlanServiceCodeList = (input, context) => {
|
|
|
911
823
|
return input
|
|
912
824
|
.filter((e) => e != null)
|
|
913
825
|
.map((entry) => {
|
|
914
|
-
if (entry === null) {
|
|
915
|
-
return null;
|
|
916
|
-
}
|
|
917
826
|
return entry;
|
|
918
827
|
});
|
|
919
828
|
};
|
|
@@ -921,9 +830,6 @@ const serializeAws_restJson1SavingsPlanStateList = (input, context) => {
|
|
|
921
830
|
return input
|
|
922
831
|
.filter((e) => e != null)
|
|
923
832
|
.map((entry) => {
|
|
924
|
-
if (entry === null) {
|
|
925
|
-
return null;
|
|
926
|
-
}
|
|
927
833
|
return entry;
|
|
928
834
|
});
|
|
929
835
|
};
|
|
@@ -931,9 +837,6 @@ const serializeAws_restJson1SavingsPlanTypeList = (input, context) => {
|
|
|
931
837
|
return input
|
|
932
838
|
.filter((e) => e != null)
|
|
933
839
|
.map((entry) => {
|
|
934
|
-
if (entry === null) {
|
|
935
|
-
return null;
|
|
936
|
-
}
|
|
937
840
|
return entry;
|
|
938
841
|
});
|
|
939
842
|
};
|
|
@@ -941,9 +844,6 @@ const serializeAws_restJson1SavingsPlanUsageTypeList = (input, context) => {
|
|
|
941
844
|
return input
|
|
942
845
|
.filter((e) => e != null)
|
|
943
846
|
.map((entry) => {
|
|
944
|
-
if (entry === null) {
|
|
945
|
-
return null;
|
|
946
|
-
}
|
|
947
847
|
return entry;
|
|
948
848
|
});
|
|
949
849
|
};
|
|
@@ -951,9 +851,6 @@ const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
|
951
851
|
return input
|
|
952
852
|
.filter((e) => e != null)
|
|
953
853
|
.map((entry) => {
|
|
954
|
-
if (entry === null) {
|
|
955
|
-
return null;
|
|
956
|
-
}
|
|
957
854
|
return entry;
|
|
958
855
|
});
|
|
959
856
|
};
|
|
@@ -972,9 +869,6 @@ const serializeAws_restJson1UUIDs = (input, context) => {
|
|
|
972
869
|
return input
|
|
973
870
|
.filter((e) => e != null)
|
|
974
871
|
.map((entry) => {
|
|
975
|
-
if (entry === null) {
|
|
976
|
-
return null;
|
|
977
|
-
}
|
|
978
872
|
return entry;
|
|
979
873
|
});
|
|
980
874
|
};
|