@aws-sdk/client-verifiedpermissions 3.504.0 → 3.509.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.
@@ -156,7 +156,7 @@ export const se_UpdatePolicyTemplateCommand = async (input, context) => {
156
156
  };
157
157
  export const de_BatchIsAuthorizedCommand = async (output, context) => {
158
158
  if (output.statusCode >= 300) {
159
- return de_BatchIsAuthorizedCommandError(output, context);
159
+ return de_CommandError(output, context);
160
160
  }
161
161
  const data = await parseBody(output.body, context);
162
162
  let contents = {};
@@ -167,40 +167,9 @@ export const de_BatchIsAuthorizedCommand = async (output, context) => {
167
167
  };
168
168
  return response;
169
169
  };
170
- const de_BatchIsAuthorizedCommandError = async (output, context) => {
171
- const parsedOutput = {
172
- ...output,
173
- body: await parseErrorBody(output.body, context),
174
- };
175
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
176
- switch (errorCode) {
177
- case "AccessDeniedException":
178
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
179
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
180
- case "InternalServerException":
181
- case "com.amazonaws.verifiedpermissions#InternalServerException":
182
- throw await de_InternalServerExceptionRes(parsedOutput, context);
183
- case "ResourceNotFoundException":
184
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
185
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
186
- case "ThrottlingException":
187
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
188
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
189
- case "ValidationException":
190
- case "com.amazonaws.verifiedpermissions#ValidationException":
191
- throw await de_ValidationExceptionRes(parsedOutput, context);
192
- default:
193
- const parsedBody = parsedOutput.body;
194
- return throwDefaultError({
195
- output,
196
- parsedBody,
197
- errorCode,
198
- });
199
- }
200
- };
201
170
  export const de_CreateIdentitySourceCommand = async (output, context) => {
202
171
  if (output.statusCode >= 300) {
203
- return de_CreateIdentitySourceCommandError(output, context);
172
+ return de_CommandError(output, context);
204
173
  }
205
174
  const data = await parseBody(output.body, context);
206
175
  let contents = {};
@@ -211,46 +180,9 @@ export const de_CreateIdentitySourceCommand = async (output, context) => {
211
180
  };
212
181
  return response;
213
182
  };
214
- const de_CreateIdentitySourceCommandError = async (output, context) => {
215
- const parsedOutput = {
216
- ...output,
217
- body: await parseErrorBody(output.body, context),
218
- };
219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
220
- switch (errorCode) {
221
- case "AccessDeniedException":
222
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
223
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
224
- case "ConflictException":
225
- case "com.amazonaws.verifiedpermissions#ConflictException":
226
- throw await de_ConflictExceptionRes(parsedOutput, context);
227
- case "InternalServerException":
228
- case "com.amazonaws.verifiedpermissions#InternalServerException":
229
- throw await de_InternalServerExceptionRes(parsedOutput, context);
230
- case "ResourceNotFoundException":
231
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
232
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
233
- case "ServiceQuotaExceededException":
234
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
235
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
236
- case "ThrottlingException":
237
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
238
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
239
- case "ValidationException":
240
- case "com.amazonaws.verifiedpermissions#ValidationException":
241
- throw await de_ValidationExceptionRes(parsedOutput, context);
242
- default:
243
- const parsedBody = parsedOutput.body;
244
- return throwDefaultError({
245
- output,
246
- parsedBody,
247
- errorCode,
248
- });
249
- }
250
- };
251
183
  export const de_CreatePolicyCommand = async (output, context) => {
252
184
  if (output.statusCode >= 300) {
253
- return de_CreatePolicyCommandError(output, context);
185
+ return de_CommandError(output, context);
254
186
  }
255
187
  const data = await parseBody(output.body, context);
256
188
  let contents = {};
@@ -261,46 +193,9 @@ export const de_CreatePolicyCommand = async (output, context) => {
261
193
  };
262
194
  return response;
263
195
  };
264
- const de_CreatePolicyCommandError = async (output, context) => {
265
- const parsedOutput = {
266
- ...output,
267
- body: await parseErrorBody(output.body, context),
268
- };
269
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
270
- switch (errorCode) {
271
- case "AccessDeniedException":
272
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
273
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
274
- case "ConflictException":
275
- case "com.amazonaws.verifiedpermissions#ConflictException":
276
- throw await de_ConflictExceptionRes(parsedOutput, context);
277
- case "InternalServerException":
278
- case "com.amazonaws.verifiedpermissions#InternalServerException":
279
- throw await de_InternalServerExceptionRes(parsedOutput, context);
280
- case "ResourceNotFoundException":
281
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
282
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
283
- case "ServiceQuotaExceededException":
284
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
285
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
286
- case "ThrottlingException":
287
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
288
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
289
- case "ValidationException":
290
- case "com.amazonaws.verifiedpermissions#ValidationException":
291
- throw await de_ValidationExceptionRes(parsedOutput, context);
292
- default:
293
- const parsedBody = parsedOutput.body;
294
- return throwDefaultError({
295
- output,
296
- parsedBody,
297
- errorCode,
298
- });
299
- }
300
- };
301
196
  export const de_CreatePolicyStoreCommand = async (output, context) => {
302
197
  if (output.statusCode >= 300) {
303
- return de_CreatePolicyStoreCommandError(output, context);
198
+ return de_CommandError(output, context);
304
199
  }
305
200
  const data = await parseBody(output.body, context);
306
201
  let contents = {};
@@ -311,43 +206,9 @@ export const de_CreatePolicyStoreCommand = async (output, context) => {
311
206
  };
312
207
  return response;
313
208
  };
314
- const de_CreatePolicyStoreCommandError = 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 "AccessDeniedException":
322
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
323
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
324
- case "ConflictException":
325
- case "com.amazonaws.verifiedpermissions#ConflictException":
326
- throw await de_ConflictExceptionRes(parsedOutput, context);
327
- case "InternalServerException":
328
- case "com.amazonaws.verifiedpermissions#InternalServerException":
329
- throw await de_InternalServerExceptionRes(parsedOutput, context);
330
- case "ServiceQuotaExceededException":
331
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
332
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
333
- case "ThrottlingException":
334
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
335
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
336
- case "ValidationException":
337
- case "com.amazonaws.verifiedpermissions#ValidationException":
338
- throw await de_ValidationExceptionRes(parsedOutput, context);
339
- default:
340
- const parsedBody = parsedOutput.body;
341
- return throwDefaultError({
342
- output,
343
- parsedBody,
344
- errorCode,
345
- });
346
- }
347
- };
348
209
  export const de_CreatePolicyTemplateCommand = async (output, context) => {
349
210
  if (output.statusCode >= 300) {
350
- return de_CreatePolicyTemplateCommandError(output, context);
211
+ return de_CommandError(output, context);
351
212
  }
352
213
  const data = await parseBody(output.body, context);
353
214
  let contents = {};
@@ -358,46 +219,9 @@ export const de_CreatePolicyTemplateCommand = async (output, context) => {
358
219
  };
359
220
  return response;
360
221
  };
361
- const de_CreatePolicyTemplateCommandError = async (output, context) => {
362
- const parsedOutput = {
363
- ...output,
364
- body: await parseErrorBody(output.body, context),
365
- };
366
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
367
- switch (errorCode) {
368
- case "AccessDeniedException":
369
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
370
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
371
- case "ConflictException":
372
- case "com.amazonaws.verifiedpermissions#ConflictException":
373
- throw await de_ConflictExceptionRes(parsedOutput, context);
374
- case "InternalServerException":
375
- case "com.amazonaws.verifiedpermissions#InternalServerException":
376
- throw await de_InternalServerExceptionRes(parsedOutput, context);
377
- case "ResourceNotFoundException":
378
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
379
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
380
- case "ServiceQuotaExceededException":
381
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
382
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
383
- case "ThrottlingException":
384
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
385
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
386
- case "ValidationException":
387
- case "com.amazonaws.verifiedpermissions#ValidationException":
388
- throw await de_ValidationExceptionRes(parsedOutput, context);
389
- default:
390
- const parsedBody = parsedOutput.body;
391
- return throwDefaultError({
392
- output,
393
- parsedBody,
394
- errorCode,
395
- });
396
- }
397
- };
398
222
  export const de_DeleteIdentitySourceCommand = async (output, context) => {
399
223
  if (output.statusCode >= 300) {
400
- return de_DeleteIdentitySourceCommandError(output, context);
224
+ return de_CommandError(output, context);
401
225
  }
402
226
  const data = await parseBody(output.body, context);
403
227
  let contents = {};
@@ -408,43 +232,9 @@ export const de_DeleteIdentitySourceCommand = async (output, context) => {
408
232
  };
409
233
  return response;
410
234
  };
411
- const de_DeleteIdentitySourceCommandError = async (output, context) => {
412
- const parsedOutput = {
413
- ...output,
414
- body: await parseErrorBody(output.body, context),
415
- };
416
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
417
- switch (errorCode) {
418
- case "AccessDeniedException":
419
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
420
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
421
- case "ConflictException":
422
- case "com.amazonaws.verifiedpermissions#ConflictException":
423
- throw await de_ConflictExceptionRes(parsedOutput, context);
424
- case "InternalServerException":
425
- case "com.amazonaws.verifiedpermissions#InternalServerException":
426
- throw await de_InternalServerExceptionRes(parsedOutput, context);
427
- case "ResourceNotFoundException":
428
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
429
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
430
- case "ThrottlingException":
431
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
432
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
433
- case "ValidationException":
434
- case "com.amazonaws.verifiedpermissions#ValidationException":
435
- throw await de_ValidationExceptionRes(parsedOutput, context);
436
- default:
437
- const parsedBody = parsedOutput.body;
438
- return throwDefaultError({
439
- output,
440
- parsedBody,
441
- errorCode,
442
- });
443
- }
444
- };
445
235
  export const de_DeletePolicyCommand = async (output, context) => {
446
236
  if (output.statusCode >= 300) {
447
- return de_DeletePolicyCommandError(output, context);
237
+ return de_CommandError(output, context);
448
238
  }
449
239
  const data = await parseBody(output.body, context);
450
240
  let contents = {};
@@ -455,43 +245,9 @@ export const de_DeletePolicyCommand = async (output, context) => {
455
245
  };
456
246
  return response;
457
247
  };
458
- const de_DeletePolicyCommandError = async (output, context) => {
459
- const parsedOutput = {
460
- ...output,
461
- body: await parseErrorBody(output.body, context),
462
- };
463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
464
- switch (errorCode) {
465
- case "AccessDeniedException":
466
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
467
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
468
- case "ConflictException":
469
- case "com.amazonaws.verifiedpermissions#ConflictException":
470
- throw await de_ConflictExceptionRes(parsedOutput, context);
471
- case "InternalServerException":
472
- case "com.amazonaws.verifiedpermissions#InternalServerException":
473
- throw await de_InternalServerExceptionRes(parsedOutput, context);
474
- case "ResourceNotFoundException":
475
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
476
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
477
- case "ThrottlingException":
478
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
479
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
480
- case "ValidationException":
481
- case "com.amazonaws.verifiedpermissions#ValidationException":
482
- throw await de_ValidationExceptionRes(parsedOutput, context);
483
- default:
484
- const parsedBody = parsedOutput.body;
485
- return throwDefaultError({
486
- output,
487
- parsedBody,
488
- errorCode,
489
- });
490
- }
491
- };
492
248
  export const de_DeletePolicyStoreCommand = async (output, context) => {
493
249
  if (output.statusCode >= 300) {
494
- return de_DeletePolicyStoreCommandError(output, context);
250
+ return de_CommandError(output, context);
495
251
  }
496
252
  const data = await parseBody(output.body, context);
497
253
  let contents = {};
@@ -502,84 +258,22 @@ export const de_DeletePolicyStoreCommand = async (output, context) => {
502
258
  };
503
259
  return response;
504
260
  };
505
- const de_DeletePolicyStoreCommandError = async (output, context) => {
506
- const parsedOutput = {
507
- ...output,
508
- body: await parseErrorBody(output.body, context),
509
- };
510
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
511
- switch (errorCode) {
512
- case "AccessDeniedException":
513
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
514
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
515
- case "InternalServerException":
516
- case "com.amazonaws.verifiedpermissions#InternalServerException":
517
- throw await de_InternalServerExceptionRes(parsedOutput, context);
518
- case "ThrottlingException":
519
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
520
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
521
- case "ValidationException":
522
- case "com.amazonaws.verifiedpermissions#ValidationException":
523
- throw await de_ValidationExceptionRes(parsedOutput, context);
524
- default:
525
- const parsedBody = parsedOutput.body;
526
- return throwDefaultError({
527
- output,
528
- parsedBody,
529
- errorCode,
530
- });
531
- }
532
- };
533
- export const de_DeletePolicyTemplateCommand = async (output, context) => {
534
- if (output.statusCode >= 300) {
535
- return de_DeletePolicyTemplateCommandError(output, context);
536
- }
537
- const data = await parseBody(output.body, context);
538
- let contents = {};
539
- contents = _json(data);
540
- const response = {
541
- $metadata: deserializeMetadata(output),
542
- ...contents,
261
+ export const de_DeletePolicyTemplateCommand = async (output, context) => {
262
+ if (output.statusCode >= 300) {
263
+ return de_CommandError(output, context);
264
+ }
265
+ const data = await parseBody(output.body, context);
266
+ let contents = {};
267
+ contents = _json(data);
268
+ const response = {
269
+ $metadata: deserializeMetadata(output),
270
+ ...contents,
543
271
  };
544
272
  return response;
545
273
  };
546
- const de_DeletePolicyTemplateCommandError = async (output, context) => {
547
- const parsedOutput = {
548
- ...output,
549
- body: await parseErrorBody(output.body, context),
550
- };
551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
552
- switch (errorCode) {
553
- case "AccessDeniedException":
554
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
555
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
556
- case "ConflictException":
557
- case "com.amazonaws.verifiedpermissions#ConflictException":
558
- throw await de_ConflictExceptionRes(parsedOutput, context);
559
- case "InternalServerException":
560
- case "com.amazonaws.verifiedpermissions#InternalServerException":
561
- throw await de_InternalServerExceptionRes(parsedOutput, context);
562
- case "ResourceNotFoundException":
563
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
564
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
565
- case "ThrottlingException":
566
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
567
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
568
- case "ValidationException":
569
- case "com.amazonaws.verifiedpermissions#ValidationException":
570
- throw await de_ValidationExceptionRes(parsedOutput, context);
571
- default:
572
- const parsedBody = parsedOutput.body;
573
- return throwDefaultError({
574
- output,
575
- parsedBody,
576
- errorCode,
577
- });
578
- }
579
- };
580
274
  export const de_GetIdentitySourceCommand = async (output, context) => {
581
275
  if (output.statusCode >= 300) {
582
- return de_GetIdentitySourceCommandError(output, context);
276
+ return de_CommandError(output, context);
583
277
  }
584
278
  const data = await parseBody(output.body, context);
585
279
  let contents = {};
@@ -590,40 +284,9 @@ export const de_GetIdentitySourceCommand = async (output, context) => {
590
284
  };
591
285
  return response;
592
286
  };
593
- const de_GetIdentitySourceCommandError = async (output, context) => {
594
- const parsedOutput = {
595
- ...output,
596
- body: await parseErrorBody(output.body, context),
597
- };
598
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
599
- switch (errorCode) {
600
- case "AccessDeniedException":
601
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
602
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
603
- case "InternalServerException":
604
- case "com.amazonaws.verifiedpermissions#InternalServerException":
605
- throw await de_InternalServerExceptionRes(parsedOutput, context);
606
- case "ResourceNotFoundException":
607
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
608
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
609
- case "ThrottlingException":
610
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
611
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
612
- case "ValidationException":
613
- case "com.amazonaws.verifiedpermissions#ValidationException":
614
- throw await de_ValidationExceptionRes(parsedOutput, context);
615
- default:
616
- const parsedBody = parsedOutput.body;
617
- return throwDefaultError({
618
- output,
619
- parsedBody,
620
- errorCode,
621
- });
622
- }
623
- };
624
287
  export const de_GetPolicyCommand = async (output, context) => {
625
288
  if (output.statusCode >= 300) {
626
- return de_GetPolicyCommandError(output, context);
289
+ return de_CommandError(output, context);
627
290
  }
628
291
  const data = await parseBody(output.body, context);
629
292
  let contents = {};
@@ -634,40 +297,9 @@ export const de_GetPolicyCommand = async (output, context) => {
634
297
  };
635
298
  return response;
636
299
  };
637
- const de_GetPolicyCommandError = async (output, context) => {
638
- const parsedOutput = {
639
- ...output,
640
- body: await parseErrorBody(output.body, context),
641
- };
642
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
643
- switch (errorCode) {
644
- case "AccessDeniedException":
645
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
646
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
647
- case "InternalServerException":
648
- case "com.amazonaws.verifiedpermissions#InternalServerException":
649
- throw await de_InternalServerExceptionRes(parsedOutput, context);
650
- case "ResourceNotFoundException":
651
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
652
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
653
- case "ThrottlingException":
654
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
655
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
656
- case "ValidationException":
657
- case "com.amazonaws.verifiedpermissions#ValidationException":
658
- throw await de_ValidationExceptionRes(parsedOutput, context);
659
- default:
660
- const parsedBody = parsedOutput.body;
661
- return throwDefaultError({
662
- output,
663
- parsedBody,
664
- errorCode,
665
- });
666
- }
667
- };
668
300
  export const de_GetPolicyStoreCommand = async (output, context) => {
669
301
  if (output.statusCode >= 300) {
670
- return de_GetPolicyStoreCommandError(output, context);
302
+ return de_CommandError(output, context);
671
303
  }
672
304
  const data = await parseBody(output.body, context);
673
305
  let contents = {};
@@ -678,40 +310,9 @@ export const de_GetPolicyStoreCommand = async (output, context) => {
678
310
  };
679
311
  return response;
680
312
  };
681
- const de_GetPolicyStoreCommandError = async (output, context) => {
682
- const parsedOutput = {
683
- ...output,
684
- body: await parseErrorBody(output.body, context),
685
- };
686
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
687
- switch (errorCode) {
688
- case "AccessDeniedException":
689
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
690
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
691
- case "InternalServerException":
692
- case "com.amazonaws.verifiedpermissions#InternalServerException":
693
- throw await de_InternalServerExceptionRes(parsedOutput, context);
694
- case "ResourceNotFoundException":
695
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
696
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
697
- case "ThrottlingException":
698
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
699
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
700
- case "ValidationException":
701
- case "com.amazonaws.verifiedpermissions#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
313
  export const de_GetPolicyTemplateCommand = async (output, context) => {
713
314
  if (output.statusCode >= 300) {
714
- return de_GetPolicyTemplateCommandError(output, context);
315
+ return de_CommandError(output, context);
715
316
  }
716
317
  const data = await parseBody(output.body, context);
717
318
  let contents = {};
@@ -722,40 +323,9 @@ export const de_GetPolicyTemplateCommand = async (output, context) => {
722
323
  };
723
324
  return response;
724
325
  };
725
- const de_GetPolicyTemplateCommandError = 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 "AccessDeniedException":
733
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
734
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
735
- case "InternalServerException":
736
- case "com.amazonaws.verifiedpermissions#InternalServerException":
737
- throw await de_InternalServerExceptionRes(parsedOutput, context);
738
- case "ResourceNotFoundException":
739
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
740
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
741
- case "ThrottlingException":
742
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
743
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
744
- case "ValidationException":
745
- case "com.amazonaws.verifiedpermissions#ValidationException":
746
- throw await de_ValidationExceptionRes(parsedOutput, context);
747
- default:
748
- const parsedBody = parsedOutput.body;
749
- return throwDefaultError({
750
- output,
751
- parsedBody,
752
- errorCode,
753
- });
754
- }
755
- };
756
326
  export const de_GetSchemaCommand = async (output, context) => {
757
327
  if (output.statusCode >= 300) {
758
- return de_GetSchemaCommandError(output, context);
328
+ return de_CommandError(output, context);
759
329
  }
760
330
  const data = await parseBody(output.body, context);
761
331
  let contents = {};
@@ -766,40 +336,9 @@ export const de_GetSchemaCommand = async (output, context) => {
766
336
  };
767
337
  return response;
768
338
  };
769
- const de_GetSchemaCommandError = 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 "AccessDeniedException":
777
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
778
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
779
- case "InternalServerException":
780
- case "com.amazonaws.verifiedpermissions#InternalServerException":
781
- throw await de_InternalServerExceptionRes(parsedOutput, context);
782
- case "ResourceNotFoundException":
783
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
784
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
785
- case "ThrottlingException":
786
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
787
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
788
- case "ValidationException":
789
- case "com.amazonaws.verifiedpermissions#ValidationException":
790
- throw await de_ValidationExceptionRes(parsedOutput, context);
791
- default:
792
- const parsedBody = parsedOutput.body;
793
- return throwDefaultError({
794
- output,
795
- parsedBody,
796
- errorCode,
797
- });
798
- }
799
- };
800
339
  export const de_IsAuthorizedCommand = async (output, context) => {
801
340
  if (output.statusCode >= 300) {
802
- return de_IsAuthorizedCommandError(output, context);
341
+ return de_CommandError(output, context);
803
342
  }
804
343
  const data = await parseBody(output.body, context);
805
344
  let contents = {};
@@ -810,172 +349,48 @@ export const de_IsAuthorizedCommand = async (output, context) => {
810
349
  };
811
350
  return response;
812
351
  };
813
- const de_IsAuthorizedCommandError = async (output, context) => {
814
- const parsedOutput = {
815
- ...output,
816
- body: await parseErrorBody(output.body, context),
817
- };
818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
- switch (errorCode) {
820
- case "AccessDeniedException":
821
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
822
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
823
- case "InternalServerException":
824
- case "com.amazonaws.verifiedpermissions#InternalServerException":
825
- throw await de_InternalServerExceptionRes(parsedOutput, context);
826
- case "ResourceNotFoundException":
827
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
828
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
829
- case "ThrottlingException":
830
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
831
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
832
- case "ValidationException":
833
- case "com.amazonaws.verifiedpermissions#ValidationException":
834
- throw await de_ValidationExceptionRes(parsedOutput, context);
835
- default:
836
- const parsedBody = parsedOutput.body;
837
- return throwDefaultError({
838
- output,
839
- parsedBody,
840
- errorCode,
841
- });
842
- }
843
- };
844
- export const de_IsAuthorizedWithTokenCommand = async (output, context) => {
845
- if (output.statusCode >= 300) {
846
- return de_IsAuthorizedWithTokenCommandError(output, context);
847
- }
848
- const data = await parseBody(output.body, context);
849
- let contents = {};
850
- contents = _json(data);
851
- const response = {
852
- $metadata: deserializeMetadata(output),
853
- ...contents,
854
- };
855
- return response;
856
- };
857
- const de_IsAuthorizedWithTokenCommandError = async (output, context) => {
858
- const parsedOutput = {
859
- ...output,
860
- body: await parseErrorBody(output.body, context),
861
- };
862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
863
- switch (errorCode) {
864
- case "AccessDeniedException":
865
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
866
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
867
- case "InternalServerException":
868
- case "com.amazonaws.verifiedpermissions#InternalServerException":
869
- throw await de_InternalServerExceptionRes(parsedOutput, context);
870
- case "ResourceNotFoundException":
871
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
872
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
873
- case "ThrottlingException":
874
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
875
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
876
- case "ValidationException":
877
- case "com.amazonaws.verifiedpermissions#ValidationException":
878
- throw await de_ValidationExceptionRes(parsedOutput, context);
879
- default:
880
- const parsedBody = parsedOutput.body;
881
- return throwDefaultError({
882
- output,
883
- parsedBody,
884
- errorCode,
885
- });
886
- }
887
- };
888
- export const de_ListIdentitySourcesCommand = async (output, context) => {
889
- if (output.statusCode >= 300) {
890
- return de_ListIdentitySourcesCommandError(output, context);
891
- }
892
- const data = await parseBody(output.body, context);
893
- let contents = {};
894
- contents = de_ListIdentitySourcesOutput(data, context);
895
- const response = {
896
- $metadata: deserializeMetadata(output),
897
- ...contents,
898
- };
899
- return response;
900
- };
901
- const de_ListIdentitySourcesCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "InternalServerException":
912
- case "com.amazonaws.verifiedpermissions#InternalServerException":
913
- throw await de_InternalServerExceptionRes(parsedOutput, context);
914
- case "ResourceNotFoundException":
915
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
917
- case "ThrottlingException":
918
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
920
- case "ValidationException":
921
- case "com.amazonaws.verifiedpermissions#ValidationException":
922
- throw await de_ValidationExceptionRes(parsedOutput, context);
923
- default:
924
- const parsedBody = parsedOutput.body;
925
- return throwDefaultError({
926
- output,
927
- parsedBody,
928
- errorCode,
929
- });
930
- }
931
- };
932
- export const de_ListPoliciesCommand = async (output, context) => {
352
+ export const de_IsAuthorizedWithTokenCommand = async (output, context) => {
933
353
  if (output.statusCode >= 300) {
934
- return de_ListPoliciesCommandError(output, context);
354
+ return de_CommandError(output, context);
935
355
  }
936
356
  const data = await parseBody(output.body, context);
937
357
  let contents = {};
938
- contents = de_ListPoliciesOutput(data, context);
358
+ contents = _json(data);
939
359
  const response = {
940
360
  $metadata: deserializeMetadata(output),
941
361
  ...contents,
942
362
  };
943
363
  return response;
944
364
  };
945
- const de_ListPoliciesCommandError = async (output, context) => {
946
- const parsedOutput = {
947
- ...output,
948
- body: await parseErrorBody(output.body, context),
365
+ export const de_ListIdentitySourcesCommand = async (output, context) => {
366
+ if (output.statusCode >= 300) {
367
+ return de_CommandError(output, context);
368
+ }
369
+ const data = await parseBody(output.body, context);
370
+ let contents = {};
371
+ contents = de_ListIdentitySourcesOutput(data, context);
372
+ const response = {
373
+ $metadata: deserializeMetadata(output),
374
+ ...contents,
949
375
  };
950
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
- switch (errorCode) {
952
- case "AccessDeniedException":
953
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
954
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
955
- case "InternalServerException":
956
- case "com.amazonaws.verifiedpermissions#InternalServerException":
957
- throw await de_InternalServerExceptionRes(parsedOutput, context);
958
- case "ResourceNotFoundException":
959
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
960
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
961
- case "ThrottlingException":
962
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
963
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
964
- case "ValidationException":
965
- case "com.amazonaws.verifiedpermissions#ValidationException":
966
- throw await de_ValidationExceptionRes(parsedOutput, context);
967
- default:
968
- const parsedBody = parsedOutput.body;
969
- return throwDefaultError({
970
- output,
971
- parsedBody,
972
- errorCode,
973
- });
376
+ return response;
377
+ };
378
+ export const de_ListPoliciesCommand = async (output, context) => {
379
+ if (output.statusCode >= 300) {
380
+ return de_CommandError(output, context);
974
381
  }
382
+ const data = await parseBody(output.body, context);
383
+ let contents = {};
384
+ contents = de_ListPoliciesOutput(data, context);
385
+ const response = {
386
+ $metadata: deserializeMetadata(output),
387
+ ...contents,
388
+ };
389
+ return response;
975
390
  };
976
391
  export const de_ListPolicyStoresCommand = async (output, context) => {
977
392
  if (output.statusCode >= 300) {
978
- return de_ListPolicyStoresCommandError(output, context);
393
+ return de_CommandError(output, context);
979
394
  }
980
395
  const data = await parseBody(output.body, context);
981
396
  let contents = {};
@@ -986,37 +401,9 @@ export const de_ListPolicyStoresCommand = async (output, context) => {
986
401
  };
987
402
  return response;
988
403
  };
989
- const de_ListPolicyStoresCommandError = async (output, context) => {
990
- const parsedOutput = {
991
- ...output,
992
- body: await parseErrorBody(output.body, context),
993
- };
994
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
995
- switch (errorCode) {
996
- case "AccessDeniedException":
997
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
998
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
999
- case "InternalServerException":
1000
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1001
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1002
- case "ThrottlingException":
1003
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1004
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1005
- case "ValidationException":
1006
- case "com.amazonaws.verifiedpermissions#ValidationException":
1007
- throw await de_ValidationExceptionRes(parsedOutput, context);
1008
- default:
1009
- const parsedBody = parsedOutput.body;
1010
- return throwDefaultError({
1011
- output,
1012
- parsedBody,
1013
- errorCode,
1014
- });
1015
- }
1016
- };
1017
404
  export const de_ListPolicyTemplatesCommand = async (output, context) => {
1018
405
  if (output.statusCode >= 300) {
1019
- return de_ListPolicyTemplatesCommandError(output, context);
406
+ return de_CommandError(output, context);
1020
407
  }
1021
408
  const data = await parseBody(output.body, context);
1022
409
  let contents = {};
@@ -1027,40 +414,9 @@ export const de_ListPolicyTemplatesCommand = async (output, context) => {
1027
414
  };
1028
415
  return response;
1029
416
  };
1030
- const de_ListPolicyTemplatesCommandError = async (output, context) => {
1031
- const parsedOutput = {
1032
- ...output,
1033
- body: await parseErrorBody(output.body, context),
1034
- };
1035
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1036
- switch (errorCode) {
1037
- case "AccessDeniedException":
1038
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1039
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1040
- case "InternalServerException":
1041
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1042
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1043
- case "ResourceNotFoundException":
1044
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
1045
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1046
- case "ThrottlingException":
1047
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1048
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1049
- case "ValidationException":
1050
- case "com.amazonaws.verifiedpermissions#ValidationException":
1051
- throw await de_ValidationExceptionRes(parsedOutput, context);
1052
- default:
1053
- const parsedBody = parsedOutput.body;
1054
- return throwDefaultError({
1055
- output,
1056
- parsedBody,
1057
- errorCode,
1058
- });
1059
- }
1060
- };
1061
417
  export const de_PutSchemaCommand = async (output, context) => {
1062
418
  if (output.statusCode >= 300) {
1063
- return de_PutSchemaCommandError(output, context);
419
+ return de_CommandError(output, context);
1064
420
  }
1065
421
  const data = await parseBody(output.body, context);
1066
422
  let contents = {};
@@ -1071,46 +427,9 @@ export const de_PutSchemaCommand = async (output, context) => {
1071
427
  };
1072
428
  return response;
1073
429
  };
1074
- const de_PutSchemaCommandError = async (output, context) => {
1075
- const parsedOutput = {
1076
- ...output,
1077
- body: await parseErrorBody(output.body, context),
1078
- };
1079
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
- switch (errorCode) {
1081
- case "AccessDeniedException":
1082
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1083
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1084
- case "ConflictException":
1085
- case "com.amazonaws.verifiedpermissions#ConflictException":
1086
- throw await de_ConflictExceptionRes(parsedOutput, context);
1087
- case "InternalServerException":
1088
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1089
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1090
- case "ResourceNotFoundException":
1091
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
1092
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1093
- case "ServiceQuotaExceededException":
1094
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
1095
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1096
- case "ThrottlingException":
1097
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1098
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1099
- case "ValidationException":
1100
- case "com.amazonaws.verifiedpermissions#ValidationException":
1101
- throw await de_ValidationExceptionRes(parsedOutput, context);
1102
- default:
1103
- const parsedBody = parsedOutput.body;
1104
- return throwDefaultError({
1105
- output,
1106
- parsedBody,
1107
- errorCode,
1108
- });
1109
- }
1110
- };
1111
430
  export const de_UpdateIdentitySourceCommand = async (output, context) => {
1112
431
  if (output.statusCode >= 300) {
1113
- return de_UpdateIdentitySourceCommandError(output, context);
432
+ return de_CommandError(output, context);
1114
433
  }
1115
434
  const data = await parseBody(output.body, context);
1116
435
  let contents = {};
@@ -1121,43 +440,9 @@ export const de_UpdateIdentitySourceCommand = async (output, context) => {
1121
440
  };
1122
441
  return response;
1123
442
  };
1124
- const de_UpdateIdentitySourceCommandError = async (output, context) => {
1125
- const parsedOutput = {
1126
- ...output,
1127
- body: await parseErrorBody(output.body, context),
1128
- };
1129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1130
- switch (errorCode) {
1131
- case "AccessDeniedException":
1132
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1133
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1134
- case "ConflictException":
1135
- case "com.amazonaws.verifiedpermissions#ConflictException":
1136
- throw await de_ConflictExceptionRes(parsedOutput, context);
1137
- case "InternalServerException":
1138
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1139
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1140
- case "ResourceNotFoundException":
1141
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
1142
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1143
- case "ThrottlingException":
1144
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1145
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1146
- case "ValidationException":
1147
- case "com.amazonaws.verifiedpermissions#ValidationException":
1148
- throw await de_ValidationExceptionRes(parsedOutput, context);
1149
- default:
1150
- const parsedBody = parsedOutput.body;
1151
- return throwDefaultError({
1152
- output,
1153
- parsedBody,
1154
- errorCode,
1155
- });
1156
- }
1157
- };
1158
443
  export const de_UpdatePolicyCommand = async (output, context) => {
1159
444
  if (output.statusCode >= 300) {
1160
- return de_UpdatePolicyCommandError(output, context);
445
+ return de_CommandError(output, context);
1161
446
  }
1162
447
  const data = await parseBody(output.body, context);
1163
448
  let contents = {};
@@ -1168,46 +453,9 @@ export const de_UpdatePolicyCommand = async (output, context) => {
1168
453
  };
1169
454
  return response;
1170
455
  };
1171
- const de_UpdatePolicyCommandError = async (output, context) => {
1172
- const parsedOutput = {
1173
- ...output,
1174
- body: await parseErrorBody(output.body, context),
1175
- };
1176
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1177
- switch (errorCode) {
1178
- case "AccessDeniedException":
1179
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1180
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1181
- case "ConflictException":
1182
- case "com.amazonaws.verifiedpermissions#ConflictException":
1183
- throw await de_ConflictExceptionRes(parsedOutput, context);
1184
- case "InternalServerException":
1185
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1186
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1187
- case "ResourceNotFoundException":
1188
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
1189
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1190
- case "ServiceQuotaExceededException":
1191
- case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
1192
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1193
- case "ThrottlingException":
1194
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1195
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1196
- case "ValidationException":
1197
- case "com.amazonaws.verifiedpermissions#ValidationException":
1198
- throw await de_ValidationExceptionRes(parsedOutput, context);
1199
- default:
1200
- const parsedBody = parsedOutput.body;
1201
- return throwDefaultError({
1202
- output,
1203
- parsedBody,
1204
- errorCode,
1205
- });
1206
- }
1207
- };
1208
456
  export const de_UpdatePolicyStoreCommand = async (output, context) => {
1209
457
  if (output.statusCode >= 300) {
1210
- return de_UpdatePolicyStoreCommandError(output, context);
458
+ return de_CommandError(output, context);
1211
459
  }
1212
460
  const data = await parseBody(output.body, context);
1213
461
  let contents = {};
@@ -1218,43 +466,9 @@ export const de_UpdatePolicyStoreCommand = async (output, context) => {
1218
466
  };
1219
467
  return response;
1220
468
  };
1221
- const de_UpdatePolicyStoreCommandError = async (output, context) => {
1222
- const parsedOutput = {
1223
- ...output,
1224
- body: await parseErrorBody(output.body, context),
1225
- };
1226
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1227
- switch (errorCode) {
1228
- case "AccessDeniedException":
1229
- case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1230
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1231
- case "ConflictException":
1232
- case "com.amazonaws.verifiedpermissions#ConflictException":
1233
- throw await de_ConflictExceptionRes(parsedOutput, context);
1234
- case "InternalServerException":
1235
- case "com.amazonaws.verifiedpermissions#InternalServerException":
1236
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1237
- case "ResourceNotFoundException":
1238
- case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
1239
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1240
- case "ThrottlingException":
1241
- case "com.amazonaws.verifiedpermissions#ThrottlingException":
1242
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1243
- case "ValidationException":
1244
- case "com.amazonaws.verifiedpermissions#ValidationException":
1245
- throw await de_ValidationExceptionRes(parsedOutput, context);
1246
- default:
1247
- const parsedBody = parsedOutput.body;
1248
- return throwDefaultError({
1249
- output,
1250
- parsedBody,
1251
- errorCode,
1252
- });
1253
- }
1254
- };
1255
469
  export const de_UpdatePolicyTemplateCommand = async (output, context) => {
1256
470
  if (output.statusCode >= 300) {
1257
- return de_UpdatePolicyTemplateCommandError(output, context);
471
+ return de_CommandError(output, context);
1258
472
  }
1259
473
  const data = await parseBody(output.body, context);
1260
474
  let contents = {};
@@ -1265,7 +479,7 @@ export const de_UpdatePolicyTemplateCommand = async (output, context) => {
1265
479
  };
1266
480
  return response;
1267
481
  };
1268
- const de_UpdatePolicyTemplateCommandError = async (output, context) => {
482
+ const de_CommandError = async (output, context) => {
1269
483
  const parsedOutput = {
1270
484
  ...output,
1271
485
  body: await parseErrorBody(output.body, context),
@@ -1275,9 +489,6 @@ const de_UpdatePolicyTemplateCommandError = async (output, context) => {
1275
489
  case "AccessDeniedException":
1276
490
  case "com.amazonaws.verifiedpermissions#AccessDeniedException":
1277
491
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1278
- case "ConflictException":
1279
- case "com.amazonaws.verifiedpermissions#ConflictException":
1280
- throw await de_ConflictExceptionRes(parsedOutput, context);
1281
492
  case "InternalServerException":
1282
493
  case "com.amazonaws.verifiedpermissions#InternalServerException":
1283
494
  throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -1290,6 +501,12 @@ const de_UpdatePolicyTemplateCommandError = async (output, context) => {
1290
501
  case "ValidationException":
1291
502
  case "com.amazonaws.verifiedpermissions#ValidationException":
1292
503
  throw await de_ValidationExceptionRes(parsedOutput, context);
504
+ case "ConflictException":
505
+ case "com.amazonaws.verifiedpermissions#ConflictException":
506
+ throw await de_ConflictExceptionRes(parsedOutput, context);
507
+ case "ServiceQuotaExceededException":
508
+ case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
509
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1293
510
  default:
1294
511
  const parsedBody = parsedOutput.body;
1295
512
  return throwDefaultError({