@aws-sdk/client-acm-pca 3.312.0 → 3.315.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.
@@ -1,77 +1,77 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { ACMPCAServiceException as __BaseException } from "../models/ACMPCAServiceException";
4
4
  import { CertificateMismatchException, ConcurrentModificationException, InvalidArgsException, InvalidArnException, InvalidNextTokenException, InvalidPolicyException, InvalidRequestException, InvalidStateException, InvalidTagException, LimitExceededException, LockoutPreventedException, MalformedCertificateException, MalformedCSRException, PermissionAlreadyExistsException, RequestAlreadyProcessedException, RequestFailedException, RequestInProgressException, ResourceNotFoundException, TooManyTagsException, } from "../models/models_0";
5
5
  export const se_CreateCertificateAuthorityCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("CreateCertificateAuthority");
7
7
  let body;
8
- body = JSON.stringify(se_CreateCertificateAuthorityRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_CreateCertificateAuthorityAuditReportCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("CreateCertificateAuthorityAuditReport");
13
13
  let body;
14
- body = JSON.stringify(se_CreateCertificateAuthorityAuditReportRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_CreatePermissionCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("CreatePermission");
19
19
  let body;
20
- body = JSON.stringify(se_CreatePermissionRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_DeleteCertificateAuthorityCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DeleteCertificateAuthority");
25
25
  let body;
26
- body = JSON.stringify(se_DeleteCertificateAuthorityRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_DeletePermissionCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DeletePermission");
31
31
  let body;
32
- body = JSON.stringify(se_DeletePermissionRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_DeletePolicyCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("DeletePolicy");
37
37
  let body;
38
- body = JSON.stringify(se_DeletePolicyRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_DescribeCertificateAuthorityCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("DescribeCertificateAuthority");
43
43
  let body;
44
- body = JSON.stringify(se_DescribeCertificateAuthorityRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_DescribeCertificateAuthorityAuditReportCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("DescribeCertificateAuthorityAuditReport");
49
49
  let body;
50
- body = JSON.stringify(se_DescribeCertificateAuthorityAuditReportRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_GetCertificateCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("GetCertificate");
55
55
  let body;
56
- body = JSON.stringify(se_GetCertificateRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_GetCertificateAuthorityCertificateCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("GetCertificateAuthorityCertificate");
61
61
  let body;
62
- body = JSON.stringify(se_GetCertificateAuthorityCertificateRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_GetCertificateAuthorityCsrCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("GetCertificateAuthorityCsr");
67
67
  let body;
68
- body = JSON.stringify(se_GetCertificateAuthorityCsrRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_GetPolicyCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("GetPolicy");
73
73
  let body;
74
- body = JSON.stringify(se_GetPolicyRequest(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_ImportCertificateAuthorityCertificateCommand = async (input, context) => {
@@ -89,55 +89,55 @@ export const se_IssueCertificateCommand = async (input, context) => {
89
89
  export const se_ListCertificateAuthoritiesCommand = async (input, context) => {
90
90
  const headers = sharedHeaders("ListCertificateAuthorities");
91
91
  let body;
92
- body = JSON.stringify(se_ListCertificateAuthoritiesRequest(input, context));
92
+ body = JSON.stringify(_json(input));
93
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
94
  };
95
95
  export const se_ListPermissionsCommand = async (input, context) => {
96
96
  const headers = sharedHeaders("ListPermissions");
97
97
  let body;
98
- body = JSON.stringify(se_ListPermissionsRequest(input, context));
98
+ body = JSON.stringify(_json(input));
99
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
100
  };
101
101
  export const se_ListTagsCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("ListTags");
103
103
  let body;
104
- body = JSON.stringify(se_ListTagsRequest(input, context));
104
+ body = JSON.stringify(_json(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  export const se_PutPolicyCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("PutPolicy");
109
109
  let body;
110
- body = JSON.stringify(se_PutPolicyRequest(input, context));
110
+ body = JSON.stringify(_json(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  export const se_RestoreCertificateAuthorityCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("RestoreCertificateAuthority");
115
115
  let body;
116
- body = JSON.stringify(se_RestoreCertificateAuthorityRequest(input, context));
116
+ body = JSON.stringify(_json(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  export const se_RevokeCertificateCommand = async (input, context) => {
120
120
  const headers = sharedHeaders("RevokeCertificate");
121
121
  let body;
122
- body = JSON.stringify(se_RevokeCertificateRequest(input, context));
122
+ body = JSON.stringify(_json(input));
123
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
124
  };
125
125
  export const se_TagCertificateAuthorityCommand = async (input, context) => {
126
126
  const headers = sharedHeaders("TagCertificateAuthority");
127
127
  let body;
128
- body = JSON.stringify(se_TagCertificateAuthorityRequest(input, context));
128
+ body = JSON.stringify(_json(input));
129
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
130
  };
131
131
  export const se_UntagCertificateAuthorityCommand = async (input, context) => {
132
132
  const headers = sharedHeaders("UntagCertificateAuthority");
133
133
  let body;
134
- body = JSON.stringify(se_UntagCertificateAuthorityRequest(input, context));
134
+ body = JSON.stringify(_json(input));
135
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
136
  };
137
137
  export const se_UpdateCertificateAuthorityCommand = async (input, context) => {
138
138
  const headers = sharedHeaders("UpdateCertificateAuthority");
139
139
  let body;
140
- body = JSON.stringify(se_UpdateCertificateAuthorityRequest(input, context));
140
+ body = JSON.stringify(_json(input));
141
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
142
  };
143
143
  export const de_CreateCertificateAuthorityCommand = async (output, context) => {
@@ -146,12 +146,12 @@ export const de_CreateCertificateAuthorityCommand = async (output, context) => {
146
146
  }
147
147
  const data = await parseBody(output.body, context);
148
148
  let contents = {};
149
- contents = de_CreateCertificateAuthorityResponse(data, context);
149
+ contents = _json(data);
150
150
  const response = {
151
151
  $metadata: deserializeMetadata(output),
152
152
  ...contents,
153
153
  };
154
- return Promise.resolve(response);
154
+ return response;
155
155
  };
156
156
  const de_CreateCertificateAuthorityCommandError = async (output, context) => {
157
157
  const parsedOutput = {
@@ -174,10 +174,9 @@ const de_CreateCertificateAuthorityCommandError = async (output, context) => {
174
174
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
175
175
  default:
176
176
  const parsedBody = parsedOutput.body;
177
- throwDefaultError({
177
+ return throwDefaultError({
178
178
  output,
179
179
  parsedBody,
180
- exceptionCtor: __BaseException,
181
180
  errorCode,
182
181
  });
183
182
  }
@@ -188,12 +187,12 @@ export const de_CreateCertificateAuthorityAuditReportCommand = async (output, co
188
187
  }
189
188
  const data = await parseBody(output.body, context);
190
189
  let contents = {};
191
- contents = de_CreateCertificateAuthorityAuditReportResponse(data, context);
190
+ contents = _json(data);
192
191
  const response = {
193
192
  $metadata: deserializeMetadata(output),
194
193
  ...contents,
195
194
  };
196
- return Promise.resolve(response);
195
+ return response;
197
196
  };
198
197
  const de_CreateCertificateAuthorityAuditReportCommandError = async (output, context) => {
199
198
  const parsedOutput = {
@@ -222,10 +221,9 @@ const de_CreateCertificateAuthorityAuditReportCommandError = async (output, cont
222
221
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
223
222
  default:
224
223
  const parsedBody = parsedOutput.body;
225
- throwDefaultError({
224
+ return throwDefaultError({
226
225
  output,
227
226
  parsedBody,
228
- exceptionCtor: __BaseException,
229
227
  errorCode,
230
228
  });
231
229
  }
@@ -238,7 +236,7 @@ export const de_CreatePermissionCommand = async (output, context) => {
238
236
  const response = {
239
237
  $metadata: deserializeMetadata(output),
240
238
  };
241
- return Promise.resolve(response);
239
+ return response;
242
240
  };
243
241
  const de_CreatePermissionCommandError = async (output, context) => {
244
242
  const parsedOutput = {
@@ -267,10 +265,9 @@ const de_CreatePermissionCommandError = async (output, context) => {
267
265
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
268
266
  default:
269
267
  const parsedBody = parsedOutput.body;
270
- throwDefaultError({
268
+ return throwDefaultError({
271
269
  output,
272
270
  parsedBody,
273
- exceptionCtor: __BaseException,
274
271
  errorCode,
275
272
  });
276
273
  }
@@ -283,7 +280,7 @@ export const de_DeleteCertificateAuthorityCommand = async (output, context) => {
283
280
  const response = {
284
281
  $metadata: deserializeMetadata(output),
285
282
  };
286
- return Promise.resolve(response);
283
+ return response;
287
284
  };
288
285
  const de_DeleteCertificateAuthorityCommandError = async (output, context) => {
289
286
  const parsedOutput = {
@@ -306,10 +303,9 @@ const de_DeleteCertificateAuthorityCommandError = async (output, context) => {
306
303
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
307
304
  default:
308
305
  const parsedBody = parsedOutput.body;
309
- throwDefaultError({
306
+ return throwDefaultError({
310
307
  output,
311
308
  parsedBody,
312
- exceptionCtor: __BaseException,
313
309
  errorCode,
314
310
  });
315
311
  }
@@ -322,7 +318,7 @@ export const de_DeletePermissionCommand = async (output, context) => {
322
318
  const response = {
323
319
  $metadata: deserializeMetadata(output),
324
320
  };
325
- return Promise.resolve(response);
321
+ return response;
326
322
  };
327
323
  const de_DeletePermissionCommandError = async (output, context) => {
328
324
  const parsedOutput = {
@@ -345,10 +341,9 @@ const de_DeletePermissionCommandError = async (output, context) => {
345
341
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
346
342
  default:
347
343
  const parsedBody = parsedOutput.body;
348
- throwDefaultError({
344
+ return throwDefaultError({
349
345
  output,
350
346
  parsedBody,
351
- exceptionCtor: __BaseException,
352
347
  errorCode,
353
348
  });
354
349
  }
@@ -361,7 +356,7 @@ export const de_DeletePolicyCommand = async (output, context) => {
361
356
  const response = {
362
357
  $metadata: deserializeMetadata(output),
363
358
  };
364
- return Promise.resolve(response);
359
+ return response;
365
360
  };
366
361
  const de_DeletePolicyCommandError = async (output, context) => {
367
362
  const parsedOutput = {
@@ -390,10 +385,9 @@ const de_DeletePolicyCommandError = async (output, context) => {
390
385
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
391
386
  default:
392
387
  const parsedBody = parsedOutput.body;
393
- throwDefaultError({
388
+ return throwDefaultError({
394
389
  output,
395
390
  parsedBody,
396
- exceptionCtor: __BaseException,
397
391
  errorCode,
398
392
  });
399
393
  }
@@ -409,7 +403,7 @@ export const de_DescribeCertificateAuthorityCommand = async (output, context) =>
409
403
  $metadata: deserializeMetadata(output),
410
404
  ...contents,
411
405
  };
412
- return Promise.resolve(response);
406
+ return response;
413
407
  };
414
408
  const de_DescribeCertificateAuthorityCommandError = async (output, context) => {
415
409
  const parsedOutput = {
@@ -426,10 +420,9 @@ const de_DescribeCertificateAuthorityCommandError = async (output, context) => {
426
420
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
427
421
  default:
428
422
  const parsedBody = parsedOutput.body;
429
- throwDefaultError({
423
+ return throwDefaultError({
430
424
  output,
431
425
  parsedBody,
432
- exceptionCtor: __BaseException,
433
426
  errorCode,
434
427
  });
435
428
  }
@@ -445,7 +438,7 @@ export const de_DescribeCertificateAuthorityAuditReportCommand = async (output,
445
438
  $metadata: deserializeMetadata(output),
446
439
  ...contents,
447
440
  };
448
- return Promise.resolve(response);
441
+ return response;
449
442
  };
450
443
  const de_DescribeCertificateAuthorityAuditReportCommandError = async (output, context) => {
451
444
  const parsedOutput = {
@@ -465,10 +458,9 @@ const de_DescribeCertificateAuthorityAuditReportCommandError = async (output, co
465
458
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
466
459
  default:
467
460
  const parsedBody = parsedOutput.body;
468
- throwDefaultError({
461
+ return throwDefaultError({
469
462
  output,
470
463
  parsedBody,
471
- exceptionCtor: __BaseException,
472
464
  errorCode,
473
465
  });
474
466
  }
@@ -479,12 +471,12 @@ export const de_GetCertificateCommand = async (output, context) => {
479
471
  }
480
472
  const data = await parseBody(output.body, context);
481
473
  let contents = {};
482
- contents = de_GetCertificateResponse(data, context);
474
+ contents = _json(data);
483
475
  const response = {
484
476
  $metadata: deserializeMetadata(output),
485
477
  ...contents,
486
478
  };
487
- return Promise.resolve(response);
479
+ return response;
488
480
  };
489
481
  const de_GetCertificateCommandError = async (output, context) => {
490
482
  const parsedOutput = {
@@ -510,10 +502,9 @@ const de_GetCertificateCommandError = async (output, context) => {
510
502
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
511
503
  default:
512
504
  const parsedBody = parsedOutput.body;
513
- throwDefaultError({
505
+ return throwDefaultError({
514
506
  output,
515
507
  parsedBody,
516
- exceptionCtor: __BaseException,
517
508
  errorCode,
518
509
  });
519
510
  }
@@ -524,12 +515,12 @@ export const de_GetCertificateAuthorityCertificateCommand = async (output, conte
524
515
  }
525
516
  const data = await parseBody(output.body, context);
526
517
  let contents = {};
527
- contents = de_GetCertificateAuthorityCertificateResponse(data, context);
518
+ contents = _json(data);
528
519
  const response = {
529
520
  $metadata: deserializeMetadata(output),
530
521
  ...contents,
531
522
  };
532
- return Promise.resolve(response);
523
+ return response;
533
524
  };
534
525
  const de_GetCertificateAuthorityCertificateCommandError = async (output, context) => {
535
526
  const parsedOutput = {
@@ -549,10 +540,9 @@ const de_GetCertificateAuthorityCertificateCommandError = async (output, context
549
540
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
550
541
  default:
551
542
  const parsedBody = parsedOutput.body;
552
- throwDefaultError({
543
+ return throwDefaultError({
553
544
  output,
554
545
  parsedBody,
555
- exceptionCtor: __BaseException,
556
546
  errorCode,
557
547
  });
558
548
  }
@@ -563,12 +553,12 @@ export const de_GetCertificateAuthorityCsrCommand = async (output, context) => {
563
553
  }
564
554
  const data = await parseBody(output.body, context);
565
555
  let contents = {};
566
- contents = de_GetCertificateAuthorityCsrResponse(data, context);
556
+ contents = _json(data);
567
557
  const response = {
568
558
  $metadata: deserializeMetadata(output),
569
559
  ...contents,
570
560
  };
571
- return Promise.resolve(response);
561
+ return response;
572
562
  };
573
563
  const de_GetCertificateAuthorityCsrCommandError = async (output, context) => {
574
564
  const parsedOutput = {
@@ -594,10 +584,9 @@ const de_GetCertificateAuthorityCsrCommandError = async (output, context) => {
594
584
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
595
585
  default:
596
586
  const parsedBody = parsedOutput.body;
597
- throwDefaultError({
587
+ return throwDefaultError({
598
588
  output,
599
589
  parsedBody,
600
- exceptionCtor: __BaseException,
601
590
  errorCode,
602
591
  });
603
592
  }
@@ -608,12 +597,12 @@ export const de_GetPolicyCommand = async (output, context) => {
608
597
  }
609
598
  const data = await parseBody(output.body, context);
610
599
  let contents = {};
611
- contents = de_GetPolicyResponse(data, context);
600
+ contents = _json(data);
612
601
  const response = {
613
602
  $metadata: deserializeMetadata(output),
614
603
  ...contents,
615
604
  };
616
- return Promise.resolve(response);
605
+ return response;
617
606
  };
618
607
  const de_GetPolicyCommandError = async (output, context) => {
619
608
  const parsedOutput = {
@@ -636,10 +625,9 @@ const de_GetPolicyCommandError = async (output, context) => {
636
625
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
637
626
  default:
638
627
  const parsedBody = parsedOutput.body;
639
- throwDefaultError({
628
+ return throwDefaultError({
640
629
  output,
641
630
  parsedBody,
642
- exceptionCtor: __BaseException,
643
631
  errorCode,
644
632
  });
645
633
  }
@@ -652,7 +640,7 @@ export const de_ImportCertificateAuthorityCertificateCommand = async (output, co
652
640
  const response = {
653
641
  $metadata: deserializeMetadata(output),
654
642
  };
655
- return Promise.resolve(response);
643
+ return response;
656
644
  };
657
645
  const de_ImportCertificateAuthorityCertificateCommandError = async (output, context) => {
658
646
  const parsedOutput = {
@@ -690,10 +678,9 @@ const de_ImportCertificateAuthorityCertificateCommandError = async (output, cont
690
678
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
691
679
  default:
692
680
  const parsedBody = parsedOutput.body;
693
- throwDefaultError({
681
+ return throwDefaultError({
694
682
  output,
695
683
  parsedBody,
696
- exceptionCtor: __BaseException,
697
684
  errorCode,
698
685
  });
699
686
  }
@@ -704,12 +691,12 @@ export const de_IssueCertificateCommand = async (output, context) => {
704
691
  }
705
692
  const data = await parseBody(output.body, context);
706
693
  let contents = {};
707
- contents = de_IssueCertificateResponse(data, context);
694
+ contents = _json(data);
708
695
  const response = {
709
696
  $metadata: deserializeMetadata(output),
710
697
  ...contents,
711
698
  };
712
- return Promise.resolve(response);
699
+ return response;
713
700
  };
714
701
  const de_IssueCertificateCommandError = async (output, context) => {
715
702
  const parsedOutput = {
@@ -738,10 +725,9 @@ const de_IssueCertificateCommandError = async (output, context) => {
738
725
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
739
726
  default:
740
727
  const parsedBody = parsedOutput.body;
741
- throwDefaultError({
728
+ return throwDefaultError({
742
729
  output,
743
730
  parsedBody,
744
- exceptionCtor: __BaseException,
745
731
  errorCode,
746
732
  });
747
733
  }
@@ -757,7 +743,7 @@ export const de_ListCertificateAuthoritiesCommand = async (output, context) => {
757
743
  $metadata: deserializeMetadata(output),
758
744
  ...contents,
759
745
  };
760
- return Promise.resolve(response);
746
+ return response;
761
747
  };
762
748
  const de_ListCertificateAuthoritiesCommandError = async (output, context) => {
763
749
  const parsedOutput = {
@@ -771,10 +757,9 @@ const de_ListCertificateAuthoritiesCommandError = async (output, context) => {
771
757
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
772
758
  default:
773
759
  const parsedBody = parsedOutput.body;
774
- throwDefaultError({
760
+ return throwDefaultError({
775
761
  output,
776
762
  parsedBody,
777
- exceptionCtor: __BaseException,
778
763
  errorCode,
779
764
  });
780
765
  }
@@ -790,7 +775,7 @@ export const de_ListPermissionsCommand = async (output, context) => {
790
775
  $metadata: deserializeMetadata(output),
791
776
  ...contents,
792
777
  };
793
- return Promise.resolve(response);
778
+ return response;
794
779
  };
795
780
  const de_ListPermissionsCommandError = async (output, context) => {
796
781
  const parsedOutput = {
@@ -816,10 +801,9 @@ const de_ListPermissionsCommandError = async (output, context) => {
816
801
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
817
802
  default:
818
803
  const parsedBody = parsedOutput.body;
819
- throwDefaultError({
804
+ return throwDefaultError({
820
805
  output,
821
806
  parsedBody,
822
- exceptionCtor: __BaseException,
823
807
  errorCode,
824
808
  });
825
809
  }
@@ -830,12 +814,12 @@ export const de_ListTagsCommand = async (output, context) => {
830
814
  }
831
815
  const data = await parseBody(output.body, context);
832
816
  let contents = {};
833
- contents = de_ListTagsResponse(data, context);
817
+ contents = _json(data);
834
818
  const response = {
835
819
  $metadata: deserializeMetadata(output),
836
820
  ...contents,
837
821
  };
838
- return Promise.resolve(response);
822
+ return response;
839
823
  };
840
824
  const de_ListTagsCommandError = async (output, context) => {
841
825
  const parsedOutput = {
@@ -855,10 +839,9 @@ const de_ListTagsCommandError = async (output, context) => {
855
839
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
856
840
  default:
857
841
  const parsedBody = parsedOutput.body;
858
- throwDefaultError({
842
+ return throwDefaultError({
859
843
  output,
860
844
  parsedBody,
861
- exceptionCtor: __BaseException,
862
845
  errorCode,
863
846
  });
864
847
  }
@@ -871,7 +854,7 @@ export const de_PutPolicyCommand = async (output, context) => {
871
854
  const response = {
872
855
  $metadata: deserializeMetadata(output),
873
856
  };
874
- return Promise.resolve(response);
857
+ return response;
875
858
  };
876
859
  const de_PutPolicyCommandError = async (output, context) => {
877
860
  const parsedOutput = {
@@ -903,10 +886,9 @@ const de_PutPolicyCommandError = async (output, context) => {
903
886
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
904
887
  default:
905
888
  const parsedBody = parsedOutput.body;
906
- throwDefaultError({
889
+ return throwDefaultError({
907
890
  output,
908
891
  parsedBody,
909
- exceptionCtor: __BaseException,
910
892
  errorCode,
911
893
  });
912
894
  }
@@ -919,7 +901,7 @@ export const de_RestoreCertificateAuthorityCommand = async (output, context) =>
919
901
  const response = {
920
902
  $metadata: deserializeMetadata(output),
921
903
  };
922
- return Promise.resolve(response);
904
+ return response;
923
905
  };
924
906
  const de_RestoreCertificateAuthorityCommandError = async (output, context) => {
925
907
  const parsedOutput = {
@@ -939,10 +921,9 @@ const de_RestoreCertificateAuthorityCommandError = async (output, context) => {
939
921
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
940
922
  default:
941
923
  const parsedBody = parsedOutput.body;
942
- throwDefaultError({
924
+ return throwDefaultError({
943
925
  output,
944
926
  parsedBody,
945
- exceptionCtor: __BaseException,
946
927
  errorCode,
947
928
  });
948
929
  }
@@ -955,7 +936,7 @@ export const de_RevokeCertificateCommand = async (output, context) => {
955
936
  const response = {
956
937
  $metadata: deserializeMetadata(output),
957
938
  };
958
- return Promise.resolve(response);
939
+ return response;
959
940
  };
960
941
  const de_RevokeCertificateCommandError = async (output, context) => {
961
942
  const parsedOutput = {
@@ -993,10 +974,9 @@ const de_RevokeCertificateCommandError = async (output, context) => {
993
974
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
994
975
  default:
995
976
  const parsedBody = parsedOutput.body;
996
- throwDefaultError({
977
+ return throwDefaultError({
997
978
  output,
998
979
  parsedBody,
999
- exceptionCtor: __BaseException,
1000
980
  errorCode,
1001
981
  });
1002
982
  }
@@ -1009,7 +989,7 @@ export const de_TagCertificateAuthorityCommand = async (output, context) => {
1009
989
  const response = {
1010
990
  $metadata: deserializeMetadata(output),
1011
991
  };
1012
- return Promise.resolve(response);
992
+ return response;
1013
993
  };
1014
994
  const de_TagCertificateAuthorityCommandError = async (output, context) => {
1015
995
  const parsedOutput = {
@@ -1035,10 +1015,9 @@ const de_TagCertificateAuthorityCommandError = async (output, context) => {
1035
1015
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1036
1016
  default:
1037
1017
  const parsedBody = parsedOutput.body;
1038
- throwDefaultError({
1018
+ return throwDefaultError({
1039
1019
  output,
1040
1020
  parsedBody,
1041
- exceptionCtor: __BaseException,
1042
1021
  errorCode,
1043
1022
  });
1044
1023
  }
@@ -1051,7 +1030,7 @@ export const de_UntagCertificateAuthorityCommand = async (output, context) => {
1051
1030
  const response = {
1052
1031
  $metadata: deserializeMetadata(output),
1053
1032
  };
1054
- return Promise.resolve(response);
1033
+ return response;
1055
1034
  };
1056
1035
  const de_UntagCertificateAuthorityCommandError = async (output, context) => {
1057
1036
  const parsedOutput = {
@@ -1074,10 +1053,9 @@ const de_UntagCertificateAuthorityCommandError = async (output, context) => {
1074
1053
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1075
1054
  default:
1076
1055
  const parsedBody = parsedOutput.body;
1077
- throwDefaultError({
1056
+ return throwDefaultError({
1078
1057
  output,
1079
1058
  parsedBody,
1080
- exceptionCtor: __BaseException,
1081
1059
  errorCode,
1082
1060
  });
1083
1061
  }
@@ -1090,7 +1068,7 @@ export const de_UpdateCertificateAuthorityCommand = async (output, context) => {
1090
1068
  const response = {
1091
1069
  $metadata: deserializeMetadata(output),
1092
1070
  };
1093
- return Promise.resolve(response);
1071
+ return response;
1094
1072
  };
1095
1073
  const de_UpdateCertificateAuthorityCommandError = async (output, context) => {
1096
1074
  const parsedOutput = {
@@ -1119,17 +1097,16 @@ const de_UpdateCertificateAuthorityCommandError = async (output, context) => {
1119
1097
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1120
1098
  default:
1121
1099
  const parsedBody = parsedOutput.body;
1122
- throwDefaultError({
1100
+ return throwDefaultError({
1123
1101
  output,
1124
1102
  parsedBody,
1125
- exceptionCtor: __BaseException,
1126
1103
  errorCode,
1127
1104
  });
1128
1105
  }
1129
1106
  };
1130
1107
  const de_CertificateMismatchExceptionRes = async (parsedOutput, context) => {
1131
1108
  const body = parsedOutput.body;
1132
- const deserialized = de_CertificateMismatchException(body, context);
1109
+ const deserialized = _json(body);
1133
1110
  const exception = new CertificateMismatchException({
1134
1111
  $metadata: deserializeMetadata(parsedOutput),
1135
1112
  ...deserialized,
@@ -1138,7 +1115,7 @@ const de_CertificateMismatchExceptionRes = async (parsedOutput, context) => {
1138
1115
  };
1139
1116
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1140
1117
  const body = parsedOutput.body;
1141
- const deserialized = de_ConcurrentModificationException(body, context);
1118
+ const deserialized = _json(body);
1142
1119
  const exception = new ConcurrentModificationException({
1143
1120
  $metadata: deserializeMetadata(parsedOutput),
1144
1121
  ...deserialized,
@@ -1147,7 +1124,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1147
1124
  };
1148
1125
  const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
1149
1126
  const body = parsedOutput.body;
1150
- const deserialized = de_InvalidArgsException(body, context);
1127
+ const deserialized = _json(body);
1151
1128
  const exception = new InvalidArgsException({
1152
1129
  $metadata: deserializeMetadata(parsedOutput),
1153
1130
  ...deserialized,
@@ -1156,7 +1133,7 @@ const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
1156
1133
  };
1157
1134
  const de_InvalidArnExceptionRes = async (parsedOutput, context) => {
1158
1135
  const body = parsedOutput.body;
1159
- const deserialized = de_InvalidArnException(body, context);
1136
+ const deserialized = _json(body);
1160
1137
  const exception = new InvalidArnException({
1161
1138
  $metadata: deserializeMetadata(parsedOutput),
1162
1139
  ...deserialized,
@@ -1165,7 +1142,7 @@ const de_InvalidArnExceptionRes = async (parsedOutput, context) => {
1165
1142
  };
1166
1143
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1167
1144
  const body = parsedOutput.body;
1168
- const deserialized = de_InvalidNextTokenException(body, context);
1145
+ const deserialized = _json(body);
1169
1146
  const exception = new InvalidNextTokenException({
1170
1147
  $metadata: deserializeMetadata(parsedOutput),
1171
1148
  ...deserialized,
@@ -1174,7 +1151,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
1174
1151
  };
1175
1152
  const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
1176
1153
  const body = parsedOutput.body;
1177
- const deserialized = de_InvalidPolicyException(body, context);
1154
+ const deserialized = _json(body);
1178
1155
  const exception = new InvalidPolicyException({
1179
1156
  $metadata: deserializeMetadata(parsedOutput),
1180
1157
  ...deserialized,
@@ -1183,7 +1160,7 @@ const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
1183
1160
  };
1184
1161
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1185
1162
  const body = parsedOutput.body;
1186
- const deserialized = de_InvalidRequestException(body, context);
1163
+ const deserialized = _json(body);
1187
1164
  const exception = new InvalidRequestException({
1188
1165
  $metadata: deserializeMetadata(parsedOutput),
1189
1166
  ...deserialized,
@@ -1192,7 +1169,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1192
1169
  };
1193
1170
  const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1194
1171
  const body = parsedOutput.body;
1195
- const deserialized = de_InvalidStateException(body, context);
1172
+ const deserialized = _json(body);
1196
1173
  const exception = new InvalidStateException({
1197
1174
  $metadata: deserializeMetadata(parsedOutput),
1198
1175
  ...deserialized,
@@ -1201,7 +1178,7 @@ const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1201
1178
  };
1202
1179
  const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
1203
1180
  const body = parsedOutput.body;
1204
- const deserialized = de_InvalidTagException(body, context);
1181
+ const deserialized = _json(body);
1205
1182
  const exception = new InvalidTagException({
1206
1183
  $metadata: deserializeMetadata(parsedOutput),
1207
1184
  ...deserialized,
@@ -1210,7 +1187,7 @@ const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
1210
1187
  };
1211
1188
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1212
1189
  const body = parsedOutput.body;
1213
- const deserialized = de_LimitExceededException(body, context);
1190
+ const deserialized = _json(body);
1214
1191
  const exception = new LimitExceededException({
1215
1192
  $metadata: deserializeMetadata(parsedOutput),
1216
1193
  ...deserialized,
@@ -1219,7 +1196,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1219
1196
  };
1220
1197
  const de_LockoutPreventedExceptionRes = async (parsedOutput, context) => {
1221
1198
  const body = parsedOutput.body;
1222
- const deserialized = de_LockoutPreventedException(body, context);
1199
+ const deserialized = _json(body);
1223
1200
  const exception = new LockoutPreventedException({
1224
1201
  $metadata: deserializeMetadata(parsedOutput),
1225
1202
  ...deserialized,
@@ -1228,7 +1205,7 @@ const de_LockoutPreventedExceptionRes = async (parsedOutput, context) => {
1228
1205
  };
1229
1206
  const de_MalformedCertificateExceptionRes = async (parsedOutput, context) => {
1230
1207
  const body = parsedOutput.body;
1231
- const deserialized = de_MalformedCertificateException(body, context);
1208
+ const deserialized = _json(body);
1232
1209
  const exception = new MalformedCertificateException({
1233
1210
  $metadata: deserializeMetadata(parsedOutput),
1234
1211
  ...deserialized,
@@ -1237,7 +1214,7 @@ const de_MalformedCertificateExceptionRes = async (parsedOutput, context) => {
1237
1214
  };
1238
1215
  const de_MalformedCSRExceptionRes = async (parsedOutput, context) => {
1239
1216
  const body = parsedOutput.body;
1240
- const deserialized = de_MalformedCSRException(body, context);
1217
+ const deserialized = _json(body);
1241
1218
  const exception = new MalformedCSRException({
1242
1219
  $metadata: deserializeMetadata(parsedOutput),
1243
1220
  ...deserialized,
@@ -1246,7 +1223,7 @@ const de_MalformedCSRExceptionRes = async (parsedOutput, context) => {
1246
1223
  };
1247
1224
  const de_PermissionAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1248
1225
  const body = parsedOutput.body;
1249
- const deserialized = de_PermissionAlreadyExistsException(body, context);
1226
+ const deserialized = _json(body);
1250
1227
  const exception = new PermissionAlreadyExistsException({
1251
1228
  $metadata: deserializeMetadata(parsedOutput),
1252
1229
  ...deserialized,
@@ -1255,7 +1232,7 @@ const de_PermissionAlreadyExistsExceptionRes = async (parsedOutput, context) =>
1255
1232
  };
1256
1233
  const de_RequestAlreadyProcessedExceptionRes = async (parsedOutput, context) => {
1257
1234
  const body = parsedOutput.body;
1258
- const deserialized = de_RequestAlreadyProcessedException(body, context);
1235
+ const deserialized = _json(body);
1259
1236
  const exception = new RequestAlreadyProcessedException({
1260
1237
  $metadata: deserializeMetadata(parsedOutput),
1261
1238
  ...deserialized,
@@ -1264,7 +1241,7 @@ const de_RequestAlreadyProcessedExceptionRes = async (parsedOutput, context) =>
1264
1241
  };
1265
1242
  const de_RequestFailedExceptionRes = async (parsedOutput, context) => {
1266
1243
  const body = parsedOutput.body;
1267
- const deserialized = de_RequestFailedException(body, context);
1244
+ const deserialized = _json(body);
1268
1245
  const exception = new RequestFailedException({
1269
1246
  $metadata: deserializeMetadata(parsedOutput),
1270
1247
  ...deserialized,
@@ -1273,7 +1250,7 @@ const de_RequestFailedExceptionRes = async (parsedOutput, context) => {
1273
1250
  };
1274
1251
  const de_RequestInProgressExceptionRes = async (parsedOutput, context) => {
1275
1252
  const body = parsedOutput.body;
1276
- const deserialized = de_RequestInProgressException(body, context);
1253
+ const deserialized = _json(body);
1277
1254
  const exception = new RequestInProgressException({
1278
1255
  $metadata: deserializeMetadata(parsedOutput),
1279
1256
  ...deserialized,
@@ -1282,7 +1259,7 @@ const de_RequestInProgressExceptionRes = async (parsedOutput, context) => {
1282
1259
  };
1283
1260
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1284
1261
  const body = parsedOutput.body;
1285
- const deserialized = de_ResourceNotFoundException(body, context);
1262
+ const deserialized = _json(body);
1286
1263
  const exception = new ResourceNotFoundException({
1287
1264
  $metadata: deserializeMetadata(parsedOutput),
1288
1265
  ...deserialized,
@@ -1291,807 +1268,102 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1291
1268
  };
1292
1269
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1293
1270
  const body = parsedOutput.body;
1294
- const deserialized = de_TooManyTagsException(body, context);
1271
+ const deserialized = _json(body);
1295
1272
  const exception = new TooManyTagsException({
1296
1273
  $metadata: deserializeMetadata(parsedOutput),
1297
1274
  ...deserialized,
1298
1275
  });
1299
1276
  return __decorateServiceException(exception, body);
1300
1277
  };
1301
- const se_AccessDescription = (input, context) => {
1302
- return {
1303
- ...(input.AccessLocation != null && { AccessLocation: se_GeneralName(input.AccessLocation, context) }),
1304
- ...(input.AccessMethod != null && { AccessMethod: se_AccessMethod(input.AccessMethod, context) }),
1305
- };
1306
- };
1307
- const se_AccessDescriptionList = (input, context) => {
1308
- return input
1309
- .filter((e) => e != null)
1310
- .map((entry) => {
1311
- return se_AccessDescription(entry, context);
1312
- });
1313
- };
1314
- const se_AccessMethod = (input, context) => {
1315
- return {
1316
- ...(input.AccessMethodType != null && { AccessMethodType: input.AccessMethodType }),
1317
- ...(input.CustomObjectIdentifier != null && { CustomObjectIdentifier: input.CustomObjectIdentifier }),
1318
- };
1319
- };
1320
- const se_ActionList = (input, context) => {
1321
- return input
1322
- .filter((e) => e != null)
1323
- .map((entry) => {
1324
- return entry;
1325
- });
1326
- };
1327
- const se_ApiPassthrough = (input, context) => {
1328
- return {
1329
- ...(input.Extensions != null && { Extensions: se_Extensions(input.Extensions, context) }),
1330
- ...(input.Subject != null && { Subject: se_ASN1Subject(input.Subject, context) }),
1331
- };
1332
- };
1333
- const se_ASN1Subject = (input, context) => {
1334
- return {
1335
- ...(input.CommonName != null && { CommonName: input.CommonName }),
1336
- ...(input.Country != null && { Country: input.Country }),
1337
- ...(input.CustomAttributes != null && {
1338
- CustomAttributes: se_CustomAttributeList(input.CustomAttributes, context),
1339
- }),
1340
- ...(input.DistinguishedNameQualifier != null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier }),
1341
- ...(input.GenerationQualifier != null && { GenerationQualifier: input.GenerationQualifier }),
1342
- ...(input.GivenName != null && { GivenName: input.GivenName }),
1343
- ...(input.Initials != null && { Initials: input.Initials }),
1344
- ...(input.Locality != null && { Locality: input.Locality }),
1345
- ...(input.Organization != null && { Organization: input.Organization }),
1346
- ...(input.OrganizationalUnit != null && { OrganizationalUnit: input.OrganizationalUnit }),
1347
- ...(input.Pseudonym != null && { Pseudonym: input.Pseudonym }),
1348
- ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
1349
- ...(input.State != null && { State: input.State }),
1350
- ...(input.Surname != null && { Surname: input.Surname }),
1351
- ...(input.Title != null && { Title: input.Title }),
1352
- };
1353
- };
1354
- const se_CertificateAuthorityConfiguration = (input, context) => {
1355
- return {
1356
- ...(input.CsrExtensions != null && { CsrExtensions: se_CsrExtensions(input.CsrExtensions, context) }),
1357
- ...(input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm }),
1358
- ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
1359
- ...(input.Subject != null && { Subject: se_ASN1Subject(input.Subject, context) }),
1360
- };
1361
- };
1362
- const se_CertificatePolicyList = (input, context) => {
1363
- return input
1364
- .filter((e) => e != null)
1365
- .map((entry) => {
1366
- return se_PolicyInformation(entry, context);
1367
- });
1368
- };
1369
- const se_CreateCertificateAuthorityAuditReportRequest = (input, context) => {
1370
- return {
1371
- ...(input.AuditReportResponseFormat != null && { AuditReportResponseFormat: input.AuditReportResponseFormat }),
1372
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1373
- ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
1374
- };
1375
- };
1376
- const se_CreateCertificateAuthorityRequest = (input, context) => {
1377
- return {
1378
- ...(input.CertificateAuthorityConfiguration != null && {
1379
- CertificateAuthorityConfiguration: se_CertificateAuthorityConfiguration(input.CertificateAuthorityConfiguration, context),
1380
- }),
1381
- ...(input.CertificateAuthorityType != null && { CertificateAuthorityType: input.CertificateAuthorityType }),
1382
- ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1383
- ...(input.KeyStorageSecurityStandard != null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard }),
1384
- ...(input.RevocationConfiguration != null && {
1385
- RevocationConfiguration: se_RevocationConfiguration(input.RevocationConfiguration, context),
1386
- }),
1387
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1388
- ...(input.UsageMode != null && { UsageMode: input.UsageMode }),
1389
- };
1390
- };
1391
- const se_CreatePermissionRequest = (input, context) => {
1392
- return {
1393
- ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }),
1394
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1395
- ...(input.Principal != null && { Principal: input.Principal }),
1396
- ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }),
1397
- };
1398
- };
1399
- const se_CrlConfiguration = (input, context) => {
1400
- return {
1401
- ...(input.CustomCname != null && { CustomCname: input.CustomCname }),
1402
- ...(input.Enabled != null && { Enabled: input.Enabled }),
1403
- ...(input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays }),
1404
- ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
1405
- ...(input.S3ObjectAcl != null && { S3ObjectAcl: input.S3ObjectAcl }),
1406
- };
1407
- };
1408
- const se_CsrExtensions = (input, context) => {
1409
- return {
1410
- ...(input.KeyUsage != null && { KeyUsage: se_KeyUsage(input.KeyUsage, context) }),
1411
- ...(input.SubjectInformationAccess != null && {
1412
- SubjectInformationAccess: se_AccessDescriptionList(input.SubjectInformationAccess, context),
1413
- }),
1414
- };
1415
- };
1416
- const se_CustomAttribute = (input, context) => {
1417
- return {
1418
- ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }),
1419
- ...(input.Value != null && { Value: input.Value }),
1420
- };
1421
- };
1422
- const se_CustomAttributeList = (input, context) => {
1423
- return input
1424
- .filter((e) => e != null)
1425
- .map((entry) => {
1426
- return se_CustomAttribute(entry, context);
1427
- });
1428
- };
1429
- const se_CustomExtension = (input, context) => {
1430
- return {
1431
- ...(input.Critical != null && { Critical: input.Critical }),
1432
- ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }),
1433
- ...(input.Value != null && { Value: input.Value }),
1434
- };
1435
- };
1436
- const se_CustomExtensionList = (input, context) => {
1437
- return input
1438
- .filter((e) => e != null)
1439
- .map((entry) => {
1440
- return se_CustomExtension(entry, context);
1441
- });
1442
- };
1443
- const se_DeleteCertificateAuthorityRequest = (input, context) => {
1444
- return {
1445
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1446
- ...(input.PermanentDeletionTimeInDays != null && {
1447
- PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays,
1448
- }),
1449
- };
1450
- };
1451
- const se_DeletePermissionRequest = (input, context) => {
1452
- return {
1453
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1454
- ...(input.Principal != null && { Principal: input.Principal }),
1455
- ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }),
1456
- };
1457
- };
1458
- const se_DeletePolicyRequest = (input, context) => {
1459
- return {
1460
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1461
- };
1462
- };
1463
- const se_DescribeCertificateAuthorityAuditReportRequest = (input, context) => {
1464
- return {
1465
- ...(input.AuditReportId != null && { AuditReportId: input.AuditReportId }),
1466
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1467
- };
1468
- };
1469
- const se_DescribeCertificateAuthorityRequest = (input, context) => {
1470
- return {
1471
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1472
- };
1473
- };
1474
- const se_EdiPartyName = (input, context) => {
1475
- return {
1476
- ...(input.NameAssigner != null && { NameAssigner: input.NameAssigner }),
1477
- ...(input.PartyName != null && { PartyName: input.PartyName }),
1478
- };
1479
- };
1480
- const se_ExtendedKeyUsage = (input, context) => {
1481
- return {
1482
- ...(input.ExtendedKeyUsageObjectIdentifier != null && {
1483
- ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier,
1484
- }),
1485
- ...(input.ExtendedKeyUsageType != null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }),
1486
- };
1487
- };
1488
- const se_ExtendedKeyUsageList = (input, context) => {
1489
- return input
1490
- .filter((e) => e != null)
1491
- .map((entry) => {
1492
- return se_ExtendedKeyUsage(entry, context);
1493
- });
1494
- };
1495
- const se_Extensions = (input, context) => {
1496
- return {
1497
- ...(input.CertificatePolicies != null && {
1498
- CertificatePolicies: se_CertificatePolicyList(input.CertificatePolicies, context),
1499
- }),
1500
- ...(input.CustomExtensions != null && {
1501
- CustomExtensions: se_CustomExtensionList(input.CustomExtensions, context),
1502
- }),
1503
- ...(input.ExtendedKeyUsage != null && {
1504
- ExtendedKeyUsage: se_ExtendedKeyUsageList(input.ExtendedKeyUsage, context),
1505
- }),
1506
- ...(input.KeyUsage != null && { KeyUsage: se_KeyUsage(input.KeyUsage, context) }),
1507
- ...(input.SubjectAlternativeNames != null && {
1508
- SubjectAlternativeNames: se_GeneralNameList(input.SubjectAlternativeNames, context),
1509
- }),
1510
- };
1511
- };
1512
- const se_GeneralName = (input, context) => {
1513
- return {
1514
- ...(input.DirectoryName != null && { DirectoryName: se_ASN1Subject(input.DirectoryName, context) }),
1515
- ...(input.DnsName != null && { DnsName: input.DnsName }),
1516
- ...(input.EdiPartyName != null && { EdiPartyName: se_EdiPartyName(input.EdiPartyName, context) }),
1517
- ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
1518
- ...(input.OtherName != null && { OtherName: se_OtherName(input.OtherName, context) }),
1519
- ...(input.RegisteredId != null && { RegisteredId: input.RegisteredId }),
1520
- ...(input.Rfc822Name != null && { Rfc822Name: input.Rfc822Name }),
1521
- ...(input.UniformResourceIdentifier != null && { UniformResourceIdentifier: input.UniformResourceIdentifier }),
1522
- };
1523
- };
1524
- const se_GeneralNameList = (input, context) => {
1525
- return input
1526
- .filter((e) => e != null)
1527
- .map((entry) => {
1528
- return se_GeneralName(entry, context);
1529
- });
1530
- };
1531
- const se_GetCertificateAuthorityCertificateRequest = (input, context) => {
1532
- return {
1533
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1534
- };
1535
- };
1536
- const se_GetCertificateAuthorityCsrRequest = (input, context) => {
1537
- return {
1538
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1539
- };
1540
- };
1541
- const se_GetCertificateRequest = (input, context) => {
1542
- return {
1543
- ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1544
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1545
- };
1546
- };
1547
- const se_GetPolicyRequest = (input, context) => {
1548
- return {
1549
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1550
- };
1551
- };
1552
1278
  const se_ImportCertificateAuthorityCertificateRequest = (input, context) => {
1553
- return {
1554
- ...(input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) }),
1555
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1556
- ...(input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }),
1557
- };
1558
- };
1559
- const se_IssueCertificateRequest = (input, context) => {
1560
- return {
1561
- ...(input.ApiPassthrough != null && { ApiPassthrough: se_ApiPassthrough(input.ApiPassthrough, context) }),
1562
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1563
- ...(input.Csr != null && { Csr: context.base64Encoder(input.Csr) }),
1564
- ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1565
- ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
1566
- ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }),
1567
- ...(input.Validity != null && { Validity: se_Validity(input.Validity, context) }),
1568
- ...(input.ValidityNotBefore != null && { ValidityNotBefore: se_Validity(input.ValidityNotBefore, context) }),
1569
- };
1570
- };
1571
- const se_KeyUsage = (input, context) => {
1572
- return {
1573
- ...(input.CRLSign != null && { CRLSign: input.CRLSign }),
1574
- ...(input.DataEncipherment != null && { DataEncipherment: input.DataEncipherment }),
1575
- ...(input.DecipherOnly != null && { DecipherOnly: input.DecipherOnly }),
1576
- ...(input.DigitalSignature != null && { DigitalSignature: input.DigitalSignature }),
1577
- ...(input.EncipherOnly != null && { EncipherOnly: input.EncipherOnly }),
1578
- ...(input.KeyAgreement != null && { KeyAgreement: input.KeyAgreement }),
1579
- ...(input.KeyCertSign != null && { KeyCertSign: input.KeyCertSign }),
1580
- ...(input.KeyEncipherment != null && { KeyEncipherment: input.KeyEncipherment }),
1581
- ...(input.NonRepudiation != null && { NonRepudiation: input.NonRepudiation }),
1582
- };
1583
- };
1584
- const se_ListCertificateAuthoritiesRequest = (input, context) => {
1585
- return {
1586
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1587
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1588
- ...(input.ResourceOwner != null && { ResourceOwner: input.ResourceOwner }),
1589
- };
1590
- };
1591
- const se_ListPermissionsRequest = (input, context) => {
1592
- return {
1593
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1594
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1595
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1596
- };
1597
- };
1598
- const se_ListTagsRequest = (input, context) => {
1599
- return {
1600
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1601
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1602
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1603
- };
1604
- };
1605
- const se_OcspConfiguration = (input, context) => {
1606
- return {
1607
- ...(input.Enabled != null && { Enabled: input.Enabled }),
1608
- ...(input.OcspCustomCname != null && { OcspCustomCname: input.OcspCustomCname }),
1609
- };
1610
- };
1611
- const se_OtherName = (input, context) => {
1612
- return {
1613
- ...(input.TypeId != null && { TypeId: input.TypeId }),
1614
- ...(input.Value != null && { Value: input.Value }),
1615
- };
1616
- };
1617
- const se_PolicyInformation = (input, context) => {
1618
- return {
1619
- ...(input.CertPolicyId != null && { CertPolicyId: input.CertPolicyId }),
1620
- ...(input.PolicyQualifiers != null && {
1621
- PolicyQualifiers: se_PolicyQualifierInfoList(input.PolicyQualifiers, context),
1622
- }),
1623
- };
1624
- };
1625
- const se_PolicyQualifierInfo = (input, context) => {
1626
- return {
1627
- ...(input.PolicyQualifierId != null && { PolicyQualifierId: input.PolicyQualifierId }),
1628
- ...(input.Qualifier != null && { Qualifier: se_Qualifier(input.Qualifier, context) }),
1629
- };
1630
- };
1631
- const se_PolicyQualifierInfoList = (input, context) => {
1632
- return input
1633
- .filter((e) => e != null)
1634
- .map((entry) => {
1635
- return se_PolicyQualifierInfo(entry, context);
1636
- });
1637
- };
1638
- const se_PutPolicyRequest = (input, context) => {
1639
- return {
1640
- ...(input.Policy != null && { Policy: input.Policy }),
1641
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1642
- };
1643
- };
1644
- const se_Qualifier = (input, context) => {
1645
- return {
1646
- ...(input.CpsUri != null && { CpsUri: input.CpsUri }),
1647
- };
1648
- };
1649
- const se_RestoreCertificateAuthorityRequest = (input, context) => {
1650
- return {
1651
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1652
- };
1653
- };
1654
- const se_RevocationConfiguration = (input, context) => {
1655
- return {
1656
- ...(input.CrlConfiguration != null && { CrlConfiguration: se_CrlConfiguration(input.CrlConfiguration, context) }),
1657
- ...(input.OcspConfiguration != null && {
1658
- OcspConfiguration: se_OcspConfiguration(input.OcspConfiguration, context),
1659
- }),
1660
- };
1661
- };
1662
- const se_RevokeCertificateRequest = (input, context) => {
1663
- return {
1664
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1665
- ...(input.CertificateSerial != null && { CertificateSerial: input.CertificateSerial }),
1666
- ...(input.RevocationReason != null && { RevocationReason: input.RevocationReason }),
1667
- };
1668
- };
1669
- const se_Tag = (input, context) => {
1670
- return {
1671
- ...(input.Key != null && { Key: input.Key }),
1672
- ...(input.Value != null && { Value: input.Value }),
1673
- };
1674
- };
1675
- const se_TagCertificateAuthorityRequest = (input, context) => {
1676
- return {
1677
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1678
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1679
- };
1680
- };
1681
- const se_TagList = (input, context) => {
1682
- return input
1683
- .filter((e) => e != null)
1684
- .map((entry) => {
1685
- return se_Tag(entry, context);
1686
- });
1687
- };
1688
- const se_UntagCertificateAuthorityRequest = (input, context) => {
1689
- return {
1690
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1691
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1692
- };
1693
- };
1694
- const se_UpdateCertificateAuthorityRequest = (input, context) => {
1695
- return {
1696
- ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1697
- ...(input.RevocationConfiguration != null && {
1698
- RevocationConfiguration: se_RevocationConfiguration(input.RevocationConfiguration, context),
1699
- }),
1700
- ...(input.Status != null && { Status: input.Status }),
1701
- };
1702
- };
1703
- const se_Validity = (input, context) => {
1704
- return {
1705
- ...(input.Type != null && { Type: input.Type }),
1706
- ...(input.Value != null && { Value: input.Value }),
1707
- };
1708
- };
1709
- const de_AccessDescription = (output, context) => {
1710
- return {
1711
- AccessLocation: output.AccessLocation != null ? de_GeneralName(output.AccessLocation, context) : undefined,
1712
- AccessMethod: output.AccessMethod != null ? de_AccessMethod(output.AccessMethod, context) : undefined,
1713
- };
1714
- };
1715
- const de_AccessDescriptionList = (output, context) => {
1716
- const retVal = (output || [])
1717
- .filter((e) => e != null)
1718
- .map((entry) => {
1719
- if (entry === null) {
1720
- return null;
1721
- }
1722
- return de_AccessDescription(entry, context);
1279
+ return take(input, {
1280
+ Certificate: context.base64Encoder,
1281
+ CertificateAuthorityArn: [],
1282
+ CertificateChain: context.base64Encoder,
1723
1283
  });
1724
- return retVal;
1725
1284
  };
1726
- const de_AccessMethod = (output, context) => {
1727
- return {
1728
- AccessMethodType: __expectString(output.AccessMethodType),
1729
- CustomObjectIdentifier: __expectString(output.CustomObjectIdentifier),
1730
- };
1731
- };
1732
- const de_ActionList = (output, context) => {
1733
- const retVal = (output || [])
1734
- .filter((e) => e != null)
1735
- .map((entry) => {
1736
- if (entry === null) {
1737
- return null;
1738
- }
1739
- return __expectString(entry);
1285
+ const se_IssueCertificateRequest = (input, context) => {
1286
+ return take(input, {
1287
+ ApiPassthrough: _json,
1288
+ CertificateAuthorityArn: [],
1289
+ Csr: context.base64Encoder,
1290
+ IdempotencyToken: [],
1291
+ SigningAlgorithm: [],
1292
+ TemplateArn: [],
1293
+ Validity: _json,
1294
+ ValidityNotBefore: _json,
1740
1295
  });
1741
- return retVal;
1742
- };
1743
- const de_ASN1Subject = (output, context) => {
1744
- return {
1745
- CommonName: __expectString(output.CommonName),
1746
- Country: __expectString(output.Country),
1747
- CustomAttributes: output.CustomAttributes != null ? de_CustomAttributeList(output.CustomAttributes, context) : undefined,
1748
- DistinguishedNameQualifier: __expectString(output.DistinguishedNameQualifier),
1749
- GenerationQualifier: __expectString(output.GenerationQualifier),
1750
- GivenName: __expectString(output.GivenName),
1751
- Initials: __expectString(output.Initials),
1752
- Locality: __expectString(output.Locality),
1753
- Organization: __expectString(output.Organization),
1754
- OrganizationalUnit: __expectString(output.OrganizationalUnit),
1755
- Pseudonym: __expectString(output.Pseudonym),
1756
- SerialNumber: __expectString(output.SerialNumber),
1757
- State: __expectString(output.State),
1758
- Surname: __expectString(output.Surname),
1759
- Title: __expectString(output.Title),
1760
- };
1761
1296
  };
1762
1297
  const de_CertificateAuthorities = (output, context) => {
1763
1298
  const retVal = (output || [])
1764
1299
  .filter((e) => e != null)
1765
1300
  .map((entry) => {
1766
- if (entry === null) {
1767
- return null;
1768
- }
1769
1301
  return de_CertificateAuthority(entry, context);
1770
1302
  });
1771
1303
  return retVal;
1772
1304
  };
1773
1305
  const de_CertificateAuthority = (output, context) => {
1774
- return {
1775
- Arn: __expectString(output.Arn),
1776
- CertificateAuthorityConfiguration: output.CertificateAuthorityConfiguration != null
1777
- ? de_CertificateAuthorityConfiguration(output.CertificateAuthorityConfiguration, context)
1778
- : undefined,
1779
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
1780
- FailureReason: __expectString(output.FailureReason),
1781
- KeyStorageSecurityStandard: __expectString(output.KeyStorageSecurityStandard),
1782
- LastStateChangeAt: output.LastStateChangeAt != null
1783
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStateChangeAt)))
1784
- : undefined,
1785
- NotAfter: output.NotAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter))) : undefined,
1786
- NotBefore: output.NotBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore))) : undefined,
1787
- OwnerAccount: __expectString(output.OwnerAccount),
1788
- RestorableUntil: output.RestorableUntil != null
1789
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RestorableUntil)))
1790
- : undefined,
1791
- RevocationConfiguration: output.RevocationConfiguration != null
1792
- ? de_RevocationConfiguration(output.RevocationConfiguration, context)
1793
- : undefined,
1794
- Serial: __expectString(output.Serial),
1795
- Status: __expectString(output.Status),
1796
- Type: __expectString(output.Type),
1797
- UsageMode: __expectString(output.UsageMode),
1798
- };
1799
- };
1800
- const de_CertificateAuthorityConfiguration = (output, context) => {
1801
- return {
1802
- CsrExtensions: output.CsrExtensions != null ? de_CsrExtensions(output.CsrExtensions, context) : undefined,
1803
- KeyAlgorithm: __expectString(output.KeyAlgorithm),
1804
- SigningAlgorithm: __expectString(output.SigningAlgorithm),
1805
- Subject: output.Subject != null ? de_ASN1Subject(output.Subject, context) : undefined,
1806
- };
1807
- };
1808
- const de_CertificateMismatchException = (output, context) => {
1809
- return {
1810
- message: __expectString(output.message),
1811
- };
1812
- };
1813
- const de_ConcurrentModificationException = (output, context) => {
1814
- return {
1815
- message: __expectString(output.message),
1816
- };
1817
- };
1818
- const de_CreateCertificateAuthorityAuditReportResponse = (output, context) => {
1819
- return {
1820
- AuditReportId: __expectString(output.AuditReportId),
1821
- S3Key: __expectString(output.S3Key),
1822
- };
1823
- };
1824
- const de_CreateCertificateAuthorityResponse = (output, context) => {
1825
- return {
1826
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
1827
- };
1828
- };
1829
- const de_CrlConfiguration = (output, context) => {
1830
- return {
1831
- CustomCname: __expectString(output.CustomCname),
1832
- Enabled: __expectBoolean(output.Enabled),
1833
- ExpirationInDays: __expectInt32(output.ExpirationInDays),
1834
- S3BucketName: __expectString(output.S3BucketName),
1835
- S3ObjectAcl: __expectString(output.S3ObjectAcl),
1836
- };
1837
- };
1838
- const de_CsrExtensions = (output, context) => {
1839
- return {
1840
- KeyUsage: output.KeyUsage != null ? de_KeyUsage(output.KeyUsage, context) : undefined,
1841
- SubjectInformationAccess: output.SubjectInformationAccess != null
1842
- ? de_AccessDescriptionList(output.SubjectInformationAccess, context)
1843
- : undefined,
1844
- };
1845
- };
1846
- const de_CustomAttribute = (output, context) => {
1847
- return {
1848
- ObjectIdentifier: __expectString(output.ObjectIdentifier),
1849
- Value: __expectString(output.Value),
1850
- };
1851
- };
1852
- const de_CustomAttributeList = (output, context) => {
1853
- const retVal = (output || [])
1854
- .filter((e) => e != null)
1855
- .map((entry) => {
1856
- if (entry === null) {
1857
- return null;
1858
- }
1859
- return de_CustomAttribute(entry, context);
1306
+ return take(output, {
1307
+ Arn: __expectString,
1308
+ CertificateAuthorityConfiguration: _json,
1309
+ CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1310
+ FailureReason: __expectString,
1311
+ KeyStorageSecurityStandard: __expectString,
1312
+ LastStateChangeAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1313
+ NotAfter: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1314
+ NotBefore: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1315
+ OwnerAccount: __expectString,
1316
+ RestorableUntil: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1317
+ RevocationConfiguration: _json,
1318
+ Serial: __expectString,
1319
+ Status: __expectString,
1320
+ Type: __expectString,
1321
+ UsageMode: __expectString,
1860
1322
  });
1861
- return retVal;
1862
1323
  };
1863
1324
  const de_DescribeCertificateAuthorityAuditReportResponse = (output, context) => {
1864
- return {
1865
- AuditReportStatus: __expectString(output.AuditReportStatus),
1866
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
1867
- S3BucketName: __expectString(output.S3BucketName),
1868
- S3Key: __expectString(output.S3Key),
1869
- };
1325
+ return take(output, {
1326
+ AuditReportStatus: __expectString,
1327
+ CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1328
+ S3BucketName: __expectString,
1329
+ S3Key: __expectString,
1330
+ });
1870
1331
  };
1871
1332
  const de_DescribeCertificateAuthorityResponse = (output, context) => {
1872
- return {
1873
- CertificateAuthority: output.CertificateAuthority != null ? de_CertificateAuthority(output.CertificateAuthority, context) : undefined,
1874
- };
1875
- };
1876
- const de_EdiPartyName = (output, context) => {
1877
- return {
1878
- NameAssigner: __expectString(output.NameAssigner),
1879
- PartyName: __expectString(output.PartyName),
1880
- };
1881
- };
1882
- const de_GeneralName = (output, context) => {
1883
- return {
1884
- DirectoryName: output.DirectoryName != null ? de_ASN1Subject(output.DirectoryName, context) : undefined,
1885
- DnsName: __expectString(output.DnsName),
1886
- EdiPartyName: output.EdiPartyName != null ? de_EdiPartyName(output.EdiPartyName, context) : undefined,
1887
- IpAddress: __expectString(output.IpAddress),
1888
- OtherName: output.OtherName != null ? de_OtherName(output.OtherName, context) : undefined,
1889
- RegisteredId: __expectString(output.RegisteredId),
1890
- Rfc822Name: __expectString(output.Rfc822Name),
1891
- UniformResourceIdentifier: __expectString(output.UniformResourceIdentifier),
1892
- };
1893
- };
1894
- const de_GetCertificateAuthorityCertificateResponse = (output, context) => {
1895
- return {
1896
- Certificate: __expectString(output.Certificate),
1897
- CertificateChain: __expectString(output.CertificateChain),
1898
- };
1899
- };
1900
- const de_GetCertificateAuthorityCsrResponse = (output, context) => {
1901
- return {
1902
- Csr: __expectString(output.Csr),
1903
- };
1904
- };
1905
- const de_GetCertificateResponse = (output, context) => {
1906
- return {
1907
- Certificate: __expectString(output.Certificate),
1908
- CertificateChain: __expectString(output.CertificateChain),
1909
- };
1910
- };
1911
- const de_GetPolicyResponse = (output, context) => {
1912
- return {
1913
- Policy: __expectString(output.Policy),
1914
- };
1915
- };
1916
- const de_InvalidArgsException = (output, context) => {
1917
- return {
1918
- message: __expectString(output.message),
1919
- };
1920
- };
1921
- const de_InvalidArnException = (output, context) => {
1922
- return {
1923
- message: __expectString(output.message),
1924
- };
1925
- };
1926
- const de_InvalidNextTokenException = (output, context) => {
1927
- return {
1928
- message: __expectString(output.message),
1929
- };
1930
- };
1931
- const de_InvalidPolicyException = (output, context) => {
1932
- return {
1933
- message: __expectString(output.message),
1934
- };
1935
- };
1936
- const de_InvalidRequestException = (output, context) => {
1937
- return {
1938
- message: __expectString(output.message),
1939
- };
1940
- };
1941
- const de_InvalidStateException = (output, context) => {
1942
- return {
1943
- message: __expectString(output.message),
1944
- };
1945
- };
1946
- const de_InvalidTagException = (output, context) => {
1947
- return {
1948
- message: __expectString(output.message),
1949
- };
1950
- };
1951
- const de_IssueCertificateResponse = (output, context) => {
1952
- return {
1953
- CertificateArn: __expectString(output.CertificateArn),
1954
- };
1955
- };
1956
- const de_KeyUsage = (output, context) => {
1957
- return {
1958
- CRLSign: __expectBoolean(output.CRLSign),
1959
- DataEncipherment: __expectBoolean(output.DataEncipherment),
1960
- DecipherOnly: __expectBoolean(output.DecipherOnly),
1961
- DigitalSignature: __expectBoolean(output.DigitalSignature),
1962
- EncipherOnly: __expectBoolean(output.EncipherOnly),
1963
- KeyAgreement: __expectBoolean(output.KeyAgreement),
1964
- KeyCertSign: __expectBoolean(output.KeyCertSign),
1965
- KeyEncipherment: __expectBoolean(output.KeyEncipherment),
1966
- NonRepudiation: __expectBoolean(output.NonRepudiation),
1967
- };
1968
- };
1969
- const de_LimitExceededException = (output, context) => {
1970
- return {
1971
- message: __expectString(output.message),
1972
- };
1333
+ return take(output, {
1334
+ CertificateAuthority: (_) => de_CertificateAuthority(_, context),
1335
+ });
1973
1336
  };
1974
1337
  const de_ListCertificateAuthoritiesResponse = (output, context) => {
1975
- return {
1976
- CertificateAuthorities: output.CertificateAuthorities != null
1977
- ? de_CertificateAuthorities(output.CertificateAuthorities, context)
1978
- : undefined,
1979
- NextToken: __expectString(output.NextToken),
1980
- };
1338
+ return take(output, {
1339
+ CertificateAuthorities: (_) => de_CertificateAuthorities(_, context),
1340
+ NextToken: __expectString,
1341
+ });
1981
1342
  };
1982
1343
  const de_ListPermissionsResponse = (output, context) => {
1983
- return {
1984
- NextToken: __expectString(output.NextToken),
1985
- Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined,
1986
- };
1987
- };
1988
- const de_ListTagsResponse = (output, context) => {
1989
- return {
1990
- NextToken: __expectString(output.NextToken),
1991
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1992
- };
1993
- };
1994
- const de_LockoutPreventedException = (output, context) => {
1995
- return {
1996
- message: __expectString(output.message),
1997
- };
1998
- };
1999
- const de_MalformedCertificateException = (output, context) => {
2000
- return {
2001
- message: __expectString(output.message),
2002
- };
2003
- };
2004
- const de_MalformedCSRException = (output, context) => {
2005
- return {
2006
- message: __expectString(output.message),
2007
- };
2008
- };
2009
- const de_OcspConfiguration = (output, context) => {
2010
- return {
2011
- Enabled: __expectBoolean(output.Enabled),
2012
- OcspCustomCname: __expectString(output.OcspCustomCname),
2013
- };
2014
- };
2015
- const de_OtherName = (output, context) => {
2016
- return {
2017
- TypeId: __expectString(output.TypeId),
2018
- Value: __expectString(output.Value),
2019
- };
1344
+ return take(output, {
1345
+ NextToken: __expectString,
1346
+ Permissions: (_) => de_PermissionList(_, context),
1347
+ });
2020
1348
  };
2021
1349
  const de_Permission = (output, context) => {
2022
- return {
2023
- Actions: output.Actions != null ? de_ActionList(output.Actions, context) : undefined,
2024
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
2025
- CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
2026
- Policy: __expectString(output.Policy),
2027
- Principal: __expectString(output.Principal),
2028
- SourceAccount: __expectString(output.SourceAccount),
2029
- };
2030
- };
2031
- const de_PermissionAlreadyExistsException = (output, context) => {
2032
- return {
2033
- message: __expectString(output.message),
2034
- };
1350
+ return take(output, {
1351
+ Actions: _json,
1352
+ CertificateAuthorityArn: __expectString,
1353
+ CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1354
+ Policy: __expectString,
1355
+ Principal: __expectString,
1356
+ SourceAccount: __expectString,
1357
+ });
2035
1358
  };
2036
1359
  const de_PermissionList = (output, context) => {
2037
1360
  const retVal = (output || [])
2038
1361
  .filter((e) => e != null)
2039
1362
  .map((entry) => {
2040
- if (entry === null) {
2041
- return null;
2042
- }
2043
1363
  return de_Permission(entry, context);
2044
1364
  });
2045
1365
  return retVal;
2046
1366
  };
2047
- const de_RequestAlreadyProcessedException = (output, context) => {
2048
- return {
2049
- message: __expectString(output.message),
2050
- };
2051
- };
2052
- const de_RequestFailedException = (output, context) => {
2053
- return {
2054
- message: __expectString(output.message),
2055
- };
2056
- };
2057
- const de_RequestInProgressException = (output, context) => {
2058
- return {
2059
- message: __expectString(output.message),
2060
- };
2061
- };
2062
- const de_ResourceNotFoundException = (output, context) => {
2063
- return {
2064
- message: __expectString(output.message),
2065
- };
2066
- };
2067
- const de_RevocationConfiguration = (output, context) => {
2068
- return {
2069
- CrlConfiguration: output.CrlConfiguration != null ? de_CrlConfiguration(output.CrlConfiguration, context) : undefined,
2070
- OcspConfiguration: output.OcspConfiguration != null ? de_OcspConfiguration(output.OcspConfiguration, context) : undefined,
2071
- };
2072
- };
2073
- const de_Tag = (output, context) => {
2074
- return {
2075
- Key: __expectString(output.Key),
2076
- Value: __expectString(output.Value),
2077
- };
2078
- };
2079
- const de_TagList = (output, context) => {
2080
- const retVal = (output || [])
2081
- .filter((e) => e != null)
2082
- .map((entry) => {
2083
- if (entry === null) {
2084
- return null;
2085
- }
2086
- return de_Tag(entry, context);
2087
- });
2088
- return retVal;
2089
- };
2090
- const de_TooManyTagsException = (output, context) => {
2091
- return {
2092
- message: __expectString(output.message),
2093
- };
2094
- };
2095
1367
  const deserializeMetadata = (output) => ({
2096
1368
  httpStatusCode: output.statusCode,
2097
1369
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2105,6 +1377,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2105
1377
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2106
1378
  };
2107
1379
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1380
+ const throwDefaultError = withBaseException(__BaseException);
2108
1381
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2109
1382
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2110
1383
  const contents = {