@aws-sdk/client-acm 3.50.0 → 3.53.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist-cjs/endpoints.js +1 -1
  3. package/dist-cjs/index.js +3 -0
  4. package/dist-cjs/models/ACMServiceException.js +11 -0
  5. package/dist-cjs/models/models_0.js +212 -1
  6. package/dist-cjs/protocols/Aws_json1_1.js +183 -580
  7. package/dist-es/endpoints.js +1 -1
  8. package/dist-es/index.js +1 -0
  9. package/dist-es/models/ACMServiceException.js +12 -0
  10. package/dist-es/models/models_0.js +195 -1
  11. package/dist-es/protocols/Aws_json1_1.js +361 -609
  12. package/dist-types/index.d.ts +1 -0
  13. package/dist-types/models/ACMServiceException.d.ts +10 -0
  14. package/dist-types/models/models_0.d.ts +114 -64
  15. package/dist-types/ts3.4/ACM.d.ts +80 -0
  16. package/dist-types/ts3.4/ACMClient.d.ts +88 -0
  17. package/dist-types/ts3.4/commands/AddTagsToCertificateCommand.d.ts +17 -0
  18. package/dist-types/ts3.4/commands/DeleteCertificateCommand.d.ts +17 -0
  19. package/dist-types/ts3.4/commands/DescribeCertificateCommand.d.ts +17 -0
  20. package/dist-types/ts3.4/commands/ExportCertificateCommand.d.ts +17 -0
  21. package/dist-types/ts3.4/commands/GetAccountConfigurationCommand.d.ts +17 -0
  22. package/dist-types/ts3.4/commands/GetCertificateCommand.d.ts +17 -0
  23. package/dist-types/ts3.4/commands/ImportCertificateCommand.d.ts +17 -0
  24. package/dist-types/ts3.4/commands/ListCertificatesCommand.d.ts +17 -0
  25. package/dist-types/ts3.4/commands/ListTagsForCertificateCommand.d.ts +17 -0
  26. package/dist-types/ts3.4/commands/PutAccountConfigurationCommand.d.ts +17 -0
  27. package/dist-types/ts3.4/commands/RemoveTagsFromCertificateCommand.d.ts +17 -0
  28. package/dist-types/ts3.4/commands/RenewCertificateCommand.d.ts +17 -0
  29. package/dist-types/ts3.4/commands/RequestCertificateCommand.d.ts +17 -0
  30. package/dist-types/ts3.4/commands/ResendValidationEmailCommand.d.ts +17 -0
  31. package/dist-types/ts3.4/commands/UpdateCertificateOptionsCommand.d.ts +17 -0
  32. package/dist-types/ts3.4/commands/index.d.ts +15 -0
  33. package/dist-types/ts3.4/endpoints.d.ts +2 -0
  34. package/dist-types/ts3.4/index.d.ts +7 -0
  35. package/dist-types/ts3.4/models/ACMServiceException.d.ts +6 -0
  36. package/dist-types/ts3.4/models/index.d.ts +1 -0
  37. package/dist-types/ts3.4/models/models_0.d.ts +638 -0
  38. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  39. package/dist-types/ts3.4/pagination/ListCertificatesPaginator.d.ts +4 -0
  40. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  41. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +47 -0
  42. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
  43. package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
  44. package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
  45. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
  46. package/dist-types/ts3.4/waiters/index.d.ts +1 -0
  47. package/dist-types/ts3.4/waiters/waitForCertificateValidated.d.ts +7 -0
  48. package/package.json +34 -34
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_json1_1UpdateCertificateOptionsCommand = exports.deserializeAws_json1_1ResendValidationEmailCommand = exports.deserializeAws_json1_1RequestCertificateCommand = exports.deserializeAws_json1_1RenewCertificateCommand = exports.deserializeAws_json1_1RemoveTagsFromCertificateCommand = exports.deserializeAws_json1_1PutAccountConfigurationCommand = exports.deserializeAws_json1_1ListTagsForCertificateCommand = exports.deserializeAws_json1_1ListCertificatesCommand = exports.deserializeAws_json1_1ImportCertificateCommand = exports.deserializeAws_json1_1GetCertificateCommand = exports.deserializeAws_json1_1GetAccountConfigurationCommand = exports.deserializeAws_json1_1ExportCertificateCommand = exports.deserializeAws_json1_1DescribeCertificateCommand = exports.deserializeAws_json1_1DeleteCertificateCommand = exports.deserializeAws_json1_1AddTagsToCertificateCommand = exports.serializeAws_json1_1UpdateCertificateOptionsCommand = exports.serializeAws_json1_1ResendValidationEmailCommand = exports.serializeAws_json1_1RequestCertificateCommand = exports.serializeAws_json1_1RenewCertificateCommand = exports.serializeAws_json1_1RemoveTagsFromCertificateCommand = exports.serializeAws_json1_1PutAccountConfigurationCommand = exports.serializeAws_json1_1ListTagsForCertificateCommand = exports.serializeAws_json1_1ListCertificatesCommand = exports.serializeAws_json1_1ImportCertificateCommand = exports.serializeAws_json1_1GetCertificateCommand = exports.serializeAws_json1_1GetAccountConfigurationCommand = exports.serializeAws_json1_1ExportCertificateCommand = exports.serializeAws_json1_1DescribeCertificateCommand = exports.serializeAws_json1_1DeleteCertificateCommand = exports.serializeAws_json1_1AddTagsToCertificateCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const ACMServiceException_1 = require("../models/ACMServiceException");
7
+ const models_0_1 = require("../models/models_0");
6
8
  const serializeAws_json1_1AddTagsToCertificateCommand = async (input, context) => {
7
9
  const headers = {
8
10
  "content-type": "application/x-amz-json-1.1",
@@ -174,75 +176,34 @@ const deserializeAws_json1_1AddTagsToCertificateCommandError = async (output, co
174
176
  switch (errorCode) {
175
177
  case "InvalidArnException":
176
178
  case "com.amazonaws.acm#InvalidArnException":
177
- response = {
178
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
179
- name: errorCode,
180
- $metadata: deserializeMetadata(output),
181
- };
182
- break;
179
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
183
180
  case "InvalidParameterException":
184
181
  case "com.amazonaws.acm#InvalidParameterException":
185
- response = {
186
- ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
187
- name: errorCode,
188
- $metadata: deserializeMetadata(output),
189
- };
190
- break;
182
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
191
183
  case "InvalidTagException":
192
184
  case "com.amazonaws.acm#InvalidTagException":
193
- response = {
194
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
195
- name: errorCode,
196
- $metadata: deserializeMetadata(output),
197
- };
198
- break;
185
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
199
186
  case "ResourceNotFoundException":
200
187
  case "com.amazonaws.acm#ResourceNotFoundException":
201
- response = {
202
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
203
- name: errorCode,
204
- $metadata: deserializeMetadata(output),
205
- };
206
- break;
188
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
207
189
  case "TagPolicyException":
208
190
  case "com.amazonaws.acm#TagPolicyException":
209
- response = {
210
- ...(await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)),
211
- name: errorCode,
212
- $metadata: deserializeMetadata(output),
213
- };
214
- break;
191
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
215
192
  case "ThrottlingException":
216
193
  case "com.amazonaws.acm#ThrottlingException":
217
- response = {
218
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
219
- name: errorCode,
220
- $metadata: deserializeMetadata(output),
221
- };
222
- break;
194
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
223
195
  case "TooManyTagsException":
224
196
  case "com.amazonaws.acm#TooManyTagsException":
225
- response = {
226
- ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
227
- name: errorCode,
228
- $metadata: deserializeMetadata(output),
229
- };
230
- break;
197
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
231
198
  default:
232
199
  const parsedBody = parsedOutput.body;
233
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
234
- response = {
235
- ...parsedBody,
236
- name: `${errorCode}`,
237
- message: parsedBody.message || parsedBody.Message || errorCode,
200
+ response = new ACMServiceException_1.ACMServiceException({
201
+ name: parsedBody.code || parsedBody.Code || errorCode,
238
202
  $fault: "client",
239
203
  $metadata: deserializeMetadata(output),
240
- };
204
+ });
205
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
241
206
  }
242
- const message = response.message || response.Message || errorCode;
243
- response.message = message;
244
- delete response.Message;
245
- return Promise.reject(Object.assign(new Error(message), response));
246
207
  };
247
208
  const deserializeAws_json1_1DeleteCertificateCommand = async (output, context) => {
248
209
  if (output.statusCode >= 300) {
@@ -266,43 +227,22 @@ const deserializeAws_json1_1DeleteCertificateCommandError = async (output, conte
266
227
  switch (errorCode) {
267
228
  case "InvalidArnException":
268
229
  case "com.amazonaws.acm#InvalidArnException":
269
- response = {
270
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
271
- name: errorCode,
272
- $metadata: deserializeMetadata(output),
273
- };
274
- break;
230
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
275
231
  case "ResourceInUseException":
276
232
  case "com.amazonaws.acm#ResourceInUseException":
277
- response = {
278
- ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
279
- name: errorCode,
280
- $metadata: deserializeMetadata(output),
281
- };
282
- break;
233
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
283
234
  case "ResourceNotFoundException":
284
235
  case "com.amazonaws.acm#ResourceNotFoundException":
285
- response = {
286
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
287
- name: errorCode,
288
- $metadata: deserializeMetadata(output),
289
- };
290
- break;
236
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
291
237
  default:
292
238
  const parsedBody = parsedOutput.body;
293
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
294
- response = {
295
- ...parsedBody,
296
- name: `${errorCode}`,
297
- message: parsedBody.message || parsedBody.Message || errorCode,
239
+ response = new ACMServiceException_1.ACMServiceException({
240
+ name: parsedBody.code || parsedBody.Code || errorCode,
298
241
  $fault: "client",
299
242
  $metadata: deserializeMetadata(output),
300
- };
243
+ });
244
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
301
245
  }
302
- const message = response.message || response.Message || errorCode;
303
- response.message = message;
304
- delete response.Message;
305
- return Promise.reject(Object.assign(new Error(message), response));
306
246
  };
307
247
  const deserializeAws_json1_1DescribeCertificateCommand = async (output, context) => {
308
248
  if (output.statusCode >= 300) {
@@ -329,35 +269,19 @@ const deserializeAws_json1_1DescribeCertificateCommandError = async (output, con
329
269
  switch (errorCode) {
330
270
  case "InvalidArnException":
331
271
  case "com.amazonaws.acm#InvalidArnException":
332
- response = {
333
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
334
- name: errorCode,
335
- $metadata: deserializeMetadata(output),
336
- };
337
- break;
272
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
338
273
  case "ResourceNotFoundException":
339
274
  case "com.amazonaws.acm#ResourceNotFoundException":
340
- response = {
341
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
342
- name: errorCode,
343
- $metadata: deserializeMetadata(output),
344
- };
345
- break;
275
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
346
276
  default:
347
277
  const parsedBody = parsedOutput.body;
348
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
349
- response = {
350
- ...parsedBody,
351
- name: `${errorCode}`,
352
- message: parsedBody.message || parsedBody.Message || errorCode,
278
+ response = new ACMServiceException_1.ACMServiceException({
279
+ name: parsedBody.code || parsedBody.Code || errorCode,
353
280
  $fault: "client",
354
281
  $metadata: deserializeMetadata(output),
355
- };
282
+ });
283
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
356
284
  }
357
- const message = response.message || response.Message || errorCode;
358
- response.message = message;
359
- delete response.Message;
360
- return Promise.reject(Object.assign(new Error(message), response));
361
285
  };
362
286
  const deserializeAws_json1_1ExportCertificateCommand = async (output, context) => {
363
287
  if (output.statusCode >= 300) {
@@ -384,43 +308,22 @@ const deserializeAws_json1_1ExportCertificateCommandError = async (output, conte
384
308
  switch (errorCode) {
385
309
  case "InvalidArnException":
386
310
  case "com.amazonaws.acm#InvalidArnException":
387
- response = {
388
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
389
- name: errorCode,
390
- $metadata: deserializeMetadata(output),
391
- };
392
- break;
311
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
393
312
  case "RequestInProgressException":
394
313
  case "com.amazonaws.acm#RequestInProgressException":
395
- response = {
396
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
397
- name: errorCode,
398
- $metadata: deserializeMetadata(output),
399
- };
400
- break;
314
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
401
315
  case "ResourceNotFoundException":
402
316
  case "com.amazonaws.acm#ResourceNotFoundException":
403
- response = {
404
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
405
- name: errorCode,
406
- $metadata: deserializeMetadata(output),
407
- };
408
- break;
317
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
409
318
  default:
410
319
  const parsedBody = parsedOutput.body;
411
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
412
- response = {
413
- ...parsedBody,
414
- name: `${errorCode}`,
415
- message: parsedBody.message || parsedBody.Message || errorCode,
320
+ response = new ACMServiceException_1.ACMServiceException({
321
+ name: parsedBody.code || parsedBody.Code || errorCode,
416
322
  $fault: "client",
417
323
  $metadata: deserializeMetadata(output),
418
- };
324
+ });
325
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
419
326
  }
420
- const message = response.message || response.Message || errorCode;
421
- response.message = message;
422
- delete response.Message;
423
- return Promise.reject(Object.assign(new Error(message), response));
424
327
  };
425
328
  const deserializeAws_json1_1GetAccountConfigurationCommand = async (output, context) => {
426
329
  if (output.statusCode >= 300) {
@@ -447,35 +350,19 @@ const deserializeAws_json1_1GetAccountConfigurationCommandError = async (output,
447
350
  switch (errorCode) {
448
351
  case "AccessDeniedException":
449
352
  case "com.amazonaws.acm#AccessDeniedException":
450
- response = {
451
- ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
452
- name: errorCode,
453
- $metadata: deserializeMetadata(output),
454
- };
455
- break;
353
+ throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
456
354
  case "ThrottlingException":
457
355
  case "com.amazonaws.acm#ThrottlingException":
458
- response = {
459
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
460
- name: errorCode,
461
- $metadata: deserializeMetadata(output),
462
- };
463
- break;
356
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
464
357
  default:
465
358
  const parsedBody = parsedOutput.body;
466
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
467
- response = {
468
- ...parsedBody,
469
- name: `${errorCode}`,
470
- message: parsedBody.message || parsedBody.Message || errorCode,
359
+ response = new ACMServiceException_1.ACMServiceException({
360
+ name: parsedBody.code || parsedBody.Code || errorCode,
471
361
  $fault: "client",
472
362
  $metadata: deserializeMetadata(output),
473
- };
363
+ });
364
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
474
365
  }
475
- const message = response.message || response.Message || errorCode;
476
- response.message = message;
477
- delete response.Message;
478
- return Promise.reject(Object.assign(new Error(message), response));
479
366
  };
480
367
  const deserializeAws_json1_1GetCertificateCommand = async (output, context) => {
481
368
  if (output.statusCode >= 300) {
@@ -502,43 +389,22 @@ const deserializeAws_json1_1GetCertificateCommandError = async (output, context)
502
389
  switch (errorCode) {
503
390
  case "InvalidArnException":
504
391
  case "com.amazonaws.acm#InvalidArnException":
505
- response = {
506
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
507
- name: errorCode,
508
- $metadata: deserializeMetadata(output),
509
- };
510
- break;
392
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
511
393
  case "RequestInProgressException":
512
394
  case "com.amazonaws.acm#RequestInProgressException":
513
- response = {
514
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
515
- name: errorCode,
516
- $metadata: deserializeMetadata(output),
517
- };
518
- break;
395
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
519
396
  case "ResourceNotFoundException":
520
397
  case "com.amazonaws.acm#ResourceNotFoundException":
521
- response = {
522
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
523
- name: errorCode,
524
- $metadata: deserializeMetadata(output),
525
- };
526
- break;
398
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
527
399
  default:
528
400
  const parsedBody = parsedOutput.body;
529
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
530
- response = {
531
- ...parsedBody,
532
- name: `${errorCode}`,
533
- message: parsedBody.message || parsedBody.Message || errorCode,
401
+ response = new ACMServiceException_1.ACMServiceException({
402
+ name: parsedBody.code || parsedBody.Code || errorCode,
534
403
  $fault: "client",
535
404
  $metadata: deserializeMetadata(output),
536
- };
405
+ });
406
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
537
407
  }
538
- const message = response.message || response.Message || errorCode;
539
- response.message = message;
540
- delete response.Message;
541
- return Promise.reject(Object.assign(new Error(message), response));
542
408
  };
543
409
  const deserializeAws_json1_1ImportCertificateCommand = async (output, context) => {
544
410
  if (output.statusCode >= 300) {
@@ -565,75 +431,34 @@ const deserializeAws_json1_1ImportCertificateCommandError = async (output, conte
565
431
  switch (errorCode) {
566
432
  case "InvalidArnException":
567
433
  case "com.amazonaws.acm#InvalidArnException":
568
- response = {
569
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
570
- name: errorCode,
571
- $metadata: deserializeMetadata(output),
572
- };
573
- break;
434
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
574
435
  case "InvalidParameterException":
575
436
  case "com.amazonaws.acm#InvalidParameterException":
576
- response = {
577
- ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
578
- name: errorCode,
579
- $metadata: deserializeMetadata(output),
580
- };
581
- break;
437
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
582
438
  case "InvalidTagException":
583
439
  case "com.amazonaws.acm#InvalidTagException":
584
- response = {
585
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
586
- name: errorCode,
587
- $metadata: deserializeMetadata(output),
588
- };
589
- break;
440
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
590
441
  case "LimitExceededException":
591
442
  case "com.amazonaws.acm#LimitExceededException":
592
- response = {
593
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
594
- name: errorCode,
595
- $metadata: deserializeMetadata(output),
596
- };
597
- break;
443
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
598
444
  case "ResourceNotFoundException":
599
445
  case "com.amazonaws.acm#ResourceNotFoundException":
600
- response = {
601
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
602
- name: errorCode,
603
- $metadata: deserializeMetadata(output),
604
- };
605
- break;
446
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
606
447
  case "TagPolicyException":
607
448
  case "com.amazonaws.acm#TagPolicyException":
608
- response = {
609
- ...(await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)),
610
- name: errorCode,
611
- $metadata: deserializeMetadata(output),
612
- };
613
- break;
449
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
614
450
  case "TooManyTagsException":
615
451
  case "com.amazonaws.acm#TooManyTagsException":
616
- response = {
617
- ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
618
- name: errorCode,
619
- $metadata: deserializeMetadata(output),
620
- };
621
- break;
452
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
622
453
  default:
623
454
  const parsedBody = parsedOutput.body;
624
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
625
- response = {
626
- ...parsedBody,
627
- name: `${errorCode}`,
628
- message: parsedBody.message || parsedBody.Message || errorCode,
455
+ response = new ACMServiceException_1.ACMServiceException({
456
+ name: parsedBody.code || parsedBody.Code || errorCode,
629
457
  $fault: "client",
630
458
  $metadata: deserializeMetadata(output),
631
- };
459
+ });
460
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
632
461
  }
633
- const message = response.message || response.Message || errorCode;
634
- response.message = message;
635
- delete response.Message;
636
- return Promise.reject(Object.assign(new Error(message), response));
637
462
  };
638
463
  const deserializeAws_json1_1ListCertificatesCommand = async (output, context) => {
639
464
  if (output.statusCode >= 300) {
@@ -660,27 +485,16 @@ const deserializeAws_json1_1ListCertificatesCommandError = async (output, contex
660
485
  switch (errorCode) {
661
486
  case "InvalidArgsException":
662
487
  case "com.amazonaws.acm#InvalidArgsException":
663
- response = {
664
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
665
- name: errorCode,
666
- $metadata: deserializeMetadata(output),
667
- };
668
- break;
488
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
669
489
  default:
670
490
  const parsedBody = parsedOutput.body;
671
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
672
- response = {
673
- ...parsedBody,
674
- name: `${errorCode}`,
675
- message: parsedBody.message || parsedBody.Message || errorCode,
491
+ response = new ACMServiceException_1.ACMServiceException({
492
+ name: parsedBody.code || parsedBody.Code || errorCode,
676
493
  $fault: "client",
677
494
  $metadata: deserializeMetadata(output),
678
- };
495
+ });
496
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
679
497
  }
680
- const message = response.message || response.Message || errorCode;
681
- response.message = message;
682
- delete response.Message;
683
- return Promise.reject(Object.assign(new Error(message), response));
684
498
  };
685
499
  const deserializeAws_json1_1ListTagsForCertificateCommand = async (output, context) => {
686
500
  if (output.statusCode >= 300) {
@@ -707,35 +521,19 @@ const deserializeAws_json1_1ListTagsForCertificateCommandError = async (output,
707
521
  switch (errorCode) {
708
522
  case "InvalidArnException":
709
523
  case "com.amazonaws.acm#InvalidArnException":
710
- response = {
711
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
712
- name: errorCode,
713
- $metadata: deserializeMetadata(output),
714
- };
715
- break;
524
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
716
525
  case "ResourceNotFoundException":
717
526
  case "com.amazonaws.acm#ResourceNotFoundException":
718
- response = {
719
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
720
- name: errorCode,
721
- $metadata: deserializeMetadata(output),
722
- };
723
- break;
527
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
724
528
  default:
725
529
  const parsedBody = parsedOutput.body;
726
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
727
- response = {
728
- ...parsedBody,
729
- name: `${errorCode}`,
730
- message: parsedBody.message || parsedBody.Message || errorCode,
530
+ response = new ACMServiceException_1.ACMServiceException({
531
+ name: parsedBody.code || parsedBody.Code || errorCode,
731
532
  $fault: "client",
732
533
  $metadata: deserializeMetadata(output),
733
- };
534
+ });
535
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
734
536
  }
735
- const message = response.message || response.Message || errorCode;
736
- response.message = message;
737
- delete response.Message;
738
- return Promise.reject(Object.assign(new Error(message), response));
739
537
  };
740
538
  const deserializeAws_json1_1PutAccountConfigurationCommand = async (output, context) => {
741
539
  if (output.statusCode >= 300) {
@@ -759,51 +557,25 @@ const deserializeAws_json1_1PutAccountConfigurationCommandError = async (output,
759
557
  switch (errorCode) {
760
558
  case "AccessDeniedException":
761
559
  case "com.amazonaws.acm#AccessDeniedException":
762
- response = {
763
- ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
764
- name: errorCode,
765
- $metadata: deserializeMetadata(output),
766
- };
767
- break;
560
+ throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
768
561
  case "ConflictException":
769
562
  case "com.amazonaws.acm#ConflictException":
770
- response = {
771
- ...(await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)),
772
- name: errorCode,
773
- $metadata: deserializeMetadata(output),
774
- };
775
- break;
563
+ throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
776
564
  case "ThrottlingException":
777
565
  case "com.amazonaws.acm#ThrottlingException":
778
- response = {
779
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
780
- name: errorCode,
781
- $metadata: deserializeMetadata(output),
782
- };
783
- break;
566
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
784
567
  case "ValidationException":
785
568
  case "com.amazonaws.acm#ValidationException":
786
- response = {
787
- ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
788
- name: errorCode,
789
- $metadata: deserializeMetadata(output),
790
- };
791
- break;
569
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
792
570
  default:
793
571
  const parsedBody = parsedOutput.body;
794
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
795
- response = {
796
- ...parsedBody,
797
- name: `${errorCode}`,
798
- message: parsedBody.message || parsedBody.Message || errorCode,
572
+ response = new ACMServiceException_1.ACMServiceException({
573
+ name: parsedBody.code || parsedBody.Code || errorCode,
799
574
  $fault: "client",
800
575
  $metadata: deserializeMetadata(output),
801
- };
576
+ });
577
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
802
578
  }
803
- const message = response.message || response.Message || errorCode;
804
- response.message = message;
805
- delete response.Message;
806
- return Promise.reject(Object.assign(new Error(message), response));
807
579
  };
808
580
  const deserializeAws_json1_1RemoveTagsFromCertificateCommand = async (output, context) => {
809
581
  if (output.statusCode >= 300) {
@@ -827,67 +599,31 @@ const deserializeAws_json1_1RemoveTagsFromCertificateCommandError = async (outpu
827
599
  switch (errorCode) {
828
600
  case "InvalidArnException":
829
601
  case "com.amazonaws.acm#InvalidArnException":
830
- response = {
831
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
832
- name: errorCode,
833
- $metadata: deserializeMetadata(output),
834
- };
835
- break;
602
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
836
603
  case "InvalidParameterException":
837
604
  case "com.amazonaws.acm#InvalidParameterException":
838
- response = {
839
- ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
840
- name: errorCode,
841
- $metadata: deserializeMetadata(output),
842
- };
843
- break;
605
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
844
606
  case "InvalidTagException":
845
607
  case "com.amazonaws.acm#InvalidTagException":
846
- response = {
847
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
848
- name: errorCode,
849
- $metadata: deserializeMetadata(output),
850
- };
851
- break;
608
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
852
609
  case "ResourceNotFoundException":
853
610
  case "com.amazonaws.acm#ResourceNotFoundException":
854
- response = {
855
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
856
- name: errorCode,
857
- $metadata: deserializeMetadata(output),
858
- };
859
- break;
611
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
860
612
  case "TagPolicyException":
861
613
  case "com.amazonaws.acm#TagPolicyException":
862
- response = {
863
- ...(await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)),
864
- name: errorCode,
865
- $metadata: deserializeMetadata(output),
866
- };
867
- break;
614
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
868
615
  case "ThrottlingException":
869
616
  case "com.amazonaws.acm#ThrottlingException":
870
- response = {
871
- ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
872
- name: errorCode,
873
- $metadata: deserializeMetadata(output),
874
- };
875
- break;
617
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
876
618
  default:
877
619
  const parsedBody = parsedOutput.body;
878
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
879
- response = {
880
- ...parsedBody,
881
- name: `${errorCode}`,
882
- message: parsedBody.message || parsedBody.Message || errorCode,
620
+ response = new ACMServiceException_1.ACMServiceException({
621
+ name: parsedBody.code || parsedBody.Code || errorCode,
883
622
  $fault: "client",
884
623
  $metadata: deserializeMetadata(output),
885
- };
624
+ });
625
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
886
626
  }
887
- const message = response.message || response.Message || errorCode;
888
- response.message = message;
889
- delete response.Message;
890
- return Promise.reject(Object.assign(new Error(message), response));
891
627
  };
892
628
  const deserializeAws_json1_1RenewCertificateCommand = async (output, context) => {
893
629
  if (output.statusCode >= 300) {
@@ -911,35 +647,19 @@ const deserializeAws_json1_1RenewCertificateCommandError = async (output, contex
911
647
  switch (errorCode) {
912
648
  case "InvalidArnException":
913
649
  case "com.amazonaws.acm#InvalidArnException":
914
- response = {
915
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
916
- name: errorCode,
917
- $metadata: deserializeMetadata(output),
918
- };
919
- break;
650
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
920
651
  case "ResourceNotFoundException":
921
652
  case "com.amazonaws.acm#ResourceNotFoundException":
922
- response = {
923
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
924
- name: errorCode,
925
- $metadata: deserializeMetadata(output),
926
- };
927
- break;
653
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
928
654
  default:
929
655
  const parsedBody = parsedOutput.body;
930
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
931
- response = {
932
- ...parsedBody,
933
- name: `${errorCode}`,
934
- message: parsedBody.message || parsedBody.Message || errorCode,
656
+ response = new ACMServiceException_1.ACMServiceException({
657
+ name: parsedBody.code || parsedBody.Code || errorCode,
935
658
  $fault: "client",
936
659
  $metadata: deserializeMetadata(output),
937
- };
660
+ });
661
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
938
662
  }
939
- const message = response.message || response.Message || errorCode;
940
- response.message = message;
941
- delete response.Message;
942
- return Promise.reject(Object.assign(new Error(message), response));
943
663
  };
944
664
  const deserializeAws_json1_1RequestCertificateCommand = async (output, context) => {
945
665
  if (output.statusCode >= 300) {
@@ -966,75 +686,34 @@ const deserializeAws_json1_1RequestCertificateCommandError = async (output, cont
966
686
  switch (errorCode) {
967
687
  case "InvalidArnException":
968
688
  case "com.amazonaws.acm#InvalidArnException":
969
- response = {
970
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
971
- name: errorCode,
972
- $metadata: deserializeMetadata(output),
973
- };
974
- break;
689
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
975
690
  case "InvalidDomainValidationOptionsException":
976
691
  case "com.amazonaws.acm#InvalidDomainValidationOptionsException":
977
- response = {
978
- ...(await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context)),
979
- name: errorCode,
980
- $metadata: deserializeMetadata(output),
981
- };
982
- break;
692
+ throw await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context);
983
693
  case "InvalidParameterException":
984
694
  case "com.amazonaws.acm#InvalidParameterException":
985
- response = {
986
- ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
987
- name: errorCode,
988
- $metadata: deserializeMetadata(output),
989
- };
990
- break;
695
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
991
696
  case "InvalidTagException":
992
697
  case "com.amazonaws.acm#InvalidTagException":
993
- response = {
994
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
995
- name: errorCode,
996
- $metadata: deserializeMetadata(output),
997
- };
998
- break;
698
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
999
699
  case "LimitExceededException":
1000
700
  case "com.amazonaws.acm#LimitExceededException":
1001
- response = {
1002
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1003
- name: errorCode,
1004
- $metadata: deserializeMetadata(output),
1005
- };
1006
- break;
701
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1007
702
  case "TagPolicyException":
1008
703
  case "com.amazonaws.acm#TagPolicyException":
1009
- response = {
1010
- ...(await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)),
1011
- name: errorCode,
1012
- $metadata: deserializeMetadata(output),
1013
- };
1014
- break;
704
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
1015
705
  case "TooManyTagsException":
1016
706
  case "com.amazonaws.acm#TooManyTagsException":
1017
- response = {
1018
- ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
1019
- name: errorCode,
1020
- $metadata: deserializeMetadata(output),
1021
- };
1022
- break;
707
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
1023
708
  default:
1024
709
  const parsedBody = parsedOutput.body;
1025
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1026
- response = {
1027
- ...parsedBody,
1028
- name: `${errorCode}`,
1029
- message: parsedBody.message || parsedBody.Message || errorCode,
710
+ response = new ACMServiceException_1.ACMServiceException({
711
+ name: parsedBody.code || parsedBody.Code || errorCode,
1030
712
  $fault: "client",
1031
713
  $metadata: deserializeMetadata(output),
1032
- };
714
+ });
715
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1033
716
  }
1034
- const message = response.message || response.Message || errorCode;
1035
- response.message = message;
1036
- delete response.Message;
1037
- return Promise.reject(Object.assign(new Error(message), response));
1038
717
  };
1039
718
  const deserializeAws_json1_1ResendValidationEmailCommand = async (output, context) => {
1040
719
  if (output.statusCode >= 300) {
@@ -1058,51 +737,25 @@ const deserializeAws_json1_1ResendValidationEmailCommandError = async (output, c
1058
737
  switch (errorCode) {
1059
738
  case "InvalidArnException":
1060
739
  case "com.amazonaws.acm#InvalidArnException":
1061
- response = {
1062
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1063
- name: errorCode,
1064
- $metadata: deserializeMetadata(output),
1065
- };
1066
- break;
740
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1067
741
  case "InvalidDomainValidationOptionsException":
1068
742
  case "com.amazonaws.acm#InvalidDomainValidationOptionsException":
1069
- response = {
1070
- ...(await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context)),
1071
- name: errorCode,
1072
- $metadata: deserializeMetadata(output),
1073
- };
1074
- break;
743
+ throw await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context);
1075
744
  case "InvalidStateException":
1076
745
  case "com.amazonaws.acm#InvalidStateException":
1077
- response = {
1078
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1079
- name: errorCode,
1080
- $metadata: deserializeMetadata(output),
1081
- };
1082
- break;
746
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1083
747
  case "ResourceNotFoundException":
1084
748
  case "com.amazonaws.acm#ResourceNotFoundException":
1085
- response = {
1086
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1087
- name: errorCode,
1088
- $metadata: deserializeMetadata(output),
1089
- };
1090
- break;
749
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1091
750
  default:
1092
751
  const parsedBody = parsedOutput.body;
1093
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1094
- response = {
1095
- ...parsedBody,
1096
- name: `${errorCode}`,
1097
- message: parsedBody.message || parsedBody.Message || errorCode,
752
+ response = new ACMServiceException_1.ACMServiceException({
753
+ name: parsedBody.code || parsedBody.Code || errorCode,
1098
754
  $fault: "client",
1099
755
  $metadata: deserializeMetadata(output),
1100
- };
756
+ });
757
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1101
758
  }
1102
- const message = response.message || response.Message || errorCode;
1103
- response.message = message;
1104
- delete response.Message;
1105
- return Promise.reject(Object.assign(new Error(message), response));
1106
759
  };
1107
760
  const deserializeAws_json1_1UpdateCertificateOptionsCommand = async (output, context) => {
1108
761
  if (output.statusCode >= 300) {
@@ -1126,227 +779,169 @@ const deserializeAws_json1_1UpdateCertificateOptionsCommandError = async (output
1126
779
  switch (errorCode) {
1127
780
  case "InvalidArnException":
1128
781
  case "com.amazonaws.acm#InvalidArnException":
1129
- response = {
1130
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1131
- name: errorCode,
1132
- $metadata: deserializeMetadata(output),
1133
- };
1134
- break;
782
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1135
783
  case "InvalidStateException":
1136
784
  case "com.amazonaws.acm#InvalidStateException":
1137
- response = {
1138
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1139
- name: errorCode,
1140
- $metadata: deserializeMetadata(output),
1141
- };
1142
- break;
785
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1143
786
  case "LimitExceededException":
1144
787
  case "com.amazonaws.acm#LimitExceededException":
1145
- response = {
1146
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1147
- name: errorCode,
1148
- $metadata: deserializeMetadata(output),
1149
- };
1150
- break;
788
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1151
789
  case "ResourceNotFoundException":
1152
790
  case "com.amazonaws.acm#ResourceNotFoundException":
1153
- response = {
1154
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1155
- name: errorCode,
1156
- $metadata: deserializeMetadata(output),
1157
- };
1158
- break;
791
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1159
792
  default:
1160
793
  const parsedBody = parsedOutput.body;
1161
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1162
- response = {
1163
- ...parsedBody,
1164
- name: `${errorCode}`,
1165
- message: parsedBody.message || parsedBody.Message || errorCode,
794
+ response = new ACMServiceException_1.ACMServiceException({
795
+ name: parsedBody.code || parsedBody.Code || errorCode,
1166
796
  $fault: "client",
1167
797
  $metadata: deserializeMetadata(output),
1168
- };
798
+ });
799
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1169
800
  }
1170
- const message = response.message || response.Message || errorCode;
1171
- response.message = message;
1172
- delete response.Message;
1173
- return Promise.reject(Object.assign(new Error(message), response));
1174
801
  };
1175
802
  const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1176
803
  const body = parsedOutput.body;
1177
804
  const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1178
- const contents = {
1179
- name: "AccessDeniedException",
1180
- $fault: "client",
805
+ const exception = new models_0_1.AccessDeniedException({
1181
806
  $metadata: deserializeMetadata(parsedOutput),
1182
807
  ...deserialized,
1183
- };
1184
- return contents;
808
+ });
809
+ return smithy_client_1.decorateServiceException(exception, body);
1185
810
  };
1186
811
  const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
1187
812
  const body = parsedOutput.body;
1188
813
  const deserialized = deserializeAws_json1_1ConflictException(body, context);
1189
- const contents = {
1190
- name: "ConflictException",
1191
- $fault: "client",
814
+ const exception = new models_0_1.ConflictException({
1192
815
  $metadata: deserializeMetadata(parsedOutput),
1193
816
  ...deserialized,
1194
- };
1195
- return contents;
817
+ });
818
+ return smithy_client_1.decorateServiceException(exception, body);
1196
819
  };
1197
820
  const deserializeAws_json1_1InvalidArgsExceptionResponse = async (parsedOutput, context) => {
1198
821
  const body = parsedOutput.body;
1199
822
  const deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
1200
- const contents = {
1201
- name: "InvalidArgsException",
1202
- $fault: "client",
823
+ const exception = new models_0_1.InvalidArgsException({
1203
824
  $metadata: deserializeMetadata(parsedOutput),
1204
825
  ...deserialized,
1205
- };
1206
- return contents;
826
+ });
827
+ return smithy_client_1.decorateServiceException(exception, body);
1207
828
  };
1208
829
  const deserializeAws_json1_1InvalidArnExceptionResponse = async (parsedOutput, context) => {
1209
830
  const body = parsedOutput.body;
1210
831
  const deserialized = deserializeAws_json1_1InvalidArnException(body, context);
1211
- const contents = {
1212
- name: "InvalidArnException",
1213
- $fault: "client",
832
+ const exception = new models_0_1.InvalidArnException({
1214
833
  $metadata: deserializeMetadata(parsedOutput),
1215
834
  ...deserialized,
1216
- };
1217
- return contents;
835
+ });
836
+ return smithy_client_1.decorateServiceException(exception, body);
1218
837
  };
1219
838
  const deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse = async (parsedOutput, context) => {
1220
839
  const body = parsedOutput.body;
1221
840
  const deserialized = deserializeAws_json1_1InvalidDomainValidationOptionsException(body, context);
1222
- const contents = {
1223
- name: "InvalidDomainValidationOptionsException",
1224
- $fault: "client",
841
+ const exception = new models_0_1.InvalidDomainValidationOptionsException({
1225
842
  $metadata: deserializeMetadata(parsedOutput),
1226
843
  ...deserialized,
1227
- };
1228
- return contents;
844
+ });
845
+ return smithy_client_1.decorateServiceException(exception, body);
1229
846
  };
1230
847
  const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
1231
848
  const body = parsedOutput.body;
1232
849
  const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
1233
- const contents = {
1234
- name: "InvalidParameterException",
1235
- $fault: "client",
850
+ const exception = new models_0_1.InvalidParameterException({
1236
851
  $metadata: deserializeMetadata(parsedOutput),
1237
852
  ...deserialized,
1238
- };
1239
- return contents;
853
+ });
854
+ return smithy_client_1.decorateServiceException(exception, body);
1240
855
  };
1241
856
  const deserializeAws_json1_1InvalidStateExceptionResponse = async (parsedOutput, context) => {
1242
857
  const body = parsedOutput.body;
1243
858
  const deserialized = deserializeAws_json1_1InvalidStateException(body, context);
1244
- const contents = {
1245
- name: "InvalidStateException",
1246
- $fault: "client",
859
+ const exception = new models_0_1.InvalidStateException({
1247
860
  $metadata: deserializeMetadata(parsedOutput),
1248
861
  ...deserialized,
1249
- };
1250
- return contents;
862
+ });
863
+ return smithy_client_1.decorateServiceException(exception, body);
1251
864
  };
1252
865
  const deserializeAws_json1_1InvalidTagExceptionResponse = async (parsedOutput, context) => {
1253
866
  const body = parsedOutput.body;
1254
867
  const deserialized = deserializeAws_json1_1InvalidTagException(body, context);
1255
- const contents = {
1256
- name: "InvalidTagException",
1257
- $fault: "client",
868
+ const exception = new models_0_1.InvalidTagException({
1258
869
  $metadata: deserializeMetadata(parsedOutput),
1259
870
  ...deserialized,
1260
- };
1261
- return contents;
871
+ });
872
+ return smithy_client_1.decorateServiceException(exception, body);
1262
873
  };
1263
874
  const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
1264
875
  const body = parsedOutput.body;
1265
876
  const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
1266
- const contents = {
1267
- name: "LimitExceededException",
1268
- $fault: "client",
877
+ const exception = new models_0_1.LimitExceededException({
1269
878
  $metadata: deserializeMetadata(parsedOutput),
1270
879
  ...deserialized,
1271
- };
1272
- return contents;
880
+ });
881
+ return smithy_client_1.decorateServiceException(exception, body);
1273
882
  };
1274
883
  const deserializeAws_json1_1RequestInProgressExceptionResponse = async (parsedOutput, context) => {
1275
884
  const body = parsedOutput.body;
1276
885
  const deserialized = deserializeAws_json1_1RequestInProgressException(body, context);
1277
- const contents = {
1278
- name: "RequestInProgressException",
1279
- $fault: "client",
886
+ const exception = new models_0_1.RequestInProgressException({
1280
887
  $metadata: deserializeMetadata(parsedOutput),
1281
888
  ...deserialized,
1282
- };
1283
- return contents;
889
+ });
890
+ return smithy_client_1.decorateServiceException(exception, body);
1284
891
  };
1285
892
  const deserializeAws_json1_1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
1286
893
  const body = parsedOutput.body;
1287
894
  const deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
1288
- const contents = {
1289
- name: "ResourceInUseException",
1290
- $fault: "client",
895
+ const exception = new models_0_1.ResourceInUseException({
1291
896
  $metadata: deserializeMetadata(parsedOutput),
1292
897
  ...deserialized,
1293
- };
1294
- return contents;
898
+ });
899
+ return smithy_client_1.decorateServiceException(exception, body);
1295
900
  };
1296
901
  const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1297
902
  const body = parsedOutput.body;
1298
903
  const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1299
- const contents = {
1300
- name: "ResourceNotFoundException",
1301
- $fault: "client",
904
+ const exception = new models_0_1.ResourceNotFoundException({
1302
905
  $metadata: deserializeMetadata(parsedOutput),
1303
906
  ...deserialized,
1304
- };
1305
- return contents;
907
+ });
908
+ return smithy_client_1.decorateServiceException(exception, body);
1306
909
  };
1307
910
  const deserializeAws_json1_1TagPolicyExceptionResponse = async (parsedOutput, context) => {
1308
911
  const body = parsedOutput.body;
1309
912
  const deserialized = deserializeAws_json1_1TagPolicyException(body, context);
1310
- const contents = {
1311
- name: "TagPolicyException",
1312
- $fault: "client",
913
+ const exception = new models_0_1.TagPolicyException({
1313
914
  $metadata: deserializeMetadata(parsedOutput),
1314
915
  ...deserialized,
1315
- };
1316
- return contents;
916
+ });
917
+ return smithy_client_1.decorateServiceException(exception, body);
1317
918
  };
1318
919
  const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1319
920
  const body = parsedOutput.body;
1320
921
  const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1321
- const contents = {
1322
- name: "ThrottlingException",
1323
- $fault: "client",
922
+ const exception = new models_0_1.ThrottlingException({
1324
923
  $metadata: deserializeMetadata(parsedOutput),
1325
924
  ...deserialized,
1326
- };
1327
- return contents;
925
+ });
926
+ return smithy_client_1.decorateServiceException(exception, body);
1328
927
  };
1329
928
  const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
1330
929
  const body = parsedOutput.body;
1331
930
  const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1332
- const contents = {
1333
- name: "TooManyTagsException",
1334
- $fault: "client",
931
+ const exception = new models_0_1.TooManyTagsException({
1335
932
  $metadata: deserializeMetadata(parsedOutput),
1336
933
  ...deserialized,
1337
- };
1338
- return contents;
934
+ });
935
+ return smithy_client_1.decorateServiceException(exception, body);
1339
936
  };
1340
937
  const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
1341
938
  const body = parsedOutput.body;
1342
939
  const deserialized = deserializeAws_json1_1ValidationException(body, context);
1343
- const contents = {
1344
- name: "ValidationException",
1345
- $fault: "client",
940
+ const exception = new models_0_1.ValidationException({
1346
941
  $metadata: deserializeMetadata(parsedOutput),
1347
942
  ...deserialized,
1348
- };
1349
- return contents;
943
+ });
944
+ return smithy_client_1.decorateServiceException(exception, body);
1350
945
  };
1351
946
  const serializeAws_json1_1AddTagsToCertificateRequest = (input, context) => {
1352
947
  return {
@@ -1656,7 +1251,7 @@ const deserializeAws_json1_1CertificateSummary = (output, context) => {
1656
1251
  };
1657
1252
  };
1658
1253
  const deserializeAws_json1_1CertificateSummaryList = (output, context) => {
1659
- return (output || [])
1254
+ const retVal = (output || [])
1660
1255
  .filter((e) => e != null)
1661
1256
  .map((entry) => {
1662
1257
  if (entry === null) {
@@ -1664,6 +1259,7 @@ const deserializeAws_json1_1CertificateSummaryList = (output, context) => {
1664
1259
  }
1665
1260
  return deserializeAws_json1_1CertificateSummary(entry, context);
1666
1261
  });
1262
+ return retVal;
1667
1263
  };
1668
1264
  const deserializeAws_json1_1ConflictException = (output, context) => {
1669
1265
  return {
@@ -1678,7 +1274,7 @@ const deserializeAws_json1_1DescribeCertificateResponse = (output, context) => {
1678
1274
  };
1679
1275
  };
1680
1276
  const deserializeAws_json1_1DomainList = (output, context) => {
1681
- return (output || [])
1277
+ const retVal = (output || [])
1682
1278
  .filter((e) => e != null)
1683
1279
  .map((entry) => {
1684
1280
  if (entry === null) {
@@ -1686,6 +1282,7 @@ const deserializeAws_json1_1DomainList = (output, context) => {
1686
1282
  }
1687
1283
  return smithy_client_1.expectString(entry);
1688
1284
  });
1285
+ return retVal;
1689
1286
  };
1690
1287
  const deserializeAws_json1_1DomainValidation = (output, context) => {
1691
1288
  return {
@@ -1702,7 +1299,7 @@ const deserializeAws_json1_1DomainValidation = (output, context) => {
1702
1299
  };
1703
1300
  };
1704
1301
  const deserializeAws_json1_1DomainValidationList = (output, context) => {
1705
- return (output || [])
1302
+ const retVal = (output || [])
1706
1303
  .filter((e) => e != null)
1707
1304
  .map((entry) => {
1708
1305
  if (entry === null) {
@@ -1710,6 +1307,7 @@ const deserializeAws_json1_1DomainValidationList = (output, context) => {
1710
1307
  }
1711
1308
  return deserializeAws_json1_1DomainValidation(entry, context);
1712
1309
  });
1310
+ return retVal;
1713
1311
  };
1714
1312
  const deserializeAws_json1_1ExpiryEventsConfiguration = (output, context) => {
1715
1313
  return {
@@ -1730,7 +1328,7 @@ const deserializeAws_json1_1ExtendedKeyUsage = (output, context) => {
1730
1328
  };
1731
1329
  };
1732
1330
  const deserializeAws_json1_1ExtendedKeyUsageList = (output, context) => {
1733
- return (output || [])
1331
+ const retVal = (output || [])
1734
1332
  .filter((e) => e != null)
1735
1333
  .map((entry) => {
1736
1334
  if (entry === null) {
@@ -1738,6 +1336,7 @@ const deserializeAws_json1_1ExtendedKeyUsageList = (output, context) => {
1738
1336
  }
1739
1337
  return deserializeAws_json1_1ExtendedKeyUsage(entry, context);
1740
1338
  });
1339
+ return retVal;
1741
1340
  };
1742
1341
  const deserializeAws_json1_1GetAccountConfigurationResponse = (output, context) => {
1743
1342
  return {
@@ -1758,7 +1357,7 @@ const deserializeAws_json1_1ImportCertificateResponse = (output, context) => {
1758
1357
  };
1759
1358
  };
1760
1359
  const deserializeAws_json1_1InUseList = (output, context) => {
1761
- return (output || [])
1360
+ const retVal = (output || [])
1762
1361
  .filter((e) => e != null)
1763
1362
  .map((entry) => {
1764
1363
  if (entry === null) {
@@ -1766,6 +1365,7 @@ const deserializeAws_json1_1InUseList = (output, context) => {
1766
1365
  }
1767
1366
  return smithy_client_1.expectString(entry);
1768
1367
  });
1368
+ return retVal;
1769
1369
  };
1770
1370
  const deserializeAws_json1_1InvalidArgsException = (output, context) => {
1771
1371
  return {
@@ -1803,7 +1403,7 @@ const deserializeAws_json1_1KeyUsage = (output, context) => {
1803
1403
  };
1804
1404
  };
1805
1405
  const deserializeAws_json1_1KeyUsageList = (output, context) => {
1806
- return (output || [])
1406
+ const retVal = (output || [])
1807
1407
  .filter((e) => e != null)
1808
1408
  .map((entry) => {
1809
1409
  if (entry === null) {
@@ -1811,6 +1411,7 @@ const deserializeAws_json1_1KeyUsageList = (output, context) => {
1811
1411
  }
1812
1412
  return deserializeAws_json1_1KeyUsage(entry, context);
1813
1413
  });
1414
+ return retVal;
1814
1415
  };
1815
1416
  const deserializeAws_json1_1LimitExceededException = (output, context) => {
1816
1417
  return {
@@ -1878,7 +1479,7 @@ const deserializeAws_json1_1Tag = (output, context) => {
1878
1479
  };
1879
1480
  };
1880
1481
  const deserializeAws_json1_1TagList = (output, context) => {
1881
- return (output || [])
1482
+ const retVal = (output || [])
1882
1483
  .filter((e) => e != null)
1883
1484
  .map((entry) => {
1884
1485
  if (entry === null) {
@@ -1886,6 +1487,7 @@ const deserializeAws_json1_1TagList = (output, context) => {
1886
1487
  }
1887
1488
  return deserializeAws_json1_1Tag(entry, context);
1888
1489
  });
1490
+ return retVal;
1889
1491
  };
1890
1492
  const deserializeAws_json1_1TagPolicyException = (output, context) => {
1891
1493
  return {
@@ -1903,7 +1505,7 @@ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
1903
1505
  };
1904
1506
  };
1905
1507
  const deserializeAws_json1_1ValidationEmailList = (output, context) => {
1906
- return (output || [])
1508
+ const retVal = (output || [])
1907
1509
  .filter((e) => e != null)
1908
1510
  .map((entry) => {
1909
1511
  if (entry === null) {
@@ -1911,6 +1513,7 @@ const deserializeAws_json1_1ValidationEmailList = (output, context) => {
1911
1513
  }
1912
1514
  return smithy_client_1.expectString(entry);
1913
1515
  });
1516
+ return retVal;
1914
1517
  };
1915
1518
  const deserializeAws_json1_1ValidationException = (output, context) => {
1916
1519
  return {