@aws-sdk/client-ecr 3.504.0 → 3.507.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.
@@ -262,7 +262,7 @@ export const se_ValidatePullThroughCacheRuleCommand = async (input, context) =>
262
262
  };
263
263
  export const de_BatchCheckLayerAvailabilityCommand = async (output, context) => {
264
264
  if (output.statusCode >= 300) {
265
- return de_BatchCheckLayerAvailabilityCommandError(output, context);
265
+ return de_CommandError(output, context);
266
266
  }
267
267
  const data = await parseBody(output.body, context);
268
268
  let contents = {};
@@ -273,34 +273,9 @@ export const de_BatchCheckLayerAvailabilityCommand = async (output, context) =>
273
273
  };
274
274
  return response;
275
275
  };
276
- const de_BatchCheckLayerAvailabilityCommandError = async (output, context) => {
277
- const parsedOutput = {
278
- ...output,
279
- body: await parseErrorBody(output.body, context),
280
- };
281
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
282
- switch (errorCode) {
283
- case "InvalidParameterException":
284
- case "com.amazonaws.ecr#InvalidParameterException":
285
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
286
- case "RepositoryNotFoundException":
287
- case "com.amazonaws.ecr#RepositoryNotFoundException":
288
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
289
- case "ServerException":
290
- case "com.amazonaws.ecr#ServerException":
291
- throw await de_ServerExceptionRes(parsedOutput, context);
292
- default:
293
- const parsedBody = parsedOutput.body;
294
- return throwDefaultError({
295
- output,
296
- parsedBody,
297
- errorCode,
298
- });
299
- }
300
- };
301
276
  export const de_BatchDeleteImageCommand = async (output, context) => {
302
277
  if (output.statusCode >= 300) {
303
- return de_BatchDeleteImageCommandError(output, context);
278
+ return de_CommandError(output, context);
304
279
  }
305
280
  const data = await parseBody(output.body, context);
306
281
  let contents = {};
@@ -311,34 +286,9 @@ export const de_BatchDeleteImageCommand = async (output, context) => {
311
286
  };
312
287
  return response;
313
288
  };
314
- const de_BatchDeleteImageCommandError = async (output, context) => {
315
- const parsedOutput = {
316
- ...output,
317
- body: await parseErrorBody(output.body, context),
318
- };
319
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
320
- switch (errorCode) {
321
- case "InvalidParameterException":
322
- case "com.amazonaws.ecr#InvalidParameterException":
323
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
324
- case "RepositoryNotFoundException":
325
- case "com.amazonaws.ecr#RepositoryNotFoundException":
326
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
327
- case "ServerException":
328
- case "com.amazonaws.ecr#ServerException":
329
- throw await de_ServerExceptionRes(parsedOutput, context);
330
- default:
331
- const parsedBody = parsedOutput.body;
332
- return throwDefaultError({
333
- output,
334
- parsedBody,
335
- errorCode,
336
- });
337
- }
338
- };
339
289
  export const de_BatchGetImageCommand = async (output, context) => {
340
290
  if (output.statusCode >= 300) {
341
- return de_BatchGetImageCommandError(output, context);
291
+ return de_CommandError(output, context);
342
292
  }
343
293
  const data = await parseBody(output.body, context);
344
294
  let contents = {};
@@ -349,40 +299,9 @@ export const de_BatchGetImageCommand = async (output, context) => {
349
299
  };
350
300
  return response;
351
301
  };
352
- const de_BatchGetImageCommandError = async (output, context) => {
353
- const parsedOutput = {
354
- ...output,
355
- body: await parseErrorBody(output.body, context),
356
- };
357
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
358
- switch (errorCode) {
359
- case "InvalidParameterException":
360
- case "com.amazonaws.ecr#InvalidParameterException":
361
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
362
- case "LimitExceededException":
363
- case "com.amazonaws.ecr#LimitExceededException":
364
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
365
- case "RepositoryNotFoundException":
366
- case "com.amazonaws.ecr#RepositoryNotFoundException":
367
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
368
- case "ServerException":
369
- case "com.amazonaws.ecr#ServerException":
370
- throw await de_ServerExceptionRes(parsedOutput, context);
371
- case "UnableToGetUpstreamImageException":
372
- case "com.amazonaws.ecr#UnableToGetUpstreamImageException":
373
- throw await de_UnableToGetUpstreamImageExceptionRes(parsedOutput, context);
374
- default:
375
- const parsedBody = parsedOutput.body;
376
- return throwDefaultError({
377
- output,
378
- parsedBody,
379
- errorCode,
380
- });
381
- }
382
- };
383
302
  export const de_BatchGetRepositoryScanningConfigurationCommand = async (output, context) => {
384
303
  if (output.statusCode >= 300) {
385
- return de_BatchGetRepositoryScanningConfigurationCommandError(output, context);
304
+ return de_CommandError(output, context);
386
305
  }
387
306
  const data = await parseBody(output.body, context);
388
307
  let contents = {};
@@ -393,37 +312,9 @@ export const de_BatchGetRepositoryScanningConfigurationCommand = async (output,
393
312
  };
394
313
  return response;
395
314
  };
396
- const de_BatchGetRepositoryScanningConfigurationCommandError = async (output, context) => {
397
- const parsedOutput = {
398
- ...output,
399
- body: await parseErrorBody(output.body, context),
400
- };
401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
- switch (errorCode) {
403
- case "InvalidParameterException":
404
- case "com.amazonaws.ecr#InvalidParameterException":
405
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
406
- case "RepositoryNotFoundException":
407
- case "com.amazonaws.ecr#RepositoryNotFoundException":
408
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
409
- case "ServerException":
410
- case "com.amazonaws.ecr#ServerException":
411
- throw await de_ServerExceptionRes(parsedOutput, context);
412
- case "ValidationException":
413
- case "com.amazonaws.ecr#ValidationException":
414
- throw await de_ValidationExceptionRes(parsedOutput, context);
415
- default:
416
- const parsedBody = parsedOutput.body;
417
- return throwDefaultError({
418
- output,
419
- parsedBody,
420
- errorCode,
421
- });
422
- }
423
- };
424
315
  export const de_CompleteLayerUploadCommand = async (output, context) => {
425
316
  if (output.statusCode >= 300) {
426
- return de_CompleteLayerUploadCommandError(output, context);
317
+ return de_CommandError(output, context);
427
318
  }
428
319
  const data = await parseBody(output.body, context);
429
320
  let contents = {};
@@ -434,52 +325,9 @@ export const de_CompleteLayerUploadCommand = async (output, context) => {
434
325
  };
435
326
  return response;
436
327
  };
437
- const de_CompleteLayerUploadCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "EmptyUploadException":
445
- case "com.amazonaws.ecr#EmptyUploadException":
446
- throw await de_EmptyUploadExceptionRes(parsedOutput, context);
447
- case "InvalidLayerException":
448
- case "com.amazonaws.ecr#InvalidLayerException":
449
- throw await de_InvalidLayerExceptionRes(parsedOutput, context);
450
- case "InvalidParameterException":
451
- case "com.amazonaws.ecr#InvalidParameterException":
452
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
453
- case "KmsException":
454
- case "com.amazonaws.ecr#KmsException":
455
- throw await de_KmsExceptionRes(parsedOutput, context);
456
- case "LayerAlreadyExistsException":
457
- case "com.amazonaws.ecr#LayerAlreadyExistsException":
458
- throw await de_LayerAlreadyExistsExceptionRes(parsedOutput, context);
459
- case "LayerPartTooSmallException":
460
- case "com.amazonaws.ecr#LayerPartTooSmallException":
461
- throw await de_LayerPartTooSmallExceptionRes(parsedOutput, context);
462
- case "RepositoryNotFoundException":
463
- case "com.amazonaws.ecr#RepositoryNotFoundException":
464
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
465
- case "ServerException":
466
- case "com.amazonaws.ecr#ServerException":
467
- throw await de_ServerExceptionRes(parsedOutput, context);
468
- case "UploadNotFoundException":
469
- case "com.amazonaws.ecr#UploadNotFoundException":
470
- throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
471
- default:
472
- const parsedBody = parsedOutput.body;
473
- return throwDefaultError({
474
- output,
475
- parsedBody,
476
- errorCode,
477
- });
478
- }
479
- };
480
328
  export const de_CreatePullThroughCacheRuleCommand = async (output, context) => {
481
329
  if (output.statusCode >= 300) {
482
- return de_CreatePullThroughCacheRuleCommandError(output, context);
330
+ return de_CommandError(output, context);
483
331
  }
484
332
  const data = await parseBody(output.body, context);
485
333
  let contents = {};
@@ -490,52 +338,9 @@ export const de_CreatePullThroughCacheRuleCommand = async (output, context) => {
490
338
  };
491
339
  return response;
492
340
  };
493
- const de_CreatePullThroughCacheRuleCommandError = async (output, context) => {
494
- const parsedOutput = {
495
- ...output,
496
- body: await parseErrorBody(output.body, context),
497
- };
498
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
499
- switch (errorCode) {
500
- case "InvalidParameterException":
501
- case "com.amazonaws.ecr#InvalidParameterException":
502
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
503
- case "LimitExceededException":
504
- case "com.amazonaws.ecr#LimitExceededException":
505
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
506
- case "PullThroughCacheRuleAlreadyExistsException":
507
- case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
508
- throw await de_PullThroughCacheRuleAlreadyExistsExceptionRes(parsedOutput, context);
509
- case "SecretNotFoundException":
510
- case "com.amazonaws.ecr#SecretNotFoundException":
511
- throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
512
- case "ServerException":
513
- case "com.amazonaws.ecr#ServerException":
514
- throw await de_ServerExceptionRes(parsedOutput, context);
515
- case "UnableToAccessSecretException":
516
- case "com.amazonaws.ecr#UnableToAccessSecretException":
517
- throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
518
- case "UnableToDecryptSecretValueException":
519
- case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
520
- throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
521
- case "UnsupportedUpstreamRegistryException":
522
- case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
523
- throw await de_UnsupportedUpstreamRegistryExceptionRes(parsedOutput, context);
524
- case "ValidationException":
525
- case "com.amazonaws.ecr#ValidationException":
526
- throw await de_ValidationExceptionRes(parsedOutput, context);
527
- default:
528
- const parsedBody = parsedOutput.body;
529
- return throwDefaultError({
530
- output,
531
- parsedBody,
532
- errorCode,
533
- });
534
- }
535
- };
536
341
  export const de_CreateRepositoryCommand = async (output, context) => {
537
342
  if (output.statusCode >= 300) {
538
- return de_CreateRepositoryCommandError(output, context);
343
+ return de_CommandError(output, context);
539
344
  }
540
345
  const data = await parseBody(output.body, context);
541
346
  let contents = {};
@@ -546,46 +351,9 @@ export const de_CreateRepositoryCommand = async (output, context) => {
546
351
  };
547
352
  return response;
548
353
  };
549
- const de_CreateRepositoryCommandError = async (output, context) => {
550
- const parsedOutput = {
551
- ...output,
552
- body: await parseErrorBody(output.body, context),
553
- };
554
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
- switch (errorCode) {
556
- case "InvalidParameterException":
557
- case "com.amazonaws.ecr#InvalidParameterException":
558
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
559
- case "InvalidTagParameterException":
560
- case "com.amazonaws.ecr#InvalidTagParameterException":
561
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
562
- case "KmsException":
563
- case "com.amazonaws.ecr#KmsException":
564
- throw await de_KmsExceptionRes(parsedOutput, context);
565
- case "LimitExceededException":
566
- case "com.amazonaws.ecr#LimitExceededException":
567
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
568
- case "RepositoryAlreadyExistsException":
569
- case "com.amazonaws.ecr#RepositoryAlreadyExistsException":
570
- throw await de_RepositoryAlreadyExistsExceptionRes(parsedOutput, context);
571
- case "ServerException":
572
- case "com.amazonaws.ecr#ServerException":
573
- throw await de_ServerExceptionRes(parsedOutput, context);
574
- case "TooManyTagsException":
575
- case "com.amazonaws.ecr#TooManyTagsException":
576
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
577
- default:
578
- const parsedBody = parsedOutput.body;
579
- return throwDefaultError({
580
- output,
581
- parsedBody,
582
- errorCode,
583
- });
584
- }
585
- };
586
354
  export const de_DeleteLifecyclePolicyCommand = async (output, context) => {
587
355
  if (output.statusCode >= 300) {
588
- return de_DeleteLifecyclePolicyCommandError(output, context);
356
+ return de_CommandError(output, context);
589
357
  }
590
358
  const data = await parseBody(output.body, context);
591
359
  let contents = {};
@@ -596,40 +364,9 @@ export const de_DeleteLifecyclePolicyCommand = async (output, context) => {
596
364
  };
597
365
  return response;
598
366
  };
599
- const de_DeleteLifecyclePolicyCommandError = async (output, context) => {
600
- const parsedOutput = {
601
- ...output,
602
- body: await parseErrorBody(output.body, context),
603
- };
604
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
605
- switch (errorCode) {
606
- case "InvalidParameterException":
607
- case "com.amazonaws.ecr#InvalidParameterException":
608
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
609
- case "LifecyclePolicyNotFoundException":
610
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
611
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
612
- case "RepositoryNotFoundException":
613
- case "com.amazonaws.ecr#RepositoryNotFoundException":
614
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
615
- case "ServerException":
616
- case "com.amazonaws.ecr#ServerException":
617
- throw await de_ServerExceptionRes(parsedOutput, context);
618
- case "ValidationException":
619
- case "com.amazonaws.ecr#ValidationException":
620
- throw await de_ValidationExceptionRes(parsedOutput, context);
621
- default:
622
- const parsedBody = parsedOutput.body;
623
- return throwDefaultError({
624
- output,
625
- parsedBody,
626
- errorCode,
627
- });
628
- }
629
- };
630
367
  export const de_DeletePullThroughCacheRuleCommand = async (output, context) => {
631
368
  if (output.statusCode >= 300) {
632
- return de_DeletePullThroughCacheRuleCommandError(output, context);
369
+ return de_CommandError(output, context);
633
370
  }
634
371
  const data = await parseBody(output.body, context);
635
372
  let contents = {};
@@ -640,37 +377,9 @@ export const de_DeletePullThroughCacheRuleCommand = async (output, context) => {
640
377
  };
641
378
  return response;
642
379
  };
643
- const de_DeletePullThroughCacheRuleCommandError = async (output, context) => {
644
- const parsedOutput = {
645
- ...output,
646
- body: await parseErrorBody(output.body, context),
647
- };
648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
649
- switch (errorCode) {
650
- case "InvalidParameterException":
651
- case "com.amazonaws.ecr#InvalidParameterException":
652
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
653
- case "PullThroughCacheRuleNotFoundException":
654
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
655
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
656
- case "ServerException":
657
- case "com.amazonaws.ecr#ServerException":
658
- throw await de_ServerExceptionRes(parsedOutput, context);
659
- case "ValidationException":
660
- case "com.amazonaws.ecr#ValidationException":
661
- throw await de_ValidationExceptionRes(parsedOutput, context);
662
- default:
663
- const parsedBody = parsedOutput.body;
664
- return throwDefaultError({
665
- output,
666
- parsedBody,
667
- errorCode,
668
- });
669
- }
670
- };
671
380
  export const de_DeleteRegistryPolicyCommand = async (output, context) => {
672
381
  if (output.statusCode >= 300) {
673
- return de_DeleteRegistryPolicyCommandError(output, context);
382
+ return de_CommandError(output, context);
674
383
  }
675
384
  const data = await parseBody(output.body, context);
676
385
  let contents = {};
@@ -681,37 +390,9 @@ export const de_DeleteRegistryPolicyCommand = async (output, context) => {
681
390
  };
682
391
  return response;
683
392
  };
684
- const de_DeleteRegistryPolicyCommandError = async (output, context) => {
685
- const parsedOutput = {
686
- ...output,
687
- body: await parseErrorBody(output.body, context),
688
- };
689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
690
- switch (errorCode) {
691
- case "InvalidParameterException":
692
- case "com.amazonaws.ecr#InvalidParameterException":
693
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
694
- case "RegistryPolicyNotFoundException":
695
- case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
696
- throw await de_RegistryPolicyNotFoundExceptionRes(parsedOutput, context);
697
- case "ServerException":
698
- case "com.amazonaws.ecr#ServerException":
699
- throw await de_ServerExceptionRes(parsedOutput, context);
700
- case "ValidationException":
701
- case "com.amazonaws.ecr#ValidationException":
702
- throw await de_ValidationExceptionRes(parsedOutput, context);
703
- default:
704
- const parsedBody = parsedOutput.body;
705
- return throwDefaultError({
706
- output,
707
- parsedBody,
708
- errorCode,
709
- });
710
- }
711
- };
712
393
  export const de_DeleteRepositoryCommand = async (output, context) => {
713
394
  if (output.statusCode >= 300) {
714
- return de_DeleteRepositoryCommandError(output, context);
395
+ return de_CommandError(output, context);
715
396
  }
716
397
  const data = await parseBody(output.body, context);
717
398
  let contents = {};
@@ -722,40 +403,9 @@ export const de_DeleteRepositoryCommand = async (output, context) => {
722
403
  };
723
404
  return response;
724
405
  };
725
- const de_DeleteRepositoryCommandError = async (output, context) => {
726
- const parsedOutput = {
727
- ...output,
728
- body: await parseErrorBody(output.body, context),
729
- };
730
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
731
- switch (errorCode) {
732
- case "InvalidParameterException":
733
- case "com.amazonaws.ecr#InvalidParameterException":
734
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
735
- case "KmsException":
736
- case "com.amazonaws.ecr#KmsException":
737
- throw await de_KmsExceptionRes(parsedOutput, context);
738
- case "RepositoryNotEmptyException":
739
- case "com.amazonaws.ecr#RepositoryNotEmptyException":
740
- throw await de_RepositoryNotEmptyExceptionRes(parsedOutput, context);
741
- case "RepositoryNotFoundException":
742
- case "com.amazonaws.ecr#RepositoryNotFoundException":
743
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
744
- case "ServerException":
745
- case "com.amazonaws.ecr#ServerException":
746
- throw await de_ServerExceptionRes(parsedOutput, context);
747
- default:
748
- const parsedBody = parsedOutput.body;
749
- return throwDefaultError({
750
- output,
751
- parsedBody,
752
- errorCode,
753
- });
754
- }
755
- };
756
406
  export const de_DeleteRepositoryPolicyCommand = async (output, context) => {
757
407
  if (output.statusCode >= 300) {
758
- return de_DeleteRepositoryPolicyCommandError(output, context);
408
+ return de_CommandError(output, context);
759
409
  }
760
410
  const data = await parseBody(output.body, context);
761
411
  let contents = {};
@@ -766,37 +416,9 @@ export const de_DeleteRepositoryPolicyCommand = async (output, context) => {
766
416
  };
767
417
  return response;
768
418
  };
769
- const de_DeleteRepositoryPolicyCommandError = async (output, context) => {
770
- const parsedOutput = {
771
- ...output,
772
- body: await parseErrorBody(output.body, context),
773
- };
774
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
775
- switch (errorCode) {
776
- case "InvalidParameterException":
777
- case "com.amazonaws.ecr#InvalidParameterException":
778
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
779
- case "RepositoryNotFoundException":
780
- case "com.amazonaws.ecr#RepositoryNotFoundException":
781
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
782
- case "RepositoryPolicyNotFoundException":
783
- case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
784
- throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
785
- case "ServerException":
786
- case "com.amazonaws.ecr#ServerException":
787
- throw await de_ServerExceptionRes(parsedOutput, context);
788
- default:
789
- const parsedBody = parsedOutput.body;
790
- return throwDefaultError({
791
- output,
792
- parsedBody,
793
- errorCode,
794
- });
795
- }
796
- };
797
419
  export const de_DescribeImageReplicationStatusCommand = async (output, context) => {
798
420
  if (output.statusCode >= 300) {
799
- return de_DescribeImageReplicationStatusCommandError(output, context);
421
+ return de_CommandError(output, context);
800
422
  }
801
423
  const data = await parseBody(output.body, context);
802
424
  let contents = {};
@@ -807,40 +429,9 @@ export const de_DescribeImageReplicationStatusCommand = async (output, context)
807
429
  };
808
430
  return response;
809
431
  };
810
- const de_DescribeImageReplicationStatusCommandError = async (output, context) => {
811
- const parsedOutput = {
812
- ...output,
813
- body: await parseErrorBody(output.body, context),
814
- };
815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
816
- switch (errorCode) {
817
- case "ImageNotFoundException":
818
- case "com.amazonaws.ecr#ImageNotFoundException":
819
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
820
- case "InvalidParameterException":
821
- case "com.amazonaws.ecr#InvalidParameterException":
822
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
823
- case "RepositoryNotFoundException":
824
- case "com.amazonaws.ecr#RepositoryNotFoundException":
825
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
826
- case "ServerException":
827
- case "com.amazonaws.ecr#ServerException":
828
- throw await de_ServerExceptionRes(parsedOutput, context);
829
- case "ValidationException":
830
- case "com.amazonaws.ecr#ValidationException":
831
- throw await de_ValidationExceptionRes(parsedOutput, context);
832
- default:
833
- const parsedBody = parsedOutput.body;
834
- return throwDefaultError({
835
- output,
836
- parsedBody,
837
- errorCode,
838
- });
839
- }
840
- };
841
432
  export const de_DescribeImagesCommand = async (output, context) => {
842
433
  if (output.statusCode >= 300) {
843
- return de_DescribeImagesCommandError(output, context);
434
+ return de_CommandError(output, context);
844
435
  }
845
436
  const data = await parseBody(output.body, context);
846
437
  let contents = {};
@@ -851,37 +442,9 @@ export const de_DescribeImagesCommand = async (output, context) => {
851
442
  };
852
443
  return response;
853
444
  };
854
- const de_DescribeImagesCommandError = async (output, context) => {
855
- const parsedOutput = {
856
- ...output,
857
- body: await parseErrorBody(output.body, context),
858
- };
859
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
860
- switch (errorCode) {
861
- case "ImageNotFoundException":
862
- case "com.amazonaws.ecr#ImageNotFoundException":
863
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
864
- case "InvalidParameterException":
865
- case "com.amazonaws.ecr#InvalidParameterException":
866
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
867
- case "RepositoryNotFoundException":
868
- case "com.amazonaws.ecr#RepositoryNotFoundException":
869
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
870
- case "ServerException":
871
- case "com.amazonaws.ecr#ServerException":
872
- throw await de_ServerExceptionRes(parsedOutput, context);
873
- default:
874
- const parsedBody = parsedOutput.body;
875
- return throwDefaultError({
876
- output,
877
- parsedBody,
878
- errorCode,
879
- });
880
- }
881
- };
882
445
  export const de_DescribeImageScanFindingsCommand = async (output, context) => {
883
446
  if (output.statusCode >= 300) {
884
- return de_DescribeImageScanFindingsCommandError(output, context);
447
+ return de_CommandError(output, context);
885
448
  }
886
449
  const data = await parseBody(output.body, context);
887
450
  let contents = {};
@@ -892,43 +455,9 @@ export const de_DescribeImageScanFindingsCommand = async (output, context) => {
892
455
  };
893
456
  return response;
894
457
  };
895
- const de_DescribeImageScanFindingsCommandError = async (output, context) => {
896
- const parsedOutput = {
897
- ...output,
898
- body: await parseErrorBody(output.body, context),
899
- };
900
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
- switch (errorCode) {
902
- case "ImageNotFoundException":
903
- case "com.amazonaws.ecr#ImageNotFoundException":
904
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
905
- case "InvalidParameterException":
906
- case "com.amazonaws.ecr#InvalidParameterException":
907
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
908
- case "RepositoryNotFoundException":
909
- case "com.amazonaws.ecr#RepositoryNotFoundException":
910
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
911
- case "ScanNotFoundException":
912
- case "com.amazonaws.ecr#ScanNotFoundException":
913
- throw await de_ScanNotFoundExceptionRes(parsedOutput, context);
914
- case "ServerException":
915
- case "com.amazonaws.ecr#ServerException":
916
- throw await de_ServerExceptionRes(parsedOutput, context);
917
- case "ValidationException":
918
- case "com.amazonaws.ecr#ValidationException":
919
- throw await de_ValidationExceptionRes(parsedOutput, context);
920
- default:
921
- const parsedBody = parsedOutput.body;
922
- return throwDefaultError({
923
- output,
924
- parsedBody,
925
- errorCode,
926
- });
927
- }
928
- };
929
458
  export const de_DescribePullThroughCacheRulesCommand = async (output, context) => {
930
459
  if (output.statusCode >= 300) {
931
- return de_DescribePullThroughCacheRulesCommandError(output, context);
460
+ return de_CommandError(output, context);
932
461
  }
933
462
  const data = await parseBody(output.body, context);
934
463
  let contents = {};
@@ -939,37 +468,9 @@ export const de_DescribePullThroughCacheRulesCommand = async (output, context) =
939
468
  };
940
469
  return response;
941
470
  };
942
- const de_DescribePullThroughCacheRulesCommandError = async (output, context) => {
943
- const parsedOutput = {
944
- ...output,
945
- body: await parseErrorBody(output.body, context),
946
- };
947
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
948
- switch (errorCode) {
949
- case "InvalidParameterException":
950
- case "com.amazonaws.ecr#InvalidParameterException":
951
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
952
- case "PullThroughCacheRuleNotFoundException":
953
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
954
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
955
- case "ServerException":
956
- case "com.amazonaws.ecr#ServerException":
957
- throw await de_ServerExceptionRes(parsedOutput, context);
958
- case "ValidationException":
959
- case "com.amazonaws.ecr#ValidationException":
960
- throw await de_ValidationExceptionRes(parsedOutput, context);
961
- default:
962
- const parsedBody = parsedOutput.body;
963
- return throwDefaultError({
964
- output,
965
- parsedBody,
966
- errorCode,
967
- });
968
- }
969
- };
970
471
  export const de_DescribeRegistryCommand = async (output, context) => {
971
472
  if (output.statusCode >= 300) {
972
- return de_DescribeRegistryCommandError(output, context);
473
+ return de_CommandError(output, context);
973
474
  }
974
475
  const data = await parseBody(output.body, context);
975
476
  let contents = {};
@@ -980,34 +481,9 @@ export const de_DescribeRegistryCommand = async (output, context) => {
980
481
  };
981
482
  return response;
982
483
  };
983
- const de_DescribeRegistryCommandError = async (output, context) => {
984
- const parsedOutput = {
985
- ...output,
986
- body: await parseErrorBody(output.body, context),
987
- };
988
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
989
- switch (errorCode) {
990
- case "InvalidParameterException":
991
- case "com.amazonaws.ecr#InvalidParameterException":
992
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
993
- case "ServerException":
994
- case "com.amazonaws.ecr#ServerException":
995
- throw await de_ServerExceptionRes(parsedOutput, context);
996
- case "ValidationException":
997
- case "com.amazonaws.ecr#ValidationException":
998
- throw await de_ValidationExceptionRes(parsedOutput, context);
999
- default:
1000
- const parsedBody = parsedOutput.body;
1001
- return throwDefaultError({
1002
- output,
1003
- parsedBody,
1004
- errorCode,
1005
- });
1006
- }
1007
- };
1008
484
  export const de_DescribeRepositoriesCommand = async (output, context) => {
1009
485
  if (output.statusCode >= 300) {
1010
- return de_DescribeRepositoriesCommandError(output, context);
486
+ return de_CommandError(output, context);
1011
487
  }
1012
488
  const data = await parseBody(output.body, context);
1013
489
  let contents = {};
@@ -1018,34 +494,9 @@ export const de_DescribeRepositoriesCommand = async (output, context) => {
1018
494
  };
1019
495
  return response;
1020
496
  };
1021
- const de_DescribeRepositoriesCommandError = async (output, context) => {
1022
- const parsedOutput = {
1023
- ...output,
1024
- body: await parseErrorBody(output.body, context),
1025
- };
1026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1027
- switch (errorCode) {
1028
- case "InvalidParameterException":
1029
- case "com.amazonaws.ecr#InvalidParameterException":
1030
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1031
- case "RepositoryNotFoundException":
1032
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1033
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1034
- case "ServerException":
1035
- case "com.amazonaws.ecr#ServerException":
1036
- throw await de_ServerExceptionRes(parsedOutput, context);
1037
- default:
1038
- const parsedBody = parsedOutput.body;
1039
- return throwDefaultError({
1040
- output,
1041
- parsedBody,
1042
- errorCode,
1043
- });
1044
- }
1045
- };
1046
497
  export const de_GetAuthorizationTokenCommand = async (output, context) => {
1047
498
  if (output.statusCode >= 300) {
1048
- return de_GetAuthorizationTokenCommandError(output, context);
499
+ return de_CommandError(output, context);
1049
500
  }
1050
501
  const data = await parseBody(output.body, context);
1051
502
  let contents = {};
@@ -1056,31 +507,9 @@ export const de_GetAuthorizationTokenCommand = async (output, context) => {
1056
507
  };
1057
508
  return response;
1058
509
  };
1059
- const de_GetAuthorizationTokenCommandError = async (output, context) => {
1060
- const parsedOutput = {
1061
- ...output,
1062
- body: await parseErrorBody(output.body, context),
1063
- };
1064
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
- switch (errorCode) {
1066
- case "InvalidParameterException":
1067
- case "com.amazonaws.ecr#InvalidParameterException":
1068
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1069
- case "ServerException":
1070
- case "com.amazonaws.ecr#ServerException":
1071
- throw await de_ServerExceptionRes(parsedOutput, context);
1072
- default:
1073
- const parsedBody = parsedOutput.body;
1074
- return throwDefaultError({
1075
- output,
1076
- parsedBody,
1077
- errorCode,
1078
- });
1079
- }
1080
- };
1081
510
  export const de_GetDownloadUrlForLayerCommand = async (output, context) => {
1082
511
  if (output.statusCode >= 300) {
1083
- return de_GetDownloadUrlForLayerCommandError(output, context);
512
+ return de_CommandError(output, context);
1084
513
  }
1085
514
  const data = await parseBody(output.body, context);
1086
515
  let contents = {};
@@ -1091,43 +520,9 @@ export const de_GetDownloadUrlForLayerCommand = async (output, context) => {
1091
520
  };
1092
521
  return response;
1093
522
  };
1094
- const de_GetDownloadUrlForLayerCommandError = async (output, context) => {
1095
- const parsedOutput = {
1096
- ...output,
1097
- body: await parseErrorBody(output.body, context),
1098
- };
1099
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1100
- switch (errorCode) {
1101
- case "InvalidParameterException":
1102
- case "com.amazonaws.ecr#InvalidParameterException":
1103
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1104
- case "LayerInaccessibleException":
1105
- case "com.amazonaws.ecr#LayerInaccessibleException":
1106
- throw await de_LayerInaccessibleExceptionRes(parsedOutput, context);
1107
- case "LayersNotFoundException":
1108
- case "com.amazonaws.ecr#LayersNotFoundException":
1109
- throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
1110
- case "RepositoryNotFoundException":
1111
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1112
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1113
- case "ServerException":
1114
- case "com.amazonaws.ecr#ServerException":
1115
- throw await de_ServerExceptionRes(parsedOutput, context);
1116
- case "UnableToGetUpstreamLayerException":
1117
- case "com.amazonaws.ecr#UnableToGetUpstreamLayerException":
1118
- throw await de_UnableToGetUpstreamLayerExceptionRes(parsedOutput, context);
1119
- default:
1120
- const parsedBody = parsedOutput.body;
1121
- return throwDefaultError({
1122
- output,
1123
- parsedBody,
1124
- errorCode,
1125
- });
1126
- }
1127
- };
1128
523
  export const de_GetLifecyclePolicyCommand = async (output, context) => {
1129
524
  if (output.statusCode >= 300) {
1130
- return de_GetLifecyclePolicyCommandError(output, context);
525
+ return de_CommandError(output, context);
1131
526
  }
1132
527
  const data = await parseBody(output.body, context);
1133
528
  let contents = {};
@@ -1138,40 +533,9 @@ export const de_GetLifecyclePolicyCommand = async (output, context) => {
1138
533
  };
1139
534
  return response;
1140
535
  };
1141
- const de_GetLifecyclePolicyCommandError = async (output, context) => {
1142
- const parsedOutput = {
1143
- ...output,
1144
- body: await parseErrorBody(output.body, context),
1145
- };
1146
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1147
- switch (errorCode) {
1148
- case "InvalidParameterException":
1149
- case "com.amazonaws.ecr#InvalidParameterException":
1150
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1151
- case "LifecyclePolicyNotFoundException":
1152
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
1153
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
1154
- case "RepositoryNotFoundException":
1155
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1156
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1157
- case "ServerException":
1158
- case "com.amazonaws.ecr#ServerException":
1159
- throw await de_ServerExceptionRes(parsedOutput, context);
1160
- case "ValidationException":
1161
- case "com.amazonaws.ecr#ValidationException":
1162
- throw await de_ValidationExceptionRes(parsedOutput, context);
1163
- default:
1164
- const parsedBody = parsedOutput.body;
1165
- return throwDefaultError({
1166
- output,
1167
- parsedBody,
1168
- errorCode,
1169
- });
1170
- }
1171
- };
1172
536
  export const de_GetLifecyclePolicyPreviewCommand = async (output, context) => {
1173
537
  if (output.statusCode >= 300) {
1174
- return de_GetLifecyclePolicyPreviewCommandError(output, context);
538
+ return de_CommandError(output, context);
1175
539
  }
1176
540
  const data = await parseBody(output.body, context);
1177
541
  let contents = {};
@@ -1182,40 +546,9 @@ export const de_GetLifecyclePolicyPreviewCommand = async (output, context) => {
1182
546
  };
1183
547
  return response;
1184
548
  };
1185
- const de_GetLifecyclePolicyPreviewCommandError = async (output, context) => {
1186
- const parsedOutput = {
1187
- ...output,
1188
- body: await parseErrorBody(output.body, context),
1189
- };
1190
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1191
- switch (errorCode) {
1192
- case "InvalidParameterException":
1193
- case "com.amazonaws.ecr#InvalidParameterException":
1194
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1195
- case "LifecyclePolicyPreviewNotFoundException":
1196
- case "com.amazonaws.ecr#LifecyclePolicyPreviewNotFoundException":
1197
- throw await de_LifecyclePolicyPreviewNotFoundExceptionRes(parsedOutput, context);
1198
- case "RepositoryNotFoundException":
1199
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1200
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1201
- case "ServerException":
1202
- case "com.amazonaws.ecr#ServerException":
1203
- throw await de_ServerExceptionRes(parsedOutput, context);
1204
- case "ValidationException":
1205
- case "com.amazonaws.ecr#ValidationException":
1206
- throw await de_ValidationExceptionRes(parsedOutput, context);
1207
- default:
1208
- const parsedBody = parsedOutput.body;
1209
- return throwDefaultError({
1210
- output,
1211
- parsedBody,
1212
- errorCode,
1213
- });
1214
- }
1215
- };
1216
549
  export const de_GetRegistryPolicyCommand = async (output, context) => {
1217
550
  if (output.statusCode >= 300) {
1218
- return de_GetRegistryPolicyCommandError(output, context);
551
+ return de_CommandError(output, context);
1219
552
  }
1220
553
  const data = await parseBody(output.body, context);
1221
554
  let contents = {};
@@ -1226,37 +559,9 @@ export const de_GetRegistryPolicyCommand = async (output, context) => {
1226
559
  };
1227
560
  return response;
1228
561
  };
1229
- const de_GetRegistryPolicyCommandError = async (output, context) => {
1230
- const parsedOutput = {
1231
- ...output,
1232
- body: await parseErrorBody(output.body, context),
1233
- };
1234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
- switch (errorCode) {
1236
- case "InvalidParameterException":
1237
- case "com.amazonaws.ecr#InvalidParameterException":
1238
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1239
- case "RegistryPolicyNotFoundException":
1240
- case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
1241
- throw await de_RegistryPolicyNotFoundExceptionRes(parsedOutput, context);
1242
- case "ServerException":
1243
- case "com.amazonaws.ecr#ServerException":
1244
- throw await de_ServerExceptionRes(parsedOutput, context);
1245
- case "ValidationException":
1246
- case "com.amazonaws.ecr#ValidationException":
1247
- throw await de_ValidationExceptionRes(parsedOutput, context);
1248
- default:
1249
- const parsedBody = parsedOutput.body;
1250
- return throwDefaultError({
1251
- output,
1252
- parsedBody,
1253
- errorCode,
1254
- });
1255
- }
1256
- };
1257
562
  export const de_GetRegistryScanningConfigurationCommand = async (output, context) => {
1258
563
  if (output.statusCode >= 300) {
1259
- return de_GetRegistryScanningConfigurationCommandError(output, context);
564
+ return de_CommandError(output, context);
1260
565
  }
1261
566
  const data = await parseBody(output.body, context);
1262
567
  let contents = {};
@@ -1267,34 +572,9 @@ export const de_GetRegistryScanningConfigurationCommand = async (output, context
1267
572
  };
1268
573
  return response;
1269
574
  };
1270
- const de_GetRegistryScanningConfigurationCommandError = async (output, context) => {
1271
- const parsedOutput = {
1272
- ...output,
1273
- body: await parseErrorBody(output.body, context),
1274
- };
1275
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1276
- switch (errorCode) {
1277
- case "InvalidParameterException":
1278
- case "com.amazonaws.ecr#InvalidParameterException":
1279
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1280
- case "ServerException":
1281
- case "com.amazonaws.ecr#ServerException":
1282
- throw await de_ServerExceptionRes(parsedOutput, context);
1283
- case "ValidationException":
1284
- case "com.amazonaws.ecr#ValidationException":
1285
- throw await de_ValidationExceptionRes(parsedOutput, context);
1286
- default:
1287
- const parsedBody = parsedOutput.body;
1288
- return throwDefaultError({
1289
- output,
1290
- parsedBody,
1291
- errorCode,
1292
- });
1293
- }
1294
- };
1295
575
  export const de_GetRepositoryPolicyCommand = async (output, context) => {
1296
576
  if (output.statusCode >= 300) {
1297
- return de_GetRepositoryPolicyCommandError(output, context);
577
+ return de_CommandError(output, context);
1298
578
  }
1299
579
  const data = await parseBody(output.body, context);
1300
580
  let contents = {};
@@ -1305,37 +585,9 @@ export const de_GetRepositoryPolicyCommand = async (output, context) => {
1305
585
  };
1306
586
  return response;
1307
587
  };
1308
- const de_GetRepositoryPolicyCommandError = async (output, context) => {
1309
- const parsedOutput = {
1310
- ...output,
1311
- body: await parseErrorBody(output.body, context),
1312
- };
1313
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1314
- switch (errorCode) {
1315
- case "InvalidParameterException":
1316
- case "com.amazonaws.ecr#InvalidParameterException":
1317
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1318
- case "RepositoryNotFoundException":
1319
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1320
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1321
- case "RepositoryPolicyNotFoundException":
1322
- case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
1323
- throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
1324
- case "ServerException":
1325
- case "com.amazonaws.ecr#ServerException":
1326
- throw await de_ServerExceptionRes(parsedOutput, context);
1327
- default:
1328
- const parsedBody = parsedOutput.body;
1329
- return throwDefaultError({
1330
- output,
1331
- parsedBody,
1332
- errorCode,
1333
- });
1334
- }
1335
- };
1336
588
  export const de_InitiateLayerUploadCommand = async (output, context) => {
1337
589
  if (output.statusCode >= 300) {
1338
- return de_InitiateLayerUploadCommandError(output, context);
590
+ return de_CommandError(output, context);
1339
591
  }
1340
592
  const data = await parseBody(output.body, context);
1341
593
  let contents = {};
@@ -1346,37 +598,9 @@ export const de_InitiateLayerUploadCommand = async (output, context) => {
1346
598
  };
1347
599
  return response;
1348
600
  };
1349
- const de_InitiateLayerUploadCommandError = async (output, context) => {
1350
- const parsedOutput = {
1351
- ...output,
1352
- body: await parseErrorBody(output.body, context),
1353
- };
1354
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1355
- switch (errorCode) {
1356
- case "InvalidParameterException":
1357
- case "com.amazonaws.ecr#InvalidParameterException":
1358
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1359
- case "KmsException":
1360
- case "com.amazonaws.ecr#KmsException":
1361
- throw await de_KmsExceptionRes(parsedOutput, context);
1362
- case "RepositoryNotFoundException":
1363
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1364
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1365
- case "ServerException":
1366
- case "com.amazonaws.ecr#ServerException":
1367
- throw await de_ServerExceptionRes(parsedOutput, context);
1368
- default:
1369
- const parsedBody = parsedOutput.body;
1370
- return throwDefaultError({
1371
- output,
1372
- parsedBody,
1373
- errorCode,
1374
- });
1375
- }
1376
- };
1377
601
  export const de_ListImagesCommand = async (output, context) => {
1378
602
  if (output.statusCode >= 300) {
1379
- return de_ListImagesCommandError(output, context);
603
+ return de_CommandError(output, context);
1380
604
  }
1381
605
  const data = await parseBody(output.body, context);
1382
606
  let contents = {};
@@ -1387,34 +611,22 @@ export const de_ListImagesCommand = async (output, context) => {
1387
611
  };
1388
612
  return response;
1389
613
  };
1390
- const de_ListImagesCommandError = async (output, context) => {
1391
- const parsedOutput = {
1392
- ...output,
1393
- body: await parseErrorBody(output.body, context),
614
+ export const de_ListTagsForResourceCommand = async (output, context) => {
615
+ if (output.statusCode >= 300) {
616
+ return de_CommandError(output, context);
617
+ }
618
+ const data = await parseBody(output.body, context);
619
+ let contents = {};
620
+ contents = _json(data);
621
+ const response = {
622
+ $metadata: deserializeMetadata(output),
623
+ ...contents,
1394
624
  };
1395
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1396
- switch (errorCode) {
1397
- case "InvalidParameterException":
1398
- case "com.amazonaws.ecr#InvalidParameterException":
1399
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1400
- case "RepositoryNotFoundException":
1401
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1402
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1403
- case "ServerException":
1404
- case "com.amazonaws.ecr#ServerException":
1405
- throw await de_ServerExceptionRes(parsedOutput, context);
1406
- default:
1407
- const parsedBody = parsedOutput.body;
1408
- return throwDefaultError({
1409
- output,
1410
- parsedBody,
1411
- errorCode,
1412
- });
1413
- }
625
+ return response;
1414
626
  };
1415
- export const de_ListTagsForResourceCommand = async (output, context) => {
627
+ export const de_PutImageCommand = async (output, context) => {
1416
628
  if (output.statusCode >= 300) {
1417
- return de_ListTagsForResourceCommandError(output, context);
629
+ return de_CommandError(output, context);
1418
630
  }
1419
631
  const data = await parseBody(output.body, context);
1420
632
  let contents = {};
@@ -1425,34 +637,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1425
637
  };
1426
638
  return response;
1427
639
  };
1428
- const de_ListTagsForResourceCommandError = async (output, context) => {
1429
- const parsedOutput = {
1430
- ...output,
1431
- body: await parseErrorBody(output.body, context),
1432
- };
1433
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1434
- switch (errorCode) {
1435
- case "InvalidParameterException":
1436
- case "com.amazonaws.ecr#InvalidParameterException":
1437
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1438
- case "RepositoryNotFoundException":
1439
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1440
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1441
- case "ServerException":
1442
- case "com.amazonaws.ecr#ServerException":
1443
- throw await de_ServerExceptionRes(parsedOutput, context);
1444
- default:
1445
- const parsedBody = parsedOutput.body;
1446
- return throwDefaultError({
1447
- output,
1448
- parsedBody,
1449
- errorCode,
1450
- });
1451
- }
1452
- };
1453
- export const de_PutImageCommand = async (output, context) => {
640
+ export const de_PutImageScanningConfigurationCommand = async (output, context) => {
1454
641
  if (output.statusCode >= 300) {
1455
- return de_PutImageCommandError(output, context);
642
+ return de_CommandError(output, context);
1456
643
  }
1457
644
  const data = await parseBody(output.body, context);
1458
645
  let contents = {};
@@ -1463,55 +650,9 @@ export const de_PutImageCommand = async (output, context) => {
1463
650
  };
1464
651
  return response;
1465
652
  };
1466
- const de_PutImageCommandError = async (output, context) => {
1467
- const parsedOutput = {
1468
- ...output,
1469
- body: await parseErrorBody(output.body, context),
1470
- };
1471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1472
- switch (errorCode) {
1473
- case "ImageAlreadyExistsException":
1474
- case "com.amazonaws.ecr#ImageAlreadyExistsException":
1475
- throw await de_ImageAlreadyExistsExceptionRes(parsedOutput, context);
1476
- case "ImageDigestDoesNotMatchException":
1477
- case "com.amazonaws.ecr#ImageDigestDoesNotMatchException":
1478
- throw await de_ImageDigestDoesNotMatchExceptionRes(parsedOutput, context);
1479
- case "ImageTagAlreadyExistsException":
1480
- case "com.amazonaws.ecr#ImageTagAlreadyExistsException":
1481
- throw await de_ImageTagAlreadyExistsExceptionRes(parsedOutput, context);
1482
- case "InvalidParameterException":
1483
- case "com.amazonaws.ecr#InvalidParameterException":
1484
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1485
- case "KmsException":
1486
- case "com.amazonaws.ecr#KmsException":
1487
- throw await de_KmsExceptionRes(parsedOutput, context);
1488
- case "LayersNotFoundException":
1489
- case "com.amazonaws.ecr#LayersNotFoundException":
1490
- throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
1491
- case "LimitExceededException":
1492
- case "com.amazonaws.ecr#LimitExceededException":
1493
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1494
- case "ReferencedImagesNotFoundException":
1495
- case "com.amazonaws.ecr#ReferencedImagesNotFoundException":
1496
- throw await de_ReferencedImagesNotFoundExceptionRes(parsedOutput, context);
1497
- case "RepositoryNotFoundException":
1498
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1499
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1500
- case "ServerException":
1501
- case "com.amazonaws.ecr#ServerException":
1502
- throw await de_ServerExceptionRes(parsedOutput, context);
1503
- default:
1504
- const parsedBody = parsedOutput.body;
1505
- return throwDefaultError({
1506
- output,
1507
- parsedBody,
1508
- errorCode,
1509
- });
1510
- }
1511
- };
1512
- export const de_PutImageScanningConfigurationCommand = async (output, context) => {
653
+ export const de_PutImageTagMutabilityCommand = async (output, context) => {
1513
654
  if (output.statusCode >= 300) {
1514
- return de_PutImageScanningConfigurationCommandError(output, context);
655
+ return de_CommandError(output, context);
1515
656
  }
1516
657
  const data = await parseBody(output.body, context);
1517
658
  let contents = {};
@@ -1522,37 +663,9 @@ export const de_PutImageScanningConfigurationCommand = async (output, context) =
1522
663
  };
1523
664
  return response;
1524
665
  };
1525
- const de_PutImageScanningConfigurationCommandError = async (output, context) => {
1526
- const parsedOutput = {
1527
- ...output,
1528
- body: await parseErrorBody(output.body, context),
1529
- };
1530
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1531
- switch (errorCode) {
1532
- case "InvalidParameterException":
1533
- case "com.amazonaws.ecr#InvalidParameterException":
1534
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1535
- case "RepositoryNotFoundException":
1536
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1537
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1538
- case "ServerException":
1539
- case "com.amazonaws.ecr#ServerException":
1540
- throw await de_ServerExceptionRes(parsedOutput, context);
1541
- case "ValidationException":
1542
- case "com.amazonaws.ecr#ValidationException":
1543
- throw await de_ValidationExceptionRes(parsedOutput, context);
1544
- default:
1545
- const parsedBody = parsedOutput.body;
1546
- return throwDefaultError({
1547
- output,
1548
- parsedBody,
1549
- errorCode,
1550
- });
1551
- }
1552
- };
1553
- export const de_PutImageTagMutabilityCommand = async (output, context) => {
666
+ export const de_PutLifecyclePolicyCommand = async (output, context) => {
1554
667
  if (output.statusCode >= 300) {
1555
- return de_PutImageTagMutabilityCommandError(output, context);
668
+ return de_CommandError(output, context);
1556
669
  }
1557
670
  const data = await parseBody(output.body, context);
1558
671
  let contents = {};
@@ -1563,34 +676,9 @@ export const de_PutImageTagMutabilityCommand = async (output, context) => {
1563
676
  };
1564
677
  return response;
1565
678
  };
1566
- const de_PutImageTagMutabilityCommandError = async (output, context) => {
1567
- const parsedOutput = {
1568
- ...output,
1569
- body: await parseErrorBody(output.body, context),
1570
- };
1571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1572
- switch (errorCode) {
1573
- case "InvalidParameterException":
1574
- case "com.amazonaws.ecr#InvalidParameterException":
1575
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1576
- case "RepositoryNotFoundException":
1577
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1578
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1579
- case "ServerException":
1580
- case "com.amazonaws.ecr#ServerException":
1581
- throw await de_ServerExceptionRes(parsedOutput, context);
1582
- default:
1583
- const parsedBody = parsedOutput.body;
1584
- return throwDefaultError({
1585
- output,
1586
- parsedBody,
1587
- errorCode,
1588
- });
1589
- }
1590
- };
1591
- export const de_PutLifecyclePolicyCommand = async (output, context) => {
679
+ export const de_PutRegistryPolicyCommand = async (output, context) => {
1592
680
  if (output.statusCode >= 300) {
1593
- return de_PutLifecyclePolicyCommandError(output, context);
681
+ return de_CommandError(output, context);
1594
682
  }
1595
683
  const data = await parseBody(output.body, context);
1596
684
  let contents = {};
@@ -1601,37 +689,9 @@ export const de_PutLifecyclePolicyCommand = async (output, context) => {
1601
689
  };
1602
690
  return response;
1603
691
  };
1604
- const de_PutLifecyclePolicyCommandError = async (output, context) => {
1605
- const parsedOutput = {
1606
- ...output,
1607
- body: await parseErrorBody(output.body, context),
1608
- };
1609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1610
- switch (errorCode) {
1611
- case "InvalidParameterException":
1612
- case "com.amazonaws.ecr#InvalidParameterException":
1613
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1614
- case "RepositoryNotFoundException":
1615
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1616
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1617
- case "ServerException":
1618
- case "com.amazonaws.ecr#ServerException":
1619
- throw await de_ServerExceptionRes(parsedOutput, context);
1620
- case "ValidationException":
1621
- case "com.amazonaws.ecr#ValidationException":
1622
- throw await de_ValidationExceptionRes(parsedOutput, context);
1623
- default:
1624
- const parsedBody = parsedOutput.body;
1625
- return throwDefaultError({
1626
- output,
1627
- parsedBody,
1628
- errorCode,
1629
- });
1630
- }
1631
- };
1632
- export const de_PutRegistryPolicyCommand = async (output, context) => {
692
+ export const de_PutRegistryScanningConfigurationCommand = async (output, context) => {
1633
693
  if (output.statusCode >= 300) {
1634
- return de_PutRegistryPolicyCommandError(output, context);
694
+ return de_CommandError(output, context);
1635
695
  }
1636
696
  const data = await parseBody(output.body, context);
1637
697
  let contents = {};
@@ -1642,34 +702,9 @@ export const de_PutRegistryPolicyCommand = async (output, context) => {
1642
702
  };
1643
703
  return response;
1644
704
  };
1645
- const de_PutRegistryPolicyCommandError = async (output, context) => {
1646
- const parsedOutput = {
1647
- ...output,
1648
- body: await parseErrorBody(output.body, context),
1649
- };
1650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
- switch (errorCode) {
1652
- case "InvalidParameterException":
1653
- case "com.amazonaws.ecr#InvalidParameterException":
1654
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1655
- case "ServerException":
1656
- case "com.amazonaws.ecr#ServerException":
1657
- throw await de_ServerExceptionRes(parsedOutput, context);
1658
- case "ValidationException":
1659
- case "com.amazonaws.ecr#ValidationException":
1660
- throw await de_ValidationExceptionRes(parsedOutput, context);
1661
- default:
1662
- const parsedBody = parsedOutput.body;
1663
- return throwDefaultError({
1664
- output,
1665
- parsedBody,
1666
- errorCode,
1667
- });
1668
- }
1669
- };
1670
- export const de_PutRegistryScanningConfigurationCommand = async (output, context) => {
705
+ export const de_PutReplicationConfigurationCommand = async (output, context) => {
1671
706
  if (output.statusCode >= 300) {
1672
- return de_PutRegistryScanningConfigurationCommandError(output, context);
707
+ return de_CommandError(output, context);
1673
708
  }
1674
709
  const data = await parseBody(output.body, context);
1675
710
  let contents = {};
@@ -1680,34 +715,9 @@ export const de_PutRegistryScanningConfigurationCommand = async (output, context
1680
715
  };
1681
716
  return response;
1682
717
  };
1683
- const de_PutRegistryScanningConfigurationCommandError = async (output, context) => {
1684
- const parsedOutput = {
1685
- ...output,
1686
- body: await parseErrorBody(output.body, context),
1687
- };
1688
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1689
- switch (errorCode) {
1690
- case "InvalidParameterException":
1691
- case "com.amazonaws.ecr#InvalidParameterException":
1692
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1693
- case "ServerException":
1694
- case "com.amazonaws.ecr#ServerException":
1695
- throw await de_ServerExceptionRes(parsedOutput, context);
1696
- case "ValidationException":
1697
- case "com.amazonaws.ecr#ValidationException":
1698
- throw await de_ValidationExceptionRes(parsedOutput, context);
1699
- default:
1700
- const parsedBody = parsedOutput.body;
1701
- return throwDefaultError({
1702
- output,
1703
- parsedBody,
1704
- errorCode,
1705
- });
1706
- }
1707
- };
1708
- export const de_PutReplicationConfigurationCommand = async (output, context) => {
718
+ export const de_SetRepositoryPolicyCommand = async (output, context) => {
1709
719
  if (output.statusCode >= 300) {
1710
- return de_PutReplicationConfigurationCommandError(output, context);
720
+ return de_CommandError(output, context);
1711
721
  }
1712
722
  const data = await parseBody(output.body, context);
1713
723
  let contents = {};
@@ -1718,34 +728,9 @@ export const de_PutReplicationConfigurationCommand = async (output, context) =>
1718
728
  };
1719
729
  return response;
1720
730
  };
1721
- const de_PutReplicationConfigurationCommandError = async (output, context) => {
1722
- const parsedOutput = {
1723
- ...output,
1724
- body: await parseErrorBody(output.body, context),
1725
- };
1726
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1727
- switch (errorCode) {
1728
- case "InvalidParameterException":
1729
- case "com.amazonaws.ecr#InvalidParameterException":
1730
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1731
- case "ServerException":
1732
- case "com.amazonaws.ecr#ServerException":
1733
- throw await de_ServerExceptionRes(parsedOutput, context);
1734
- case "ValidationException":
1735
- case "com.amazonaws.ecr#ValidationException":
1736
- throw await de_ValidationExceptionRes(parsedOutput, context);
1737
- default:
1738
- const parsedBody = parsedOutput.body;
1739
- return throwDefaultError({
1740
- output,
1741
- parsedBody,
1742
- errorCode,
1743
- });
1744
- }
1745
- };
1746
- export const de_SetRepositoryPolicyCommand = async (output, context) => {
731
+ export const de_StartImageScanCommand = async (output, context) => {
1747
732
  if (output.statusCode >= 300) {
1748
- return de_SetRepositoryPolicyCommandError(output, context);
733
+ return de_CommandError(output, context);
1749
734
  }
1750
735
  const data = await parseBody(output.body, context);
1751
736
  let contents = {};
@@ -1756,84 +741,9 @@ export const de_SetRepositoryPolicyCommand = async (output, context) => {
1756
741
  };
1757
742
  return response;
1758
743
  };
1759
- const de_SetRepositoryPolicyCommandError = async (output, context) => {
1760
- const parsedOutput = {
1761
- ...output,
1762
- body: await parseErrorBody(output.body, context),
1763
- };
1764
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1765
- switch (errorCode) {
1766
- case "InvalidParameterException":
1767
- case "com.amazonaws.ecr#InvalidParameterException":
1768
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1769
- case "RepositoryNotFoundException":
1770
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1771
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1772
- case "ServerException":
1773
- case "com.amazonaws.ecr#ServerException":
1774
- throw await de_ServerExceptionRes(parsedOutput, context);
1775
- default:
1776
- const parsedBody = parsedOutput.body;
1777
- return throwDefaultError({
1778
- output,
1779
- parsedBody,
1780
- errorCode,
1781
- });
1782
- }
1783
- };
1784
- export const de_StartImageScanCommand = async (output, context) => {
1785
- if (output.statusCode >= 300) {
1786
- return de_StartImageScanCommandError(output, context);
1787
- }
1788
- const data = await parseBody(output.body, context);
1789
- let contents = {};
1790
- contents = _json(data);
1791
- const response = {
1792
- $metadata: deserializeMetadata(output),
1793
- ...contents,
1794
- };
1795
- return response;
1796
- };
1797
- const de_StartImageScanCommandError = async (output, context) => {
1798
- const parsedOutput = {
1799
- ...output,
1800
- body: await parseErrorBody(output.body, context),
1801
- };
1802
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1803
- switch (errorCode) {
1804
- case "ImageNotFoundException":
1805
- case "com.amazonaws.ecr#ImageNotFoundException":
1806
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
1807
- case "InvalidParameterException":
1808
- case "com.amazonaws.ecr#InvalidParameterException":
1809
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1810
- case "LimitExceededException":
1811
- case "com.amazonaws.ecr#LimitExceededException":
1812
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1813
- case "RepositoryNotFoundException":
1814
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1815
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1816
- case "ServerException":
1817
- case "com.amazonaws.ecr#ServerException":
1818
- throw await de_ServerExceptionRes(parsedOutput, context);
1819
- case "UnsupportedImageTypeException":
1820
- case "com.amazonaws.ecr#UnsupportedImageTypeException":
1821
- throw await de_UnsupportedImageTypeExceptionRes(parsedOutput, context);
1822
- case "ValidationException":
1823
- case "com.amazonaws.ecr#ValidationException":
1824
- throw await de_ValidationExceptionRes(parsedOutput, context);
1825
- default:
1826
- const parsedBody = parsedOutput.body;
1827
- return throwDefaultError({
1828
- output,
1829
- parsedBody,
1830
- errorCode,
1831
- });
1832
- }
1833
- };
1834
744
  export const de_StartLifecyclePolicyPreviewCommand = async (output, context) => {
1835
745
  if (output.statusCode >= 300) {
1836
- return de_StartLifecyclePolicyPreviewCommandError(output, context);
746
+ return de_CommandError(output, context);
1837
747
  }
1838
748
  const data = await parseBody(output.body, context);
1839
749
  let contents = {};
@@ -1844,43 +754,9 @@ export const de_StartLifecyclePolicyPreviewCommand = async (output, context) =>
1844
754
  };
1845
755
  return response;
1846
756
  };
1847
- const de_StartLifecyclePolicyPreviewCommandError = async (output, context) => {
1848
- const parsedOutput = {
1849
- ...output,
1850
- body: await parseErrorBody(output.body, context),
1851
- };
1852
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1853
- switch (errorCode) {
1854
- case "InvalidParameterException":
1855
- case "com.amazonaws.ecr#InvalidParameterException":
1856
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1857
- case "LifecyclePolicyNotFoundException":
1858
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
1859
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
1860
- case "LifecyclePolicyPreviewInProgressException":
1861
- case "com.amazonaws.ecr#LifecyclePolicyPreviewInProgressException":
1862
- throw await de_LifecyclePolicyPreviewInProgressExceptionRes(parsedOutput, context);
1863
- case "RepositoryNotFoundException":
1864
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1865
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1866
- case "ServerException":
1867
- case "com.amazonaws.ecr#ServerException":
1868
- throw await de_ServerExceptionRes(parsedOutput, context);
1869
- case "ValidationException":
1870
- case "com.amazonaws.ecr#ValidationException":
1871
- throw await de_ValidationExceptionRes(parsedOutput, context);
1872
- default:
1873
- const parsedBody = parsedOutput.body;
1874
- return throwDefaultError({
1875
- output,
1876
- parsedBody,
1877
- errorCode,
1878
- });
1879
- }
1880
- };
1881
757
  export const de_TagResourceCommand = async (output, context) => {
1882
758
  if (output.statusCode >= 300) {
1883
- return de_TagResourceCommandError(output, context);
759
+ return de_CommandError(output, context);
1884
760
  }
1885
761
  const data = await parseBody(output.body, context);
1886
762
  let contents = {};
@@ -1891,40 +767,9 @@ export const de_TagResourceCommand = async (output, context) => {
1891
767
  };
1892
768
  return response;
1893
769
  };
1894
- const de_TagResourceCommandError = async (output, context) => {
1895
- const parsedOutput = {
1896
- ...output,
1897
- body: await parseErrorBody(output.body, context),
1898
- };
1899
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1900
- switch (errorCode) {
1901
- case "InvalidParameterException":
1902
- case "com.amazonaws.ecr#InvalidParameterException":
1903
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1904
- case "InvalidTagParameterException":
1905
- case "com.amazonaws.ecr#InvalidTagParameterException":
1906
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
1907
- case "RepositoryNotFoundException":
1908
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1909
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1910
- case "ServerException":
1911
- case "com.amazonaws.ecr#ServerException":
1912
- throw await de_ServerExceptionRes(parsedOutput, context);
1913
- case "TooManyTagsException":
1914
- case "com.amazonaws.ecr#TooManyTagsException":
1915
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1916
- default:
1917
- const parsedBody = parsedOutput.body;
1918
- return throwDefaultError({
1919
- output,
1920
- parsedBody,
1921
- errorCode,
1922
- });
1923
- }
1924
- };
1925
770
  export const de_UntagResourceCommand = async (output, context) => {
1926
771
  if (output.statusCode >= 300) {
1927
- return de_UntagResourceCommandError(output, context);
772
+ return de_CommandError(output, context);
1928
773
  }
1929
774
  const data = await parseBody(output.body, context);
1930
775
  let contents = {};
@@ -1935,40 +780,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1935
780
  };
1936
781
  return response;
1937
782
  };
1938
- const de_UntagResourceCommandError = async (output, context) => {
1939
- const parsedOutput = {
1940
- ...output,
1941
- body: await parseErrorBody(output.body, context),
1942
- };
1943
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1944
- switch (errorCode) {
1945
- case "InvalidParameterException":
1946
- case "com.amazonaws.ecr#InvalidParameterException":
1947
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1948
- case "InvalidTagParameterException":
1949
- case "com.amazonaws.ecr#InvalidTagParameterException":
1950
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
1951
- case "RepositoryNotFoundException":
1952
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1953
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1954
- case "ServerException":
1955
- case "com.amazonaws.ecr#ServerException":
1956
- throw await de_ServerExceptionRes(parsedOutput, context);
1957
- case "TooManyTagsException":
1958
- case "com.amazonaws.ecr#TooManyTagsException":
1959
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1960
- default:
1961
- const parsedBody = parsedOutput.body;
1962
- return throwDefaultError({
1963
- output,
1964
- parsedBody,
1965
- errorCode,
1966
- });
1967
- }
1968
- };
1969
783
  export const de_UpdatePullThroughCacheRuleCommand = async (output, context) => {
1970
784
  if (output.statusCode >= 300) {
1971
- return de_UpdatePullThroughCacheRuleCommandError(output, context);
785
+ return de_CommandError(output, context);
1972
786
  }
1973
787
  const data = await parseBody(output.body, context);
1974
788
  let contents = {};
@@ -1979,46 +793,9 @@ export const de_UpdatePullThroughCacheRuleCommand = async (output, context) => {
1979
793
  };
1980
794
  return response;
1981
795
  };
1982
- const de_UpdatePullThroughCacheRuleCommandError = async (output, context) => {
1983
- const parsedOutput = {
1984
- ...output,
1985
- body: await parseErrorBody(output.body, context),
1986
- };
1987
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1988
- switch (errorCode) {
1989
- case "InvalidParameterException":
1990
- case "com.amazonaws.ecr#InvalidParameterException":
1991
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1992
- case "PullThroughCacheRuleNotFoundException":
1993
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
1994
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
1995
- case "SecretNotFoundException":
1996
- case "com.amazonaws.ecr#SecretNotFoundException":
1997
- throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
1998
- case "ServerException":
1999
- case "com.amazonaws.ecr#ServerException":
2000
- throw await de_ServerExceptionRes(parsedOutput, context);
2001
- case "UnableToAccessSecretException":
2002
- case "com.amazonaws.ecr#UnableToAccessSecretException":
2003
- throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
2004
- case "UnableToDecryptSecretValueException":
2005
- case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
2006
- throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
2007
- case "ValidationException":
2008
- case "com.amazonaws.ecr#ValidationException":
2009
- throw await de_ValidationExceptionRes(parsedOutput, context);
2010
- default:
2011
- const parsedBody = parsedOutput.body;
2012
- return throwDefaultError({
2013
- output,
2014
- parsedBody,
2015
- errorCode,
2016
- });
2017
- }
2018
- };
2019
796
  export const de_UploadLayerPartCommand = async (output, context) => {
2020
797
  if (output.statusCode >= 300) {
2021
- return de_UploadLayerPartCommandError(output, context);
798
+ return de_CommandError(output, context);
2022
799
  }
2023
800
  const data = await parseBody(output.body, context);
2024
801
  let contents = {};
@@ -2029,46 +806,9 @@ export const de_UploadLayerPartCommand = async (output, context) => {
2029
806
  };
2030
807
  return response;
2031
808
  };
2032
- const de_UploadLayerPartCommandError = async (output, context) => {
2033
- const parsedOutput = {
2034
- ...output,
2035
- body: await parseErrorBody(output.body, context),
2036
- };
2037
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2038
- switch (errorCode) {
2039
- case "InvalidLayerPartException":
2040
- case "com.amazonaws.ecr#InvalidLayerPartException":
2041
- throw await de_InvalidLayerPartExceptionRes(parsedOutput, context);
2042
- case "InvalidParameterException":
2043
- case "com.amazonaws.ecr#InvalidParameterException":
2044
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2045
- case "KmsException":
2046
- case "com.amazonaws.ecr#KmsException":
2047
- throw await de_KmsExceptionRes(parsedOutput, context);
2048
- case "LimitExceededException":
2049
- case "com.amazonaws.ecr#LimitExceededException":
2050
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2051
- case "RepositoryNotFoundException":
2052
- case "com.amazonaws.ecr#RepositoryNotFoundException":
2053
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
2054
- case "ServerException":
2055
- case "com.amazonaws.ecr#ServerException":
2056
- throw await de_ServerExceptionRes(parsedOutput, context);
2057
- case "UploadNotFoundException":
2058
- case "com.amazonaws.ecr#UploadNotFoundException":
2059
- throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
2060
- default:
2061
- const parsedBody = parsedOutput.body;
2062
- return throwDefaultError({
2063
- output,
2064
- parsedBody,
2065
- errorCode,
2066
- });
2067
- }
2068
- };
2069
809
  export const de_ValidatePullThroughCacheRuleCommand = async (output, context) => {
2070
810
  if (output.statusCode >= 300) {
2071
- return de_ValidatePullThroughCacheRuleCommandError(output, context);
811
+ return de_CommandError(output, context);
2072
812
  }
2073
813
  const data = await parseBody(output.body, context);
2074
814
  let contents = {};
@@ -2079,7 +819,7 @@ export const de_ValidatePullThroughCacheRuleCommand = async (output, context) =>
2079
819
  };
2080
820
  return response;
2081
821
  };
2082
- const de_ValidatePullThroughCacheRuleCommandError = async (output, context) => {
822
+ const de_CommandError = async (output, context) => {
2083
823
  const parsedOutput = {
2084
824
  ...output,
2085
825
  body: await parseErrorBody(output.body, context),
@@ -2089,15 +829,117 @@ const de_ValidatePullThroughCacheRuleCommandError = async (output, context) => {
2089
829
  case "InvalidParameterException":
2090
830
  case "com.amazonaws.ecr#InvalidParameterException":
2091
831
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2092
- case "PullThroughCacheRuleNotFoundException":
2093
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
2094
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
832
+ case "RepositoryNotFoundException":
833
+ case "com.amazonaws.ecr#RepositoryNotFoundException":
834
+ throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
2095
835
  case "ServerException":
2096
836
  case "com.amazonaws.ecr#ServerException":
2097
837
  throw await de_ServerExceptionRes(parsedOutput, context);
838
+ case "LimitExceededException":
839
+ case "com.amazonaws.ecr#LimitExceededException":
840
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
841
+ case "UnableToGetUpstreamImageException":
842
+ case "com.amazonaws.ecr#UnableToGetUpstreamImageException":
843
+ throw await de_UnableToGetUpstreamImageExceptionRes(parsedOutput, context);
2098
844
  case "ValidationException":
2099
845
  case "com.amazonaws.ecr#ValidationException":
2100
846
  throw await de_ValidationExceptionRes(parsedOutput, context);
847
+ case "EmptyUploadException":
848
+ case "com.amazonaws.ecr#EmptyUploadException":
849
+ throw await de_EmptyUploadExceptionRes(parsedOutput, context);
850
+ case "InvalidLayerException":
851
+ case "com.amazonaws.ecr#InvalidLayerException":
852
+ throw await de_InvalidLayerExceptionRes(parsedOutput, context);
853
+ case "KmsException":
854
+ case "com.amazonaws.ecr#KmsException":
855
+ throw await de_KmsExceptionRes(parsedOutput, context);
856
+ case "LayerAlreadyExistsException":
857
+ case "com.amazonaws.ecr#LayerAlreadyExistsException":
858
+ throw await de_LayerAlreadyExistsExceptionRes(parsedOutput, context);
859
+ case "LayerPartTooSmallException":
860
+ case "com.amazonaws.ecr#LayerPartTooSmallException":
861
+ throw await de_LayerPartTooSmallExceptionRes(parsedOutput, context);
862
+ case "UploadNotFoundException":
863
+ case "com.amazonaws.ecr#UploadNotFoundException":
864
+ throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
865
+ case "PullThroughCacheRuleAlreadyExistsException":
866
+ case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
867
+ throw await de_PullThroughCacheRuleAlreadyExistsExceptionRes(parsedOutput, context);
868
+ case "SecretNotFoundException":
869
+ case "com.amazonaws.ecr#SecretNotFoundException":
870
+ throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
871
+ case "UnableToAccessSecretException":
872
+ case "com.amazonaws.ecr#UnableToAccessSecretException":
873
+ throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
874
+ case "UnableToDecryptSecretValueException":
875
+ case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
876
+ throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
877
+ case "UnsupportedUpstreamRegistryException":
878
+ case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
879
+ throw await de_UnsupportedUpstreamRegistryExceptionRes(parsedOutput, context);
880
+ case "InvalidTagParameterException":
881
+ case "com.amazonaws.ecr#InvalidTagParameterException":
882
+ throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
883
+ case "RepositoryAlreadyExistsException":
884
+ case "com.amazonaws.ecr#RepositoryAlreadyExistsException":
885
+ throw await de_RepositoryAlreadyExistsExceptionRes(parsedOutput, context);
886
+ case "TooManyTagsException":
887
+ case "com.amazonaws.ecr#TooManyTagsException":
888
+ throw await de_TooManyTagsExceptionRes(parsedOutput, context);
889
+ case "LifecyclePolicyNotFoundException":
890
+ case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
891
+ throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
892
+ case "PullThroughCacheRuleNotFoundException":
893
+ case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
894
+ throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
895
+ case "RegistryPolicyNotFoundException":
896
+ case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
897
+ throw await de_RegistryPolicyNotFoundExceptionRes(parsedOutput, context);
898
+ case "RepositoryNotEmptyException":
899
+ case "com.amazonaws.ecr#RepositoryNotEmptyException":
900
+ throw await de_RepositoryNotEmptyExceptionRes(parsedOutput, context);
901
+ case "RepositoryPolicyNotFoundException":
902
+ case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
903
+ throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
904
+ case "ImageNotFoundException":
905
+ case "com.amazonaws.ecr#ImageNotFoundException":
906
+ throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
907
+ case "ScanNotFoundException":
908
+ case "com.amazonaws.ecr#ScanNotFoundException":
909
+ throw await de_ScanNotFoundExceptionRes(parsedOutput, context);
910
+ case "LayerInaccessibleException":
911
+ case "com.amazonaws.ecr#LayerInaccessibleException":
912
+ throw await de_LayerInaccessibleExceptionRes(parsedOutput, context);
913
+ case "LayersNotFoundException":
914
+ case "com.amazonaws.ecr#LayersNotFoundException":
915
+ throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
916
+ case "UnableToGetUpstreamLayerException":
917
+ case "com.amazonaws.ecr#UnableToGetUpstreamLayerException":
918
+ throw await de_UnableToGetUpstreamLayerExceptionRes(parsedOutput, context);
919
+ case "LifecyclePolicyPreviewNotFoundException":
920
+ case "com.amazonaws.ecr#LifecyclePolicyPreviewNotFoundException":
921
+ throw await de_LifecyclePolicyPreviewNotFoundExceptionRes(parsedOutput, context);
922
+ case "ImageAlreadyExistsException":
923
+ case "com.amazonaws.ecr#ImageAlreadyExistsException":
924
+ throw await de_ImageAlreadyExistsExceptionRes(parsedOutput, context);
925
+ case "ImageDigestDoesNotMatchException":
926
+ case "com.amazonaws.ecr#ImageDigestDoesNotMatchException":
927
+ throw await de_ImageDigestDoesNotMatchExceptionRes(parsedOutput, context);
928
+ case "ImageTagAlreadyExistsException":
929
+ case "com.amazonaws.ecr#ImageTagAlreadyExistsException":
930
+ throw await de_ImageTagAlreadyExistsExceptionRes(parsedOutput, context);
931
+ case "ReferencedImagesNotFoundException":
932
+ case "com.amazonaws.ecr#ReferencedImagesNotFoundException":
933
+ throw await de_ReferencedImagesNotFoundExceptionRes(parsedOutput, context);
934
+ case "UnsupportedImageTypeException":
935
+ case "com.amazonaws.ecr#UnsupportedImageTypeException":
936
+ throw await de_UnsupportedImageTypeExceptionRes(parsedOutput, context);
937
+ case "LifecyclePolicyPreviewInProgressException":
938
+ case "com.amazonaws.ecr#LifecyclePolicyPreviewInProgressException":
939
+ throw await de_LifecyclePolicyPreviewInProgressExceptionRes(parsedOutput, context);
940
+ case "InvalidLayerPartException":
941
+ case "com.amazonaws.ecr#InvalidLayerPartException":
942
+ throw await de_InvalidLayerPartExceptionRes(parsedOutput, context);
2101
943
  default:
2102
944
  const parsedBody = parsedOutput.body;
2103
945
  return throwDefaultError({