@aws-sdk/client-connectcampaigns 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.
- package/dist-cjs/index.js +33 -696
- package/dist-es/protocols/Aws_restJson1.js +55 -718
- package/package.json +3 -3
|
@@ -259,7 +259,7 @@ export const se_UpdateCampaignOutboundCallConfigCommand = async (input, context)
|
|
|
259
259
|
};
|
|
260
260
|
export const de_CreateCampaignCommand = async (output, context) => {
|
|
261
261
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
262
|
-
return
|
|
262
|
+
return de_CommandError(output, context);
|
|
263
263
|
}
|
|
264
264
|
const contents = map({
|
|
265
265
|
$metadata: deserializeMetadata(output),
|
|
@@ -273,46 +273,9 @@ export const de_CreateCampaignCommand = async (output, context) => {
|
|
|
273
273
|
Object.assign(contents, doc);
|
|
274
274
|
return contents;
|
|
275
275
|
};
|
|
276
|
-
const de_CreateCampaignCommandError = async (output, context) => {
|
|
277
|
-
const parsedOutput = {
|
|
278
|
-
...output,
|
|
279
|
-
body: await parseErrorBody(output.body, context),
|
|
280
|
-
};
|
|
281
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
|
-
switch (errorCode) {
|
|
283
|
-
case "AccessDeniedException":
|
|
284
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
285
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
286
|
-
case "ConflictException":
|
|
287
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
288
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
289
|
-
case "InternalServerException":
|
|
290
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
291
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
292
|
-
case "ResourceNotFoundException":
|
|
293
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
294
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
295
|
-
case "ServiceQuotaExceededException":
|
|
296
|
-
case "com.amazonaws.connectcampaigns#ServiceQuotaExceededException":
|
|
297
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
298
|
-
case "ThrottlingException":
|
|
299
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
300
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
301
|
-
case "ValidationException":
|
|
302
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
303
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
304
|
-
default:
|
|
305
|
-
const parsedBody = parsedOutput.body;
|
|
306
|
-
return throwDefaultError({
|
|
307
|
-
output,
|
|
308
|
-
parsedBody,
|
|
309
|
-
errorCode,
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
276
|
export const de_DeleteCampaignCommand = async (output, context) => {
|
|
314
277
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
315
|
-
return
|
|
278
|
+
return de_CommandError(output, context);
|
|
316
279
|
}
|
|
317
280
|
const contents = map({
|
|
318
281
|
$metadata: deserializeMetadata(output),
|
|
@@ -320,37 +283,9 @@ export const de_DeleteCampaignCommand = async (output, context) => {
|
|
|
320
283
|
await collectBody(output.body, context);
|
|
321
284
|
return contents;
|
|
322
285
|
};
|
|
323
|
-
const de_DeleteCampaignCommandError = async (output, context) => {
|
|
324
|
-
const parsedOutput = {
|
|
325
|
-
...output,
|
|
326
|
-
body: await parseErrorBody(output.body, context),
|
|
327
|
-
};
|
|
328
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
329
|
-
switch (errorCode) {
|
|
330
|
-
case "AccessDeniedException":
|
|
331
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
332
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
333
|
-
case "InternalServerException":
|
|
334
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
335
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
336
|
-
case "ResourceNotFoundException":
|
|
337
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
338
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
339
|
-
case "ValidationException":
|
|
340
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
341
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
342
|
-
default:
|
|
343
|
-
const parsedBody = parsedOutput.body;
|
|
344
|
-
return throwDefaultError({
|
|
345
|
-
output,
|
|
346
|
-
parsedBody,
|
|
347
|
-
errorCode,
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
286
|
export const de_DeleteConnectInstanceConfigCommand = async (output, context) => {
|
|
352
287
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
353
|
-
return
|
|
288
|
+
return de_CommandError(output, context);
|
|
354
289
|
}
|
|
355
290
|
const contents = map({
|
|
356
291
|
$metadata: deserializeMetadata(output),
|
|
@@ -358,43 +293,9 @@ export const de_DeleteConnectInstanceConfigCommand = async (output, context) =>
|
|
|
358
293
|
await collectBody(output.body, context);
|
|
359
294
|
return contents;
|
|
360
295
|
};
|
|
361
|
-
const de_DeleteConnectInstanceConfigCommandError = async (output, context) => {
|
|
362
|
-
const parsedOutput = {
|
|
363
|
-
...output,
|
|
364
|
-
body: await parseErrorBody(output.body, context),
|
|
365
|
-
};
|
|
366
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
367
|
-
switch (errorCode) {
|
|
368
|
-
case "AccessDeniedException":
|
|
369
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
370
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
371
|
-
case "InternalServerException":
|
|
372
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
373
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
374
|
-
case "InvalidStateException":
|
|
375
|
-
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
376
|
-
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
377
|
-
case "ResourceNotFoundException":
|
|
378
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
379
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
380
|
-
case "ThrottlingException":
|
|
381
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
382
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
383
|
-
case "ValidationException":
|
|
384
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
385
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
386
|
-
default:
|
|
387
|
-
const parsedBody = parsedOutput.body;
|
|
388
|
-
return throwDefaultError({
|
|
389
|
-
output,
|
|
390
|
-
parsedBody,
|
|
391
|
-
errorCode,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
296
|
export const de_DeleteInstanceOnboardingJobCommand = async (output, context) => {
|
|
396
297
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
397
|
-
return
|
|
298
|
+
return de_CommandError(output, context);
|
|
398
299
|
}
|
|
399
300
|
const contents = map({
|
|
400
301
|
$metadata: deserializeMetadata(output),
|
|
@@ -402,40 +303,9 @@ export const de_DeleteInstanceOnboardingJobCommand = async (output, context) =>
|
|
|
402
303
|
await collectBody(output.body, context);
|
|
403
304
|
return contents;
|
|
404
305
|
};
|
|
405
|
-
const de_DeleteInstanceOnboardingJobCommandError = async (output, context) => {
|
|
406
|
-
const parsedOutput = {
|
|
407
|
-
...output,
|
|
408
|
-
body: await parseErrorBody(output.body, context),
|
|
409
|
-
};
|
|
410
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
411
|
-
switch (errorCode) {
|
|
412
|
-
case "AccessDeniedException":
|
|
413
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
414
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
415
|
-
case "InternalServerException":
|
|
416
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
417
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
418
|
-
case "InvalidStateException":
|
|
419
|
-
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
420
|
-
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
421
|
-
case "ResourceNotFoundException":
|
|
422
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
423
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
424
|
-
case "ValidationException":
|
|
425
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
426
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
427
|
-
default:
|
|
428
|
-
const parsedBody = parsedOutput.body;
|
|
429
|
-
return throwDefaultError({
|
|
430
|
-
output,
|
|
431
|
-
parsedBody,
|
|
432
|
-
errorCode,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
306
|
export const de_DescribeCampaignCommand = async (output, context) => {
|
|
437
307
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
438
|
-
return
|
|
308
|
+
return de_CommandError(output, context);
|
|
439
309
|
}
|
|
440
310
|
const contents = map({
|
|
441
311
|
$metadata: deserializeMetadata(output),
|
|
@@ -447,37 +317,9 @@ export const de_DescribeCampaignCommand = async (output, context) => {
|
|
|
447
317
|
Object.assign(contents, doc);
|
|
448
318
|
return contents;
|
|
449
319
|
};
|
|
450
|
-
const de_DescribeCampaignCommandError = 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 "AccessDeniedException":
|
|
458
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
459
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
460
|
-
case "InternalServerException":
|
|
461
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
462
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
463
|
-
case "ResourceNotFoundException":
|
|
464
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
465
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
466
|
-
case "ValidationException":
|
|
467
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
468
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
469
|
-
default:
|
|
470
|
-
const parsedBody = parsedOutput.body;
|
|
471
|
-
return throwDefaultError({
|
|
472
|
-
output,
|
|
473
|
-
parsedBody,
|
|
474
|
-
errorCode,
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
320
|
export const de_GetCampaignStateCommand = async (output, context) => {
|
|
479
321
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
|
-
return
|
|
322
|
+
return de_CommandError(output, context);
|
|
481
323
|
}
|
|
482
324
|
const contents = map({
|
|
483
325
|
$metadata: deserializeMetadata(output),
|
|
@@ -489,40 +331,9 @@ export const de_GetCampaignStateCommand = async (output, context) => {
|
|
|
489
331
|
Object.assign(contents, doc);
|
|
490
332
|
return contents;
|
|
491
333
|
};
|
|
492
|
-
const de_GetCampaignStateCommandError = async (output, context) => {
|
|
493
|
-
const parsedOutput = {
|
|
494
|
-
...output,
|
|
495
|
-
body: await parseErrorBody(output.body, context),
|
|
496
|
-
};
|
|
497
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
|
-
switch (errorCode) {
|
|
499
|
-
case "AccessDeniedException":
|
|
500
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
501
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
502
|
-
case "InternalServerException":
|
|
503
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
504
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
505
|
-
case "ResourceNotFoundException":
|
|
506
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
507
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
508
|
-
case "ThrottlingException":
|
|
509
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
510
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
511
|
-
case "ValidationException":
|
|
512
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
513
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
514
|
-
default:
|
|
515
|
-
const parsedBody = parsedOutput.body;
|
|
516
|
-
return throwDefaultError({
|
|
517
|
-
output,
|
|
518
|
-
parsedBody,
|
|
519
|
-
errorCode,
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
334
|
export const de_GetCampaignStateBatchCommand = async (output, context) => {
|
|
524
335
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
|
-
return
|
|
336
|
+
return de_CommandError(output, context);
|
|
526
337
|
}
|
|
527
338
|
const contents = map({
|
|
528
339
|
$metadata: deserializeMetadata(output),
|
|
@@ -535,37 +346,9 @@ export const de_GetCampaignStateBatchCommand = async (output, context) => {
|
|
|
535
346
|
Object.assign(contents, doc);
|
|
536
347
|
return contents;
|
|
537
348
|
};
|
|
538
|
-
const de_GetCampaignStateBatchCommandError = async (output, context) => {
|
|
539
|
-
const parsedOutput = {
|
|
540
|
-
...output,
|
|
541
|
-
body: await parseErrorBody(output.body, context),
|
|
542
|
-
};
|
|
543
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
544
|
-
switch (errorCode) {
|
|
545
|
-
case "AccessDeniedException":
|
|
546
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
547
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
548
|
-
case "InternalServerException":
|
|
549
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
550
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
551
|
-
case "ThrottlingException":
|
|
552
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
553
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
554
|
-
case "ValidationException":
|
|
555
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
556
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
557
|
-
default:
|
|
558
|
-
const parsedBody = parsedOutput.body;
|
|
559
|
-
return throwDefaultError({
|
|
560
|
-
output,
|
|
561
|
-
parsedBody,
|
|
562
|
-
errorCode,
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
};
|
|
566
349
|
export const de_GetConnectInstanceConfigCommand = async (output, context) => {
|
|
567
350
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
568
|
-
return
|
|
351
|
+
return de_CommandError(output, context);
|
|
569
352
|
}
|
|
570
353
|
const contents = map({
|
|
571
354
|
$metadata: deserializeMetadata(output),
|
|
@@ -577,37 +360,9 @@ export const de_GetConnectInstanceConfigCommand = async (output, context) => {
|
|
|
577
360
|
Object.assign(contents, doc);
|
|
578
361
|
return contents;
|
|
579
362
|
};
|
|
580
|
-
const de_GetConnectInstanceConfigCommandError = async (output, context) => {
|
|
581
|
-
const parsedOutput = {
|
|
582
|
-
...output,
|
|
583
|
-
body: await parseErrorBody(output.body, context),
|
|
584
|
-
};
|
|
585
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
586
|
-
switch (errorCode) {
|
|
587
|
-
case "AccessDeniedException":
|
|
588
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
589
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
590
|
-
case "InternalServerException":
|
|
591
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
592
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
593
|
-
case "ResourceNotFoundException":
|
|
594
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
595
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
596
|
-
case "ValidationException":
|
|
597
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
598
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
599
|
-
default:
|
|
600
|
-
const parsedBody = parsedOutput.body;
|
|
601
|
-
return throwDefaultError({
|
|
602
|
-
output,
|
|
603
|
-
parsedBody,
|
|
604
|
-
errorCode,
|
|
605
|
-
});
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
363
|
export const de_GetInstanceOnboardingJobStatusCommand = async (output, context) => {
|
|
609
364
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
610
|
-
return
|
|
365
|
+
return de_CommandError(output, context);
|
|
611
366
|
}
|
|
612
367
|
const contents = map({
|
|
613
368
|
$metadata: deserializeMetadata(output),
|
|
@@ -619,37 +374,9 @@ export const de_GetInstanceOnboardingJobStatusCommand = async (output, context)
|
|
|
619
374
|
Object.assign(contents, doc);
|
|
620
375
|
return contents;
|
|
621
376
|
};
|
|
622
|
-
const de_GetInstanceOnboardingJobStatusCommandError = async (output, context) => {
|
|
623
|
-
const parsedOutput = {
|
|
624
|
-
...output,
|
|
625
|
-
body: await parseErrorBody(output.body, context),
|
|
626
|
-
};
|
|
627
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
628
|
-
switch (errorCode) {
|
|
629
|
-
case "AccessDeniedException":
|
|
630
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
631
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
632
|
-
case "InternalServerException":
|
|
633
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
634
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
635
|
-
case "ResourceNotFoundException":
|
|
636
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
637
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
638
|
-
case "ValidationException":
|
|
639
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
640
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
641
|
-
default:
|
|
642
|
-
const parsedBody = parsedOutput.body;
|
|
643
|
-
return throwDefaultError({
|
|
644
|
-
output,
|
|
645
|
-
parsedBody,
|
|
646
|
-
errorCode,
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
377
|
export const de_ListCampaignsCommand = async (output, context) => {
|
|
651
378
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
652
|
-
return
|
|
379
|
+
return de_CommandError(output, context);
|
|
653
380
|
}
|
|
654
381
|
const contents = map({
|
|
655
382
|
$metadata: deserializeMetadata(output),
|
|
@@ -662,34 +389,9 @@ export const de_ListCampaignsCommand = async (output, context) => {
|
|
|
662
389
|
Object.assign(contents, doc);
|
|
663
390
|
return contents;
|
|
664
391
|
};
|
|
665
|
-
const de_ListCampaignsCommandError = async (output, context) => {
|
|
666
|
-
const parsedOutput = {
|
|
667
|
-
...output,
|
|
668
|
-
body: await parseErrorBody(output.body, context),
|
|
669
|
-
};
|
|
670
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
671
|
-
switch (errorCode) {
|
|
672
|
-
case "AccessDeniedException":
|
|
673
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
674
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
675
|
-
case "InternalServerException":
|
|
676
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
677
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
678
|
-
case "ValidationException":
|
|
679
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
680
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
681
|
-
default:
|
|
682
|
-
const parsedBody = parsedOutput.body;
|
|
683
|
-
return throwDefaultError({
|
|
684
|
-
output,
|
|
685
|
-
parsedBody,
|
|
686
|
-
errorCode,
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
392
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
691
393
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
692
|
-
return
|
|
394
|
+
return de_CommandError(output, context);
|
|
693
395
|
}
|
|
694
396
|
const contents = map({
|
|
695
397
|
$metadata: deserializeMetadata(output),
|
|
@@ -701,186 +403,34 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
701
403
|
Object.assign(contents, doc);
|
|
702
404
|
return contents;
|
|
703
405
|
};
|
|
704
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
705
|
-
const parsedOutput = {
|
|
706
|
-
...output,
|
|
707
|
-
body: await parseErrorBody(output.body, context),
|
|
708
|
-
};
|
|
709
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
710
|
-
switch (errorCode) {
|
|
711
|
-
case "AccessDeniedException":
|
|
712
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
713
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
714
|
-
case "InternalServerException":
|
|
715
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
716
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
717
|
-
case "ResourceNotFoundException":
|
|
718
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
719
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
720
|
-
case "ThrottlingException":
|
|
721
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
722
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
723
|
-
case "ValidationException":
|
|
724
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
725
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
726
|
-
default:
|
|
727
|
-
const parsedBody = parsedOutput.body;
|
|
728
|
-
return throwDefaultError({
|
|
729
|
-
output,
|
|
730
|
-
parsedBody,
|
|
731
|
-
errorCode,
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
};
|
|
735
406
|
export const de_PauseCampaignCommand = async (output, context) => {
|
|
736
407
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
737
|
-
return
|
|
408
|
+
return de_CommandError(output, context);
|
|
738
409
|
}
|
|
739
410
|
const contents = map({
|
|
740
411
|
$metadata: deserializeMetadata(output),
|
|
741
412
|
});
|
|
742
|
-
await collectBody(output.body, context);
|
|
743
|
-
return contents;
|
|
744
|
-
};
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
body: await parseErrorBody(output.body, context),
|
|
749
|
-
};
|
|
750
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
|
-
switch (errorCode) {
|
|
752
|
-
case "AccessDeniedException":
|
|
753
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
754
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
755
|
-
case "ConflictException":
|
|
756
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
757
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
758
|
-
case "InternalServerException":
|
|
759
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
760
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
761
|
-
case "InvalidCampaignStateException":
|
|
762
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
763
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
764
|
-
case "ResourceNotFoundException":
|
|
765
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
766
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
767
|
-
case "ThrottlingException":
|
|
768
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
769
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
770
|
-
case "ValidationException":
|
|
771
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
772
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
773
|
-
default:
|
|
774
|
-
const parsedBody = parsedOutput.body;
|
|
775
|
-
return throwDefaultError({
|
|
776
|
-
output,
|
|
777
|
-
parsedBody,
|
|
778
|
-
errorCode,
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
export const de_PutDialRequestBatchCommand = async (output, context) => {
|
|
783
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
784
|
-
return de_PutDialRequestBatchCommandError(output, context);
|
|
785
|
-
}
|
|
786
|
-
const contents = map({
|
|
787
|
-
$metadata: deserializeMetadata(output),
|
|
788
|
-
});
|
|
789
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
790
|
-
const doc = take(data, {
|
|
791
|
-
failedRequests: _json,
|
|
792
|
-
successfulRequests: _json,
|
|
793
|
-
});
|
|
794
|
-
Object.assign(contents, doc);
|
|
795
|
-
return contents;
|
|
796
|
-
};
|
|
797
|
-
const de_PutDialRequestBatchCommandError = async (output, context) => {
|
|
798
|
-
const parsedOutput = {
|
|
799
|
-
...output,
|
|
800
|
-
body: await parseErrorBody(output.body, context),
|
|
801
|
-
};
|
|
802
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
803
|
-
switch (errorCode) {
|
|
804
|
-
case "AccessDeniedException":
|
|
805
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
806
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
807
|
-
case "ConflictException":
|
|
808
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
809
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
810
|
-
case "InternalServerException":
|
|
811
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
812
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
813
|
-
case "InvalidCampaignStateException":
|
|
814
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
815
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
816
|
-
case "ResourceNotFoundException":
|
|
817
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
818
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
819
|
-
case "ThrottlingException":
|
|
820
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
821
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
822
|
-
case "ValidationException":
|
|
823
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
824
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
825
|
-
default:
|
|
826
|
-
const parsedBody = parsedOutput.body;
|
|
827
|
-
return throwDefaultError({
|
|
828
|
-
output,
|
|
829
|
-
parsedBody,
|
|
830
|
-
errorCode,
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
};
|
|
834
|
-
export const de_ResumeCampaignCommand = async (output, context) => {
|
|
835
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
836
|
-
return de_ResumeCampaignCommandError(output, context);
|
|
837
|
-
}
|
|
838
|
-
const contents = map({
|
|
839
|
-
$metadata: deserializeMetadata(output),
|
|
840
|
-
});
|
|
841
|
-
await collectBody(output.body, context);
|
|
842
|
-
return contents;
|
|
843
|
-
};
|
|
844
|
-
const de_ResumeCampaignCommandError = async (output, context) => {
|
|
845
|
-
const parsedOutput = {
|
|
846
|
-
...output,
|
|
847
|
-
body: await parseErrorBody(output.body, context),
|
|
848
|
-
};
|
|
849
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
850
|
-
switch (errorCode) {
|
|
851
|
-
case "AccessDeniedException":
|
|
852
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
853
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
854
|
-
case "ConflictException":
|
|
855
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
856
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
857
|
-
case "InternalServerException":
|
|
858
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
859
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
860
|
-
case "InvalidCampaignStateException":
|
|
861
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
862
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
863
|
-
case "ResourceNotFoundException":
|
|
864
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
865
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
866
|
-
case "ThrottlingException":
|
|
867
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
868
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
869
|
-
case "ValidationException":
|
|
870
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
871
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
872
|
-
default:
|
|
873
|
-
const parsedBody = parsedOutput.body;
|
|
874
|
-
return throwDefaultError({
|
|
875
|
-
output,
|
|
876
|
-
parsedBody,
|
|
877
|
-
errorCode,
|
|
878
|
-
});
|
|
413
|
+
await collectBody(output.body, context);
|
|
414
|
+
return contents;
|
|
415
|
+
};
|
|
416
|
+
export const de_PutDialRequestBatchCommand = async (output, context) => {
|
|
417
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
418
|
+
return de_CommandError(output, context);
|
|
879
419
|
}
|
|
420
|
+
const contents = map({
|
|
421
|
+
$metadata: deserializeMetadata(output),
|
|
422
|
+
});
|
|
423
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
424
|
+
const doc = take(data, {
|
|
425
|
+
failedRequests: _json,
|
|
426
|
+
successfulRequests: _json,
|
|
427
|
+
});
|
|
428
|
+
Object.assign(contents, doc);
|
|
429
|
+
return contents;
|
|
880
430
|
};
|
|
881
|
-
export const
|
|
431
|
+
export const de_ResumeCampaignCommand = async (output, context) => {
|
|
882
432
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
883
|
-
return
|
|
433
|
+
return de_CommandError(output, context);
|
|
884
434
|
}
|
|
885
435
|
const contents = map({
|
|
886
436
|
$metadata: deserializeMetadata(output),
|
|
@@ -888,46 +438,19 @@ export const de_StartCampaignCommand = async (output, context) => {
|
|
|
888
438
|
await collectBody(output.body, context);
|
|
889
439
|
return contents;
|
|
890
440
|
};
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
body: await parseErrorBody(output.body, context),
|
|
895
|
-
};
|
|
896
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
897
|
-
switch (errorCode) {
|
|
898
|
-
case "AccessDeniedException":
|
|
899
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
900
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
901
|
-
case "ConflictException":
|
|
902
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
903
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
904
|
-
case "InternalServerException":
|
|
905
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
906
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
907
|
-
case "InvalidCampaignStateException":
|
|
908
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
909
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
910
|
-
case "ResourceNotFoundException":
|
|
911
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
912
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
913
|
-
case "ThrottlingException":
|
|
914
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
915
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
916
|
-
case "ValidationException":
|
|
917
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
918
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
919
|
-
default:
|
|
920
|
-
const parsedBody = parsedOutput.body;
|
|
921
|
-
return throwDefaultError({
|
|
922
|
-
output,
|
|
923
|
-
parsedBody,
|
|
924
|
-
errorCode,
|
|
925
|
-
});
|
|
441
|
+
export const de_StartCampaignCommand = async (output, context) => {
|
|
442
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
443
|
+
return de_CommandError(output, context);
|
|
926
444
|
}
|
|
445
|
+
const contents = map({
|
|
446
|
+
$metadata: deserializeMetadata(output),
|
|
447
|
+
});
|
|
448
|
+
await collectBody(output.body, context);
|
|
449
|
+
return contents;
|
|
927
450
|
};
|
|
928
451
|
export const de_StartInstanceOnboardingJobCommand = async (output, context) => {
|
|
929
452
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
930
|
-
return
|
|
453
|
+
return de_CommandError(output, context);
|
|
931
454
|
}
|
|
932
455
|
const contents = map({
|
|
933
456
|
$metadata: deserializeMetadata(output),
|
|
@@ -939,43 +462,9 @@ export const de_StartInstanceOnboardingJobCommand = async (output, context) => {
|
|
|
939
462
|
Object.assign(contents, doc);
|
|
940
463
|
return contents;
|
|
941
464
|
};
|
|
942
|
-
const de_StartInstanceOnboardingJobCommandError = async (output, context) => {
|
|
943
|
-
const parsedOutput = {
|
|
944
|
-
...output,
|
|
945
|
-
body: await parseErrorBody(output.body, context),
|
|
946
|
-
};
|
|
947
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
948
|
-
switch (errorCode) {
|
|
949
|
-
case "AccessDeniedException":
|
|
950
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
951
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
952
|
-
case "ConflictException":
|
|
953
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
954
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
955
|
-
case "InternalServerException":
|
|
956
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
957
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
958
|
-
case "ResourceNotFoundException":
|
|
959
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
960
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
961
|
-
case "ThrottlingException":
|
|
962
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
963
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
964
|
-
case "ValidationException":
|
|
965
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
966
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
967
|
-
default:
|
|
968
|
-
const parsedBody = parsedOutput.body;
|
|
969
|
-
return throwDefaultError({
|
|
970
|
-
output,
|
|
971
|
-
parsedBody,
|
|
972
|
-
errorCode,
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
};
|
|
976
465
|
export const de_StopCampaignCommand = async (output, context) => {
|
|
977
466
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
978
|
-
return
|
|
467
|
+
return de_CommandError(output, context);
|
|
979
468
|
}
|
|
980
469
|
const contents = map({
|
|
981
470
|
$metadata: deserializeMetadata(output),
|
|
@@ -983,46 +472,9 @@ export const de_StopCampaignCommand = async (output, context) => {
|
|
|
983
472
|
await collectBody(output.body, context);
|
|
984
473
|
return contents;
|
|
985
474
|
};
|
|
986
|
-
const de_StopCampaignCommandError = async (output, context) => {
|
|
987
|
-
const parsedOutput = {
|
|
988
|
-
...output,
|
|
989
|
-
body: await parseErrorBody(output.body, context),
|
|
990
|
-
};
|
|
991
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
|
-
switch (errorCode) {
|
|
993
|
-
case "AccessDeniedException":
|
|
994
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
995
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
996
|
-
case "ConflictException":
|
|
997
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
998
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
999
|
-
case "InternalServerException":
|
|
1000
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1001
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1002
|
-
case "InvalidCampaignStateException":
|
|
1003
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
1004
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
1005
|
-
case "ResourceNotFoundException":
|
|
1006
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1007
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1008
|
-
case "ThrottlingException":
|
|
1009
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1010
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1011
|
-
case "ValidationException":
|
|
1012
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1013
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1014
|
-
default:
|
|
1015
|
-
const parsedBody = parsedOutput.body;
|
|
1016
|
-
return throwDefaultError({
|
|
1017
|
-
output,
|
|
1018
|
-
parsedBody,
|
|
1019
|
-
errorCode,
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
};
|
|
1023
475
|
export const de_TagResourceCommand = async (output, context) => {
|
|
1024
476
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1025
|
-
return
|
|
477
|
+
return de_CommandError(output, context);
|
|
1026
478
|
}
|
|
1027
479
|
const contents = map({
|
|
1028
480
|
$metadata: deserializeMetadata(output),
|
|
@@ -1030,40 +482,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
1030
482
|
await collectBody(output.body, context);
|
|
1031
483
|
return contents;
|
|
1032
484
|
};
|
|
1033
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1034
|
-
const parsedOutput = {
|
|
1035
|
-
...output,
|
|
1036
|
-
body: await parseErrorBody(output.body, context),
|
|
1037
|
-
};
|
|
1038
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1039
|
-
switch (errorCode) {
|
|
1040
|
-
case "AccessDeniedException":
|
|
1041
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1042
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1043
|
-
case "InternalServerException":
|
|
1044
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1045
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1046
|
-
case "ResourceNotFoundException":
|
|
1047
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1048
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1049
|
-
case "ThrottlingException":
|
|
1050
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1051
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1052
|
-
case "ValidationException":
|
|
1053
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1054
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1055
|
-
default:
|
|
1056
|
-
const parsedBody = parsedOutput.body;
|
|
1057
|
-
return throwDefaultError({
|
|
1058
|
-
output,
|
|
1059
|
-
parsedBody,
|
|
1060
|
-
errorCode,
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
485
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
1065
486
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1066
|
-
return
|
|
487
|
+
return de_CommandError(output, context);
|
|
1067
488
|
}
|
|
1068
489
|
const contents = map({
|
|
1069
490
|
$metadata: deserializeMetadata(output),
|
|
@@ -1071,40 +492,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
1071
492
|
await collectBody(output.body, context);
|
|
1072
493
|
return contents;
|
|
1073
494
|
};
|
|
1074
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1075
|
-
const parsedOutput = {
|
|
1076
|
-
...output,
|
|
1077
|
-
body: await parseErrorBody(output.body, context),
|
|
1078
|
-
};
|
|
1079
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1080
|
-
switch (errorCode) {
|
|
1081
|
-
case "AccessDeniedException":
|
|
1082
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1083
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1084
|
-
case "InternalServerException":
|
|
1085
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1086
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1087
|
-
case "ResourceNotFoundException":
|
|
1088
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1089
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1090
|
-
case "ThrottlingException":
|
|
1091
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1092
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1093
|
-
case "ValidationException":
|
|
1094
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1095
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1096
|
-
default:
|
|
1097
|
-
const parsedBody = parsedOutput.body;
|
|
1098
|
-
return throwDefaultError({
|
|
1099
|
-
output,
|
|
1100
|
-
parsedBody,
|
|
1101
|
-
errorCode,
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
495
|
export const de_UpdateCampaignDialerConfigCommand = async (output, context) => {
|
|
1106
496
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1107
|
-
return
|
|
497
|
+
return de_CommandError(output, context);
|
|
1108
498
|
}
|
|
1109
499
|
const contents = map({
|
|
1110
500
|
$metadata: deserializeMetadata(output),
|
|
@@ -1112,40 +502,9 @@ export const de_UpdateCampaignDialerConfigCommand = async (output, context) => {
|
|
|
1112
502
|
await collectBody(output.body, context);
|
|
1113
503
|
return contents;
|
|
1114
504
|
};
|
|
1115
|
-
const de_UpdateCampaignDialerConfigCommandError = async (output, context) => {
|
|
1116
|
-
const parsedOutput = {
|
|
1117
|
-
...output,
|
|
1118
|
-
body: await parseErrorBody(output.body, context),
|
|
1119
|
-
};
|
|
1120
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1121
|
-
switch (errorCode) {
|
|
1122
|
-
case "AccessDeniedException":
|
|
1123
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1124
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1125
|
-
case "ConflictException":
|
|
1126
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1127
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1128
|
-
case "InternalServerException":
|
|
1129
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1130
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1131
|
-
case "ResourceNotFoundException":
|
|
1132
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1133
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1134
|
-
case "ValidationException":
|
|
1135
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1136
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1137
|
-
default:
|
|
1138
|
-
const parsedBody = parsedOutput.body;
|
|
1139
|
-
return throwDefaultError({
|
|
1140
|
-
output,
|
|
1141
|
-
parsedBody,
|
|
1142
|
-
errorCode,
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
};
|
|
1146
505
|
export const de_UpdateCampaignNameCommand = async (output, context) => {
|
|
1147
506
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1148
|
-
return
|
|
507
|
+
return de_CommandError(output, context);
|
|
1149
508
|
}
|
|
1150
509
|
const contents = map({
|
|
1151
510
|
$metadata: deserializeMetadata(output),
|
|
@@ -1153,40 +512,9 @@ export const de_UpdateCampaignNameCommand = async (output, context) => {
|
|
|
1153
512
|
await collectBody(output.body, context);
|
|
1154
513
|
return contents;
|
|
1155
514
|
};
|
|
1156
|
-
const de_UpdateCampaignNameCommandError = async (output, context) => {
|
|
1157
|
-
const parsedOutput = {
|
|
1158
|
-
...output,
|
|
1159
|
-
body: await parseErrorBody(output.body, context),
|
|
1160
|
-
};
|
|
1161
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1162
|
-
switch (errorCode) {
|
|
1163
|
-
case "AccessDeniedException":
|
|
1164
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1165
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1166
|
-
case "ConflictException":
|
|
1167
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1168
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1169
|
-
case "InternalServerException":
|
|
1170
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1171
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1172
|
-
case "ResourceNotFoundException":
|
|
1173
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1174
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1175
|
-
case "ValidationException":
|
|
1176
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1177
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1178
|
-
default:
|
|
1179
|
-
const parsedBody = parsedOutput.body;
|
|
1180
|
-
return throwDefaultError({
|
|
1181
|
-
output,
|
|
1182
|
-
parsedBody,
|
|
1183
|
-
errorCode,
|
|
1184
|
-
});
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
515
|
export const de_UpdateCampaignOutboundCallConfigCommand = async (output, context) => {
|
|
1188
516
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1189
|
-
return
|
|
517
|
+
return de_CommandError(output, context);
|
|
1190
518
|
}
|
|
1191
519
|
const contents = map({
|
|
1192
520
|
$metadata: deserializeMetadata(output),
|
|
@@ -1194,7 +522,7 @@ export const de_UpdateCampaignOutboundCallConfigCommand = async (output, context
|
|
|
1194
522
|
await collectBody(output.body, context);
|
|
1195
523
|
return contents;
|
|
1196
524
|
};
|
|
1197
|
-
const
|
|
525
|
+
const de_CommandError = async (output, context) => {
|
|
1198
526
|
const parsedOutput = {
|
|
1199
527
|
...output,
|
|
1200
528
|
body: await parseErrorBody(output.body, context),
|
|
@@ -1213,12 +541,21 @@ const de_UpdateCampaignOutboundCallConfigCommandError = async (output, context)
|
|
|
1213
541
|
case "ResourceNotFoundException":
|
|
1214
542
|
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1215
543
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
544
|
+
case "ServiceQuotaExceededException":
|
|
545
|
+
case "com.amazonaws.connectcampaigns#ServiceQuotaExceededException":
|
|
546
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1216
547
|
case "ThrottlingException":
|
|
1217
548
|
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1218
549
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1219
550
|
case "ValidationException":
|
|
1220
551
|
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1221
552
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
553
|
+
case "InvalidStateException":
|
|
554
|
+
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
555
|
+
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
556
|
+
case "InvalidCampaignStateException":
|
|
557
|
+
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
558
|
+
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
1222
559
|
default:
|
|
1223
560
|
const parsedBody = parsedOutput.body;
|
|
1224
561
|
return throwDefaultError({
|