@aws-sdk/client-application-discovery-service 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ export const se_UpdateApplicationCommand = async (input, context) => {
172
172
  };
173
173
  export const de_AssociateConfigurationItemsToApplicationCommand = async (output, context) => {
174
174
  if (output.statusCode >= 300) {
175
- return de_AssociateConfigurationItemsToApplicationCommandError(output, context);
175
+ return de_CommandError(output, context);
176
176
  }
177
177
  const data = await parseBody(output.body, context);
178
178
  let contents = {};
@@ -183,40 +183,9 @@ export const de_AssociateConfigurationItemsToApplicationCommand = async (output,
183
183
  };
184
184
  return response;
185
185
  };
186
- const de_AssociateConfigurationItemsToApplicationCommandError = async (output, context) => {
187
- const parsedOutput = {
188
- ...output,
189
- body: await parseErrorBody(output.body, context),
190
- };
191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
192
- switch (errorCode) {
193
- case "AuthorizationErrorException":
194
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
195
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
196
- case "HomeRegionNotSetException":
197
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
198
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
199
- case "InvalidParameterException":
200
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
201
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
202
- case "InvalidParameterValueException":
203
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
204
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
205
- case "ServerInternalErrorException":
206
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
207
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
208
- default:
209
- const parsedBody = parsedOutput.body;
210
- return throwDefaultError({
211
- output,
212
- parsedBody,
213
- errorCode,
214
- });
215
- }
216
- };
217
186
  export const de_BatchDeleteAgentsCommand = async (output, context) => {
218
187
  if (output.statusCode >= 300) {
219
- return de_BatchDeleteAgentsCommandError(output, context);
188
+ return de_CommandError(output, context);
220
189
  }
221
190
  const data = await parseBody(output.body, context);
222
191
  let contents = {};
@@ -227,37 +196,9 @@ export const de_BatchDeleteAgentsCommand = async (output, context) => {
227
196
  };
228
197
  return response;
229
198
  };
230
- const de_BatchDeleteAgentsCommandError = async (output, context) => {
231
- const parsedOutput = {
232
- ...output,
233
- body: await parseErrorBody(output.body, context),
234
- };
235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
236
- switch (errorCode) {
237
- case "AuthorizationErrorException":
238
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
239
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
240
- case "InvalidParameterException":
241
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
242
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
243
- case "InvalidParameterValueException":
244
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
245
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
246
- case "ServerInternalErrorException":
247
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
248
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
249
- default:
250
- const parsedBody = parsedOutput.body;
251
- return throwDefaultError({
252
- output,
253
- parsedBody,
254
- errorCode,
255
- });
256
- }
257
- };
258
199
  export const de_BatchDeleteImportDataCommand = async (output, context) => {
259
200
  if (output.statusCode >= 300) {
260
- return de_BatchDeleteImportDataCommandError(output, context);
201
+ return de_CommandError(output, context);
261
202
  }
262
203
  const data = await parseBody(output.body, context);
263
204
  let contents = {};
@@ -268,40 +209,9 @@ export const de_BatchDeleteImportDataCommand = async (output, context) => {
268
209
  };
269
210
  return response;
270
211
  };
271
- const de_BatchDeleteImportDataCommandError = async (output, context) => {
272
- const parsedOutput = {
273
- ...output,
274
- body: await parseErrorBody(output.body, context),
275
- };
276
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
277
- switch (errorCode) {
278
- case "AuthorizationErrorException":
279
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
280
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
281
- case "HomeRegionNotSetException":
282
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
283
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
284
- case "InvalidParameterException":
285
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
286
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
287
- case "InvalidParameterValueException":
288
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
289
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
290
- case "ServerInternalErrorException":
291
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
292
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
293
- default:
294
- const parsedBody = parsedOutput.body;
295
- return throwDefaultError({
296
- output,
297
- parsedBody,
298
- errorCode,
299
- });
300
- }
301
- };
302
212
  export const de_CreateApplicationCommand = async (output, context) => {
303
213
  if (output.statusCode >= 300) {
304
- return de_CreateApplicationCommandError(output, context);
214
+ return de_CommandError(output, context);
305
215
  }
306
216
  const data = await parseBody(output.body, context);
307
217
  let contents = {};
@@ -312,40 +222,9 @@ export const de_CreateApplicationCommand = async (output, context) => {
312
222
  };
313
223
  return response;
314
224
  };
315
- const de_CreateApplicationCommandError = async (output, context) => {
316
- const parsedOutput = {
317
- ...output,
318
- body: await parseErrorBody(output.body, context),
319
- };
320
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
321
- switch (errorCode) {
322
- case "AuthorizationErrorException":
323
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
324
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
325
- case "HomeRegionNotSetException":
326
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
327
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
328
- case "InvalidParameterException":
329
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
330
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
331
- case "InvalidParameterValueException":
332
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
333
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
334
- case "ServerInternalErrorException":
335
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
336
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
337
- default:
338
- const parsedBody = parsedOutput.body;
339
- return throwDefaultError({
340
- output,
341
- parsedBody,
342
- errorCode,
343
- });
344
- }
345
- };
346
225
  export const de_CreateTagsCommand = async (output, context) => {
347
226
  if (output.statusCode >= 300) {
348
- return de_CreateTagsCommandError(output, context);
227
+ return de_CommandError(output, context);
349
228
  }
350
229
  const data = await parseBody(output.body, context);
351
230
  let contents = {};
@@ -356,43 +235,9 @@ export const de_CreateTagsCommand = async (output, context) => {
356
235
  };
357
236
  return response;
358
237
  };
359
- const de_CreateTagsCommandError = async (output, context) => {
360
- const parsedOutput = {
361
- ...output,
362
- body: await parseErrorBody(output.body, context),
363
- };
364
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
365
- switch (errorCode) {
366
- case "AuthorizationErrorException":
367
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
368
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
369
- case "HomeRegionNotSetException":
370
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
371
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
372
- case "InvalidParameterException":
373
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
374
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
375
- case "InvalidParameterValueException":
376
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
377
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
378
- case "ResourceNotFoundException":
379
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
380
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
381
- case "ServerInternalErrorException":
382
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
383
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
384
- default:
385
- const parsedBody = parsedOutput.body;
386
- return throwDefaultError({
387
- output,
388
- parsedBody,
389
- errorCode,
390
- });
391
- }
392
- };
393
238
  export const de_DeleteApplicationsCommand = async (output, context) => {
394
239
  if (output.statusCode >= 300) {
395
- return de_DeleteApplicationsCommandError(output, context);
240
+ return de_CommandError(output, context);
396
241
  }
397
242
  const data = await parseBody(output.body, context);
398
243
  let contents = {};
@@ -403,40 +248,9 @@ export const de_DeleteApplicationsCommand = async (output, context) => {
403
248
  };
404
249
  return response;
405
250
  };
406
- const de_DeleteApplicationsCommandError = async (output, context) => {
407
- const parsedOutput = {
408
- ...output,
409
- body: await parseErrorBody(output.body, context),
410
- };
411
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
412
- switch (errorCode) {
413
- case "AuthorizationErrorException":
414
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
415
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
416
- case "HomeRegionNotSetException":
417
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
418
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
419
- case "InvalidParameterException":
420
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
421
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
422
- case "InvalidParameterValueException":
423
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
424
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
425
- case "ServerInternalErrorException":
426
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
427
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
428
- default:
429
- const parsedBody = parsedOutput.body;
430
- return throwDefaultError({
431
- output,
432
- parsedBody,
433
- errorCode,
434
- });
435
- }
436
- };
437
251
  export const de_DeleteTagsCommand = async (output, context) => {
438
252
  if (output.statusCode >= 300) {
439
- return de_DeleteTagsCommandError(output, context);
253
+ return de_CommandError(output, context);
440
254
  }
441
255
  const data = await parseBody(output.body, context);
442
256
  let contents = {};
@@ -447,43 +261,9 @@ export const de_DeleteTagsCommand = async (output, context) => {
447
261
  };
448
262
  return response;
449
263
  };
450
- const de_DeleteTagsCommandError = async (output, context) => {
451
- const parsedOutput = {
452
- ...output,
453
- body: await parseErrorBody(output.body, context),
454
- };
455
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
456
- switch (errorCode) {
457
- case "AuthorizationErrorException":
458
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
459
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
460
- case "HomeRegionNotSetException":
461
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
462
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
463
- case "InvalidParameterException":
464
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
465
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
466
- case "InvalidParameterValueException":
467
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
468
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
469
- case "ResourceNotFoundException":
470
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
471
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
472
- case "ServerInternalErrorException":
473
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
474
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
475
- default:
476
- const parsedBody = parsedOutput.body;
477
- return throwDefaultError({
478
- output,
479
- parsedBody,
480
- errorCode,
481
- });
482
- }
483
- };
484
264
  export const de_DescribeAgentsCommand = async (output, context) => {
485
265
  if (output.statusCode >= 300) {
486
- return de_DescribeAgentsCommandError(output, context);
266
+ return de_CommandError(output, context);
487
267
  }
488
268
  const data = await parseBody(output.body, context);
489
269
  let contents = {};
@@ -494,40 +274,9 @@ export const de_DescribeAgentsCommand = async (output, context) => {
494
274
  };
495
275
  return response;
496
276
  };
497
- const de_DescribeAgentsCommandError = async (output, context) => {
498
- const parsedOutput = {
499
- ...output,
500
- body: await parseErrorBody(output.body, context),
501
- };
502
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
503
- switch (errorCode) {
504
- case "AuthorizationErrorException":
505
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
506
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
507
- case "HomeRegionNotSetException":
508
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
509
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
510
- case "InvalidParameterException":
511
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
512
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
513
- case "InvalidParameterValueException":
514
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
515
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
516
- case "ServerInternalErrorException":
517
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
518
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
519
- default:
520
- const parsedBody = parsedOutput.body;
521
- return throwDefaultError({
522
- output,
523
- parsedBody,
524
- errorCode,
525
- });
526
- }
527
- };
528
277
  export const de_DescribeBatchDeleteConfigurationTaskCommand = async (output, context) => {
529
278
  if (output.statusCode >= 300) {
530
- return de_DescribeBatchDeleteConfigurationTaskCommandError(output, context);
279
+ return de_CommandError(output, context);
531
280
  }
532
281
  const data = await parseBody(output.body, context);
533
282
  let contents = {};
@@ -538,81 +287,22 @@ export const de_DescribeBatchDeleteConfigurationTaskCommand = async (output, con
538
287
  };
539
288
  return response;
540
289
  };
541
- const de_DescribeBatchDeleteConfigurationTaskCommandError = async (output, context) => {
542
- const parsedOutput = {
543
- ...output,
544
- body: await parseErrorBody(output.body, context),
545
- };
546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
- switch (errorCode) {
548
- case "AuthorizationErrorException":
549
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
550
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
551
- case "HomeRegionNotSetException":
552
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
553
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
554
- case "InvalidParameterValueException":
555
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
556
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
557
- case "ServerInternalErrorException":
558
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
559
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
560
- default:
561
- const parsedBody = parsedOutput.body;
562
- return throwDefaultError({
563
- output,
564
- parsedBody,
565
- errorCode,
566
- });
567
- }
568
- };
569
- export const de_DescribeConfigurationsCommand = async (output, context) => {
570
- if (output.statusCode >= 300) {
571
- return de_DescribeConfigurationsCommandError(output, context);
572
- }
573
- const data = await parseBody(output.body, context);
574
- let contents = {};
575
- contents = _json(data);
576
- const response = {
577
- $metadata: deserializeMetadata(output),
578
- ...contents,
290
+ export const de_DescribeConfigurationsCommand = async (output, context) => {
291
+ if (output.statusCode >= 300) {
292
+ return de_CommandError(output, context);
293
+ }
294
+ const data = await parseBody(output.body, context);
295
+ let contents = {};
296
+ contents = _json(data);
297
+ const response = {
298
+ $metadata: deserializeMetadata(output),
299
+ ...contents,
579
300
  };
580
301
  return response;
581
302
  };
582
- const de_DescribeConfigurationsCommandError = async (output, context) => {
583
- const parsedOutput = {
584
- ...output,
585
- body: await parseErrorBody(output.body, context),
586
- };
587
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
- switch (errorCode) {
589
- case "AuthorizationErrorException":
590
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
591
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
592
- case "HomeRegionNotSetException":
593
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
594
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
595
- case "InvalidParameterException":
596
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
597
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
598
- case "InvalidParameterValueException":
599
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
600
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
601
- case "ServerInternalErrorException":
602
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
603
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
604
- default:
605
- const parsedBody = parsedOutput.body;
606
- return throwDefaultError({
607
- output,
608
- parsedBody,
609
- errorCode,
610
- });
611
- }
612
- };
613
303
  export const de_DescribeContinuousExportsCommand = async (output, context) => {
614
304
  if (output.statusCode >= 300) {
615
- return de_DescribeContinuousExportsCommandError(output, context);
305
+ return de_CommandError(output, context);
616
306
  }
617
307
  const data = await parseBody(output.body, context);
618
308
  let contents = {};
@@ -623,46 +313,9 @@ export const de_DescribeContinuousExportsCommand = async (output, context) => {
623
313
  };
624
314
  return response;
625
315
  };
626
- const de_DescribeContinuousExportsCommandError = async (output, context) => {
627
- const parsedOutput = {
628
- ...output,
629
- body: await parseErrorBody(output.body, context),
630
- };
631
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
632
- switch (errorCode) {
633
- case "AuthorizationErrorException":
634
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
635
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
636
- case "HomeRegionNotSetException":
637
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
638
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
639
- case "InvalidParameterException":
640
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
641
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
642
- case "InvalidParameterValueException":
643
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
644
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
645
- case "OperationNotPermittedException":
646
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
647
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
648
- case "ResourceNotFoundException":
649
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
650
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
651
- case "ServerInternalErrorException":
652
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
653
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
654
- default:
655
- const parsedBody = parsedOutput.body;
656
- return throwDefaultError({
657
- output,
658
- parsedBody,
659
- errorCode,
660
- });
661
- }
662
- };
663
316
  export const de_DescribeExportConfigurationsCommand = async (output, context) => {
664
317
  if (output.statusCode >= 300) {
665
- return de_DescribeExportConfigurationsCommandError(output, context);
318
+ return de_CommandError(output, context);
666
319
  }
667
320
  const data = await parseBody(output.body, context);
668
321
  let contents = {};
@@ -673,43 +326,9 @@ export const de_DescribeExportConfigurationsCommand = async (output, context) =>
673
326
  };
674
327
  return response;
675
328
  };
676
- const de_DescribeExportConfigurationsCommandError = async (output, context) => {
677
- const parsedOutput = {
678
- ...output,
679
- body: await parseErrorBody(output.body, context),
680
- };
681
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
- switch (errorCode) {
683
- case "AuthorizationErrorException":
684
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
685
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
686
- case "HomeRegionNotSetException":
687
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
688
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
689
- case "InvalidParameterException":
690
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
691
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
692
- case "InvalidParameterValueException":
693
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
694
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
695
- case "ResourceNotFoundException":
696
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
697
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
698
- case "ServerInternalErrorException":
699
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
700
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
701
- default:
702
- const parsedBody = parsedOutput.body;
703
- return throwDefaultError({
704
- output,
705
- parsedBody,
706
- errorCode,
707
- });
708
- }
709
- };
710
329
  export const de_DescribeExportTasksCommand = async (output, context) => {
711
330
  if (output.statusCode >= 300) {
712
- return de_DescribeExportTasksCommandError(output, context);
331
+ return de_CommandError(output, context);
713
332
  }
714
333
  const data = await parseBody(output.body, context);
715
334
  let contents = {};
@@ -720,40 +339,9 @@ export const de_DescribeExportTasksCommand = async (output, context) => {
720
339
  };
721
340
  return response;
722
341
  };
723
- const de_DescribeExportTasksCommandError = async (output, context) => {
724
- const parsedOutput = {
725
- ...output,
726
- body: await parseErrorBody(output.body, context),
727
- };
728
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
729
- switch (errorCode) {
730
- case "AuthorizationErrorException":
731
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
732
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
733
- case "HomeRegionNotSetException":
734
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
735
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
736
- case "InvalidParameterException":
737
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
738
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
739
- case "InvalidParameterValueException":
740
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
741
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
742
- case "ServerInternalErrorException":
743
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
744
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
745
- default:
746
- const parsedBody = parsedOutput.body;
747
- return throwDefaultError({
748
- output,
749
- parsedBody,
750
- errorCode,
751
- });
752
- }
753
- };
754
342
  export const de_DescribeImportTasksCommand = async (output, context) => {
755
343
  if (output.statusCode >= 300) {
756
- return de_DescribeImportTasksCommandError(output, context);
344
+ return de_CommandError(output, context);
757
345
  }
758
346
  const data = await parseBody(output.body, context);
759
347
  let contents = {};
@@ -764,40 +352,9 @@ export const de_DescribeImportTasksCommand = async (output, context) => {
764
352
  };
765
353
  return response;
766
354
  };
767
- const de_DescribeImportTasksCommandError = async (output, context) => {
768
- const parsedOutput = {
769
- ...output,
770
- body: await parseErrorBody(output.body, context),
771
- };
772
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
773
- switch (errorCode) {
774
- case "AuthorizationErrorException":
775
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
776
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
777
- case "HomeRegionNotSetException":
778
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
779
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
780
- case "InvalidParameterException":
781
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
782
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
783
- case "InvalidParameterValueException":
784
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
785
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
786
- case "ServerInternalErrorException":
787
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
788
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
789
- default:
790
- const parsedBody = parsedOutput.body;
791
- return throwDefaultError({
792
- output,
793
- parsedBody,
794
- errorCode,
795
- });
796
- }
797
- };
798
355
  export const de_DescribeTagsCommand = async (output, context) => {
799
356
  if (output.statusCode >= 300) {
800
- return de_DescribeTagsCommandError(output, context);
357
+ return de_CommandError(output, context);
801
358
  }
802
359
  const data = await parseBody(output.body, context);
803
360
  let contents = {};
@@ -808,43 +365,9 @@ export const de_DescribeTagsCommand = async (output, context) => {
808
365
  };
809
366
  return response;
810
367
  };
811
- const de_DescribeTagsCommandError = async (output, context) => {
812
- const parsedOutput = {
813
- ...output,
814
- body: await parseErrorBody(output.body, context),
815
- };
816
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
- switch (errorCode) {
818
- case "AuthorizationErrorException":
819
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
820
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
821
- case "HomeRegionNotSetException":
822
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
823
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
824
- case "InvalidParameterException":
825
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
826
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
827
- case "InvalidParameterValueException":
828
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
829
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
830
- case "ResourceNotFoundException":
831
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
832
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
833
- case "ServerInternalErrorException":
834
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
835
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
836
- default:
837
- const parsedBody = parsedOutput.body;
838
- return throwDefaultError({
839
- output,
840
- parsedBody,
841
- errorCode,
842
- });
843
- }
844
- };
845
368
  export const de_DisassociateConfigurationItemsFromApplicationCommand = async (output, context) => {
846
369
  if (output.statusCode >= 300) {
847
- return de_DisassociateConfigurationItemsFromApplicationCommandError(output, context);
370
+ return de_CommandError(output, context);
848
371
  }
849
372
  const data = await parseBody(output.body, context);
850
373
  let contents = {};
@@ -855,40 +378,9 @@ export const de_DisassociateConfigurationItemsFromApplicationCommand = async (ou
855
378
  };
856
379
  return response;
857
380
  };
858
- const de_DisassociateConfigurationItemsFromApplicationCommandError = async (output, context) => {
859
- const parsedOutput = {
860
- ...output,
861
- body: await parseErrorBody(output.body, context),
862
- };
863
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
- switch (errorCode) {
865
- case "AuthorizationErrorException":
866
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
867
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
868
- case "HomeRegionNotSetException":
869
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
870
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
871
- case "InvalidParameterException":
872
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
873
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
874
- case "InvalidParameterValueException":
875
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
876
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
877
- case "ServerInternalErrorException":
878
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
879
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
880
- default:
881
- const parsedBody = parsedOutput.body;
882
- return throwDefaultError({
883
- output,
884
- parsedBody,
885
- errorCode,
886
- });
887
- }
888
- };
889
381
  export const de_ExportConfigurationsCommand = async (output, context) => {
890
382
  if (output.statusCode >= 300) {
891
- return de_ExportConfigurationsCommandError(output, context);
383
+ return de_CommandError(output, context);
892
384
  }
893
385
  const data = await parseBody(output.body, context);
894
386
  let contents = {};
@@ -899,43 +391,9 @@ export const de_ExportConfigurationsCommand = async (output, context) => {
899
391
  };
900
392
  return response;
901
393
  };
902
- const de_ExportConfigurationsCommandError = async (output, context) => {
903
- const parsedOutput = {
904
- ...output,
905
- body: await parseErrorBody(output.body, context),
906
- };
907
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
908
- switch (errorCode) {
909
- case "AuthorizationErrorException":
910
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
911
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
912
- case "HomeRegionNotSetException":
913
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
914
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
915
- case "InvalidParameterException":
916
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
917
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
918
- case "InvalidParameterValueException":
919
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
920
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
921
- case "OperationNotPermittedException":
922
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
923
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
924
- case "ServerInternalErrorException":
925
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
926
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
927
- default:
928
- const parsedBody = parsedOutput.body;
929
- return throwDefaultError({
930
- output,
931
- parsedBody,
932
- errorCode,
933
- });
934
- }
935
- };
936
394
  export const de_GetDiscoverySummaryCommand = async (output, context) => {
937
395
  if (output.statusCode >= 300) {
938
- return de_GetDiscoverySummaryCommandError(output, context);
396
+ return de_CommandError(output, context);
939
397
  }
940
398
  const data = await parseBody(output.body, context);
941
399
  let contents = {};
@@ -946,40 +404,9 @@ export const de_GetDiscoverySummaryCommand = async (output, context) => {
946
404
  };
947
405
  return response;
948
406
  };
949
- const de_GetDiscoverySummaryCommandError = async (output, context) => {
950
- const parsedOutput = {
951
- ...output,
952
- body: await parseErrorBody(output.body, context),
953
- };
954
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
955
- switch (errorCode) {
956
- case "AuthorizationErrorException":
957
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
958
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
959
- case "HomeRegionNotSetException":
960
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
961
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
962
- case "InvalidParameterException":
963
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
964
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
965
- case "InvalidParameterValueException":
966
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
967
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
968
- case "ServerInternalErrorException":
969
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
970
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
971
- default:
972
- const parsedBody = parsedOutput.body;
973
- return throwDefaultError({
974
- output,
975
- parsedBody,
976
- errorCode,
977
- });
978
- }
979
- };
980
407
  export const de_ListConfigurationsCommand = async (output, context) => {
981
408
  if (output.statusCode >= 300) {
982
- return de_ListConfigurationsCommandError(output, context);
409
+ return de_CommandError(output, context);
983
410
  }
984
411
  const data = await parseBody(output.body, context);
985
412
  let contents = {};
@@ -990,87 +417,22 @@ export const de_ListConfigurationsCommand = async (output, context) => {
990
417
  };
991
418
  return response;
992
419
  };
993
- const de_ListConfigurationsCommandError = async (output, context) => {
994
- const parsedOutput = {
995
- ...output,
996
- body: await parseErrorBody(output.body, context),
997
- };
998
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
999
- switch (errorCode) {
1000
- case "AuthorizationErrorException":
1001
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1002
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1003
- case "HomeRegionNotSetException":
1004
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1005
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1006
- case "InvalidParameterException":
1007
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1008
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1009
- case "InvalidParameterValueException":
1010
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1011
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1012
- case "ResourceNotFoundException":
1013
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1014
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1015
- case "ServerInternalErrorException":
1016
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1017
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1018
- default:
1019
- const parsedBody = parsedOutput.body;
1020
- return throwDefaultError({
1021
- output,
1022
- parsedBody,
1023
- errorCode,
1024
- });
1025
- }
1026
- };
1027
420
  export const de_ListServerNeighborsCommand = async (output, context) => {
1028
421
  if (output.statusCode >= 300) {
1029
- return de_ListServerNeighborsCommandError(output, context);
422
+ return de_CommandError(output, context);
1030
423
  }
1031
424
  const data = await parseBody(output.body, context);
1032
425
  let contents = {};
1033
426
  contents = _json(data);
1034
427
  const response = {
1035
- $metadata: deserializeMetadata(output),
1036
- ...contents,
1037
- };
1038
- return response;
1039
- };
1040
- const de_ListServerNeighborsCommandError = async (output, context) => {
1041
- const parsedOutput = {
1042
- ...output,
1043
- body: await parseErrorBody(output.body, context),
1044
- };
1045
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1046
- switch (errorCode) {
1047
- case "AuthorizationErrorException":
1048
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1049
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1050
- case "HomeRegionNotSetException":
1051
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1052
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1053
- case "InvalidParameterException":
1054
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1055
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1056
- case "InvalidParameterValueException":
1057
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1058
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1059
- case "ServerInternalErrorException":
1060
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1061
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1062
- default:
1063
- const parsedBody = parsedOutput.body;
1064
- return throwDefaultError({
1065
- output,
1066
- parsedBody,
1067
- errorCode,
1068
- });
1069
- }
428
+ $metadata: deserializeMetadata(output),
429
+ ...contents,
430
+ };
431
+ return response;
1070
432
  };
1071
433
  export const de_StartBatchDeleteConfigurationTaskCommand = async (output, context) => {
1072
434
  if (output.statusCode >= 300) {
1073
- return de_StartBatchDeleteConfigurationTaskCommandError(output, context);
435
+ return de_CommandError(output, context);
1074
436
  }
1075
437
  const data = await parseBody(output.body, context);
1076
438
  let contents = {};
@@ -1081,43 +443,9 @@ export const de_StartBatchDeleteConfigurationTaskCommand = async (output, contex
1081
443
  };
1082
444
  return response;
1083
445
  };
1084
- const de_StartBatchDeleteConfigurationTaskCommandError = async (output, context) => {
1085
- const parsedOutput = {
1086
- ...output,
1087
- body: await parseErrorBody(output.body, context),
1088
- };
1089
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1090
- switch (errorCode) {
1091
- case "AuthorizationErrorException":
1092
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1093
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1094
- case "HomeRegionNotSetException":
1095
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1096
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1097
- case "InvalidParameterValueException":
1098
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1099
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1100
- case "LimitExceededException":
1101
- case "com.amazonaws.applicationdiscoveryservice#LimitExceededException":
1102
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1103
- case "OperationNotPermittedException":
1104
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1105
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1106
- case "ServerInternalErrorException":
1107
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1108
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1109
- default:
1110
- const parsedBody = parsedOutput.body;
1111
- return throwDefaultError({
1112
- output,
1113
- parsedBody,
1114
- errorCode,
1115
- });
1116
- }
1117
- };
1118
446
  export const de_StartContinuousExportCommand = async (output, context) => {
1119
447
  if (output.statusCode >= 300) {
1120
- return de_StartContinuousExportCommandError(output, context);
448
+ return de_CommandError(output, context);
1121
449
  }
1122
450
  const data = await parseBody(output.body, context);
1123
451
  let contents = {};
@@ -1128,49 +456,9 @@ export const de_StartContinuousExportCommand = async (output, context) => {
1128
456
  };
1129
457
  return response;
1130
458
  };
1131
- const de_StartContinuousExportCommandError = async (output, context) => {
1132
- const parsedOutput = {
1133
- ...output,
1134
- body: await parseErrorBody(output.body, context),
1135
- };
1136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
- switch (errorCode) {
1138
- case "AuthorizationErrorException":
1139
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1140
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1141
- case "ConflictErrorException":
1142
- case "com.amazonaws.applicationdiscoveryservice#ConflictErrorException":
1143
- throw await de_ConflictErrorExceptionRes(parsedOutput, context);
1144
- case "HomeRegionNotSetException":
1145
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1146
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1147
- case "InvalidParameterException":
1148
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1149
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1150
- case "InvalidParameterValueException":
1151
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1152
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1153
- case "OperationNotPermittedException":
1154
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1155
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1156
- case "ResourceInUseException":
1157
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1158
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1159
- case "ServerInternalErrorException":
1160
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1161
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1162
- default:
1163
- const parsedBody = parsedOutput.body;
1164
- return throwDefaultError({
1165
- output,
1166
- parsedBody,
1167
- errorCode,
1168
- });
1169
- }
1170
- };
1171
459
  export const de_StartDataCollectionByAgentIdsCommand = async (output, context) => {
1172
460
  if (output.statusCode >= 300) {
1173
- return de_StartDataCollectionByAgentIdsCommandError(output, context);
461
+ return de_CommandError(output, context);
1174
462
  }
1175
463
  const data = await parseBody(output.body, context);
1176
464
  let contents = {};
@@ -1181,40 +469,9 @@ export const de_StartDataCollectionByAgentIdsCommand = async (output, context) =
1181
469
  };
1182
470
  return response;
1183
471
  };
1184
- const de_StartDataCollectionByAgentIdsCommandError = async (output, context) => {
1185
- const parsedOutput = {
1186
- ...output,
1187
- body: await parseErrorBody(output.body, context),
1188
- };
1189
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1190
- switch (errorCode) {
1191
- case "AuthorizationErrorException":
1192
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1193
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1194
- case "HomeRegionNotSetException":
1195
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1196
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1197
- case "InvalidParameterException":
1198
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1199
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1200
- case "InvalidParameterValueException":
1201
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1202
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1203
- case "ServerInternalErrorException":
1204
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1205
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1206
- default:
1207
- const parsedBody = parsedOutput.body;
1208
- return throwDefaultError({
1209
- output,
1210
- parsedBody,
1211
- errorCode,
1212
- });
1213
- }
1214
- };
1215
472
  export const de_StartExportTaskCommand = async (output, context) => {
1216
473
  if (output.statusCode >= 300) {
1217
- return de_StartExportTaskCommandError(output, context);
474
+ return de_CommandError(output, context);
1218
475
  }
1219
476
  const data = await parseBody(output.body, context);
1220
477
  let contents = {};
@@ -1225,43 +482,9 @@ export const de_StartExportTaskCommand = async (output, context) => {
1225
482
  };
1226
483
  return response;
1227
484
  };
1228
- const de_StartExportTaskCommandError = async (output, context) => {
1229
- const parsedOutput = {
1230
- ...output,
1231
- body: await parseErrorBody(output.body, context),
1232
- };
1233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1234
- switch (errorCode) {
1235
- case "AuthorizationErrorException":
1236
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1237
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1238
- case "HomeRegionNotSetException":
1239
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1240
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1241
- case "InvalidParameterException":
1242
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1243
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1244
- case "InvalidParameterValueException":
1245
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1246
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1247
- case "OperationNotPermittedException":
1248
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1249
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1250
- case "ServerInternalErrorException":
1251
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1252
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1253
- default:
1254
- const parsedBody = parsedOutput.body;
1255
- return throwDefaultError({
1256
- output,
1257
- parsedBody,
1258
- errorCode,
1259
- });
1260
- }
1261
- };
1262
485
  export const de_StartImportTaskCommand = async (output, context) => {
1263
486
  if (output.statusCode >= 300) {
1264
- return de_StartImportTaskCommandError(output, context);
487
+ return de_CommandError(output, context);
1265
488
  }
1266
489
  const data = await parseBody(output.body, context);
1267
490
  let contents = {};
@@ -1272,43 +495,9 @@ export const de_StartImportTaskCommand = async (output, context) => {
1272
495
  };
1273
496
  return response;
1274
497
  };
1275
- const de_StartImportTaskCommandError = async (output, context) => {
1276
- const parsedOutput = {
1277
- ...output,
1278
- body: await parseErrorBody(output.body, context),
1279
- };
1280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1281
- switch (errorCode) {
1282
- case "AuthorizationErrorException":
1283
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1284
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1285
- case "HomeRegionNotSetException":
1286
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1287
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1288
- case "InvalidParameterException":
1289
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1290
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1291
- case "InvalidParameterValueException":
1292
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1293
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1294
- case "ResourceInUseException":
1295
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1296
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1297
- case "ServerInternalErrorException":
1298
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1299
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1300
- default:
1301
- const parsedBody = parsedOutput.body;
1302
- return throwDefaultError({
1303
- output,
1304
- parsedBody,
1305
- errorCode,
1306
- });
1307
- }
1308
- };
1309
498
  export const de_StopContinuousExportCommand = async (output, context) => {
1310
499
  if (output.statusCode >= 300) {
1311
- return de_StopContinuousExportCommandError(output, context);
500
+ return de_CommandError(output, context);
1312
501
  }
1313
502
  const data = await parseBody(output.body, context);
1314
503
  let contents = {};
@@ -1319,49 +508,9 @@ export const de_StopContinuousExportCommand = async (output, context) => {
1319
508
  };
1320
509
  return response;
1321
510
  };
1322
- const de_StopContinuousExportCommandError = async (output, context) => {
1323
- const parsedOutput = {
1324
- ...output,
1325
- body: await parseErrorBody(output.body, context),
1326
- };
1327
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1328
- switch (errorCode) {
1329
- case "AuthorizationErrorException":
1330
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1331
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1332
- case "HomeRegionNotSetException":
1333
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1334
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1335
- case "InvalidParameterException":
1336
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1337
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1338
- case "InvalidParameterValueException":
1339
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1340
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1341
- case "OperationNotPermittedException":
1342
- case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
1343
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1344
- case "ResourceInUseException":
1345
- case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
1346
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1347
- case "ResourceNotFoundException":
1348
- case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
1349
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1350
- case "ServerInternalErrorException":
1351
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1352
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1353
- default:
1354
- const parsedBody = parsedOutput.body;
1355
- return throwDefaultError({
1356
- output,
1357
- parsedBody,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
511
  export const de_StopDataCollectionByAgentIdsCommand = async (output, context) => {
1363
512
  if (output.statusCode >= 300) {
1364
- return de_StopDataCollectionByAgentIdsCommandError(output, context);
513
+ return de_CommandError(output, context);
1365
514
  }
1366
515
  const data = await parseBody(output.body, context);
1367
516
  let contents = {};
@@ -1372,40 +521,9 @@ export const de_StopDataCollectionByAgentIdsCommand = async (output, context) =>
1372
521
  };
1373
522
  return response;
1374
523
  };
1375
- const de_StopDataCollectionByAgentIdsCommandError = async (output, context) => {
1376
- const parsedOutput = {
1377
- ...output,
1378
- body: await parseErrorBody(output.body, context),
1379
- };
1380
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1381
- switch (errorCode) {
1382
- case "AuthorizationErrorException":
1383
- case "com.amazonaws.applicationdiscoveryservice#AuthorizationErrorException":
1384
- throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
1385
- case "HomeRegionNotSetException":
1386
- case "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException":
1387
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
1388
- case "InvalidParameterException":
1389
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterException":
1390
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1391
- case "InvalidParameterValueException":
1392
- case "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException":
1393
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1394
- case "ServerInternalErrorException":
1395
- case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1396
- throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
1397
- default:
1398
- const parsedBody = parsedOutput.body;
1399
- return throwDefaultError({
1400
- output,
1401
- parsedBody,
1402
- errorCode,
1403
- });
1404
- }
1405
- };
1406
524
  export const de_UpdateApplicationCommand = async (output, context) => {
1407
525
  if (output.statusCode >= 300) {
1408
- return de_UpdateApplicationCommandError(output, context);
526
+ return de_CommandError(output, context);
1409
527
  }
1410
528
  const data = await parseBody(output.body, context);
1411
529
  let contents = {};
@@ -1416,7 +534,7 @@ export const de_UpdateApplicationCommand = async (output, context) => {
1416
534
  };
1417
535
  return response;
1418
536
  };
1419
- const de_UpdateApplicationCommandError = async (output, context) => {
537
+ const de_CommandError = async (output, context) => {
1420
538
  const parsedOutput = {
1421
539
  ...output,
1422
540
  body: await parseErrorBody(output.body, context),
@@ -1438,6 +556,21 @@ const de_UpdateApplicationCommandError = async (output, context) => {
1438
556
  case "ServerInternalErrorException":
1439
557
  case "com.amazonaws.applicationdiscoveryservice#ServerInternalErrorException":
1440
558
  throw await de_ServerInternalErrorExceptionRes(parsedOutput, context);
559
+ case "ResourceNotFoundException":
560
+ case "com.amazonaws.applicationdiscoveryservice#ResourceNotFoundException":
561
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
562
+ case "OperationNotPermittedException":
563
+ case "com.amazonaws.applicationdiscoveryservice#OperationNotPermittedException":
564
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
565
+ case "LimitExceededException":
566
+ case "com.amazonaws.applicationdiscoveryservice#LimitExceededException":
567
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
568
+ case "ConflictErrorException":
569
+ case "com.amazonaws.applicationdiscoveryservice#ConflictErrorException":
570
+ throw await de_ConflictErrorExceptionRes(parsedOutput, context);
571
+ case "ResourceInUseException":
572
+ case "com.amazonaws.applicationdiscoveryservice#ResourceInUseException":
573
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1441
574
  default:
1442
575
  const parsedBody = parsedOutput.body;
1443
576
  return throwDefaultError({