@aws-sdk/client-cognito-sync 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.
@@ -212,7 +212,7 @@ export const se_UpdateRecordsCommand = async (input, context) => {
212
212
  };
213
213
  export const de_BulkPublishCommand = async (output, context) => {
214
214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
215
- return de_BulkPublishCommandError(output, context);
215
+ return de_CommandError(output, context);
216
216
  }
217
217
  const contents = map({
218
218
  $metadata: deserializeMetadata(output),
@@ -224,43 +224,9 @@ export const de_BulkPublishCommand = async (output, context) => {
224
224
  Object.assign(contents, doc);
225
225
  return contents;
226
226
  };
227
- const de_BulkPublishCommandError = async (output, context) => {
228
- const parsedOutput = {
229
- ...output,
230
- body: await parseErrorBody(output.body, context),
231
- };
232
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
233
- switch (errorCode) {
234
- case "AlreadyStreamedException":
235
- case "com.amazonaws.cognitosync#AlreadyStreamedException":
236
- throw await de_AlreadyStreamedExceptionRes(parsedOutput, context);
237
- case "DuplicateRequestException":
238
- case "com.amazonaws.cognitosync#DuplicateRequestException":
239
- throw await de_DuplicateRequestExceptionRes(parsedOutput, context);
240
- case "InternalErrorException":
241
- case "com.amazonaws.cognitosync#InternalErrorException":
242
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
243
- case "InvalidParameterException":
244
- case "com.amazonaws.cognitosync#InvalidParameterException":
245
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
246
- case "NotAuthorizedException":
247
- case "com.amazonaws.cognitosync#NotAuthorizedException":
248
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
249
- case "ResourceNotFoundException":
250
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
251
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
252
- default:
253
- const parsedBody = parsedOutput.body;
254
- return throwDefaultError({
255
- output,
256
- parsedBody,
257
- errorCode,
258
- });
259
- }
260
- };
261
227
  export const de_DeleteDatasetCommand = async (output, context) => {
262
228
  if (output.statusCode !== 200 && output.statusCode >= 300) {
263
- return de_DeleteDatasetCommandError(output, context);
229
+ return de_CommandError(output, context);
264
230
  }
265
231
  const contents = map({
266
232
  $metadata: deserializeMetadata(output),
@@ -272,43 +238,9 @@ export const de_DeleteDatasetCommand = async (output, context) => {
272
238
  Object.assign(contents, doc);
273
239
  return contents;
274
240
  };
275
- const de_DeleteDatasetCommandError = async (output, context) => {
276
- const parsedOutput = {
277
- ...output,
278
- body: await parseErrorBody(output.body, context),
279
- };
280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
281
- switch (errorCode) {
282
- case "InternalErrorException":
283
- case "com.amazonaws.cognitosync#InternalErrorException":
284
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
285
- case "InvalidParameterException":
286
- case "com.amazonaws.cognitosync#InvalidParameterException":
287
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
288
- case "NotAuthorizedException":
289
- case "com.amazonaws.cognitosync#NotAuthorizedException":
290
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
291
- case "ResourceConflictException":
292
- case "com.amazonaws.cognitosync#ResourceConflictException":
293
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
294
- case "ResourceNotFoundException":
295
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
296
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
297
- case "TooManyRequestsException":
298
- case "com.amazonaws.cognitosync#TooManyRequestsException":
299
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
300
- default:
301
- const parsedBody = parsedOutput.body;
302
- return throwDefaultError({
303
- output,
304
- parsedBody,
305
- errorCode,
306
- });
307
- }
308
- };
309
241
  export const de_DescribeDatasetCommand = async (output, context) => {
310
242
  if (output.statusCode !== 200 && output.statusCode >= 300) {
311
- return de_DescribeDatasetCommandError(output, context);
243
+ return de_CommandError(output, context);
312
244
  }
313
245
  const contents = map({
314
246
  $metadata: deserializeMetadata(output),
@@ -320,40 +252,9 @@ export const de_DescribeDatasetCommand = async (output, context) => {
320
252
  Object.assign(contents, doc);
321
253
  return contents;
322
254
  };
323
- const de_DescribeDatasetCommandError = async (output, context) => {
324
- const parsedOutput = {
325
- ...output,
326
- body: await parseErrorBody(output.body, context),
327
- };
328
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
329
- switch (errorCode) {
330
- case "InternalErrorException":
331
- case "com.amazonaws.cognitosync#InternalErrorException":
332
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
333
- case "InvalidParameterException":
334
- case "com.amazonaws.cognitosync#InvalidParameterException":
335
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
336
- case "NotAuthorizedException":
337
- case "com.amazonaws.cognitosync#NotAuthorizedException":
338
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
339
- case "ResourceNotFoundException":
340
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
341
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
342
- case "TooManyRequestsException":
343
- case "com.amazonaws.cognitosync#TooManyRequestsException":
344
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
345
- default:
346
- const parsedBody = parsedOutput.body;
347
- return throwDefaultError({
348
- output,
349
- parsedBody,
350
- errorCode,
351
- });
352
- }
353
- };
354
255
  export const de_DescribeIdentityPoolUsageCommand = async (output, context) => {
355
256
  if (output.statusCode !== 200 && output.statusCode >= 300) {
356
- return de_DescribeIdentityPoolUsageCommandError(output, context);
257
+ return de_CommandError(output, context);
357
258
  }
358
259
  const contents = map({
359
260
  $metadata: deserializeMetadata(output),
@@ -365,40 +266,9 @@ export const de_DescribeIdentityPoolUsageCommand = async (output, context) => {
365
266
  Object.assign(contents, doc);
366
267
  return contents;
367
268
  };
368
- const de_DescribeIdentityPoolUsageCommandError = async (output, context) => {
369
- const parsedOutput = {
370
- ...output,
371
- body: await parseErrorBody(output.body, context),
372
- };
373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
374
- switch (errorCode) {
375
- case "InternalErrorException":
376
- case "com.amazonaws.cognitosync#InternalErrorException":
377
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
378
- case "InvalidParameterException":
379
- case "com.amazonaws.cognitosync#InvalidParameterException":
380
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
381
- case "NotAuthorizedException":
382
- case "com.amazonaws.cognitosync#NotAuthorizedException":
383
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
384
- case "ResourceNotFoundException":
385
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
386
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
387
- case "TooManyRequestsException":
388
- case "com.amazonaws.cognitosync#TooManyRequestsException":
389
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
390
- default:
391
- const parsedBody = parsedOutput.body;
392
- return throwDefaultError({
393
- output,
394
- parsedBody,
395
- errorCode,
396
- });
397
- }
398
- };
399
269
  export const de_DescribeIdentityUsageCommand = async (output, context) => {
400
270
  if (output.statusCode !== 200 && output.statusCode >= 300) {
401
- return de_DescribeIdentityUsageCommandError(output, context);
271
+ return de_CommandError(output, context);
402
272
  }
403
273
  const contents = map({
404
274
  $metadata: deserializeMetadata(output),
@@ -410,40 +280,9 @@ export const de_DescribeIdentityUsageCommand = async (output, context) => {
410
280
  Object.assign(contents, doc);
411
281
  return contents;
412
282
  };
413
- const de_DescribeIdentityUsageCommandError = async (output, context) => {
414
- const parsedOutput = {
415
- ...output,
416
- body: await parseErrorBody(output.body, context),
417
- };
418
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
419
- switch (errorCode) {
420
- case "InternalErrorException":
421
- case "com.amazonaws.cognitosync#InternalErrorException":
422
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
423
- case "InvalidParameterException":
424
- case "com.amazonaws.cognitosync#InvalidParameterException":
425
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
426
- case "NotAuthorizedException":
427
- case "com.amazonaws.cognitosync#NotAuthorizedException":
428
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
429
- case "ResourceNotFoundException":
430
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
431
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
432
- case "TooManyRequestsException":
433
- case "com.amazonaws.cognitosync#TooManyRequestsException":
434
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
435
- default:
436
- const parsedBody = parsedOutput.body;
437
- return throwDefaultError({
438
- output,
439
- parsedBody,
440
- errorCode,
441
- });
442
- }
443
- };
444
283
  export const de_GetBulkPublishDetailsCommand = async (output, context) => {
445
284
  if (output.statusCode !== 200 && output.statusCode >= 300) {
446
- return de_GetBulkPublishDetailsCommandError(output, context);
285
+ return de_CommandError(output, context);
447
286
  }
448
287
  const contents = map({
449
288
  $metadata: deserializeMetadata(output),
@@ -459,37 +298,9 @@ export const de_GetBulkPublishDetailsCommand = async (output, context) => {
459
298
  Object.assign(contents, doc);
460
299
  return contents;
461
300
  };
462
- const de_GetBulkPublishDetailsCommandError = async (output, context) => {
463
- const parsedOutput = {
464
- ...output,
465
- body: await parseErrorBody(output.body, context),
466
- };
467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
468
- switch (errorCode) {
469
- case "InternalErrorException":
470
- case "com.amazonaws.cognitosync#InternalErrorException":
471
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
472
- case "InvalidParameterException":
473
- case "com.amazonaws.cognitosync#InvalidParameterException":
474
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
475
- case "NotAuthorizedException":
476
- case "com.amazonaws.cognitosync#NotAuthorizedException":
477
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
478
- case "ResourceNotFoundException":
479
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
480
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
481
- default:
482
- const parsedBody = parsedOutput.body;
483
- return throwDefaultError({
484
- output,
485
- parsedBody,
486
- errorCode,
487
- });
488
- }
489
- };
490
301
  export const de_GetCognitoEventsCommand = async (output, context) => {
491
302
  if (output.statusCode !== 200 && output.statusCode >= 300) {
492
- return de_GetCognitoEventsCommandError(output, context);
303
+ return de_CommandError(output, context);
493
304
  }
494
305
  const contents = map({
495
306
  $metadata: deserializeMetadata(output),
@@ -501,40 +312,9 @@ export const de_GetCognitoEventsCommand = async (output, context) => {
501
312
  Object.assign(contents, doc);
502
313
  return contents;
503
314
  };
504
- const de_GetCognitoEventsCommandError = async (output, context) => {
505
- const parsedOutput = {
506
- ...output,
507
- body: await parseErrorBody(output.body, context),
508
- };
509
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
- switch (errorCode) {
511
- case "InternalErrorException":
512
- case "com.amazonaws.cognitosync#InternalErrorException":
513
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
514
- case "InvalidParameterException":
515
- case "com.amazonaws.cognitosync#InvalidParameterException":
516
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
517
- case "NotAuthorizedException":
518
- case "com.amazonaws.cognitosync#NotAuthorizedException":
519
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
520
- case "ResourceNotFoundException":
521
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
522
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
523
- case "TooManyRequestsException":
524
- case "com.amazonaws.cognitosync#TooManyRequestsException":
525
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
526
- default:
527
- const parsedBody = parsedOutput.body;
528
- return throwDefaultError({
529
- output,
530
- parsedBody,
531
- errorCode,
532
- });
533
- }
534
- };
535
315
  export const de_GetIdentityPoolConfigurationCommand = async (output, context) => {
536
316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
537
- return de_GetIdentityPoolConfigurationCommandError(output, context);
317
+ return de_CommandError(output, context);
538
318
  }
539
319
  const contents = map({
540
320
  $metadata: deserializeMetadata(output),
@@ -548,40 +328,9 @@ export const de_GetIdentityPoolConfigurationCommand = async (output, context) =>
548
328
  Object.assign(contents, doc);
549
329
  return contents;
550
330
  };
551
- const de_GetIdentityPoolConfigurationCommandError = async (output, context) => {
552
- const parsedOutput = {
553
- ...output,
554
- body: await parseErrorBody(output.body, context),
555
- };
556
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
557
- switch (errorCode) {
558
- case "InternalErrorException":
559
- case "com.amazonaws.cognitosync#InternalErrorException":
560
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
561
- case "InvalidParameterException":
562
- case "com.amazonaws.cognitosync#InvalidParameterException":
563
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
564
- case "NotAuthorizedException":
565
- case "com.amazonaws.cognitosync#NotAuthorizedException":
566
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
567
- case "ResourceNotFoundException":
568
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
569
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
570
- case "TooManyRequestsException":
571
- case "com.amazonaws.cognitosync#TooManyRequestsException":
572
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
573
- default:
574
- const parsedBody = parsedOutput.body;
575
- return throwDefaultError({
576
- output,
577
- parsedBody,
578
- errorCode,
579
- });
580
- }
581
- };
582
331
  export const de_ListDatasetsCommand = async (output, context) => {
583
332
  if (output.statusCode !== 200 && output.statusCode >= 300) {
584
- return de_ListDatasetsCommandError(output, context);
333
+ return de_CommandError(output, context);
585
334
  }
586
335
  const contents = map({
587
336
  $metadata: deserializeMetadata(output),
@@ -590,42 +339,14 @@ export const de_ListDatasetsCommand = async (output, context) => {
590
339
  const doc = take(data, {
591
340
  Count: __expectInt32,
592
341
  Datasets: (_) => de_DatasetList(_, context),
593
- NextToken: __expectString,
594
- });
595
- Object.assign(contents, doc);
596
- return contents;
597
- };
598
- const de_ListDatasetsCommandError = async (output, context) => {
599
- const parsedOutput = {
600
- ...output,
601
- body: await parseErrorBody(output.body, context),
602
- };
603
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
604
- switch (errorCode) {
605
- case "InternalErrorException":
606
- case "com.amazonaws.cognitosync#InternalErrorException":
607
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
608
- case "InvalidParameterException":
609
- case "com.amazonaws.cognitosync#InvalidParameterException":
610
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
611
- case "NotAuthorizedException":
612
- case "com.amazonaws.cognitosync#NotAuthorizedException":
613
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
614
- case "TooManyRequestsException":
615
- case "com.amazonaws.cognitosync#TooManyRequestsException":
616
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
617
- default:
618
- const parsedBody = parsedOutput.body;
619
- return throwDefaultError({
620
- output,
621
- parsedBody,
622
- errorCode,
623
- });
624
- }
342
+ NextToken: __expectString,
343
+ });
344
+ Object.assign(contents, doc);
345
+ return contents;
625
346
  };
626
347
  export const de_ListIdentityPoolUsageCommand = async (output, context) => {
627
348
  if (output.statusCode !== 200 && output.statusCode >= 300) {
628
- return de_ListIdentityPoolUsageCommandError(output, context);
349
+ return de_CommandError(output, context);
629
350
  }
630
351
  const contents = map({
631
352
  $metadata: deserializeMetadata(output),
@@ -640,37 +361,9 @@ export const de_ListIdentityPoolUsageCommand = async (output, context) => {
640
361
  Object.assign(contents, doc);
641
362
  return contents;
642
363
  };
643
- const de_ListIdentityPoolUsageCommandError = 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 "InternalErrorException":
651
- case "com.amazonaws.cognitosync#InternalErrorException":
652
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
653
- case "InvalidParameterException":
654
- case "com.amazonaws.cognitosync#InvalidParameterException":
655
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
656
- case "NotAuthorizedException":
657
- case "com.amazonaws.cognitosync#NotAuthorizedException":
658
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
659
- case "TooManyRequestsException":
660
- case "com.amazonaws.cognitosync#TooManyRequestsException":
661
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
662
- default:
663
- const parsedBody = parsedOutput.body;
664
- return throwDefaultError({
665
- output,
666
- parsedBody,
667
- errorCode,
668
- });
669
- }
670
- };
671
364
  export const de_ListRecordsCommand = async (output, context) => {
672
365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
673
- return de_ListRecordsCommandError(output, context);
366
+ return de_CommandError(output, context);
674
367
  }
675
368
  const contents = map({
676
369
  $metadata: deserializeMetadata(output),
@@ -690,37 +383,9 @@ export const de_ListRecordsCommand = async (output, context) => {
690
383
  Object.assign(contents, doc);
691
384
  return contents;
692
385
  };
693
- const de_ListRecordsCommandError = async (output, context) => {
694
- const parsedOutput = {
695
- ...output,
696
- body: await parseErrorBody(output.body, context),
697
- };
698
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- switch (errorCode) {
700
- case "InternalErrorException":
701
- case "com.amazonaws.cognitosync#InternalErrorException":
702
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
703
- case "InvalidParameterException":
704
- case "com.amazonaws.cognitosync#InvalidParameterException":
705
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
706
- case "NotAuthorizedException":
707
- case "com.amazonaws.cognitosync#NotAuthorizedException":
708
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
709
- case "TooManyRequestsException":
710
- case "com.amazonaws.cognitosync#TooManyRequestsException":
711
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
712
- default:
713
- const parsedBody = parsedOutput.body;
714
- return throwDefaultError({
715
- output,
716
- parsedBody,
717
- errorCode,
718
- });
719
- }
720
- };
721
386
  export const de_RegisterDeviceCommand = async (output, context) => {
722
387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
723
- return de_RegisterDeviceCommandError(output, context);
388
+ return de_CommandError(output, context);
724
389
  }
725
390
  const contents = map({
726
391
  $metadata: deserializeMetadata(output),
@@ -732,43 +397,9 @@ export const de_RegisterDeviceCommand = async (output, context) => {
732
397
  Object.assign(contents, doc);
733
398
  return contents;
734
399
  };
735
- const de_RegisterDeviceCommandError = async (output, context) => {
736
- const parsedOutput = {
737
- ...output,
738
- body: await parseErrorBody(output.body, context),
739
- };
740
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
741
- switch (errorCode) {
742
- case "InternalErrorException":
743
- case "com.amazonaws.cognitosync#InternalErrorException":
744
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
745
- case "InvalidConfigurationException":
746
- case "com.amazonaws.cognitosync#InvalidConfigurationException":
747
- throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
748
- case "InvalidParameterException":
749
- case "com.amazonaws.cognitosync#InvalidParameterException":
750
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
751
- case "NotAuthorizedException":
752
- case "com.amazonaws.cognitosync#NotAuthorizedException":
753
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
754
- case "ResourceNotFoundException":
755
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
756
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
757
- case "TooManyRequestsException":
758
- case "com.amazonaws.cognitosync#TooManyRequestsException":
759
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
760
- default:
761
- const parsedBody = parsedOutput.body;
762
- return throwDefaultError({
763
- output,
764
- parsedBody,
765
- errorCode,
766
- });
767
- }
768
- };
769
400
  export const de_SetCognitoEventsCommand = async (output, context) => {
770
401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
771
- return de_SetCognitoEventsCommandError(output, context);
402
+ return de_CommandError(output, context);
772
403
  }
773
404
  const contents = map({
774
405
  $metadata: deserializeMetadata(output),
@@ -776,40 +407,9 @@ export const de_SetCognitoEventsCommand = async (output, context) => {
776
407
  await collectBody(output.body, context);
777
408
  return contents;
778
409
  };
779
- const de_SetCognitoEventsCommandError = async (output, context) => {
780
- const parsedOutput = {
781
- ...output,
782
- body: await parseErrorBody(output.body, context),
783
- };
784
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
785
- switch (errorCode) {
786
- case "InternalErrorException":
787
- case "com.amazonaws.cognitosync#InternalErrorException":
788
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
789
- case "InvalidParameterException":
790
- case "com.amazonaws.cognitosync#InvalidParameterException":
791
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
792
- case "NotAuthorizedException":
793
- case "com.amazonaws.cognitosync#NotAuthorizedException":
794
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
795
- case "ResourceNotFoundException":
796
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
797
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
798
- case "TooManyRequestsException":
799
- case "com.amazonaws.cognitosync#TooManyRequestsException":
800
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
801
- default:
802
- const parsedBody = parsedOutput.body;
803
- return throwDefaultError({
804
- output,
805
- parsedBody,
806
- errorCode,
807
- });
808
- }
809
- };
810
410
  export const de_SetIdentityPoolConfigurationCommand = async (output, context) => {
811
411
  if (output.statusCode !== 200 && output.statusCode >= 300) {
812
- return de_SetIdentityPoolConfigurationCommandError(output, context);
412
+ return de_CommandError(output, context);
813
413
  }
814
414
  const contents = map({
815
415
  $metadata: deserializeMetadata(output),
@@ -823,43 +423,9 @@ export const de_SetIdentityPoolConfigurationCommand = async (output, context) =>
823
423
  Object.assign(contents, doc);
824
424
  return contents;
825
425
  };
826
- const de_SetIdentityPoolConfigurationCommandError = async (output, context) => {
827
- const parsedOutput = {
828
- ...output,
829
- body: await parseErrorBody(output.body, context),
830
- };
831
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
832
- switch (errorCode) {
833
- case "ConcurrentModificationException":
834
- case "com.amazonaws.cognitosync#ConcurrentModificationException":
835
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
836
- case "InternalErrorException":
837
- case "com.amazonaws.cognitosync#InternalErrorException":
838
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
839
- case "InvalidParameterException":
840
- case "com.amazonaws.cognitosync#InvalidParameterException":
841
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
842
- case "NotAuthorizedException":
843
- case "com.amazonaws.cognitosync#NotAuthorizedException":
844
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
845
- case "ResourceNotFoundException":
846
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
847
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
848
- case "TooManyRequestsException":
849
- case "com.amazonaws.cognitosync#TooManyRequestsException":
850
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
851
- default:
852
- const parsedBody = parsedOutput.body;
853
- return throwDefaultError({
854
- output,
855
- parsedBody,
856
- errorCode,
857
- });
858
- }
859
- };
860
426
  export const de_SubscribeToDatasetCommand = async (output, context) => {
861
427
  if (output.statusCode !== 200 && output.statusCode >= 300) {
862
- return de_SubscribeToDatasetCommandError(output, context);
428
+ return de_CommandError(output, context);
863
429
  }
864
430
  const contents = map({
865
431
  $metadata: deserializeMetadata(output),
@@ -867,43 +433,9 @@ export const de_SubscribeToDatasetCommand = async (output, context) => {
867
433
  await collectBody(output.body, context);
868
434
  return contents;
869
435
  };
870
- const de_SubscribeToDatasetCommandError = async (output, context) => {
871
- const parsedOutput = {
872
- ...output,
873
- body: await parseErrorBody(output.body, context),
874
- };
875
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
876
- switch (errorCode) {
877
- case "InternalErrorException":
878
- case "com.amazonaws.cognitosync#InternalErrorException":
879
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
880
- case "InvalidConfigurationException":
881
- case "com.amazonaws.cognitosync#InvalidConfigurationException":
882
- throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
883
- case "InvalidParameterException":
884
- case "com.amazonaws.cognitosync#InvalidParameterException":
885
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
886
- case "NotAuthorizedException":
887
- case "com.amazonaws.cognitosync#NotAuthorizedException":
888
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
889
- case "ResourceNotFoundException":
890
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
891
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
892
- case "TooManyRequestsException":
893
- case "com.amazonaws.cognitosync#TooManyRequestsException":
894
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
895
- default:
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode,
901
- });
902
- }
903
- };
904
436
  export const de_UnsubscribeFromDatasetCommand = async (output, context) => {
905
437
  if (output.statusCode !== 200 && output.statusCode >= 300) {
906
- return de_UnsubscribeFromDatasetCommandError(output, context);
438
+ return de_CommandError(output, context);
907
439
  }
908
440
  const contents = map({
909
441
  $metadata: deserializeMetadata(output),
@@ -911,43 +443,9 @@ export const de_UnsubscribeFromDatasetCommand = async (output, context) => {
911
443
  await collectBody(output.body, context);
912
444
  return contents;
913
445
  };
914
- const de_UnsubscribeFromDatasetCommandError = async (output, context) => {
915
- const parsedOutput = {
916
- ...output,
917
- body: await parseErrorBody(output.body, context),
918
- };
919
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
920
- switch (errorCode) {
921
- case "InternalErrorException":
922
- case "com.amazonaws.cognitosync#InternalErrorException":
923
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
924
- case "InvalidConfigurationException":
925
- case "com.amazonaws.cognitosync#InvalidConfigurationException":
926
- throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
927
- case "InvalidParameterException":
928
- case "com.amazonaws.cognitosync#InvalidParameterException":
929
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
930
- case "NotAuthorizedException":
931
- case "com.amazonaws.cognitosync#NotAuthorizedException":
932
- throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
933
- case "ResourceNotFoundException":
934
- case "com.amazonaws.cognitosync#ResourceNotFoundException":
935
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
936
- case "TooManyRequestsException":
937
- case "com.amazonaws.cognitosync#TooManyRequestsException":
938
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
939
- default:
940
- const parsedBody = parsedOutput.body;
941
- return throwDefaultError({
942
- output,
943
- parsedBody,
944
- errorCode,
945
- });
946
- }
947
- };
948
446
  export const de_UpdateRecordsCommand = async (output, context) => {
949
447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
950
- return de_UpdateRecordsCommandError(output, context);
448
+ return de_CommandError(output, context);
951
449
  }
952
450
  const contents = map({
953
451
  $metadata: deserializeMetadata(output),
@@ -959,40 +457,52 @@ export const de_UpdateRecordsCommand = async (output, context) => {
959
457
  Object.assign(contents, doc);
960
458
  return contents;
961
459
  };
962
- const de_UpdateRecordsCommandError = async (output, context) => {
460
+ const de_CommandError = async (output, context) => {
963
461
  const parsedOutput = {
964
462
  ...output,
965
463
  body: await parseErrorBody(output.body, context),
966
464
  };
967
465
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
968
466
  switch (errorCode) {
467
+ case "AlreadyStreamedException":
468
+ case "com.amazonaws.cognitosync#AlreadyStreamedException":
469
+ throw await de_AlreadyStreamedExceptionRes(parsedOutput, context);
470
+ case "DuplicateRequestException":
471
+ case "com.amazonaws.cognitosync#DuplicateRequestException":
472
+ throw await de_DuplicateRequestExceptionRes(parsedOutput, context);
969
473
  case "InternalErrorException":
970
474
  case "com.amazonaws.cognitosync#InternalErrorException":
971
475
  throw await de_InternalErrorExceptionRes(parsedOutput, context);
972
- case "InvalidLambdaFunctionOutputException":
973
- case "com.amazonaws.cognitosync#InvalidLambdaFunctionOutputException":
974
- throw await de_InvalidLambdaFunctionOutputExceptionRes(parsedOutput, context);
975
476
  case "InvalidParameterException":
976
477
  case "com.amazonaws.cognitosync#InvalidParameterException":
977
478
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
978
- case "LambdaThrottledException":
979
- case "com.amazonaws.cognitosync#LambdaThrottledException":
980
- throw await de_LambdaThrottledExceptionRes(parsedOutput, context);
981
- case "LimitExceededException":
982
- case "com.amazonaws.cognitosync#LimitExceededException":
983
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
984
479
  case "NotAuthorizedException":
985
480
  case "com.amazonaws.cognitosync#NotAuthorizedException":
986
481
  throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
987
- case "ResourceConflictException":
988
- case "com.amazonaws.cognitosync#ResourceConflictException":
989
- throw await de_ResourceConflictExceptionRes(parsedOutput, context);
990
482
  case "ResourceNotFoundException":
991
483
  case "com.amazonaws.cognitosync#ResourceNotFoundException":
992
484
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
485
+ case "ResourceConflictException":
486
+ case "com.amazonaws.cognitosync#ResourceConflictException":
487
+ throw await de_ResourceConflictExceptionRes(parsedOutput, context);
993
488
  case "TooManyRequestsException":
994
489
  case "com.amazonaws.cognitosync#TooManyRequestsException":
995
490
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
491
+ case "InvalidConfigurationException":
492
+ case "com.amazonaws.cognitosync#InvalidConfigurationException":
493
+ throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
494
+ case "ConcurrentModificationException":
495
+ case "com.amazonaws.cognitosync#ConcurrentModificationException":
496
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
497
+ case "InvalidLambdaFunctionOutputException":
498
+ case "com.amazonaws.cognitosync#InvalidLambdaFunctionOutputException":
499
+ throw await de_InvalidLambdaFunctionOutputExceptionRes(parsedOutput, context);
500
+ case "LambdaThrottledException":
501
+ case "com.amazonaws.cognitosync#LambdaThrottledException":
502
+ throw await de_LambdaThrottledExceptionRes(parsedOutput, context);
503
+ case "LimitExceededException":
504
+ case "com.amazonaws.cognitosync#LimitExceededException":
505
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
996
506
  default:
997
507
  const parsedBody = parsedOutput.body;
998
508
  return throwDefaultError({