@aws-sdk/client-migration-hub 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.
@@ -106,7 +106,7 @@ export const se_PutResourceAttributesCommand = async (input, context) => {
106
106
  };
107
107
  export const de_AssociateCreatedArtifactCommand = async (output, context) => {
108
108
  if (output.statusCode >= 300) {
109
- return de_AssociateCreatedArtifactCommandError(output, context);
109
+ return de_CommandError(output, context);
110
110
  }
111
111
  const data = await parseBody(output.body, context);
112
112
  let contents = {};
@@ -117,52 +117,9 @@ export const de_AssociateCreatedArtifactCommand = async (output, context) => {
117
117
  };
118
118
  return response;
119
119
  };
120
- const de_AssociateCreatedArtifactCommandError = async (output, context) => {
121
- const parsedOutput = {
122
- ...output,
123
- body: await parseErrorBody(output.body, context),
124
- };
125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
126
- switch (errorCode) {
127
- case "AccessDeniedException":
128
- case "com.amazonaws.migrationhub#AccessDeniedException":
129
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
130
- case "DryRunOperation":
131
- case "com.amazonaws.migrationhub#DryRunOperation":
132
- throw await de_DryRunOperationRes(parsedOutput, context);
133
- case "HomeRegionNotSetException":
134
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
135
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
136
- case "InternalServerError":
137
- case "com.amazonaws.migrationhub#InternalServerError":
138
- throw await de_InternalServerErrorRes(parsedOutput, context);
139
- case "InvalidInputException":
140
- case "com.amazonaws.migrationhub#InvalidInputException":
141
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
142
- case "ResourceNotFoundException":
143
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
144
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
145
- case "ServiceUnavailableException":
146
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
147
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
148
- case "ThrottlingException":
149
- case "com.amazonaws.migrationhub#ThrottlingException":
150
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
151
- case "UnauthorizedOperation":
152
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
153
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
154
- default:
155
- const parsedBody = parsedOutput.body;
156
- return throwDefaultError({
157
- output,
158
- parsedBody,
159
- errorCode,
160
- });
161
- }
162
- };
163
120
  export const de_AssociateDiscoveredResourceCommand = async (output, context) => {
164
121
  if (output.statusCode >= 300) {
165
- return de_AssociateDiscoveredResourceCommandError(output, context);
122
+ return de_CommandError(output, context);
166
123
  }
167
124
  const data = await parseBody(output.body, context);
168
125
  let contents = {};
@@ -173,55 +130,9 @@ export const de_AssociateDiscoveredResourceCommand = async (output, context) =>
173
130
  };
174
131
  return response;
175
132
  };
176
- const de_AssociateDiscoveredResourceCommandError = async (output, context) => {
177
- const parsedOutput = {
178
- ...output,
179
- body: await parseErrorBody(output.body, context),
180
- };
181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
182
- switch (errorCode) {
183
- case "AccessDeniedException":
184
- case "com.amazonaws.migrationhub#AccessDeniedException":
185
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
186
- case "DryRunOperation":
187
- case "com.amazonaws.migrationhub#DryRunOperation":
188
- throw await de_DryRunOperationRes(parsedOutput, context);
189
- case "HomeRegionNotSetException":
190
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
191
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
192
- case "InternalServerError":
193
- case "com.amazonaws.migrationhub#InternalServerError":
194
- throw await de_InternalServerErrorRes(parsedOutput, context);
195
- case "InvalidInputException":
196
- case "com.amazonaws.migrationhub#InvalidInputException":
197
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
198
- case "PolicyErrorException":
199
- case "com.amazonaws.migrationhub#PolicyErrorException":
200
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
201
- case "ResourceNotFoundException":
202
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
203
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
204
- case "ServiceUnavailableException":
205
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
206
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
207
- case "ThrottlingException":
208
- case "com.amazonaws.migrationhub#ThrottlingException":
209
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
210
- case "UnauthorizedOperation":
211
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
212
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
213
- default:
214
- const parsedBody = parsedOutput.body;
215
- return throwDefaultError({
216
- output,
217
- parsedBody,
218
- errorCode,
219
- });
220
- }
221
- };
222
133
  export const de_CreateProgressUpdateStreamCommand = async (output, context) => {
223
134
  if (output.statusCode >= 300) {
224
- return de_CreateProgressUpdateStreamCommandError(output, context);
135
+ return de_CommandError(output, context);
225
136
  }
226
137
  const data = await parseBody(output.body, context);
227
138
  let contents = {};
@@ -232,49 +143,9 @@ export const de_CreateProgressUpdateStreamCommand = async (output, context) => {
232
143
  };
233
144
  return response;
234
145
  };
235
- const de_CreateProgressUpdateStreamCommandError = async (output, context) => {
236
- const parsedOutput = {
237
- ...output,
238
- body: await parseErrorBody(output.body, context),
239
- };
240
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
241
- switch (errorCode) {
242
- case "AccessDeniedException":
243
- case "com.amazonaws.migrationhub#AccessDeniedException":
244
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
245
- case "DryRunOperation":
246
- case "com.amazonaws.migrationhub#DryRunOperation":
247
- throw await de_DryRunOperationRes(parsedOutput, context);
248
- case "HomeRegionNotSetException":
249
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
250
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
251
- case "InternalServerError":
252
- case "com.amazonaws.migrationhub#InternalServerError":
253
- throw await de_InternalServerErrorRes(parsedOutput, context);
254
- case "InvalidInputException":
255
- case "com.amazonaws.migrationhub#InvalidInputException":
256
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
257
- case "ServiceUnavailableException":
258
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
259
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
260
- case "ThrottlingException":
261
- case "com.amazonaws.migrationhub#ThrottlingException":
262
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
263
- case "UnauthorizedOperation":
264
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
265
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
266
- default:
267
- const parsedBody = parsedOutput.body;
268
- return throwDefaultError({
269
- output,
270
- parsedBody,
271
- errorCode,
272
- });
273
- }
274
- };
275
146
  export const de_DeleteProgressUpdateStreamCommand = async (output, context) => {
276
147
  if (output.statusCode >= 300) {
277
- return de_DeleteProgressUpdateStreamCommandError(output, context);
148
+ return de_CommandError(output, context);
278
149
  }
279
150
  const data = await parseBody(output.body, context);
280
151
  let contents = {};
@@ -285,52 +156,9 @@ export const de_DeleteProgressUpdateStreamCommand = async (output, context) => {
285
156
  };
286
157
  return response;
287
158
  };
288
- const de_DeleteProgressUpdateStreamCommandError = async (output, context) => {
289
- const parsedOutput = {
290
- ...output,
291
- body: await parseErrorBody(output.body, context),
292
- };
293
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
294
- switch (errorCode) {
295
- case "AccessDeniedException":
296
- case "com.amazonaws.migrationhub#AccessDeniedException":
297
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
298
- case "DryRunOperation":
299
- case "com.amazonaws.migrationhub#DryRunOperation":
300
- throw await de_DryRunOperationRes(parsedOutput, context);
301
- case "HomeRegionNotSetException":
302
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
303
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
304
- case "InternalServerError":
305
- case "com.amazonaws.migrationhub#InternalServerError":
306
- throw await de_InternalServerErrorRes(parsedOutput, context);
307
- case "InvalidInputException":
308
- case "com.amazonaws.migrationhub#InvalidInputException":
309
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
310
- case "ResourceNotFoundException":
311
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
312
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
313
- case "ServiceUnavailableException":
314
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
315
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
316
- case "ThrottlingException":
317
- case "com.amazonaws.migrationhub#ThrottlingException":
318
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
319
- case "UnauthorizedOperation":
320
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
321
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
322
- default:
323
- const parsedBody = parsedOutput.body;
324
- return throwDefaultError({
325
- output,
326
- parsedBody,
327
- errorCode,
328
- });
329
- }
330
- };
331
159
  export const de_DescribeApplicationStateCommand = async (output, context) => {
332
160
  if (output.statusCode >= 300) {
333
- return de_DescribeApplicationStateCommandError(output, context);
161
+ return de_CommandError(output, context);
334
162
  }
335
163
  const data = await parseBody(output.body, context);
336
164
  let contents = {};
@@ -341,49 +169,9 @@ export const de_DescribeApplicationStateCommand = async (output, context) => {
341
169
  };
342
170
  return response;
343
171
  };
344
- const de_DescribeApplicationStateCommandError = async (output, context) => {
345
- const parsedOutput = {
346
- ...output,
347
- body: await parseErrorBody(output.body, context),
348
- };
349
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
350
- switch (errorCode) {
351
- case "AccessDeniedException":
352
- case "com.amazonaws.migrationhub#AccessDeniedException":
353
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
354
- case "HomeRegionNotSetException":
355
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
356
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
357
- case "InternalServerError":
358
- case "com.amazonaws.migrationhub#InternalServerError":
359
- throw await de_InternalServerErrorRes(parsedOutput, context);
360
- case "InvalidInputException":
361
- case "com.amazonaws.migrationhub#InvalidInputException":
362
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
363
- case "PolicyErrorException":
364
- case "com.amazonaws.migrationhub#PolicyErrorException":
365
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
366
- case "ResourceNotFoundException":
367
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
368
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
369
- case "ServiceUnavailableException":
370
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
371
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
372
- case "ThrottlingException":
373
- case "com.amazonaws.migrationhub#ThrottlingException":
374
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
375
- default:
376
- const parsedBody = parsedOutput.body;
377
- return throwDefaultError({
378
- output,
379
- parsedBody,
380
- errorCode,
381
- });
382
- }
383
- };
384
172
  export const de_DescribeMigrationTaskCommand = async (output, context) => {
385
173
  if (output.statusCode >= 300) {
386
- return de_DescribeMigrationTaskCommandError(output, context);
174
+ return de_CommandError(output, context);
387
175
  }
388
176
  const data = await parseBody(output.body, context);
389
177
  let contents = {};
@@ -394,46 +182,9 @@ export const de_DescribeMigrationTaskCommand = async (output, context) => {
394
182
  };
395
183
  return response;
396
184
  };
397
- const de_DescribeMigrationTaskCommandError = async (output, context) => {
398
- const parsedOutput = {
399
- ...output,
400
- body: await parseErrorBody(output.body, context),
401
- };
402
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
403
- switch (errorCode) {
404
- case "AccessDeniedException":
405
- case "com.amazonaws.migrationhub#AccessDeniedException":
406
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
407
- case "HomeRegionNotSetException":
408
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
409
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
410
- case "InternalServerError":
411
- case "com.amazonaws.migrationhub#InternalServerError":
412
- throw await de_InternalServerErrorRes(parsedOutput, context);
413
- case "InvalidInputException":
414
- case "com.amazonaws.migrationhub#InvalidInputException":
415
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
416
- case "ResourceNotFoundException":
417
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
418
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
419
- case "ServiceUnavailableException":
420
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
421
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
422
- case "ThrottlingException":
423
- case "com.amazonaws.migrationhub#ThrottlingException":
424
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
425
- default:
426
- const parsedBody = parsedOutput.body;
427
- return throwDefaultError({
428
- output,
429
- parsedBody,
430
- errorCode,
431
- });
432
- }
433
- };
434
185
  export const de_DisassociateCreatedArtifactCommand = async (output, context) => {
435
186
  if (output.statusCode >= 300) {
436
- return de_DisassociateCreatedArtifactCommandError(output, context);
187
+ return de_CommandError(output, context);
437
188
  }
438
189
  const data = await parseBody(output.body, context);
439
190
  let contents = {};
@@ -444,108 +195,9 @@ export const de_DisassociateCreatedArtifactCommand = async (output, context) =>
444
195
  };
445
196
  return response;
446
197
  };
447
- const de_DisassociateCreatedArtifactCommandError = async (output, context) => {
448
- const parsedOutput = {
449
- ...output,
450
- body: await parseErrorBody(output.body, context),
451
- };
452
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
453
- switch (errorCode) {
454
- case "AccessDeniedException":
455
- case "com.amazonaws.migrationhub#AccessDeniedException":
456
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
457
- case "DryRunOperation":
458
- case "com.amazonaws.migrationhub#DryRunOperation":
459
- throw await de_DryRunOperationRes(parsedOutput, context);
460
- case "HomeRegionNotSetException":
461
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
462
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
463
- case "InternalServerError":
464
- case "com.amazonaws.migrationhub#InternalServerError":
465
- throw await de_InternalServerErrorRes(parsedOutput, context);
466
- case "InvalidInputException":
467
- case "com.amazonaws.migrationhub#InvalidInputException":
468
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
469
- case "ResourceNotFoundException":
470
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
471
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
472
- case "ServiceUnavailableException":
473
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
474
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
475
- case "ThrottlingException":
476
- case "com.amazonaws.migrationhub#ThrottlingException":
477
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
478
- case "UnauthorizedOperation":
479
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
480
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
481
- default:
482
- const parsedBody = parsedOutput.body;
483
- return throwDefaultError({
484
- output,
485
- parsedBody,
486
- errorCode,
487
- });
488
- }
489
- };
490
198
  export const de_DisassociateDiscoveredResourceCommand = async (output, context) => {
491
199
  if (output.statusCode >= 300) {
492
- return de_DisassociateDiscoveredResourceCommandError(output, context);
493
- }
494
- const data = await parseBody(output.body, context);
495
- let contents = {};
496
- contents = _json(data);
497
- const response = {
498
- $metadata: deserializeMetadata(output),
499
- ...contents,
500
- };
501
- return response;
502
- };
503
- const de_DisassociateDiscoveredResourceCommandError = async (output, context) => {
504
- const parsedOutput = {
505
- ...output,
506
- body: await parseErrorBody(output.body, context),
507
- };
508
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
509
- switch (errorCode) {
510
- case "AccessDeniedException":
511
- case "com.amazonaws.migrationhub#AccessDeniedException":
512
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
513
- case "DryRunOperation":
514
- case "com.amazonaws.migrationhub#DryRunOperation":
515
- throw await de_DryRunOperationRes(parsedOutput, context);
516
- case "HomeRegionNotSetException":
517
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
518
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
519
- case "InternalServerError":
520
- case "com.amazonaws.migrationhub#InternalServerError":
521
- throw await de_InternalServerErrorRes(parsedOutput, context);
522
- case "InvalidInputException":
523
- case "com.amazonaws.migrationhub#InvalidInputException":
524
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
525
- case "ResourceNotFoundException":
526
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
527
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
528
- case "ServiceUnavailableException":
529
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
530
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
531
- case "ThrottlingException":
532
- case "com.amazonaws.migrationhub#ThrottlingException":
533
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
534
- case "UnauthorizedOperation":
535
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
536
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
537
- default:
538
- const parsedBody = parsedOutput.body;
539
- return throwDefaultError({
540
- output,
541
- parsedBody,
542
- errorCode,
543
- });
544
- }
545
- };
546
- export const de_ImportMigrationTaskCommand = async (output, context) => {
547
- if (output.statusCode >= 300) {
548
- return de_ImportMigrationTaskCommandError(output, context);
200
+ return de_CommandError(output, context);
549
201
  }
550
202
  const data = await parseBody(output.body, context);
551
203
  let contents = {};
@@ -553,102 +205,12 @@ export const de_ImportMigrationTaskCommand = async (output, context) => {
553
205
  const response = {
554
206
  $metadata: deserializeMetadata(output),
555
207
  ...contents,
556
- };
557
- return response;
558
- };
559
- const de_ImportMigrationTaskCommandError = async (output, context) => {
560
- const parsedOutput = {
561
- ...output,
562
- body: await parseErrorBody(output.body, context),
563
- };
564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
565
- switch (errorCode) {
566
- case "AccessDeniedException":
567
- case "com.amazonaws.migrationhub#AccessDeniedException":
568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
569
- case "DryRunOperation":
570
- case "com.amazonaws.migrationhub#DryRunOperation":
571
- throw await de_DryRunOperationRes(parsedOutput, context);
572
- case "HomeRegionNotSetException":
573
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
574
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
575
- case "InternalServerError":
576
- case "com.amazonaws.migrationhub#InternalServerError":
577
- throw await de_InternalServerErrorRes(parsedOutput, context);
578
- case "InvalidInputException":
579
- case "com.amazonaws.migrationhub#InvalidInputException":
580
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
581
- case "ResourceNotFoundException":
582
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
583
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
584
- case "ServiceUnavailableException":
585
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
586
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
587
- case "ThrottlingException":
588
- case "com.amazonaws.migrationhub#ThrottlingException":
589
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
590
- case "UnauthorizedOperation":
591
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
592
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
593
- default:
594
- const parsedBody = parsedOutput.body;
595
- return throwDefaultError({
596
- output,
597
- parsedBody,
598
- errorCode,
599
- });
600
- }
601
- };
602
- export const de_ListApplicationStatesCommand = async (output, context) => {
603
- if (output.statusCode >= 300) {
604
- return de_ListApplicationStatesCommandError(output, context);
605
- }
606
- const data = await parseBody(output.body, context);
607
- let contents = {};
608
- contents = de_ListApplicationStatesResult(data, context);
609
- const response = {
610
- $metadata: deserializeMetadata(output),
611
- ...contents,
612
- };
613
- return response;
614
- };
615
- const de_ListApplicationStatesCommandError = async (output, context) => {
616
- const parsedOutput = {
617
- ...output,
618
- body: await parseErrorBody(output.body, context),
619
- };
620
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
621
- switch (errorCode) {
622
- case "AccessDeniedException":
623
- case "com.amazonaws.migrationhub#AccessDeniedException":
624
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
625
- case "HomeRegionNotSetException":
626
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
627
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
628
- case "InternalServerError":
629
- case "com.amazonaws.migrationhub#InternalServerError":
630
- throw await de_InternalServerErrorRes(parsedOutput, context);
631
- case "InvalidInputException":
632
- case "com.amazonaws.migrationhub#InvalidInputException":
633
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
634
- case "ServiceUnavailableException":
635
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
636
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
637
- case "ThrottlingException":
638
- case "com.amazonaws.migrationhub#ThrottlingException":
639
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
640
- default:
641
- const parsedBody = parsedOutput.body;
642
- return throwDefaultError({
643
- output,
644
- parsedBody,
645
- errorCode,
646
- });
647
- }
208
+ };
209
+ return response;
648
210
  };
649
- export const de_ListCreatedArtifactsCommand = async (output, context) => {
211
+ export const de_ImportMigrationTaskCommand = async (output, context) => {
650
212
  if (output.statusCode >= 300) {
651
- return de_ListCreatedArtifactsCommandError(output, context);
213
+ return de_CommandError(output, context);
652
214
  }
653
215
  const data = await parseBody(output.body, context);
654
216
  let contents = {};
@@ -659,46 +221,22 @@ export const de_ListCreatedArtifactsCommand = async (output, context) => {
659
221
  };
660
222
  return response;
661
223
  };
662
- const de_ListCreatedArtifactsCommandError = async (output, context) => {
663
- const parsedOutput = {
664
- ...output,
665
- body: await parseErrorBody(output.body, context),
666
- };
667
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
668
- switch (errorCode) {
669
- case "AccessDeniedException":
670
- case "com.amazonaws.migrationhub#AccessDeniedException":
671
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
672
- case "HomeRegionNotSetException":
673
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
674
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
675
- case "InternalServerError":
676
- case "com.amazonaws.migrationhub#InternalServerError":
677
- throw await de_InternalServerErrorRes(parsedOutput, context);
678
- case "InvalidInputException":
679
- case "com.amazonaws.migrationhub#InvalidInputException":
680
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
681
- case "ResourceNotFoundException":
682
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
683
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
684
- case "ServiceUnavailableException":
685
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
686
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
687
- case "ThrottlingException":
688
- case "com.amazonaws.migrationhub#ThrottlingException":
689
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
690
- default:
691
- const parsedBody = parsedOutput.body;
692
- return throwDefaultError({
693
- output,
694
- parsedBody,
695
- errorCode,
696
- });
224
+ export const de_ListApplicationStatesCommand = async (output, context) => {
225
+ if (output.statusCode >= 300) {
226
+ return de_CommandError(output, context);
697
227
  }
228
+ const data = await parseBody(output.body, context);
229
+ let contents = {};
230
+ contents = de_ListApplicationStatesResult(data, context);
231
+ const response = {
232
+ $metadata: deserializeMetadata(output),
233
+ ...contents,
234
+ };
235
+ return response;
698
236
  };
699
- export const de_ListDiscoveredResourcesCommand = async (output, context) => {
237
+ export const de_ListCreatedArtifactsCommand = async (output, context) => {
700
238
  if (output.statusCode >= 300) {
701
- return de_ListDiscoveredResourcesCommandError(output, context);
239
+ return de_CommandError(output, context);
702
240
  }
703
241
  const data = await parseBody(output.body, context);
704
242
  let contents = {};
@@ -709,46 +247,22 @@ export const de_ListDiscoveredResourcesCommand = async (output, context) => {
709
247
  };
710
248
  return response;
711
249
  };
712
- const de_ListDiscoveredResourcesCommandError = async (output, context) => {
713
- const parsedOutput = {
714
- ...output,
715
- body: await parseErrorBody(output.body, context),
716
- };
717
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
718
- switch (errorCode) {
719
- case "AccessDeniedException":
720
- case "com.amazonaws.migrationhub#AccessDeniedException":
721
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
722
- case "HomeRegionNotSetException":
723
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
724
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
725
- case "InternalServerError":
726
- case "com.amazonaws.migrationhub#InternalServerError":
727
- throw await de_InternalServerErrorRes(parsedOutput, context);
728
- case "InvalidInputException":
729
- case "com.amazonaws.migrationhub#InvalidInputException":
730
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
731
- case "ResourceNotFoundException":
732
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
733
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
734
- case "ServiceUnavailableException":
735
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
736
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
737
- case "ThrottlingException":
738
- case "com.amazonaws.migrationhub#ThrottlingException":
739
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
740
- default:
741
- const parsedBody = parsedOutput.body;
742
- return throwDefaultError({
743
- output,
744
- parsedBody,
745
- errorCode,
746
- });
250
+ export const de_ListDiscoveredResourcesCommand = async (output, context) => {
251
+ if (output.statusCode >= 300) {
252
+ return de_CommandError(output, context);
747
253
  }
254
+ const data = await parseBody(output.body, context);
255
+ let contents = {};
256
+ contents = _json(data);
257
+ const response = {
258
+ $metadata: deserializeMetadata(output),
259
+ ...contents,
260
+ };
261
+ return response;
748
262
  };
749
263
  export const de_ListMigrationTasksCommand = async (output, context) => {
750
264
  if (output.statusCode >= 300) {
751
- return de_ListMigrationTasksCommandError(output, context);
265
+ return de_CommandError(output, context);
752
266
  }
753
267
  const data = await parseBody(output.body, context);
754
268
  let contents = {};
@@ -759,49 +273,9 @@ export const de_ListMigrationTasksCommand = async (output, context) => {
759
273
  };
760
274
  return response;
761
275
  };
762
- const de_ListMigrationTasksCommandError = async (output, context) => {
763
- const parsedOutput = {
764
- ...output,
765
- body: await parseErrorBody(output.body, context),
766
- };
767
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
768
- switch (errorCode) {
769
- case "AccessDeniedException":
770
- case "com.amazonaws.migrationhub#AccessDeniedException":
771
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
772
- case "HomeRegionNotSetException":
773
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
774
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
775
- case "InternalServerError":
776
- case "com.amazonaws.migrationhub#InternalServerError":
777
- throw await de_InternalServerErrorRes(parsedOutput, context);
778
- case "InvalidInputException":
779
- case "com.amazonaws.migrationhub#InvalidInputException":
780
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
781
- case "PolicyErrorException":
782
- case "com.amazonaws.migrationhub#PolicyErrorException":
783
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
784
- case "ResourceNotFoundException":
785
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
786
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
787
- case "ServiceUnavailableException":
788
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
789
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
790
- case "ThrottlingException":
791
- case "com.amazonaws.migrationhub#ThrottlingException":
792
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
793
- default:
794
- const parsedBody = parsedOutput.body;
795
- return throwDefaultError({
796
- output,
797
- parsedBody,
798
- errorCode,
799
- });
800
- }
801
- };
802
276
  export const de_ListProgressUpdateStreamsCommand = async (output, context) => {
803
277
  if (output.statusCode >= 300) {
804
- return de_ListProgressUpdateStreamsCommandError(output, context);
278
+ return de_CommandError(output, context);
805
279
  }
806
280
  const data = await parseBody(output.body, context);
807
281
  let contents = {};
@@ -812,43 +286,9 @@ export const de_ListProgressUpdateStreamsCommand = async (output, context) => {
812
286
  };
813
287
  return response;
814
288
  };
815
- const de_ListProgressUpdateStreamsCommandError = async (output, context) => {
816
- const parsedOutput = {
817
- ...output,
818
- body: await parseErrorBody(output.body, context),
819
- };
820
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
821
- switch (errorCode) {
822
- case "AccessDeniedException":
823
- case "com.amazonaws.migrationhub#AccessDeniedException":
824
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
825
- case "HomeRegionNotSetException":
826
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
827
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
828
- case "InternalServerError":
829
- case "com.amazonaws.migrationhub#InternalServerError":
830
- throw await de_InternalServerErrorRes(parsedOutput, context);
831
- case "InvalidInputException":
832
- case "com.amazonaws.migrationhub#InvalidInputException":
833
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
834
- case "ServiceUnavailableException":
835
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
836
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
837
- case "ThrottlingException":
838
- case "com.amazonaws.migrationhub#ThrottlingException":
839
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
840
- default:
841
- const parsedBody = parsedOutput.body;
842
- return throwDefaultError({
843
- output,
844
- parsedBody,
845
- errorCode,
846
- });
847
- }
848
- };
849
289
  export const de_NotifyApplicationStateCommand = async (output, context) => {
850
290
  if (output.statusCode >= 300) {
851
- return de_NotifyApplicationStateCommandError(output, context);
291
+ return de_CommandError(output, context);
852
292
  }
853
293
  const data = await parseBody(output.body, context);
854
294
  let contents = {};
@@ -859,55 +299,9 @@ export const de_NotifyApplicationStateCommand = async (output, context) => {
859
299
  };
860
300
  return response;
861
301
  };
862
- const de_NotifyApplicationStateCommandError = async (output, context) => {
863
- const parsedOutput = {
864
- ...output,
865
- body: await parseErrorBody(output.body, context),
866
- };
867
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
868
- switch (errorCode) {
869
- case "AccessDeniedException":
870
- case "com.amazonaws.migrationhub#AccessDeniedException":
871
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
872
- case "DryRunOperation":
873
- case "com.amazonaws.migrationhub#DryRunOperation":
874
- throw await de_DryRunOperationRes(parsedOutput, context);
875
- case "HomeRegionNotSetException":
876
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
877
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
878
- case "InternalServerError":
879
- case "com.amazonaws.migrationhub#InternalServerError":
880
- throw await de_InternalServerErrorRes(parsedOutput, context);
881
- case "InvalidInputException":
882
- case "com.amazonaws.migrationhub#InvalidInputException":
883
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
884
- case "PolicyErrorException":
885
- case "com.amazonaws.migrationhub#PolicyErrorException":
886
- throw await de_PolicyErrorExceptionRes(parsedOutput, context);
887
- case "ResourceNotFoundException":
888
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
889
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
890
- case "ServiceUnavailableException":
891
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
892
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
893
- case "ThrottlingException":
894
- case "com.amazonaws.migrationhub#ThrottlingException":
895
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
896
- case "UnauthorizedOperation":
897
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
898
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
899
- default:
900
- const parsedBody = parsedOutput.body;
901
- return throwDefaultError({
902
- output,
903
- parsedBody,
904
- errorCode,
905
- });
906
- }
907
- };
908
302
  export const de_NotifyMigrationTaskStateCommand = async (output, context) => {
909
303
  if (output.statusCode >= 300) {
910
- return de_NotifyMigrationTaskStateCommandError(output, context);
304
+ return de_CommandError(output, context);
911
305
  }
912
306
  const data = await parseBody(output.body, context);
913
307
  let contents = {};
@@ -918,52 +312,9 @@ export const de_NotifyMigrationTaskStateCommand = async (output, context) => {
918
312
  };
919
313
  return response;
920
314
  };
921
- const de_NotifyMigrationTaskStateCommandError = async (output, context) => {
922
- const parsedOutput = {
923
- ...output,
924
- body: await parseErrorBody(output.body, context),
925
- };
926
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
927
- switch (errorCode) {
928
- case "AccessDeniedException":
929
- case "com.amazonaws.migrationhub#AccessDeniedException":
930
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
931
- case "DryRunOperation":
932
- case "com.amazonaws.migrationhub#DryRunOperation":
933
- throw await de_DryRunOperationRes(parsedOutput, context);
934
- case "HomeRegionNotSetException":
935
- case "com.amazonaws.migrationhub#HomeRegionNotSetException":
936
- throw await de_HomeRegionNotSetExceptionRes(parsedOutput, context);
937
- case "InternalServerError":
938
- case "com.amazonaws.migrationhub#InternalServerError":
939
- throw await de_InternalServerErrorRes(parsedOutput, context);
940
- case "InvalidInputException":
941
- case "com.amazonaws.migrationhub#InvalidInputException":
942
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
943
- case "ResourceNotFoundException":
944
- case "com.amazonaws.migrationhub#ResourceNotFoundException":
945
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
946
- case "ServiceUnavailableException":
947
- case "com.amazonaws.migrationhub#ServiceUnavailableException":
948
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
949
- case "ThrottlingException":
950
- case "com.amazonaws.migrationhub#ThrottlingException":
951
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
952
- case "UnauthorizedOperation":
953
- case "com.amazonaws.migrationhub#UnauthorizedOperation":
954
- throw await de_UnauthorizedOperationRes(parsedOutput, context);
955
- default:
956
- const parsedBody = parsedOutput.body;
957
- return throwDefaultError({
958
- output,
959
- parsedBody,
960
- errorCode,
961
- });
962
- }
963
- };
964
315
  export const de_PutResourceAttributesCommand = async (output, context) => {
965
316
  if (output.statusCode >= 300) {
966
- return de_PutResourceAttributesCommandError(output, context);
317
+ return de_CommandError(output, context);
967
318
  }
968
319
  const data = await parseBody(output.body, context);
969
320
  let contents = {};
@@ -974,7 +325,7 @@ export const de_PutResourceAttributesCommand = async (output, context) => {
974
325
  };
975
326
  return response;
976
327
  };
977
- const de_PutResourceAttributesCommandError = async (output, context) => {
328
+ const de_CommandError = async (output, context) => {
978
329
  const parsedOutput = {
979
330
  ...output,
980
331
  body: await parseErrorBody(output.body, context),
@@ -1008,6 +359,9 @@ const de_PutResourceAttributesCommandError = async (output, context) => {
1008
359
  case "UnauthorizedOperation":
1009
360
  case "com.amazonaws.migrationhub#UnauthorizedOperation":
1010
361
  throw await de_UnauthorizedOperationRes(parsedOutput, context);
362
+ case "PolicyErrorException":
363
+ case "com.amazonaws.migrationhub#PolicyErrorException":
364
+ throw await de_PolicyErrorExceptionRes(parsedOutput, context);
1011
365
  default:
1012
366
  const parsedBody = parsedOutput.body;
1013
367
  return throwDefaultError({