@aws-sdk/client-b2bi 3.503.1 → 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.
@@ -168,7 +168,7 @@ export const se_UpdateTransformerCommand = async (input, context) => {
168
168
  };
169
169
  export const de_CreateCapabilityCommand = async (output, context) => {
170
170
  if (output.statusCode >= 300) {
171
- return de_CreateCapabilityCommandError(output, context);
171
+ return de_CommandError(output, context);
172
172
  }
173
173
  const data = await parseBody(output.body, context);
174
174
  let contents = {};
@@ -179,46 +179,9 @@ export const de_CreateCapabilityCommand = async (output, context) => {
179
179
  };
180
180
  return response;
181
181
  };
182
- const de_CreateCapabilityCommandError = async (output, context) => {
183
- const parsedOutput = {
184
- ...output,
185
- body: await parseErrorBody(output.body, context),
186
- };
187
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
188
- switch (errorCode) {
189
- case "AccessDeniedException":
190
- case "com.amazonaws.b2bi#AccessDeniedException":
191
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
192
- case "ConflictException":
193
- case "com.amazonaws.b2bi#ConflictException":
194
- throw await de_ConflictExceptionRes(parsedOutput, context);
195
- case "InternalServerException":
196
- case "com.amazonaws.b2bi#InternalServerException":
197
- throw await de_InternalServerExceptionRes(parsedOutput, context);
198
- case "ResourceNotFoundException":
199
- case "com.amazonaws.b2bi#ResourceNotFoundException":
200
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
201
- case "ServiceQuotaExceededException":
202
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
203
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
204
- case "ThrottlingException":
205
- case "com.amazonaws.b2bi#ThrottlingException":
206
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
207
- case "ValidationException":
208
- case "com.amazonaws.b2bi#ValidationException":
209
- throw await de_ValidationExceptionRes(parsedOutput, context);
210
- default:
211
- const parsedBody = parsedOutput.body;
212
- return throwDefaultError({
213
- output,
214
- parsedBody,
215
- errorCode,
216
- });
217
- }
218
- };
219
182
  export const de_CreatePartnershipCommand = async (output, context) => {
220
183
  if (output.statusCode >= 300) {
221
- return de_CreatePartnershipCommandError(output, context);
184
+ return de_CommandError(output, context);
222
185
  }
223
186
  const data = await parseBody(output.body, context);
224
187
  let contents = {};
@@ -229,46 +192,9 @@ export const de_CreatePartnershipCommand = async (output, context) => {
229
192
  };
230
193
  return response;
231
194
  };
232
- const de_CreatePartnershipCommandError = async (output, context) => {
233
- const parsedOutput = {
234
- ...output,
235
- body: await parseErrorBody(output.body, context),
236
- };
237
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
238
- switch (errorCode) {
239
- case "AccessDeniedException":
240
- case "com.amazonaws.b2bi#AccessDeniedException":
241
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
242
- case "ConflictException":
243
- case "com.amazonaws.b2bi#ConflictException":
244
- throw await de_ConflictExceptionRes(parsedOutput, context);
245
- case "InternalServerException":
246
- case "com.amazonaws.b2bi#InternalServerException":
247
- throw await de_InternalServerExceptionRes(parsedOutput, context);
248
- case "ResourceNotFoundException":
249
- case "com.amazonaws.b2bi#ResourceNotFoundException":
250
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
251
- case "ServiceQuotaExceededException":
252
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
253
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
254
- case "ThrottlingException":
255
- case "com.amazonaws.b2bi#ThrottlingException":
256
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
257
- case "ValidationException":
258
- case "com.amazonaws.b2bi#ValidationException":
259
- throw await de_ValidationExceptionRes(parsedOutput, context);
260
- default:
261
- const parsedBody = parsedOutput.body;
262
- return throwDefaultError({
263
- output,
264
- parsedBody,
265
- errorCode,
266
- });
267
- }
268
- };
269
195
  export const de_CreateProfileCommand = async (output, context) => {
270
196
  if (output.statusCode >= 300) {
271
- return de_CreateProfileCommandError(output, context);
197
+ return de_CommandError(output, context);
272
198
  }
273
199
  const data = await parseBody(output.body, context);
274
200
  let contents = {};
@@ -279,46 +205,9 @@ export const de_CreateProfileCommand = async (output, context) => {
279
205
  };
280
206
  return response;
281
207
  };
282
- const de_CreateProfileCommandError = async (output, context) => {
283
- const parsedOutput = {
284
- ...output,
285
- body: await parseErrorBody(output.body, context),
286
- };
287
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
288
- switch (errorCode) {
289
- case "AccessDeniedException":
290
- case "com.amazonaws.b2bi#AccessDeniedException":
291
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
292
- case "ConflictException":
293
- case "com.amazonaws.b2bi#ConflictException":
294
- throw await de_ConflictExceptionRes(parsedOutput, context);
295
- case "InternalServerException":
296
- case "com.amazonaws.b2bi#InternalServerException":
297
- throw await de_InternalServerExceptionRes(parsedOutput, context);
298
- case "ResourceNotFoundException":
299
- case "com.amazonaws.b2bi#ResourceNotFoundException":
300
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
301
- case "ServiceQuotaExceededException":
302
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
303
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
304
- case "ThrottlingException":
305
- case "com.amazonaws.b2bi#ThrottlingException":
306
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
307
- case "ValidationException":
308
- case "com.amazonaws.b2bi#ValidationException":
309
- throw await de_ValidationExceptionRes(parsedOutput, context);
310
- default:
311
- const parsedBody = parsedOutput.body;
312
- return throwDefaultError({
313
- output,
314
- parsedBody,
315
- errorCode,
316
- });
317
- }
318
- };
319
208
  export const de_CreateTransformerCommand = async (output, context) => {
320
209
  if (output.statusCode >= 300) {
321
- return de_CreateTransformerCommandError(output, context);
210
+ return de_CommandError(output, context);
322
211
  }
323
212
  const data = await parseBody(output.body, context);
324
213
  let contents = {};
@@ -329,46 +218,9 @@ export const de_CreateTransformerCommand = async (output, context) => {
329
218
  };
330
219
  return response;
331
220
  };
332
- const de_CreateTransformerCommandError = async (output, context) => {
333
- const parsedOutput = {
334
- ...output,
335
- body: await parseErrorBody(output.body, context),
336
- };
337
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
338
- switch (errorCode) {
339
- case "AccessDeniedException":
340
- case "com.amazonaws.b2bi#AccessDeniedException":
341
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
342
- case "ConflictException":
343
- case "com.amazonaws.b2bi#ConflictException":
344
- throw await de_ConflictExceptionRes(parsedOutput, context);
345
- case "InternalServerException":
346
- case "com.amazonaws.b2bi#InternalServerException":
347
- throw await de_InternalServerExceptionRes(parsedOutput, context);
348
- case "ResourceNotFoundException":
349
- case "com.amazonaws.b2bi#ResourceNotFoundException":
350
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
351
- case "ServiceQuotaExceededException":
352
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
353
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
354
- case "ThrottlingException":
355
- case "com.amazonaws.b2bi#ThrottlingException":
356
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
357
- case "ValidationException":
358
- case "com.amazonaws.b2bi#ValidationException":
359
- throw await de_ValidationExceptionRes(parsedOutput, context);
360
- default:
361
- const parsedBody = parsedOutput.body;
362
- return throwDefaultError({
363
- output,
364
- parsedBody,
365
- errorCode,
366
- });
367
- }
368
- };
369
221
  export const de_DeleteCapabilityCommand = async (output, context) => {
370
222
  if (output.statusCode >= 300) {
371
- return de_DeleteCapabilityCommandError(output, context);
223
+ return de_CommandError(output, context);
372
224
  }
373
225
  await collectBody(output.body, context);
374
226
  const response = {
@@ -376,43 +228,9 @@ export const de_DeleteCapabilityCommand = async (output, context) => {
376
228
  };
377
229
  return response;
378
230
  };
379
- const de_DeleteCapabilityCommandError = async (output, context) => {
380
- const parsedOutput = {
381
- ...output,
382
- body: await parseErrorBody(output.body, context),
383
- };
384
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
385
- switch (errorCode) {
386
- case "AccessDeniedException":
387
- case "com.amazonaws.b2bi#AccessDeniedException":
388
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
389
- case "ConflictException":
390
- case "com.amazonaws.b2bi#ConflictException":
391
- throw await de_ConflictExceptionRes(parsedOutput, context);
392
- case "InternalServerException":
393
- case "com.amazonaws.b2bi#InternalServerException":
394
- throw await de_InternalServerExceptionRes(parsedOutput, context);
395
- case "ResourceNotFoundException":
396
- case "com.amazonaws.b2bi#ResourceNotFoundException":
397
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
398
- case "ThrottlingException":
399
- case "com.amazonaws.b2bi#ThrottlingException":
400
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
401
- case "ValidationException":
402
- case "com.amazonaws.b2bi#ValidationException":
403
- throw await de_ValidationExceptionRes(parsedOutput, context);
404
- default:
405
- const parsedBody = parsedOutput.body;
406
- return throwDefaultError({
407
- output,
408
- parsedBody,
409
- errorCode,
410
- });
411
- }
412
- };
413
231
  export const de_DeletePartnershipCommand = async (output, context) => {
414
232
  if (output.statusCode >= 300) {
415
- return de_DeletePartnershipCommandError(output, context);
233
+ return de_CommandError(output, context);
416
234
  }
417
235
  await collectBody(output.body, context);
418
236
  const response = {
@@ -420,43 +238,9 @@ export const de_DeletePartnershipCommand = async (output, context) => {
420
238
  };
421
239
  return response;
422
240
  };
423
- const de_DeletePartnershipCommandError = async (output, context) => {
424
- const parsedOutput = {
425
- ...output,
426
- body: await parseErrorBody(output.body, context),
427
- };
428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
429
- switch (errorCode) {
430
- case "AccessDeniedException":
431
- case "com.amazonaws.b2bi#AccessDeniedException":
432
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
433
- case "ConflictException":
434
- case "com.amazonaws.b2bi#ConflictException":
435
- throw await de_ConflictExceptionRes(parsedOutput, context);
436
- case "InternalServerException":
437
- case "com.amazonaws.b2bi#InternalServerException":
438
- throw await de_InternalServerExceptionRes(parsedOutput, context);
439
- case "ResourceNotFoundException":
440
- case "com.amazonaws.b2bi#ResourceNotFoundException":
441
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
442
- case "ThrottlingException":
443
- case "com.amazonaws.b2bi#ThrottlingException":
444
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
445
- case "ValidationException":
446
- case "com.amazonaws.b2bi#ValidationException":
447
- throw await de_ValidationExceptionRes(parsedOutput, context);
448
- default:
449
- const parsedBody = parsedOutput.body;
450
- return throwDefaultError({
451
- output,
452
- parsedBody,
453
- errorCode,
454
- });
455
- }
456
- };
457
241
  export const de_DeleteProfileCommand = async (output, context) => {
458
242
  if (output.statusCode >= 300) {
459
- return de_DeleteProfileCommandError(output, context);
243
+ return de_CommandError(output, context);
460
244
  }
461
245
  await collectBody(output.body, context);
462
246
  const response = {
@@ -464,43 +248,9 @@ export const de_DeleteProfileCommand = async (output, context) => {
464
248
  };
465
249
  return response;
466
250
  };
467
- const de_DeleteProfileCommandError = async (output, context) => {
468
- const parsedOutput = {
469
- ...output,
470
- body: await parseErrorBody(output.body, context),
471
- };
472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
473
- switch (errorCode) {
474
- case "AccessDeniedException":
475
- case "com.amazonaws.b2bi#AccessDeniedException":
476
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
477
- case "ConflictException":
478
- case "com.amazonaws.b2bi#ConflictException":
479
- throw await de_ConflictExceptionRes(parsedOutput, context);
480
- case "InternalServerException":
481
- case "com.amazonaws.b2bi#InternalServerException":
482
- throw await de_InternalServerExceptionRes(parsedOutput, context);
483
- case "ResourceNotFoundException":
484
- case "com.amazonaws.b2bi#ResourceNotFoundException":
485
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
486
- case "ThrottlingException":
487
- case "com.amazonaws.b2bi#ThrottlingException":
488
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
489
- case "ValidationException":
490
- case "com.amazonaws.b2bi#ValidationException":
491
- throw await de_ValidationExceptionRes(parsedOutput, context);
492
- default:
493
- const parsedBody = parsedOutput.body;
494
- return throwDefaultError({
495
- output,
496
- parsedBody,
497
- errorCode,
498
- });
499
- }
500
- };
501
251
  export const de_DeleteTransformerCommand = async (output, context) => {
502
252
  if (output.statusCode >= 300) {
503
- return de_DeleteTransformerCommandError(output, context);
253
+ return de_CommandError(output, context);
504
254
  }
505
255
  await collectBody(output.body, context);
506
256
  const response = {
@@ -508,43 +258,9 @@ export const de_DeleteTransformerCommand = async (output, context) => {
508
258
  };
509
259
  return response;
510
260
  };
511
- const de_DeleteTransformerCommandError = async (output, context) => {
512
- const parsedOutput = {
513
- ...output,
514
- body: await parseErrorBody(output.body, context),
515
- };
516
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
517
- switch (errorCode) {
518
- case "AccessDeniedException":
519
- case "com.amazonaws.b2bi#AccessDeniedException":
520
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
521
- case "ConflictException":
522
- case "com.amazonaws.b2bi#ConflictException":
523
- throw await de_ConflictExceptionRes(parsedOutput, context);
524
- case "InternalServerException":
525
- case "com.amazonaws.b2bi#InternalServerException":
526
- throw await de_InternalServerExceptionRes(parsedOutput, context);
527
- case "ResourceNotFoundException":
528
- case "com.amazonaws.b2bi#ResourceNotFoundException":
529
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
530
- case "ThrottlingException":
531
- case "com.amazonaws.b2bi#ThrottlingException":
532
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
533
- case "ValidationException":
534
- case "com.amazonaws.b2bi#ValidationException":
535
- throw await de_ValidationExceptionRes(parsedOutput, context);
536
- default:
537
- const parsedBody = parsedOutput.body;
538
- return throwDefaultError({
539
- output,
540
- parsedBody,
541
- errorCode,
542
- });
543
- }
544
- };
545
261
  export const de_GetCapabilityCommand = async (output, context) => {
546
262
  if (output.statusCode >= 300) {
547
- return de_GetCapabilityCommandError(output, context);
263
+ return de_CommandError(output, context);
548
264
  }
549
265
  const data = await parseBody(output.body, context);
550
266
  let contents = {};
@@ -555,40 +271,9 @@ export const de_GetCapabilityCommand = async (output, context) => {
555
271
  };
556
272
  return response;
557
273
  };
558
- const de_GetCapabilityCommandError = async (output, context) => {
559
- const parsedOutput = {
560
- ...output,
561
- body: await parseErrorBody(output.body, context),
562
- };
563
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
- switch (errorCode) {
565
- case "AccessDeniedException":
566
- case "com.amazonaws.b2bi#AccessDeniedException":
567
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
568
- case "InternalServerException":
569
- case "com.amazonaws.b2bi#InternalServerException":
570
- throw await de_InternalServerExceptionRes(parsedOutput, context);
571
- case "ResourceNotFoundException":
572
- case "com.amazonaws.b2bi#ResourceNotFoundException":
573
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
574
- case "ThrottlingException":
575
- case "com.amazonaws.b2bi#ThrottlingException":
576
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
577
- case "ValidationException":
578
- case "com.amazonaws.b2bi#ValidationException":
579
- throw await de_ValidationExceptionRes(parsedOutput, context);
580
- default:
581
- const parsedBody = parsedOutput.body;
582
- return throwDefaultError({
583
- output,
584
- parsedBody,
585
- errorCode,
586
- });
587
- }
588
- };
589
274
  export const de_GetPartnershipCommand = async (output, context) => {
590
275
  if (output.statusCode >= 300) {
591
- return de_GetPartnershipCommandError(output, context);
276
+ return de_CommandError(output, context);
592
277
  }
593
278
  const data = await parseBody(output.body, context);
594
279
  let contents = {};
@@ -599,40 +284,9 @@ export const de_GetPartnershipCommand = async (output, context) => {
599
284
  };
600
285
  return response;
601
286
  };
602
- const de_GetPartnershipCommandError = async (output, context) => {
603
- const parsedOutput = {
604
- ...output,
605
- body: await parseErrorBody(output.body, context),
606
- };
607
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
- switch (errorCode) {
609
- case "AccessDeniedException":
610
- case "com.amazonaws.b2bi#AccessDeniedException":
611
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
612
- case "InternalServerException":
613
- case "com.amazonaws.b2bi#InternalServerException":
614
- throw await de_InternalServerExceptionRes(parsedOutput, context);
615
- case "ResourceNotFoundException":
616
- case "com.amazonaws.b2bi#ResourceNotFoundException":
617
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
618
- case "ThrottlingException":
619
- case "com.amazonaws.b2bi#ThrottlingException":
620
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
621
- case "ValidationException":
622
- case "com.amazonaws.b2bi#ValidationException":
623
- throw await de_ValidationExceptionRes(parsedOutput, context);
624
- default:
625
- const parsedBody = parsedOutput.body;
626
- return throwDefaultError({
627
- output,
628
- parsedBody,
629
- errorCode,
630
- });
631
- }
632
- };
633
287
  export const de_GetProfileCommand = async (output, context) => {
634
288
  if (output.statusCode >= 300) {
635
- return de_GetProfileCommandError(output, context);
289
+ return de_CommandError(output, context);
636
290
  }
637
291
  const data = await parseBody(output.body, context);
638
292
  let contents = {};
@@ -643,40 +297,9 @@ export const de_GetProfileCommand = async (output, context) => {
643
297
  };
644
298
  return response;
645
299
  };
646
- const de_GetProfileCommandError = async (output, context) => {
647
- const parsedOutput = {
648
- ...output,
649
- body: await parseErrorBody(output.body, context),
650
- };
651
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
- switch (errorCode) {
653
- case "AccessDeniedException":
654
- case "com.amazonaws.b2bi#AccessDeniedException":
655
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
656
- case "InternalServerException":
657
- case "com.amazonaws.b2bi#InternalServerException":
658
- throw await de_InternalServerExceptionRes(parsedOutput, context);
659
- case "ResourceNotFoundException":
660
- case "com.amazonaws.b2bi#ResourceNotFoundException":
661
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
662
- case "ThrottlingException":
663
- case "com.amazonaws.b2bi#ThrottlingException":
664
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
665
- case "ValidationException":
666
- case "com.amazonaws.b2bi#ValidationException":
667
- throw await de_ValidationExceptionRes(parsedOutput, context);
668
- default:
669
- const parsedBody = parsedOutput.body;
670
- return throwDefaultError({
671
- output,
672
- parsedBody,
673
- errorCode,
674
- });
675
- }
676
- };
677
300
  export const de_GetTransformerCommand = async (output, context) => {
678
301
  if (output.statusCode >= 300) {
679
- return de_GetTransformerCommandError(output, context);
302
+ return de_CommandError(output, context);
680
303
  }
681
304
  const data = await parseBody(output.body, context);
682
305
  let contents = {};
@@ -687,40 +310,9 @@ export const de_GetTransformerCommand = async (output, context) => {
687
310
  };
688
311
  return response;
689
312
  };
690
- const de_GetTransformerCommandError = async (output, context) => {
691
- const parsedOutput = {
692
- ...output,
693
- body: await parseErrorBody(output.body, context),
694
- };
695
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
- switch (errorCode) {
697
- case "AccessDeniedException":
698
- case "com.amazonaws.b2bi#AccessDeniedException":
699
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
700
- case "InternalServerException":
701
- case "com.amazonaws.b2bi#InternalServerException":
702
- throw await de_InternalServerExceptionRes(parsedOutput, context);
703
- case "ResourceNotFoundException":
704
- case "com.amazonaws.b2bi#ResourceNotFoundException":
705
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
706
- case "ThrottlingException":
707
- case "com.amazonaws.b2bi#ThrottlingException":
708
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
709
- case "ValidationException":
710
- case "com.amazonaws.b2bi#ValidationException":
711
- throw await de_ValidationExceptionRes(parsedOutput, context);
712
- default:
713
- const parsedBody = parsedOutput.body;
714
- return throwDefaultError({
715
- output,
716
- parsedBody,
717
- errorCode,
718
- });
719
- }
720
- };
721
313
  export const de_GetTransformerJobCommand = async (output, context) => {
722
314
  if (output.statusCode >= 300) {
723
- return de_GetTransformerJobCommandError(output, context);
315
+ return de_CommandError(output, context);
724
316
  }
725
317
  const data = await parseBody(output.body, context);
726
318
  let contents = {};
@@ -731,40 +323,9 @@ export const de_GetTransformerJobCommand = async (output, context) => {
731
323
  };
732
324
  return response;
733
325
  };
734
- const de_GetTransformerJobCommandError = async (output, context) => {
735
- const parsedOutput = {
736
- ...output,
737
- body: await parseErrorBody(output.body, context),
738
- };
739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
- switch (errorCode) {
741
- case "AccessDeniedException":
742
- case "com.amazonaws.b2bi#AccessDeniedException":
743
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
744
- case "InternalServerException":
745
- case "com.amazonaws.b2bi#InternalServerException":
746
- throw await de_InternalServerExceptionRes(parsedOutput, context);
747
- case "ResourceNotFoundException":
748
- case "com.amazonaws.b2bi#ResourceNotFoundException":
749
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
750
- case "ThrottlingException":
751
- case "com.amazonaws.b2bi#ThrottlingException":
752
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
753
- case "ValidationException":
754
- case "com.amazonaws.b2bi#ValidationException":
755
- throw await de_ValidationExceptionRes(parsedOutput, context);
756
- default:
757
- const parsedBody = parsedOutput.body;
758
- return throwDefaultError({
759
- output,
760
- parsedBody,
761
- errorCode,
762
- });
763
- }
764
- };
765
326
  export const de_ListCapabilitiesCommand = async (output, context) => {
766
327
  if (output.statusCode >= 300) {
767
- return de_ListCapabilitiesCommandError(output, context);
328
+ return de_CommandError(output, context);
768
329
  }
769
330
  const data = await parseBody(output.body, context);
770
331
  let contents = {};
@@ -775,22 +336,9 @@ export const de_ListCapabilitiesCommand = async (output, context) => {
775
336
  };
776
337
  return response;
777
338
  };
778
- const de_ListCapabilitiesCommandError = async (output, context) => {
779
- const parsedOutput = {
780
- ...output,
781
- body: await parseErrorBody(output.body, context),
782
- };
783
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
784
- const parsedBody = parsedOutput.body;
785
- return throwDefaultError({
786
- output,
787
- parsedBody,
788
- errorCode,
789
- });
790
- };
791
339
  export const de_ListPartnershipsCommand = async (output, context) => {
792
340
  if (output.statusCode >= 300) {
793
- return de_ListPartnershipsCommandError(output, context);
341
+ return de_CommandError(output, context);
794
342
  }
795
343
  const data = await parseBody(output.body, context);
796
344
  let contents = {};
@@ -801,40 +349,9 @@ export const de_ListPartnershipsCommand = async (output, context) => {
801
349
  };
802
350
  return response;
803
351
  };
804
- const de_ListPartnershipsCommandError = async (output, context) => {
805
- const parsedOutput = {
806
- ...output,
807
- body: await parseErrorBody(output.body, context),
808
- };
809
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
- switch (errorCode) {
811
- case "AccessDeniedException":
812
- case "com.amazonaws.b2bi#AccessDeniedException":
813
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
814
- case "InternalServerException":
815
- case "com.amazonaws.b2bi#InternalServerException":
816
- throw await de_InternalServerExceptionRes(parsedOutput, context);
817
- case "ResourceNotFoundException":
818
- case "com.amazonaws.b2bi#ResourceNotFoundException":
819
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
820
- case "ThrottlingException":
821
- case "com.amazonaws.b2bi#ThrottlingException":
822
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
823
- case "ValidationException":
824
- case "com.amazonaws.b2bi#ValidationException":
825
- throw await de_ValidationExceptionRes(parsedOutput, context);
826
- default:
827
- const parsedBody = parsedOutput.body;
828
- return throwDefaultError({
829
- output,
830
- parsedBody,
831
- errorCode,
832
- });
833
- }
834
- };
835
352
  export const de_ListProfilesCommand = async (output, context) => {
836
353
  if (output.statusCode >= 300) {
837
- return de_ListProfilesCommandError(output, context);
354
+ return de_CommandError(output, context);
838
355
  }
839
356
  const data = await parseBody(output.body, context);
840
357
  let contents = {};
@@ -845,22 +362,9 @@ export const de_ListProfilesCommand = async (output, context) => {
845
362
  };
846
363
  return response;
847
364
  };
848
- const de_ListProfilesCommandError = async (output, context) => {
849
- const parsedOutput = {
850
- ...output,
851
- body: await parseErrorBody(output.body, context),
852
- };
853
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
854
- const parsedBody = parsedOutput.body;
855
- return throwDefaultError({
856
- output,
857
- parsedBody,
858
- errorCode,
859
- });
860
- };
861
365
  export const de_ListTagsForResourceCommand = async (output, context) => {
862
366
  if (output.statusCode >= 300) {
863
- return de_ListTagsForResourceCommandError(output, context);
367
+ return de_CommandError(output, context);
864
368
  }
865
369
  const data = await parseBody(output.body, context);
866
370
  let contents = {};
@@ -871,34 +375,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
871
375
  };
872
376
  return response;
873
377
  };
874
- const de_ListTagsForResourceCommandError = async (output, context) => {
875
- const parsedOutput = {
876
- ...output,
877
- body: await parseErrorBody(output.body, context),
878
- };
879
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
880
- switch (errorCode) {
881
- case "InternalServerException":
882
- case "com.amazonaws.b2bi#InternalServerException":
883
- throw await de_InternalServerExceptionRes(parsedOutput, context);
884
- case "ResourceNotFoundException":
885
- case "com.amazonaws.b2bi#ResourceNotFoundException":
886
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
887
- case "ValidationException":
888
- case "com.amazonaws.b2bi#ValidationException":
889
- throw await de_ValidationExceptionRes(parsedOutput, context);
890
- default:
891
- const parsedBody = parsedOutput.body;
892
- return throwDefaultError({
893
- output,
894
- parsedBody,
895
- errorCode,
896
- });
897
- }
898
- };
899
378
  export const de_ListTransformersCommand = async (output, context) => {
900
379
  if (output.statusCode >= 300) {
901
- return de_ListTransformersCommandError(output, context);
380
+ return de_CommandError(output, context);
902
381
  }
903
382
  const data = await parseBody(output.body, context);
904
383
  let contents = {};
@@ -909,22 +388,9 @@ export const de_ListTransformersCommand = async (output, context) => {
909
388
  };
910
389
  return response;
911
390
  };
912
- const de_ListTransformersCommandError = async (output, context) => {
913
- const parsedOutput = {
914
- ...output,
915
- body: await parseErrorBody(output.body, context),
916
- };
917
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
918
- const parsedBody = parsedOutput.body;
919
- return throwDefaultError({
920
- output,
921
- parsedBody,
922
- errorCode,
923
- });
924
- };
925
391
  export const de_StartTransformerJobCommand = async (output, context) => {
926
392
  if (output.statusCode >= 300) {
927
- return de_StartTransformerJobCommandError(output, context);
393
+ return de_CommandError(output, context);
928
394
  }
929
395
  const data = await parseBody(output.body, context);
930
396
  let contents = {};
@@ -935,40 +401,9 @@ export const de_StartTransformerJobCommand = async (output, context) => {
935
401
  };
936
402
  return response;
937
403
  };
938
- const de_StartTransformerJobCommandError = async (output, context) => {
939
- const parsedOutput = {
940
- ...output,
941
- body: await parseErrorBody(output.body, context),
942
- };
943
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
944
- switch (errorCode) {
945
- case "AccessDeniedException":
946
- case "com.amazonaws.b2bi#AccessDeniedException":
947
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
948
- case "InternalServerException":
949
- case "com.amazonaws.b2bi#InternalServerException":
950
- throw await de_InternalServerExceptionRes(parsedOutput, context);
951
- case "ResourceNotFoundException":
952
- case "com.amazonaws.b2bi#ResourceNotFoundException":
953
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
954
- case "ThrottlingException":
955
- case "com.amazonaws.b2bi#ThrottlingException":
956
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
957
- case "ValidationException":
958
- case "com.amazonaws.b2bi#ValidationException":
959
- throw await de_ValidationExceptionRes(parsedOutput, context);
960
- default:
961
- const parsedBody = parsedOutput.body;
962
- return throwDefaultError({
963
- output,
964
- parsedBody,
965
- errorCode,
966
- });
967
- }
968
- };
969
404
  export const de_TagResourceCommand = async (output, context) => {
970
405
  if (output.statusCode >= 300) {
971
- return de_TagResourceCommandError(output, context);
406
+ return de_CommandError(output, context);
972
407
  }
973
408
  await collectBody(output.body, context);
974
409
  const response = {
@@ -976,37 +411,9 @@ export const de_TagResourceCommand = async (output, context) => {
976
411
  };
977
412
  return response;
978
413
  };
979
- const de_TagResourceCommandError = async (output, context) => {
980
- const parsedOutput = {
981
- ...output,
982
- body: await parseErrorBody(output.body, context),
983
- };
984
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
985
- switch (errorCode) {
986
- case "InternalServerException":
987
- case "com.amazonaws.b2bi#InternalServerException":
988
- throw await de_InternalServerExceptionRes(parsedOutput, context);
989
- case "ResourceNotFoundException":
990
- case "com.amazonaws.b2bi#ResourceNotFoundException":
991
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
992
- case "ThrottlingException":
993
- case "com.amazonaws.b2bi#ThrottlingException":
994
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
995
- case "ValidationException":
996
- case "com.amazonaws.b2bi#ValidationException":
997
- throw await de_ValidationExceptionRes(parsedOutput, context);
998
- default:
999
- const parsedBody = parsedOutput.body;
1000
- return throwDefaultError({
1001
- output,
1002
- parsedBody,
1003
- errorCode,
1004
- });
1005
- }
1006
- };
1007
414
  export const de_TestMappingCommand = async (output, context) => {
1008
415
  if (output.statusCode >= 300) {
1009
- return de_TestMappingCommandError(output, context);
416
+ return de_CommandError(output, context);
1010
417
  }
1011
418
  const data = await parseBody(output.body, context);
1012
419
  let contents = {};
@@ -1017,40 +424,9 @@ export const de_TestMappingCommand = async (output, context) => {
1017
424
  };
1018
425
  return response;
1019
426
  };
1020
- const de_TestMappingCommandError = async (output, context) => {
1021
- const parsedOutput = {
1022
- ...output,
1023
- body: await parseErrorBody(output.body, context),
1024
- };
1025
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1026
- switch (errorCode) {
1027
- case "AccessDeniedException":
1028
- case "com.amazonaws.b2bi#AccessDeniedException":
1029
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1030
- case "InternalServerException":
1031
- case "com.amazonaws.b2bi#InternalServerException":
1032
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1033
- case "ResourceNotFoundException":
1034
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1035
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1036
- case "ThrottlingException":
1037
- case "com.amazonaws.b2bi#ThrottlingException":
1038
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1039
- case "ValidationException":
1040
- case "com.amazonaws.b2bi#ValidationException":
1041
- throw await de_ValidationExceptionRes(parsedOutput, context);
1042
- default:
1043
- const parsedBody = parsedOutput.body;
1044
- return throwDefaultError({
1045
- output,
1046
- parsedBody,
1047
- errorCode,
1048
- });
1049
- }
1050
- };
1051
427
  export const de_TestParsingCommand = async (output, context) => {
1052
428
  if (output.statusCode >= 300) {
1053
- return de_TestParsingCommandError(output, context);
429
+ return de_CommandError(output, context);
1054
430
  }
1055
431
  const data = await parseBody(output.body, context);
1056
432
  let contents = {};
@@ -1061,40 +437,9 @@ export const de_TestParsingCommand = async (output, context) => {
1061
437
  };
1062
438
  return response;
1063
439
  };
1064
- const de_TestParsingCommandError = async (output, context) => {
1065
- const parsedOutput = {
1066
- ...output,
1067
- body: await parseErrorBody(output.body, context),
1068
- };
1069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1070
- switch (errorCode) {
1071
- case "AccessDeniedException":
1072
- case "com.amazonaws.b2bi#AccessDeniedException":
1073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1074
- case "InternalServerException":
1075
- case "com.amazonaws.b2bi#InternalServerException":
1076
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1077
- case "ResourceNotFoundException":
1078
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1079
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1080
- case "ThrottlingException":
1081
- case "com.amazonaws.b2bi#ThrottlingException":
1082
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1083
- case "ValidationException":
1084
- case "com.amazonaws.b2bi#ValidationException":
1085
- throw await de_ValidationExceptionRes(parsedOutput, context);
1086
- default:
1087
- const parsedBody = parsedOutput.body;
1088
- return throwDefaultError({
1089
- output,
1090
- parsedBody,
1091
- errorCode,
1092
- });
1093
- }
1094
- };
1095
440
  export const de_UntagResourceCommand = async (output, context) => {
1096
441
  if (output.statusCode >= 300) {
1097
- return de_UntagResourceCommandError(output, context);
442
+ return de_CommandError(output, context);
1098
443
  }
1099
444
  await collectBody(output.body, context);
1100
445
  const response = {
@@ -1102,34 +447,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1102
447
  };
1103
448
  return response;
1104
449
  };
1105
- const de_UntagResourceCommandError = async (output, context) => {
1106
- const parsedOutput = {
1107
- ...output,
1108
- body: await parseErrorBody(output.body, context),
1109
- };
1110
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1111
- switch (errorCode) {
1112
- case "InternalServerException":
1113
- case "com.amazonaws.b2bi#InternalServerException":
1114
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1115
- case "ResourceNotFoundException":
1116
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1117
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1118
- case "ValidationException":
1119
- case "com.amazonaws.b2bi#ValidationException":
1120
- throw await de_ValidationExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
450
  export const de_UpdateCapabilityCommand = async (output, context) => {
1131
451
  if (output.statusCode >= 300) {
1132
- return de_UpdateCapabilityCommandError(output, context);
452
+ return de_CommandError(output, context);
1133
453
  }
1134
454
  const data = await parseBody(output.body, context);
1135
455
  let contents = {};
@@ -1140,46 +460,9 @@ export const de_UpdateCapabilityCommand = async (output, context) => {
1140
460
  };
1141
461
  return response;
1142
462
  };
1143
- const de_UpdateCapabilityCommandError = async (output, context) => {
1144
- const parsedOutput = {
1145
- ...output,
1146
- body: await parseErrorBody(output.body, context),
1147
- };
1148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1149
- switch (errorCode) {
1150
- case "AccessDeniedException":
1151
- case "com.amazonaws.b2bi#AccessDeniedException":
1152
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1153
- case "ConflictException":
1154
- case "com.amazonaws.b2bi#ConflictException":
1155
- throw await de_ConflictExceptionRes(parsedOutput, context);
1156
- case "InternalServerException":
1157
- case "com.amazonaws.b2bi#InternalServerException":
1158
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1159
- case "ResourceNotFoundException":
1160
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1161
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1162
- case "ServiceQuotaExceededException":
1163
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1164
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1165
- case "ThrottlingException":
1166
- case "com.amazonaws.b2bi#ThrottlingException":
1167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1168
- case "ValidationException":
1169
- case "com.amazonaws.b2bi#ValidationException":
1170
- throw await de_ValidationExceptionRes(parsedOutput, context);
1171
- default:
1172
- const parsedBody = parsedOutput.body;
1173
- return throwDefaultError({
1174
- output,
1175
- parsedBody,
1176
- errorCode,
1177
- });
1178
- }
1179
- };
1180
463
  export const de_UpdatePartnershipCommand = async (output, context) => {
1181
464
  if (output.statusCode >= 300) {
1182
- return de_UpdatePartnershipCommandError(output, context);
465
+ return de_CommandError(output, context);
1183
466
  }
1184
467
  const data = await parseBody(output.body, context);
1185
468
  let contents = {};
@@ -1190,46 +473,9 @@ export const de_UpdatePartnershipCommand = async (output, context) => {
1190
473
  };
1191
474
  return response;
1192
475
  };
1193
- const de_UpdatePartnershipCommandError = async (output, context) => {
1194
- const parsedOutput = {
1195
- ...output,
1196
- body: await parseErrorBody(output.body, context),
1197
- };
1198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1199
- switch (errorCode) {
1200
- case "AccessDeniedException":
1201
- case "com.amazonaws.b2bi#AccessDeniedException":
1202
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1203
- case "ConflictException":
1204
- case "com.amazonaws.b2bi#ConflictException":
1205
- throw await de_ConflictExceptionRes(parsedOutput, context);
1206
- case "InternalServerException":
1207
- case "com.amazonaws.b2bi#InternalServerException":
1208
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1209
- case "ResourceNotFoundException":
1210
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1211
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1212
- case "ServiceQuotaExceededException":
1213
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1214
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1215
- case "ThrottlingException":
1216
- case "com.amazonaws.b2bi#ThrottlingException":
1217
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1218
- case "ValidationException":
1219
- case "com.amazonaws.b2bi#ValidationException":
1220
- throw await de_ValidationExceptionRes(parsedOutput, context);
1221
- default:
1222
- const parsedBody = parsedOutput.body;
1223
- return throwDefaultError({
1224
- output,
1225
- parsedBody,
1226
- errorCode,
1227
- });
1228
- }
1229
- };
1230
476
  export const de_UpdateProfileCommand = async (output, context) => {
1231
477
  if (output.statusCode >= 300) {
1232
- return de_UpdateProfileCommandError(output, context);
478
+ return de_CommandError(output, context);
1233
479
  }
1234
480
  const data = await parseBody(output.body, context);
1235
481
  let contents = {};
@@ -1240,46 +486,9 @@ export const de_UpdateProfileCommand = async (output, context) => {
1240
486
  };
1241
487
  return response;
1242
488
  };
1243
- const de_UpdateProfileCommandError = async (output, context) => {
1244
- const parsedOutput = {
1245
- ...output,
1246
- body: await parseErrorBody(output.body, context),
1247
- };
1248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1249
- switch (errorCode) {
1250
- case "AccessDeniedException":
1251
- case "com.amazonaws.b2bi#AccessDeniedException":
1252
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1253
- case "ConflictException":
1254
- case "com.amazonaws.b2bi#ConflictException":
1255
- throw await de_ConflictExceptionRes(parsedOutput, context);
1256
- case "InternalServerException":
1257
- case "com.amazonaws.b2bi#InternalServerException":
1258
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1259
- case "ResourceNotFoundException":
1260
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1261
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1262
- case "ServiceQuotaExceededException":
1263
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1264
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1265
- case "ThrottlingException":
1266
- case "com.amazonaws.b2bi#ThrottlingException":
1267
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1268
- case "ValidationException":
1269
- case "com.amazonaws.b2bi#ValidationException":
1270
- throw await de_ValidationExceptionRes(parsedOutput, context);
1271
- default:
1272
- const parsedBody = parsedOutput.body;
1273
- return throwDefaultError({
1274
- output,
1275
- parsedBody,
1276
- errorCode,
1277
- });
1278
- }
1279
- };
1280
489
  export const de_UpdateTransformerCommand = async (output, context) => {
1281
490
  if (output.statusCode >= 300) {
1282
- return de_UpdateTransformerCommandError(output, context);
491
+ return de_CommandError(output, context);
1283
492
  }
1284
493
  const data = await parseBody(output.body, context);
1285
494
  let contents = {};
@@ -1290,7 +499,7 @@ export const de_UpdateTransformerCommand = async (output, context) => {
1290
499
  };
1291
500
  return response;
1292
501
  };
1293
- const de_UpdateTransformerCommandError = async (output, context) => {
502
+ const de_CommandError = async (output, context) => {
1294
503
  const parsedOutput = {
1295
504
  ...output,
1296
505
  body: await parseErrorBody(output.body, context),