@aws-sdk/client-acm-pca 3.185.0 → 3.188.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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/ACMPCA.js +94 -101
  3. package/dist-es/ACMPCAClient.js +22 -28
  4. package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js +21 -28
  5. package/dist-es/commands/CreateCertificateAuthorityCommand.js +21 -28
  6. package/dist-es/commands/CreatePermissionCommand.js +22 -29
  7. package/dist-es/commands/DeleteCertificateAuthorityCommand.js +22 -29
  8. package/dist-es/commands/DeletePermissionCommand.js +22 -29
  9. package/dist-es/commands/DeletePolicyCommand.js +22 -29
  10. package/dist-es/commands/DescribeCertificateAuthorityAuditReportCommand.js +21 -28
  11. package/dist-es/commands/DescribeCertificateAuthorityCommand.js +21 -28
  12. package/dist-es/commands/GetCertificateAuthorityCertificateCommand.js +21 -28
  13. package/dist-es/commands/GetCertificateAuthorityCsrCommand.js +21 -28
  14. package/dist-es/commands/GetCertificateCommand.js +21 -28
  15. package/dist-es/commands/GetPolicyCommand.js +21 -28
  16. package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js +22 -29
  17. package/dist-es/commands/IssueCertificateCommand.js +21 -28
  18. package/dist-es/commands/ListCertificateAuthoritiesCommand.js +21 -28
  19. package/dist-es/commands/ListPermissionsCommand.js +21 -28
  20. package/dist-es/commands/ListTagsCommand.js +21 -28
  21. package/dist-es/commands/PutPolicyCommand.js +22 -29
  22. package/dist-es/commands/RestoreCertificateAuthorityCommand.js +22 -29
  23. package/dist-es/commands/RevokeCertificateCommand.js +22 -29
  24. package/dist-es/commands/TagCertificateAuthorityCommand.js +22 -29
  25. package/dist-es/commands/UntagCertificateAuthorityCommand.js +22 -29
  26. package/dist-es/commands/UpdateCertificateAuthorityCommand.js +22 -29
  27. package/dist-es/endpoints.js +8 -8
  28. package/dist-es/models/ACMPCAServiceException.js +5 -10
  29. package/dist-es/models/models_0.js +386 -269
  30. package/dist-es/pagination/ListCertificateAuthoritiesPaginator.js +25 -68
  31. package/dist-es/pagination/ListPermissionsPaginator.js +25 -68
  32. package/dist-es/pagination/ListTagsPaginator.js +25 -68
  33. package/dist-es/protocols/Aws_json1_1.js +1817 -2238
  34. package/dist-es/runtimeConfig.browser.js +26 -12
  35. package/dist-es/runtimeConfig.js +30 -12
  36. package/dist-es/runtimeConfig.native.js +8 -5
  37. package/dist-es/runtimeConfig.shared.js +8 -11
  38. package/dist-es/waiters/waitForAuditReportCreated.js +36 -56
  39. package/dist-es/waiters/waitForCertificateAuthorityCSRCreated.js +23 -42
  40. package/dist-es/waiters/waitForCertificateIssued.js +23 -42
  41. package/package.json +34 -34
@@ -1,2199 +1,1801 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
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";
4
3
  import { ACMPCAServiceException as __BaseException } from "../models/ACMPCAServiceException";
5
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";
6
- export var serializeAws_json1_1CreateCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthority",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthorityAuditReport",
23
- };
24
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_1CreatePermissionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var headers, body;
30
- return __generator(this, function (_a) {
31
- headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "ACMPrivateCA.CreatePermission",
34
- };
35
- body = JSON.stringify(serializeAws_json1_1CreatePermissionRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_1DeleteCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
- var headers, body;
41
- return __generator(this, function (_a) {
42
- headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "ACMPrivateCA.DeleteCertificateAuthority",
45
- };
46
- body = JSON.stringify(serializeAws_json1_1DeleteCertificateAuthorityRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_1DeletePermissionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
- var headers, body;
52
- return __generator(this, function (_a) {
53
- headers = {
54
- "content-type": "application/x-amz-json-1.1",
55
- "x-amz-target": "ACMPrivateCA.DeletePermission",
56
- };
57
- body = JSON.stringify(serializeAws_json1_1DeletePermissionRequest(input, context));
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_1DeletePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
- var headers, body;
63
- return __generator(this, function (_a) {
64
- headers = {
65
- "content-type": "application/x-amz-json-1.1",
66
- "x-amz-target": "ACMPrivateCA.DeletePolicy",
67
- };
68
- body = JSON.stringify(serializeAws_json1_1DeletePolicyRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_1DescribeCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
- var headers, body;
74
- return __generator(this, function (_a) {
75
- headers = {
76
- "content-type": "application/x-amz-json-1.1",
77
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthority",
78
- };
79
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
- var headers, body;
85
- return __generator(this, function (_a) {
86
- headers = {
87
- "content-type": "application/x-amz-json-1.1",
88
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthorityAuditReport",
89
- };
90
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_1GetCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var headers, body;
96
- return __generator(this, function (_a) {
97
- headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "ACMPrivateCA.GetCertificate",
100
- };
101
- body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_1GetCertificateAuthorityCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
- var headers, body;
107
- return __generator(this, function (_a) {
108
- headers = {
109
- "content-type": "application/x-amz-json-1.1",
110
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCertificate",
111
- };
112
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCertificateRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_1GetCertificateAuthorityCsrCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
- var headers, body;
118
- return __generator(this, function (_a) {
119
- headers = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCsr",
122
- };
123
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCsrRequest(input, context));
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_1GetPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
- var headers, body;
129
- return __generator(this, function (_a) {
130
- headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "ACMPrivateCA.GetPolicy",
133
- };
134
- body = JSON.stringify(serializeAws_json1_1GetPolicyRequest(input, context));
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_1ImportCertificateAuthorityCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
- var headers, body;
140
- return __generator(this, function (_a) {
141
- headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "ACMPrivateCA.ImportCertificateAuthorityCertificate",
144
- };
145
- body = JSON.stringify(serializeAws_json1_1ImportCertificateAuthorityCertificateRequest(input, context));
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var serializeAws_json1_1IssueCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
- var headers, body;
151
- return __generator(this, function (_a) {
152
- headers = {
153
- "content-type": "application/x-amz-json-1.1",
154
- "x-amz-target": "ACMPrivateCA.IssueCertificate",
155
- };
156
- body = JSON.stringify(serializeAws_json1_1IssueCertificateRequest(input, context));
157
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
- });
159
- }); };
160
- export var serializeAws_json1_1ListCertificateAuthoritiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
- var headers, body;
162
- return __generator(this, function (_a) {
163
- headers = {
164
- "content-type": "application/x-amz-json-1.1",
165
- "x-amz-target": "ACMPrivateCA.ListCertificateAuthorities",
166
- };
167
- body = JSON.stringify(serializeAws_json1_1ListCertificateAuthoritiesRequest(input, context));
168
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
- });
170
- }); };
171
- export var serializeAws_json1_1ListPermissionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var headers, body;
173
- return __generator(this, function (_a) {
174
- headers = {
175
- "content-type": "application/x-amz-json-1.1",
176
- "x-amz-target": "ACMPrivateCA.ListPermissions",
177
- };
178
- body = JSON.stringify(serializeAws_json1_1ListPermissionsRequest(input, context));
179
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
180
- });
181
- }); };
182
- export var serializeAws_json1_1ListTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
183
- var headers, body;
184
- return __generator(this, function (_a) {
185
- headers = {
186
- "content-type": "application/x-amz-json-1.1",
187
- "x-amz-target": "ACMPrivateCA.ListTags",
188
- };
189
- body = JSON.stringify(serializeAws_json1_1ListTagsRequest(input, context));
190
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
191
- });
192
- }); };
193
- export var serializeAws_json1_1PutPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
194
- var headers, body;
195
- return __generator(this, function (_a) {
196
- headers = {
197
- "content-type": "application/x-amz-json-1.1",
198
- "x-amz-target": "ACMPrivateCA.PutPolicy",
199
- };
200
- body = JSON.stringify(serializeAws_json1_1PutPolicyRequest(input, context));
201
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
202
- });
203
- }); };
204
- export var serializeAws_json1_1RestoreCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
205
- var headers, body;
206
- return __generator(this, function (_a) {
207
- headers = {
208
- "content-type": "application/x-amz-json-1.1",
209
- "x-amz-target": "ACMPrivateCA.RestoreCertificateAuthority",
210
- };
211
- body = JSON.stringify(serializeAws_json1_1RestoreCertificateAuthorityRequest(input, context));
212
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
213
- });
214
- }); };
215
- export var serializeAws_json1_1RevokeCertificateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
216
- var headers, body;
217
- return __generator(this, function (_a) {
218
- headers = {
219
- "content-type": "application/x-amz-json-1.1",
220
- "x-amz-target": "ACMPrivateCA.RevokeCertificate",
221
- };
222
- body = JSON.stringify(serializeAws_json1_1RevokeCertificateRequest(input, context));
223
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
224
- });
225
- }); };
226
- export var serializeAws_json1_1TagCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
227
- var headers, body;
228
- return __generator(this, function (_a) {
229
- headers = {
230
- "content-type": "application/x-amz-json-1.1",
231
- "x-amz-target": "ACMPrivateCA.TagCertificateAuthority",
232
- };
233
- body = JSON.stringify(serializeAws_json1_1TagCertificateAuthorityRequest(input, context));
234
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
235
- });
236
- }); };
237
- export var serializeAws_json1_1UntagCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
238
- var headers, body;
239
- return __generator(this, function (_a) {
240
- headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "ACMPrivateCA.UntagCertificateAuthority",
243
- };
244
- body = JSON.stringify(serializeAws_json1_1UntagCertificateAuthorityRequest(input, context));
245
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
246
- });
247
- }); };
248
- export var serializeAws_json1_1UpdateCertificateAuthorityCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
249
- var headers, body;
250
- return __generator(this, function (_a) {
251
- headers = {
252
- "content-type": "application/x-amz-json-1.1",
253
- "x-amz-target": "ACMPrivateCA.UpdateCertificateAuthority",
254
- };
255
- body = JSON.stringify(serializeAws_json1_1UpdateCertificateAuthorityRequest(input, context));
256
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
257
- });
258
- }); };
259
- export var deserializeAws_json1_1CreateCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
260
- var data, contents, response;
261
- return __generator(this, function (_a) {
262
- switch (_a.label) {
263
- case 0:
264
- if (output.statusCode >= 300) {
265
- return [2, deserializeAws_json1_1CreateCertificateAuthorityCommandError(output, context)];
266
- }
267
- return [4, parseBody(output.body, context)];
268
- case 1:
269
- data = _a.sent();
270
- contents = {};
271
- contents = deserializeAws_json1_1CreateCertificateAuthorityResponse(data, context);
272
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
273
- return [2, Promise.resolve(response)];
274
- }
275
- });
276
- }); };
277
- var deserializeAws_json1_1CreateCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
278
- var parsedOutput, _a, errorCode, _b, parsedBody;
279
- var _c;
280
- return __generator(this, function (_d) {
281
- switch (_d.label) {
282
- case 0:
283
- _a = [__assign({}, output)];
284
- _c = {};
285
- return [4, parseErrorBody(output.body, context)];
286
- case 1:
287
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
288
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
289
- _b = errorCode;
290
- switch (_b) {
291
- case "InvalidArgsException": return [3, 2];
292
- case "com.amazonaws.acmpca#InvalidArgsException": return [3, 2];
293
- case "InvalidPolicyException": return [3, 4];
294
- case "com.amazonaws.acmpca#InvalidPolicyException": return [3, 4];
295
- case "InvalidTagException": return [3, 6];
296
- case "com.amazonaws.acmpca#InvalidTagException": return [3, 6];
297
- case "LimitExceededException": return [3, 8];
298
- case "com.amazonaws.acmpca#LimitExceededException": return [3, 8];
299
- }
300
- return [3, 10];
301
- case 2: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
302
- case 3: throw _d.sent();
303
- case 4: return [4, deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)];
304
- case 5: throw _d.sent();
305
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
306
- case 7: throw _d.sent();
307
- case 8: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
308
- case 9: throw _d.sent();
309
- case 10:
310
- parsedBody = parsedOutput.body;
311
- throwDefaultError({
312
- output: output,
313
- parsedBody: parsedBody,
314
- exceptionCtor: __BaseException,
315
- errorCode: errorCode,
316
- });
317
- _d.label = 11;
318
- case 11: return [2];
319
- }
320
- });
321
- }); };
322
- export var deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
323
- var data, contents, response;
324
- return __generator(this, function (_a) {
325
- switch (_a.label) {
326
- case 0:
327
- if (output.statusCode >= 300) {
328
- return [2, deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError(output, context)];
329
- }
330
- return [4, parseBody(output.body, context)];
331
- case 1:
332
- data = _a.sent();
333
- contents = {};
334
- contents = deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse(data, context);
335
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
336
- return [2, Promise.resolve(response)];
337
- }
338
- });
339
- }); };
340
- var deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
341
- var parsedOutput, _a, errorCode, _b, parsedBody;
342
- var _c;
343
- return __generator(this, function (_d) {
344
- switch (_d.label) {
345
- case 0:
346
- _a = [__assign({}, output)];
347
- _c = {};
348
- return [4, parseErrorBody(output.body, context)];
349
- case 1:
350
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
351
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
- _b = errorCode;
353
- switch (_b) {
354
- case "InvalidArgsException": return [3, 2];
355
- case "com.amazonaws.acmpca#InvalidArgsException": return [3, 2];
356
- case "InvalidArnException": return [3, 4];
357
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
358
- case "InvalidStateException": return [3, 6];
359
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 6];
360
- case "RequestFailedException": return [3, 8];
361
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 8];
362
- case "RequestInProgressException": return [3, 10];
363
- case "com.amazonaws.acmpca#RequestInProgressException": return [3, 10];
364
- case "ResourceNotFoundException": return [3, 12];
365
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 12];
366
- }
367
- return [3, 14];
368
- case 2: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
369
- case 3: throw _d.sent();
370
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
371
- case 5: throw _d.sent();
372
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
373
- case 7: throw _d.sent();
374
- case 8: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
375
- case 9: throw _d.sent();
376
- case 10: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
377
- case 11: throw _d.sent();
378
- case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
379
- case 13: throw _d.sent();
380
- case 14:
381
- parsedBody = parsedOutput.body;
382
- throwDefaultError({
383
- output: output,
384
- parsedBody: parsedBody,
385
- exceptionCtor: __BaseException,
386
- errorCode: errorCode,
387
- });
388
- _d.label = 15;
389
- case 15: return [2];
390
- }
391
- });
392
- }); };
393
- export var deserializeAws_json1_1CreatePermissionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
394
- var response;
395
- return __generator(this, function (_a) {
396
- switch (_a.label) {
397
- case 0:
398
- if (output.statusCode >= 300) {
399
- return [2, deserializeAws_json1_1CreatePermissionCommandError(output, context)];
400
- }
401
- return [4, collectBody(output.body, context)];
402
- case 1:
403
- _a.sent();
404
- response = {
405
- $metadata: deserializeMetadata(output),
406
- };
407
- return [2, Promise.resolve(response)];
408
- }
409
- });
410
- }); };
411
- var deserializeAws_json1_1CreatePermissionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
412
- var parsedOutput, _a, errorCode, _b, parsedBody;
413
- var _c;
414
- return __generator(this, function (_d) {
415
- switch (_d.label) {
416
- case 0:
417
- _a = [__assign({}, output)];
418
- _c = {};
419
- return [4, parseErrorBody(output.body, context)];
420
- case 1:
421
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
422
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
423
- _b = errorCode;
424
- switch (_b) {
425
- case "InvalidArnException": return [3, 2];
426
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
427
- case "InvalidStateException": return [3, 4];
428
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
429
- case "LimitExceededException": return [3, 6];
430
- case "com.amazonaws.acmpca#LimitExceededException": return [3, 6];
431
- case "PermissionAlreadyExistsException": return [3, 8];
432
- case "com.amazonaws.acmpca#PermissionAlreadyExistsException": return [3, 8];
433
- case "RequestFailedException": return [3, 10];
434
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 10];
435
- case "ResourceNotFoundException": return [3, 12];
436
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 12];
437
- }
438
- return [3, 14];
439
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
440
- case 3: throw _d.sent();
441
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
442
- case 5: throw _d.sent();
443
- case 6: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
444
- case 7: throw _d.sent();
445
- case 8: return [4, deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse(parsedOutput, context)];
446
- case 9: throw _d.sent();
447
- case 10: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
448
- case 11: throw _d.sent();
449
- case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
450
- case 13: throw _d.sent();
451
- case 14:
452
- parsedBody = parsedOutput.body;
453
- throwDefaultError({
454
- output: output,
455
- parsedBody: parsedBody,
456
- exceptionCtor: __BaseException,
457
- errorCode: errorCode,
458
- });
459
- _d.label = 15;
460
- case 15: return [2];
461
- }
462
- });
463
- }); };
464
- export var deserializeAws_json1_1DeleteCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
465
- var response;
466
- return __generator(this, function (_a) {
467
- switch (_a.label) {
468
- case 0:
469
- if (output.statusCode >= 300) {
470
- return [2, deserializeAws_json1_1DeleteCertificateAuthorityCommandError(output, context)];
471
- }
472
- return [4, collectBody(output.body, context)];
473
- case 1:
474
- _a.sent();
475
- response = {
476
- $metadata: deserializeMetadata(output),
477
- };
478
- return [2, Promise.resolve(response)];
479
- }
480
- });
481
- }); };
482
- var deserializeAws_json1_1DeleteCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
483
- var parsedOutput, _a, errorCode, _b, parsedBody;
484
- var _c;
485
- return __generator(this, function (_d) {
486
- switch (_d.label) {
487
- case 0:
488
- _a = [__assign({}, output)];
489
- _c = {};
490
- return [4, parseErrorBody(output.body, context)];
491
- case 1:
492
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
493
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
494
- _b = errorCode;
495
- switch (_b) {
496
- case "ConcurrentModificationException": return [3, 2];
497
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 2];
498
- case "InvalidArnException": return [3, 4];
499
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
500
- case "InvalidStateException": return [3, 6];
501
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 6];
502
- case "ResourceNotFoundException": return [3, 8];
503
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 8];
504
- }
505
- return [3, 10];
506
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
507
- case 3: throw _d.sent();
508
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
509
- case 5: throw _d.sent();
510
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
511
- case 7: throw _d.sent();
512
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
513
- case 9: throw _d.sent();
514
- case 10:
515
- parsedBody = parsedOutput.body;
516
- throwDefaultError({
517
- output: output,
518
- parsedBody: parsedBody,
519
- exceptionCtor: __BaseException,
520
- errorCode: errorCode,
521
- });
522
- _d.label = 11;
523
- case 11: return [2];
524
- }
525
- });
526
- }); };
527
- export var deserializeAws_json1_1DeletePermissionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
528
- var response;
529
- return __generator(this, function (_a) {
530
- switch (_a.label) {
531
- case 0:
532
- if (output.statusCode >= 300) {
533
- return [2, deserializeAws_json1_1DeletePermissionCommandError(output, context)];
534
- }
535
- return [4, collectBody(output.body, context)];
536
- case 1:
537
- _a.sent();
538
- response = {
539
- $metadata: deserializeMetadata(output),
540
- };
541
- return [2, Promise.resolve(response)];
542
- }
543
- });
544
- }); };
545
- var deserializeAws_json1_1DeletePermissionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
546
- var parsedOutput, _a, errorCode, _b, parsedBody;
547
- var _c;
548
- return __generator(this, function (_d) {
549
- switch (_d.label) {
550
- case 0:
551
- _a = [__assign({}, output)];
552
- _c = {};
553
- return [4, parseErrorBody(output.body, context)];
554
- case 1:
555
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
556
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
557
- _b = errorCode;
558
- switch (_b) {
559
- case "InvalidArnException": return [3, 2];
560
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
561
- case "InvalidStateException": return [3, 4];
562
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
563
- case "RequestFailedException": return [3, 6];
564
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 6];
565
- case "ResourceNotFoundException": return [3, 8];
566
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 8];
567
- }
568
- return [3, 10];
569
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
570
- case 3: throw _d.sent();
571
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
572
- case 5: throw _d.sent();
573
- case 6: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
574
- case 7: throw _d.sent();
575
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
576
- case 9: throw _d.sent();
577
- case 10:
578
- parsedBody = parsedOutput.body;
579
- throwDefaultError({
580
- output: output,
581
- parsedBody: parsedBody,
582
- exceptionCtor: __BaseException,
583
- errorCode: errorCode,
584
- });
585
- _d.label = 11;
586
- case 11: return [2];
587
- }
588
- });
589
- }); };
590
- export var deserializeAws_json1_1DeletePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
591
- var response;
592
- return __generator(this, function (_a) {
593
- switch (_a.label) {
594
- case 0:
595
- if (output.statusCode >= 300) {
596
- return [2, deserializeAws_json1_1DeletePolicyCommandError(output, context)];
597
- }
598
- return [4, collectBody(output.body, context)];
599
- case 1:
600
- _a.sent();
601
- response = {
602
- $metadata: deserializeMetadata(output),
603
- };
604
- return [2, Promise.resolve(response)];
605
- }
606
- });
607
- }); };
608
- var deserializeAws_json1_1DeletePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
609
- var parsedOutput, _a, errorCode, _b, parsedBody;
610
- var _c;
611
- return __generator(this, function (_d) {
612
- switch (_d.label) {
613
- case 0:
614
- _a = [__assign({}, output)];
615
- _c = {};
616
- return [4, parseErrorBody(output.body, context)];
617
- case 1:
618
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
619
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
620
- _b = errorCode;
621
- switch (_b) {
622
- case "ConcurrentModificationException": return [3, 2];
623
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 2];
624
- case "InvalidArnException": return [3, 4];
625
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
626
- case "InvalidStateException": return [3, 6];
627
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 6];
628
- case "LockoutPreventedException": return [3, 8];
629
- case "com.amazonaws.acmpca#LockoutPreventedException": return [3, 8];
630
- case "RequestFailedException": return [3, 10];
631
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 10];
632
- case "ResourceNotFoundException": return [3, 12];
633
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 12];
634
- }
635
- return [3, 14];
636
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
637
- case 3: throw _d.sent();
638
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
639
- case 5: throw _d.sent();
640
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
641
- case 7: throw _d.sent();
642
- case 8: return [4, deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)];
643
- case 9: throw _d.sent();
644
- case 10: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
645
- case 11: throw _d.sent();
646
- case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
647
- case 13: throw _d.sent();
648
- case 14:
649
- parsedBody = parsedOutput.body;
650
- throwDefaultError({
651
- output: output,
652
- parsedBody: parsedBody,
653
- exceptionCtor: __BaseException,
654
- errorCode: errorCode,
655
- });
656
- _d.label = 15;
657
- case 15: return [2];
658
- }
659
- });
660
- }); };
661
- export var deserializeAws_json1_1DescribeCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
662
- var data, contents, response;
663
- return __generator(this, function (_a) {
664
- switch (_a.label) {
665
- case 0:
666
- if (output.statusCode >= 300) {
667
- return [2, deserializeAws_json1_1DescribeCertificateAuthorityCommandError(output, context)];
668
- }
669
- return [4, parseBody(output.body, context)];
670
- case 1:
671
- data = _a.sent();
672
- contents = {};
673
- contents = deserializeAws_json1_1DescribeCertificateAuthorityResponse(data, context);
674
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
675
- return [2, Promise.resolve(response)];
676
- }
677
- });
678
- }); };
679
- var deserializeAws_json1_1DescribeCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
680
- var parsedOutput, _a, errorCode, _b, parsedBody;
681
- var _c;
682
- return __generator(this, function (_d) {
683
- switch (_d.label) {
684
- case 0:
685
- _a = [__assign({}, output)];
686
- _c = {};
687
- return [4, parseErrorBody(output.body, context)];
688
- case 1:
689
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
690
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
691
- _b = errorCode;
692
- switch (_b) {
693
- case "InvalidArnException": return [3, 2];
694
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
695
- case "ResourceNotFoundException": return [3, 4];
696
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 4];
697
- }
698
- return [3, 6];
699
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
700
- case 3: throw _d.sent();
701
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
702
- case 5: throw _d.sent();
703
- case 6:
704
- parsedBody = parsedOutput.body;
705
- throwDefaultError({
706
- output: output,
707
- parsedBody: parsedBody,
708
- exceptionCtor: __BaseException,
709
- errorCode: errorCode,
710
- });
711
- _d.label = 7;
712
- case 7: return [2];
713
- }
714
- });
715
- }); };
716
- export var deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
717
- var data, contents, response;
718
- return __generator(this, function (_a) {
719
- switch (_a.label) {
720
- case 0:
721
- if (output.statusCode >= 300) {
722
- return [2, deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError(output, context)];
723
- }
724
- return [4, parseBody(output.body, context)];
725
- case 1:
726
- data = _a.sent();
727
- contents = {};
728
- contents = deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse(data, context);
729
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
730
- return [2, Promise.resolve(response)];
731
- }
732
- });
733
- }); };
734
- var deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
735
- var parsedOutput, _a, errorCode, _b, parsedBody;
736
- var _c;
737
- return __generator(this, function (_d) {
738
- switch (_d.label) {
739
- case 0:
740
- _a = [__assign({}, output)];
741
- _c = {};
742
- return [4, parseErrorBody(output.body, context)];
743
- case 1:
744
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
745
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
746
- _b = errorCode;
747
- switch (_b) {
748
- case "InvalidArgsException": return [3, 2];
749
- case "com.amazonaws.acmpca#InvalidArgsException": return [3, 2];
750
- case "InvalidArnException": return [3, 4];
751
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
752
- case "ResourceNotFoundException": return [3, 6];
753
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 6];
754
- }
755
- return [3, 8];
756
- case 2: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
757
- case 3: throw _d.sent();
758
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
759
- case 5: throw _d.sent();
760
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
761
- case 7: throw _d.sent();
762
- case 8:
763
- parsedBody = parsedOutput.body;
764
- throwDefaultError({
765
- output: output,
766
- parsedBody: parsedBody,
767
- exceptionCtor: __BaseException,
768
- errorCode: errorCode,
769
- });
770
- _d.label = 9;
771
- case 9: return [2];
772
- }
773
- });
774
- }); };
775
- export var deserializeAws_json1_1GetCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
776
- var data, contents, response;
777
- return __generator(this, function (_a) {
778
- switch (_a.label) {
779
- case 0:
780
- if (output.statusCode >= 300) {
781
- return [2, deserializeAws_json1_1GetCertificateCommandError(output, context)];
782
- }
783
- return [4, parseBody(output.body, context)];
784
- case 1:
785
- data = _a.sent();
786
- contents = {};
787
- contents = deserializeAws_json1_1GetCertificateResponse(data, context);
788
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
789
- return [2, Promise.resolve(response)];
790
- }
791
- });
792
- }); };
793
- var deserializeAws_json1_1GetCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
794
- var parsedOutput, _a, errorCode, _b, parsedBody;
795
- var _c;
796
- return __generator(this, function (_d) {
797
- switch (_d.label) {
798
- case 0:
799
- _a = [__assign({}, output)];
800
- _c = {};
801
- return [4, parseErrorBody(output.body, context)];
802
- case 1:
803
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
804
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
805
- _b = errorCode;
806
- switch (_b) {
807
- case "InvalidArnException": return [3, 2];
808
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
809
- case "InvalidStateException": return [3, 4];
810
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
811
- case "RequestFailedException": return [3, 6];
812
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 6];
813
- case "RequestInProgressException": return [3, 8];
814
- case "com.amazonaws.acmpca#RequestInProgressException": return [3, 8];
815
- case "ResourceNotFoundException": return [3, 10];
816
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 10];
817
- }
818
- return [3, 12];
819
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
820
- case 3: throw _d.sent();
821
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
822
- case 5: throw _d.sent();
823
- case 6: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
824
- case 7: throw _d.sent();
825
- case 8: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
826
- case 9: throw _d.sent();
827
- case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
828
- case 11: throw _d.sent();
829
- case 12:
830
- parsedBody = parsedOutput.body;
831
- throwDefaultError({
832
- output: output,
833
- parsedBody: parsedBody,
834
- exceptionCtor: __BaseException,
835
- errorCode: errorCode,
836
- });
837
- _d.label = 13;
838
- case 13: return [2];
839
- }
840
- });
841
- }); };
842
- export var deserializeAws_json1_1GetCertificateAuthorityCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
843
- var data, contents, response;
844
- return __generator(this, function (_a) {
845
- switch (_a.label) {
846
- case 0:
847
- if (output.statusCode >= 300) {
848
- return [2, deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError(output, context)];
849
- }
850
- return [4, parseBody(output.body, context)];
851
- case 1:
852
- data = _a.sent();
853
- contents = {};
854
- contents = deserializeAws_json1_1GetCertificateAuthorityCertificateResponse(data, context);
855
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
856
- return [2, Promise.resolve(response)];
857
- }
858
- });
859
- }); };
860
- var deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
861
- var parsedOutput, _a, errorCode, _b, parsedBody;
862
- var _c;
863
- return __generator(this, function (_d) {
864
- switch (_d.label) {
865
- case 0:
866
- _a = [__assign({}, output)];
867
- _c = {};
868
- return [4, parseErrorBody(output.body, context)];
869
- case 1:
870
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
871
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
872
- _b = errorCode;
873
- switch (_b) {
874
- case "InvalidArnException": return [3, 2];
875
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
876
- case "InvalidStateException": return [3, 4];
877
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
878
- case "ResourceNotFoundException": return [3, 6];
879
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 6];
880
- }
881
- return [3, 8];
882
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
883
- case 3: throw _d.sent();
884
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
885
- case 5: throw _d.sent();
886
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
887
- case 7: throw _d.sent();
888
- case 8:
889
- parsedBody = parsedOutput.body;
890
- throwDefaultError({
891
- output: output,
892
- parsedBody: parsedBody,
893
- exceptionCtor: __BaseException,
894
- errorCode: errorCode,
895
- });
896
- _d.label = 9;
897
- case 9: return [2];
898
- }
899
- });
900
- }); };
901
- export var deserializeAws_json1_1GetCertificateAuthorityCsrCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
902
- var data, contents, response;
903
- return __generator(this, function (_a) {
904
- switch (_a.label) {
905
- case 0:
906
- if (output.statusCode >= 300) {
907
- return [2, deserializeAws_json1_1GetCertificateAuthorityCsrCommandError(output, context)];
908
- }
909
- return [4, parseBody(output.body, context)];
910
- case 1:
911
- data = _a.sent();
912
- contents = {};
913
- contents = deserializeAws_json1_1GetCertificateAuthorityCsrResponse(data, context);
914
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
915
- return [2, Promise.resolve(response)];
916
- }
917
- });
918
- }); };
919
- var deserializeAws_json1_1GetCertificateAuthorityCsrCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
920
- var parsedOutput, _a, errorCode, _b, parsedBody;
921
- var _c;
922
- return __generator(this, function (_d) {
923
- switch (_d.label) {
924
- case 0:
925
- _a = [__assign({}, output)];
926
- _c = {};
927
- return [4, parseErrorBody(output.body, context)];
928
- case 1:
929
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
930
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
931
- _b = errorCode;
932
- switch (_b) {
933
- case "InvalidArnException": return [3, 2];
934
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
935
- case "InvalidStateException": return [3, 4];
936
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
937
- case "RequestFailedException": return [3, 6];
938
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 6];
939
- case "RequestInProgressException": return [3, 8];
940
- case "com.amazonaws.acmpca#RequestInProgressException": return [3, 8];
941
- case "ResourceNotFoundException": return [3, 10];
942
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 10];
943
- }
944
- return [3, 12];
945
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
946
- case 3: throw _d.sent();
947
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
948
- case 5: throw _d.sent();
949
- case 6: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
950
- case 7: throw _d.sent();
951
- case 8: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
952
- case 9: throw _d.sent();
953
- case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
954
- case 11: throw _d.sent();
955
- case 12:
956
- parsedBody = parsedOutput.body;
957
- throwDefaultError({
958
- output: output,
959
- parsedBody: parsedBody,
960
- exceptionCtor: __BaseException,
961
- errorCode: errorCode,
962
- });
963
- _d.label = 13;
964
- case 13: return [2];
965
- }
966
- });
967
- }); };
968
- export var deserializeAws_json1_1GetPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
969
- var data, contents, response;
970
- return __generator(this, function (_a) {
971
- switch (_a.label) {
972
- case 0:
973
- if (output.statusCode >= 300) {
974
- return [2, deserializeAws_json1_1GetPolicyCommandError(output, context)];
975
- }
976
- return [4, parseBody(output.body, context)];
977
- case 1:
978
- data = _a.sent();
979
- contents = {};
980
- contents = deserializeAws_json1_1GetPolicyResponse(data, context);
981
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
982
- return [2, Promise.resolve(response)];
983
- }
984
- });
985
- }); };
986
- var deserializeAws_json1_1GetPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
987
- var parsedOutput, _a, errorCode, _b, parsedBody;
988
- var _c;
989
- return __generator(this, function (_d) {
990
- switch (_d.label) {
991
- case 0:
992
- _a = [__assign({}, output)];
993
- _c = {};
994
- return [4, parseErrorBody(output.body, context)];
995
- case 1:
996
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
997
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
998
- _b = errorCode;
999
- switch (_b) {
1000
- case "InvalidArnException": return [3, 2];
1001
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1002
- case "InvalidStateException": return [3, 4];
1003
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
1004
- case "RequestFailedException": return [3, 6];
1005
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 6];
1006
- case "ResourceNotFoundException": return [3, 8];
1007
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 8];
1008
- }
1009
- return [3, 10];
1010
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1011
- case 3: throw _d.sent();
1012
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1013
- case 5: throw _d.sent();
1014
- case 6: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
1015
- case 7: throw _d.sent();
1016
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1017
- case 9: throw _d.sent();
1018
- case 10:
1019
- parsedBody = parsedOutput.body;
1020
- throwDefaultError({
1021
- output: output,
1022
- parsedBody: parsedBody,
1023
- exceptionCtor: __BaseException,
1024
- errorCode: errorCode,
1025
- });
1026
- _d.label = 11;
1027
- case 11: return [2];
1028
- }
1029
- });
1030
- }); };
1031
- export var deserializeAws_json1_1ImportCertificateAuthorityCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1032
- var response;
1033
- return __generator(this, function (_a) {
1034
- switch (_a.label) {
1035
- case 0:
1036
- if (output.statusCode >= 300) {
1037
- return [2, deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError(output, context)];
1038
- }
1039
- return [4, collectBody(output.body, context)];
1040
- case 1:
1041
- _a.sent();
1042
- response = {
1043
- $metadata: deserializeMetadata(output),
1044
- };
1045
- return [2, Promise.resolve(response)];
1046
- }
1047
- });
1048
- }); };
1049
- var deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1050
- var parsedOutput, _a, errorCode, _b, parsedBody;
1051
- var _c;
1052
- return __generator(this, function (_d) {
1053
- switch (_d.label) {
1054
- case 0:
1055
- _a = [__assign({}, output)];
1056
- _c = {};
1057
- return [4, parseErrorBody(output.body, context)];
1058
- case 1:
1059
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1060
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
- _b = errorCode;
1062
- switch (_b) {
1063
- case "CertificateMismatchException": return [3, 2];
1064
- case "com.amazonaws.acmpca#CertificateMismatchException": return [3, 2];
1065
- case "ConcurrentModificationException": return [3, 4];
1066
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 4];
1067
- case "InvalidArnException": return [3, 6];
1068
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 6];
1069
- case "InvalidRequestException": return [3, 8];
1070
- case "com.amazonaws.acmpca#InvalidRequestException": return [3, 8];
1071
- case "InvalidStateException": return [3, 10];
1072
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 10];
1073
- case "MalformedCertificateException": return [3, 12];
1074
- case "com.amazonaws.acmpca#MalformedCertificateException": return [3, 12];
1075
- case "RequestFailedException": return [3, 14];
1076
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 14];
1077
- case "RequestInProgressException": return [3, 16];
1078
- case "com.amazonaws.acmpca#RequestInProgressException": return [3, 16];
1079
- case "ResourceNotFoundException": return [3, 18];
1080
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 18];
1081
- }
1082
- return [3, 20];
1083
- case 2: return [4, deserializeAws_json1_1CertificateMismatchExceptionResponse(parsedOutput, context)];
1084
- case 3: throw _d.sent();
1085
- case 4: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
1086
- case 5: throw _d.sent();
1087
- case 6: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1088
- case 7: throw _d.sent();
1089
- case 8: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
1090
- case 9: throw _d.sent();
1091
- case 10: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1092
- case 11: throw _d.sent();
1093
- case 12: return [4, deserializeAws_json1_1MalformedCertificateExceptionResponse(parsedOutput, context)];
1094
- case 13: throw _d.sent();
1095
- case 14: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
1096
- case 15: throw _d.sent();
1097
- case 16: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
1098
- case 17: throw _d.sent();
1099
- case 18: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1100
- case 19: throw _d.sent();
1101
- case 20:
1102
- parsedBody = parsedOutput.body;
1103
- throwDefaultError({
1104
- output: output,
1105
- parsedBody: parsedBody,
1106
- exceptionCtor: __BaseException,
1107
- errorCode: errorCode,
1108
- });
1109
- _d.label = 21;
1110
- case 21: return [2];
1111
- }
1112
- });
1113
- }); };
1114
- export var deserializeAws_json1_1IssueCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1115
- var data, contents, response;
1116
- return __generator(this, function (_a) {
1117
- switch (_a.label) {
1118
- case 0:
1119
- if (output.statusCode >= 300) {
1120
- return [2, deserializeAws_json1_1IssueCertificateCommandError(output, context)];
1121
- }
1122
- return [4, parseBody(output.body, context)];
1123
- case 1:
1124
- data = _a.sent();
1125
- contents = {};
1126
- contents = deserializeAws_json1_1IssueCertificateResponse(data, context);
1127
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1128
- return [2, Promise.resolve(response)];
1129
- }
1130
- });
1131
- }); };
1132
- var deserializeAws_json1_1IssueCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1133
- var parsedOutput, _a, errorCode, _b, parsedBody;
1134
- var _c;
1135
- return __generator(this, function (_d) {
1136
- switch (_d.label) {
1137
- case 0:
1138
- _a = [__assign({}, output)];
1139
- _c = {};
1140
- return [4, parseErrorBody(output.body, context)];
1141
- case 1:
1142
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1143
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1144
- _b = errorCode;
1145
- switch (_b) {
1146
- case "InvalidArgsException": return [3, 2];
1147
- case "com.amazonaws.acmpca#InvalidArgsException": return [3, 2];
1148
- case "InvalidArnException": return [3, 4];
1149
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
1150
- case "InvalidStateException": return [3, 6];
1151
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 6];
1152
- case "LimitExceededException": return [3, 8];
1153
- case "com.amazonaws.acmpca#LimitExceededException": return [3, 8];
1154
- case "MalformedCSRException": return [3, 10];
1155
- case "com.amazonaws.acmpca#MalformedCSRException": return [3, 10];
1156
- case "ResourceNotFoundException": return [3, 12];
1157
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 12];
1158
- }
1159
- return [3, 14];
1160
- case 2: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
1161
- case 3: throw _d.sent();
1162
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1163
- case 5: throw _d.sent();
1164
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1165
- case 7: throw _d.sent();
1166
- case 8: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
1167
- case 9: throw _d.sent();
1168
- case 10: return [4, deserializeAws_json1_1MalformedCSRExceptionResponse(parsedOutput, context)];
1169
- case 11: throw _d.sent();
1170
- case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1171
- case 13: throw _d.sent();
1172
- case 14:
1173
- parsedBody = parsedOutput.body;
1174
- throwDefaultError({
1175
- output: output,
1176
- parsedBody: parsedBody,
1177
- exceptionCtor: __BaseException,
1178
- errorCode: errorCode,
1179
- });
1180
- _d.label = 15;
1181
- case 15: return [2];
1182
- }
1183
- });
1184
- }); };
1185
- export var deserializeAws_json1_1ListCertificateAuthoritiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1186
- var data, contents, response;
1187
- return __generator(this, function (_a) {
1188
- switch (_a.label) {
1189
- case 0:
1190
- if (output.statusCode >= 300) {
1191
- return [2, deserializeAws_json1_1ListCertificateAuthoritiesCommandError(output, context)];
1192
- }
1193
- return [4, parseBody(output.body, context)];
1194
- case 1:
1195
- data = _a.sent();
1196
- contents = {};
1197
- contents = deserializeAws_json1_1ListCertificateAuthoritiesResponse(data, context);
1198
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1199
- return [2, Promise.resolve(response)];
1200
- }
1201
- });
1202
- }); };
1203
- var deserializeAws_json1_1ListCertificateAuthoritiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1204
- var parsedOutput, _a, errorCode, _b, parsedBody;
1205
- var _c;
1206
- return __generator(this, function (_d) {
1207
- switch (_d.label) {
1208
- case 0:
1209
- _a = [__assign({}, output)];
1210
- _c = {};
1211
- return [4, parseErrorBody(output.body, context)];
1212
- case 1:
1213
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1214
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1215
- _b = errorCode;
1216
- switch (_b) {
1217
- case "InvalidNextTokenException": return [3, 2];
1218
- case "com.amazonaws.acmpca#InvalidNextTokenException": return [3, 2];
1219
- }
1220
- return [3, 4];
1221
- case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1222
- case 3: throw _d.sent();
1223
- case 4:
1224
- parsedBody = parsedOutput.body;
1225
- throwDefaultError({
1226
- output: output,
1227
- parsedBody: parsedBody,
1228
- exceptionCtor: __BaseException,
1229
- errorCode: errorCode,
1230
- });
1231
- _d.label = 5;
1232
- case 5: return [2];
1233
- }
1234
- });
1235
- }); };
1236
- export var deserializeAws_json1_1ListPermissionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1237
- var data, contents, response;
1238
- return __generator(this, function (_a) {
1239
- switch (_a.label) {
1240
- case 0:
1241
- if (output.statusCode >= 300) {
1242
- return [2, deserializeAws_json1_1ListPermissionsCommandError(output, context)];
1243
- }
1244
- return [4, parseBody(output.body, context)];
1245
- case 1:
1246
- data = _a.sent();
1247
- contents = {};
1248
- contents = deserializeAws_json1_1ListPermissionsResponse(data, context);
1249
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1250
- return [2, Promise.resolve(response)];
1251
- }
1252
- });
1253
- }); };
1254
- var deserializeAws_json1_1ListPermissionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1255
- var parsedOutput, _a, errorCode, _b, parsedBody;
1256
- var _c;
1257
- return __generator(this, function (_d) {
1258
- switch (_d.label) {
1259
- case 0:
1260
- _a = [__assign({}, output)];
1261
- _c = {};
1262
- return [4, parseErrorBody(output.body, context)];
1263
- case 1:
1264
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1265
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1266
- _b = errorCode;
1267
- switch (_b) {
1268
- case "InvalidArnException": return [3, 2];
1269
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1270
- case "InvalidNextTokenException": return [3, 4];
1271
- case "com.amazonaws.acmpca#InvalidNextTokenException": return [3, 4];
1272
- case "InvalidStateException": return [3, 6];
1273
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 6];
1274
- case "RequestFailedException": return [3, 8];
1275
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 8];
1276
- case "ResourceNotFoundException": return [3, 10];
1277
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 10];
1278
- }
1279
- return [3, 12];
1280
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1281
- case 3: throw _d.sent();
1282
- case 4: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
1283
- case 5: throw _d.sent();
1284
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1285
- case 7: throw _d.sent();
1286
- case 8: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
1287
- case 9: throw _d.sent();
1288
- case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1289
- case 11: throw _d.sent();
1290
- case 12:
1291
- parsedBody = parsedOutput.body;
1292
- throwDefaultError({
1293
- output: output,
1294
- parsedBody: parsedBody,
1295
- exceptionCtor: __BaseException,
1296
- errorCode: errorCode,
1297
- });
1298
- _d.label = 13;
1299
- case 13: return [2];
1300
- }
1301
- });
1302
- }); };
1303
- export var deserializeAws_json1_1ListTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1304
- var data, contents, response;
1305
- return __generator(this, function (_a) {
1306
- switch (_a.label) {
1307
- case 0:
1308
- if (output.statusCode >= 300) {
1309
- return [2, deserializeAws_json1_1ListTagsCommandError(output, context)];
1310
- }
1311
- return [4, parseBody(output.body, context)];
1312
- case 1:
1313
- data = _a.sent();
1314
- contents = {};
1315
- contents = deserializeAws_json1_1ListTagsResponse(data, context);
1316
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1317
- return [2, Promise.resolve(response)];
1318
- }
1319
- });
1320
- }); };
1321
- var deserializeAws_json1_1ListTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1322
- var parsedOutput, _a, errorCode, _b, parsedBody;
1323
- var _c;
1324
- return __generator(this, function (_d) {
1325
- switch (_d.label) {
1326
- case 0:
1327
- _a = [__assign({}, output)];
1328
- _c = {};
1329
- return [4, parseErrorBody(output.body, context)];
1330
- case 1:
1331
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1332
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1333
- _b = errorCode;
1334
- switch (_b) {
1335
- case "InvalidArnException": return [3, 2];
1336
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1337
- case "InvalidStateException": return [3, 4];
1338
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
1339
- case "ResourceNotFoundException": return [3, 6];
1340
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 6];
1341
- }
1342
- return [3, 8];
1343
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1344
- case 3: throw _d.sent();
1345
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1346
- case 5: throw _d.sent();
1347
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1348
- case 7: throw _d.sent();
1349
- case 8:
1350
- parsedBody = parsedOutput.body;
1351
- throwDefaultError({
1352
- output: output,
1353
- parsedBody: parsedBody,
1354
- exceptionCtor: __BaseException,
1355
- errorCode: errorCode,
1356
- });
1357
- _d.label = 9;
1358
- case 9: return [2];
1359
- }
1360
- });
1361
- }); };
1362
- export var deserializeAws_json1_1PutPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1363
- var response;
1364
- return __generator(this, function (_a) {
1365
- switch (_a.label) {
1366
- case 0:
1367
- if (output.statusCode >= 300) {
1368
- return [2, deserializeAws_json1_1PutPolicyCommandError(output, context)];
1369
- }
1370
- return [4, collectBody(output.body, context)];
1371
- case 1:
1372
- _a.sent();
1373
- response = {
1374
- $metadata: deserializeMetadata(output),
1375
- };
1376
- return [2, Promise.resolve(response)];
1377
- }
1378
- });
1379
- }); };
1380
- var deserializeAws_json1_1PutPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1381
- var parsedOutput, _a, errorCode, _b, parsedBody;
1382
- var _c;
1383
- return __generator(this, function (_d) {
1384
- switch (_d.label) {
1385
- case 0:
1386
- _a = [__assign({}, output)];
1387
- _c = {};
1388
- return [4, parseErrorBody(output.body, context)];
1389
- case 1:
1390
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1391
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1392
- _b = errorCode;
1393
- switch (_b) {
1394
- case "ConcurrentModificationException": return [3, 2];
1395
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 2];
1396
- case "InvalidArnException": return [3, 4];
1397
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
1398
- case "InvalidPolicyException": return [3, 6];
1399
- case "com.amazonaws.acmpca#InvalidPolicyException": return [3, 6];
1400
- case "InvalidStateException": return [3, 8];
1401
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 8];
1402
- case "LockoutPreventedException": return [3, 10];
1403
- case "com.amazonaws.acmpca#LockoutPreventedException": return [3, 10];
1404
- case "RequestFailedException": return [3, 12];
1405
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 12];
1406
- case "ResourceNotFoundException": return [3, 14];
1407
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 14];
1408
- }
1409
- return [3, 16];
1410
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
1411
- case 3: throw _d.sent();
1412
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1413
- case 5: throw _d.sent();
1414
- case 6: return [4, deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)];
1415
- case 7: throw _d.sent();
1416
- case 8: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1417
- case 9: throw _d.sent();
1418
- case 10: return [4, deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)];
1419
- case 11: throw _d.sent();
1420
- case 12: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
1421
- case 13: throw _d.sent();
1422
- case 14: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1423
- case 15: throw _d.sent();
1424
- case 16:
1425
- parsedBody = parsedOutput.body;
1426
- throwDefaultError({
1427
- output: output,
1428
- parsedBody: parsedBody,
1429
- exceptionCtor: __BaseException,
1430
- errorCode: errorCode,
1431
- });
1432
- _d.label = 17;
1433
- case 17: return [2];
1434
- }
1435
- });
1436
- }); };
1437
- export var deserializeAws_json1_1RestoreCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1438
- var response;
1439
- return __generator(this, function (_a) {
1440
- switch (_a.label) {
1441
- case 0:
1442
- if (output.statusCode >= 300) {
1443
- return [2, deserializeAws_json1_1RestoreCertificateAuthorityCommandError(output, context)];
1444
- }
1445
- return [4, collectBody(output.body, context)];
1446
- case 1:
1447
- _a.sent();
1448
- response = {
1449
- $metadata: deserializeMetadata(output),
1450
- };
1451
- return [2, Promise.resolve(response)];
1452
- }
1453
- });
1454
- }); };
1455
- var deserializeAws_json1_1RestoreCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1456
- var parsedOutput, _a, errorCode, _b, parsedBody;
1457
- var _c;
1458
- return __generator(this, function (_d) {
1459
- switch (_d.label) {
1460
- case 0:
1461
- _a = [__assign({}, output)];
1462
- _c = {};
1463
- return [4, parseErrorBody(output.body, context)];
1464
- case 1:
1465
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1466
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1467
- _b = errorCode;
1468
- switch (_b) {
1469
- case "InvalidArnException": return [3, 2];
1470
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1471
- case "InvalidStateException": return [3, 4];
1472
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
1473
- case "ResourceNotFoundException": return [3, 6];
1474
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 6];
1475
- }
1476
- return [3, 8];
1477
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1478
- case 3: throw _d.sent();
1479
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1480
- case 5: throw _d.sent();
1481
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1482
- case 7: throw _d.sent();
1483
- case 8:
1484
- parsedBody = parsedOutput.body;
1485
- throwDefaultError({
1486
- output: output,
1487
- parsedBody: parsedBody,
1488
- exceptionCtor: __BaseException,
1489
- errorCode: errorCode,
1490
- });
1491
- _d.label = 9;
1492
- case 9: return [2];
1493
- }
1494
- });
1495
- }); };
1496
- export var deserializeAws_json1_1RevokeCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1497
- var response;
1498
- return __generator(this, function (_a) {
1499
- switch (_a.label) {
1500
- case 0:
1501
- if (output.statusCode >= 300) {
1502
- return [2, deserializeAws_json1_1RevokeCertificateCommandError(output, context)];
1503
- }
1504
- return [4, collectBody(output.body, context)];
1505
- case 1:
1506
- _a.sent();
1507
- response = {
1508
- $metadata: deserializeMetadata(output),
1509
- };
1510
- return [2, Promise.resolve(response)];
1511
- }
1512
- });
1513
- }); };
1514
- var deserializeAws_json1_1RevokeCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1515
- var parsedOutput, _a, errorCode, _b, parsedBody;
1516
- var _c;
1517
- return __generator(this, function (_d) {
1518
- switch (_d.label) {
1519
- case 0:
1520
- _a = [__assign({}, output)];
1521
- _c = {};
1522
- return [4, parseErrorBody(output.body, context)];
1523
- case 1:
1524
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1525
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1526
- _b = errorCode;
1527
- switch (_b) {
1528
- case "ConcurrentModificationException": return [3, 2];
1529
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 2];
1530
- case "InvalidArnException": return [3, 4];
1531
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 4];
1532
- case "InvalidRequestException": return [3, 6];
1533
- case "com.amazonaws.acmpca#InvalidRequestException": return [3, 6];
1534
- case "InvalidStateException": return [3, 8];
1535
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 8];
1536
- case "LimitExceededException": return [3, 10];
1537
- case "com.amazonaws.acmpca#LimitExceededException": return [3, 10];
1538
- case "RequestAlreadyProcessedException": return [3, 12];
1539
- case "com.amazonaws.acmpca#RequestAlreadyProcessedException": return [3, 12];
1540
- case "RequestFailedException": return [3, 14];
1541
- case "com.amazonaws.acmpca#RequestFailedException": return [3, 14];
1542
- case "RequestInProgressException": return [3, 16];
1543
- case "com.amazonaws.acmpca#RequestInProgressException": return [3, 16];
1544
- case "ResourceNotFoundException": return [3, 18];
1545
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 18];
1546
- }
1547
- return [3, 20];
1548
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
1549
- case 3: throw _d.sent();
1550
- case 4: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1551
- case 5: throw _d.sent();
1552
- case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
1553
- case 7: throw _d.sent();
1554
- case 8: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1555
- case 9: throw _d.sent();
1556
- case 10: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
1557
- case 11: throw _d.sent();
1558
- case 12: return [4, deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse(parsedOutput, context)];
1559
- case 13: throw _d.sent();
1560
- case 14: return [4, deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)];
1561
- case 15: throw _d.sent();
1562
- case 16: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
1563
- case 17: throw _d.sent();
1564
- case 18: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1565
- case 19: throw _d.sent();
1566
- case 20:
1567
- parsedBody = parsedOutput.body;
1568
- throwDefaultError({
1569
- output: output,
1570
- parsedBody: parsedBody,
1571
- exceptionCtor: __BaseException,
1572
- errorCode: errorCode,
1573
- });
1574
- _d.label = 21;
1575
- case 21: return [2];
1576
- }
1577
- });
1578
- }); };
1579
- export var deserializeAws_json1_1TagCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1580
- var response;
1581
- return __generator(this, function (_a) {
1582
- switch (_a.label) {
1583
- case 0:
1584
- if (output.statusCode >= 300) {
1585
- return [2, deserializeAws_json1_1TagCertificateAuthorityCommandError(output, context)];
1586
- }
1587
- return [4, collectBody(output.body, context)];
1588
- case 1:
1589
- _a.sent();
1590
- response = {
1591
- $metadata: deserializeMetadata(output),
1592
- };
1593
- return [2, Promise.resolve(response)];
1594
- }
1595
- });
1596
- }); };
1597
- var deserializeAws_json1_1TagCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1598
- var parsedOutput, _a, errorCode, _b, parsedBody;
1599
- var _c;
1600
- return __generator(this, function (_d) {
1601
- switch (_d.label) {
1602
- case 0:
1603
- _a = [__assign({}, output)];
1604
- _c = {};
1605
- return [4, parseErrorBody(output.body, context)];
1606
- case 1:
1607
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1608
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
- _b = errorCode;
1610
- switch (_b) {
1611
- case "InvalidArnException": return [3, 2];
1612
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1613
- case "InvalidStateException": return [3, 4];
1614
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
1615
- case "InvalidTagException": return [3, 6];
1616
- case "com.amazonaws.acmpca#InvalidTagException": return [3, 6];
1617
- case "ResourceNotFoundException": return [3, 8];
1618
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 8];
1619
- case "TooManyTagsException": return [3, 10];
1620
- case "com.amazonaws.acmpca#TooManyTagsException": return [3, 10];
1621
- }
1622
- return [3, 12];
1623
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1624
- case 3: throw _d.sent();
1625
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1626
- case 5: throw _d.sent();
1627
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
1628
- case 7: throw _d.sent();
1629
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1630
- case 9: throw _d.sent();
1631
- case 10: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
1632
- case 11: throw _d.sent();
1633
- case 12:
1634
- parsedBody = parsedOutput.body;
1635
- throwDefaultError({
1636
- output: output,
1637
- parsedBody: parsedBody,
1638
- exceptionCtor: __BaseException,
1639
- errorCode: errorCode,
1640
- });
1641
- _d.label = 13;
1642
- case 13: return [2];
1643
- }
1644
- });
1645
- }); };
1646
- export var deserializeAws_json1_1UntagCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1647
- var response;
1648
- return __generator(this, function (_a) {
1649
- switch (_a.label) {
1650
- case 0:
1651
- if (output.statusCode >= 300) {
1652
- return [2, deserializeAws_json1_1UntagCertificateAuthorityCommandError(output, context)];
1653
- }
1654
- return [4, collectBody(output.body, context)];
1655
- case 1:
1656
- _a.sent();
1657
- response = {
1658
- $metadata: deserializeMetadata(output),
1659
- };
1660
- return [2, Promise.resolve(response)];
1661
- }
1662
- });
1663
- }); };
1664
- var deserializeAws_json1_1UntagCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1665
- var parsedOutput, _a, errorCode, _b, parsedBody;
1666
- var _c;
1667
- return __generator(this, function (_d) {
1668
- switch (_d.label) {
1669
- case 0:
1670
- _a = [__assign({}, output)];
1671
- _c = {};
1672
- return [4, parseErrorBody(output.body, context)];
1673
- case 1:
1674
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1675
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1676
- _b = errorCode;
1677
- switch (_b) {
1678
- case "InvalidArnException": return [3, 2];
1679
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 2];
1680
- case "InvalidStateException": return [3, 4];
1681
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 4];
1682
- case "InvalidTagException": return [3, 6];
1683
- case "com.amazonaws.acmpca#InvalidTagException": return [3, 6];
1684
- case "ResourceNotFoundException": return [3, 8];
1685
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 8];
1686
- }
1687
- return [3, 10];
1688
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1689
- case 3: throw _d.sent();
1690
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1691
- case 5: throw _d.sent();
1692
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
1693
- case 7: throw _d.sent();
1694
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1695
- case 9: throw _d.sent();
1696
- case 10:
1697
- parsedBody = parsedOutput.body;
1698
- throwDefaultError({
1699
- output: output,
1700
- parsedBody: parsedBody,
1701
- exceptionCtor: __BaseException,
1702
- errorCode: errorCode,
1703
- });
1704
- _d.label = 11;
1705
- case 11: return [2];
1706
- }
1707
- });
1708
- }); };
1709
- export var deserializeAws_json1_1UpdateCertificateAuthorityCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1710
- var response;
1711
- return __generator(this, function (_a) {
1712
- switch (_a.label) {
1713
- case 0:
1714
- if (output.statusCode >= 300) {
1715
- return [2, deserializeAws_json1_1UpdateCertificateAuthorityCommandError(output, context)];
1716
- }
1717
- return [4, collectBody(output.body, context)];
1718
- case 1:
1719
- _a.sent();
1720
- response = {
1721
- $metadata: deserializeMetadata(output),
1722
- };
1723
- return [2, Promise.resolve(response)];
1724
- }
1725
- });
1726
- }); };
1727
- var deserializeAws_json1_1UpdateCertificateAuthorityCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1728
- var parsedOutput, _a, errorCode, _b, parsedBody;
1729
- var _c;
1730
- return __generator(this, function (_d) {
1731
- switch (_d.label) {
1732
- case 0:
1733
- _a = [__assign({}, output)];
1734
- _c = {};
1735
- return [4, parseErrorBody(output.body, context)];
1736
- case 1:
1737
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1738
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1739
- _b = errorCode;
1740
- switch (_b) {
1741
- case "ConcurrentModificationException": return [3, 2];
1742
- case "com.amazonaws.acmpca#ConcurrentModificationException": return [3, 2];
1743
- case "InvalidArgsException": return [3, 4];
1744
- case "com.amazonaws.acmpca#InvalidArgsException": return [3, 4];
1745
- case "InvalidArnException": return [3, 6];
1746
- case "com.amazonaws.acmpca#InvalidArnException": return [3, 6];
1747
- case "InvalidPolicyException": return [3, 8];
1748
- case "com.amazonaws.acmpca#InvalidPolicyException": return [3, 8];
1749
- case "InvalidStateException": return [3, 10];
1750
- case "com.amazonaws.acmpca#InvalidStateException": return [3, 10];
1751
- case "ResourceNotFoundException": return [3, 12];
1752
- case "com.amazonaws.acmpca#ResourceNotFoundException": return [3, 12];
1753
- }
1754
- return [3, 14];
1755
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
1756
- case 3: throw _d.sent();
1757
- case 4: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
1758
- case 5: throw _d.sent();
1759
- case 6: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1760
- case 7: throw _d.sent();
1761
- case 8: return [4, deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)];
1762
- case 9: throw _d.sent();
1763
- case 10: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1764
- case 11: throw _d.sent();
1765
- case 12: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1766
- case 13: throw _d.sent();
1767
- case 14:
1768
- parsedBody = parsedOutput.body;
1769
- throwDefaultError({
1770
- output: output,
1771
- parsedBody: parsedBody,
1772
- exceptionCtor: __BaseException,
1773
- errorCode: errorCode,
1774
- });
1775
- _d.label = 15;
1776
- case 15: return [2];
1777
- }
1778
- });
1779
- }); };
1780
- var deserializeAws_json1_1CertificateMismatchExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1781
- var body, deserialized, exception;
1782
- return __generator(this, function (_a) {
1783
- body = parsedOutput.body;
1784
- deserialized = deserializeAws_json1_1CertificateMismatchException(body, context);
1785
- exception = new CertificateMismatchException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1786
- return [2, __decorateServiceException(exception, body)];
1787
- });
1788
- }); };
1789
- var deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1790
- var body, deserialized, exception;
1791
- return __generator(this, function (_a) {
1792
- body = parsedOutput.body;
1793
- deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
1794
- exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1795
- return [2, __decorateServiceException(exception, body)];
1796
- });
1797
- }); };
1798
- var deserializeAws_json1_1InvalidArgsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1799
- var body, deserialized, exception;
1800
- return __generator(this, function (_a) {
1801
- body = parsedOutput.body;
1802
- deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
1803
- exception = new InvalidArgsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1804
- return [2, __decorateServiceException(exception, body)];
1805
- });
1806
- }); };
1807
- var deserializeAws_json1_1InvalidArnExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1808
- var body, deserialized, exception;
1809
- return __generator(this, function (_a) {
1810
- body = parsedOutput.body;
1811
- deserialized = deserializeAws_json1_1InvalidArnException(body, context);
1812
- exception = new InvalidArnException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1813
- return [2, __decorateServiceException(exception, body)];
1814
- });
1815
- }); };
1816
- var deserializeAws_json1_1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1817
- var body, deserialized, exception;
1818
- return __generator(this, function (_a) {
1819
- body = parsedOutput.body;
1820
- deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
1821
- exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1822
- return [2, __decorateServiceException(exception, body)];
1823
- });
1824
- }); };
1825
- var deserializeAws_json1_1InvalidPolicyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1826
- var body, deserialized, exception;
1827
- return __generator(this, function (_a) {
1828
- body = parsedOutput.body;
1829
- deserialized = deserializeAws_json1_1InvalidPolicyException(body, context);
1830
- exception = new InvalidPolicyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1831
- return [2, __decorateServiceException(exception, body)];
1832
- });
1833
- }); };
1834
- var deserializeAws_json1_1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1835
- var body, deserialized, exception;
1836
- return __generator(this, function (_a) {
1837
- body = parsedOutput.body;
1838
- deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
1839
- exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1840
- return [2, __decorateServiceException(exception, body)];
1841
- });
1842
- }); };
1843
- var deserializeAws_json1_1InvalidStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1844
- var body, deserialized, exception;
1845
- return __generator(this, function (_a) {
1846
- body = parsedOutput.body;
1847
- deserialized = deserializeAws_json1_1InvalidStateException(body, context);
1848
- exception = new InvalidStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1849
- return [2, __decorateServiceException(exception, body)];
1850
- });
1851
- }); };
1852
- var deserializeAws_json1_1InvalidTagExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1853
- var body, deserialized, exception;
1854
- return __generator(this, function (_a) {
1855
- body = parsedOutput.body;
1856
- deserialized = deserializeAws_json1_1InvalidTagException(body, context);
1857
- exception = new InvalidTagException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1858
- return [2, __decorateServiceException(exception, body)];
1859
- });
1860
- }); };
1861
- var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1862
- var body, deserialized, exception;
1863
- return __generator(this, function (_a) {
1864
- body = parsedOutput.body;
1865
- deserialized = deserializeAws_json1_1LimitExceededException(body, context);
1866
- exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1867
- return [2, __decorateServiceException(exception, body)];
1868
- });
1869
- }); };
1870
- var deserializeAws_json1_1LockoutPreventedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1871
- var body, deserialized, exception;
1872
- return __generator(this, function (_a) {
1873
- body = parsedOutput.body;
1874
- deserialized = deserializeAws_json1_1LockoutPreventedException(body, context);
1875
- exception = new LockoutPreventedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1876
- return [2, __decorateServiceException(exception, body)];
1877
- });
1878
- }); };
1879
- var deserializeAws_json1_1MalformedCertificateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1880
- var body, deserialized, exception;
1881
- return __generator(this, function (_a) {
1882
- body = parsedOutput.body;
1883
- deserialized = deserializeAws_json1_1MalformedCertificateException(body, context);
1884
- exception = new MalformedCertificateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1885
- return [2, __decorateServiceException(exception, body)];
1886
- });
1887
- }); };
1888
- var deserializeAws_json1_1MalformedCSRExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1889
- var body, deserialized, exception;
1890
- return __generator(this, function (_a) {
1891
- body = parsedOutput.body;
1892
- deserialized = deserializeAws_json1_1MalformedCSRException(body, context);
1893
- exception = new MalformedCSRException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1894
- return [2, __decorateServiceException(exception, body)];
1895
- });
1896
- }); };
1897
- var deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1898
- var body, deserialized, exception;
1899
- return __generator(this, function (_a) {
1900
- body = parsedOutput.body;
1901
- deserialized = deserializeAws_json1_1PermissionAlreadyExistsException(body, context);
1902
- exception = new PermissionAlreadyExistsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1903
- return [2, __decorateServiceException(exception, body)];
1904
- });
1905
- }); };
1906
- var deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1907
- var body, deserialized, exception;
1908
- return __generator(this, function (_a) {
1909
- body = parsedOutput.body;
1910
- deserialized = deserializeAws_json1_1RequestAlreadyProcessedException(body, context);
1911
- exception = new RequestAlreadyProcessedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1912
- return [2, __decorateServiceException(exception, body)];
1913
- });
1914
- }); };
1915
- var deserializeAws_json1_1RequestFailedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1916
- var body, deserialized, exception;
1917
- return __generator(this, function (_a) {
1918
- body = parsedOutput.body;
1919
- deserialized = deserializeAws_json1_1RequestFailedException(body, context);
1920
- exception = new RequestFailedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1921
- return [2, __decorateServiceException(exception, body)];
1922
- });
1923
- }); };
1924
- var deserializeAws_json1_1RequestInProgressExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1925
- var body, deserialized, exception;
1926
- return __generator(this, function (_a) {
1927
- body = parsedOutput.body;
1928
- deserialized = deserializeAws_json1_1RequestInProgressException(body, context);
1929
- exception = new RequestInProgressException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1930
- return [2, __decorateServiceException(exception, body)];
1931
- });
1932
- }); };
1933
- var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1934
- var body, deserialized, exception;
1935
- return __generator(this, function (_a) {
1936
- body = parsedOutput.body;
1937
- deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1938
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1939
- return [2, __decorateServiceException(exception, body)];
1940
- });
1941
- }); };
1942
- var deserializeAws_json1_1TooManyTagsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1943
- var body, deserialized, exception;
1944
- return __generator(this, function (_a) {
1945
- body = parsedOutput.body;
1946
- deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1947
- exception = new TooManyTagsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1948
- return [2, __decorateServiceException(exception, body)];
1949
- });
1950
- }); };
1951
- var serializeAws_json1_1AccessDescription = function (input, context) {
1952
- return __assign(__assign({}, (input.AccessLocation != null && {
1953
- AccessLocation: serializeAws_json1_1GeneralName(input.AccessLocation, context),
1954
- })), (input.AccessMethod != null && { AccessMethod: serializeAws_json1_1AccessMethod(input.AccessMethod, context) }));
5
+ export const serializeAws_json1_1CreateCertificateAuthorityCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "ACMPrivateCA.CreateCertificateAuthority",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.1",
17
+ "x-amz-target": "ACMPrivateCA.CreateCertificateAuthorityAuditReport",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_1CreatePermissionCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.1",
26
+ "x-amz-target": "ACMPrivateCA.CreatePermission",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_1CreatePermissionRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_1DeleteCertificateAuthorityCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.1",
35
+ "x-amz-target": "ACMPrivateCA.DeleteCertificateAuthority",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_1DeleteCertificateAuthorityRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_1DeletePermissionCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "ACMPrivateCA.DeletePermission",
45
+ };
46
+ let body;
47
+ body = JSON.stringify(serializeAws_json1_1DeletePermissionRequest(input, context));
48
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
+ };
50
+ export const serializeAws_json1_1DeletePolicyCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "ACMPrivateCA.DeletePolicy",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_1DeletePolicyRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ export const serializeAws_json1_1DescribeCertificateAuthorityCommand = async (input, context) => {
60
+ const headers = {
61
+ "content-type": "application/x-amz-json-1.1",
62
+ "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthority",
63
+ };
64
+ let body;
65
+ body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityRequest(input, context));
66
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
+ };
68
+ export const serializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.1",
71
+ "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthorityAuditReport",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_1GetCertificateCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.1",
80
+ "x-amz-target": "ACMPrivateCA.GetCertificate",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
86
+ export const serializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (input, context) => {
87
+ const headers = {
88
+ "content-type": "application/x-amz-json-1.1",
89
+ "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCertificate",
90
+ };
91
+ let body;
92
+ body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCertificateRequest(input, context));
93
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
+ };
95
+ export const serializeAws_json1_1GetCertificateAuthorityCsrCommand = async (input, context) => {
96
+ const headers = {
97
+ "content-type": "application/x-amz-json-1.1",
98
+ "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCsr",
99
+ };
100
+ let body;
101
+ body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCsrRequest(input, context));
102
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
+ };
104
+ export const serializeAws_json1_1GetPolicyCommand = async (input, context) => {
105
+ const headers = {
106
+ "content-type": "application/x-amz-json-1.1",
107
+ "x-amz-target": "ACMPrivateCA.GetPolicy",
108
+ };
109
+ let body;
110
+ body = JSON.stringify(serializeAws_json1_1GetPolicyRequest(input, context));
111
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
+ };
113
+ export const serializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (input, context) => {
114
+ const headers = {
115
+ "content-type": "application/x-amz-json-1.1",
116
+ "x-amz-target": "ACMPrivateCA.ImportCertificateAuthorityCertificate",
117
+ };
118
+ let body;
119
+ body = JSON.stringify(serializeAws_json1_1ImportCertificateAuthorityCertificateRequest(input, context));
120
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
+ };
122
+ export const serializeAws_json1_1IssueCertificateCommand = async (input, context) => {
123
+ const headers = {
124
+ "content-type": "application/x-amz-json-1.1",
125
+ "x-amz-target": "ACMPrivateCA.IssueCertificate",
126
+ };
127
+ let body;
128
+ body = JSON.stringify(serializeAws_json1_1IssueCertificateRequest(input, context));
129
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
+ };
131
+ export const serializeAws_json1_1ListCertificateAuthoritiesCommand = async (input, context) => {
132
+ const headers = {
133
+ "content-type": "application/x-amz-json-1.1",
134
+ "x-amz-target": "ACMPrivateCA.ListCertificateAuthorities",
135
+ };
136
+ let body;
137
+ body = JSON.stringify(serializeAws_json1_1ListCertificateAuthoritiesRequest(input, context));
138
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
+ };
140
+ export const serializeAws_json1_1ListPermissionsCommand = async (input, context) => {
141
+ const headers = {
142
+ "content-type": "application/x-amz-json-1.1",
143
+ "x-amz-target": "ACMPrivateCA.ListPermissions",
144
+ };
145
+ let body;
146
+ body = JSON.stringify(serializeAws_json1_1ListPermissionsRequest(input, context));
147
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
+ };
149
+ export const serializeAws_json1_1ListTagsCommand = async (input, context) => {
150
+ const headers = {
151
+ "content-type": "application/x-amz-json-1.1",
152
+ "x-amz-target": "ACMPrivateCA.ListTags",
153
+ };
154
+ let body;
155
+ body = JSON.stringify(serializeAws_json1_1ListTagsRequest(input, context));
156
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
+ };
158
+ export const serializeAws_json1_1PutPolicyCommand = async (input, context) => {
159
+ const headers = {
160
+ "content-type": "application/x-amz-json-1.1",
161
+ "x-amz-target": "ACMPrivateCA.PutPolicy",
162
+ };
163
+ let body;
164
+ body = JSON.stringify(serializeAws_json1_1PutPolicyRequest(input, context));
165
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
+ };
167
+ export const serializeAws_json1_1RestoreCertificateAuthorityCommand = async (input, context) => {
168
+ const headers = {
169
+ "content-type": "application/x-amz-json-1.1",
170
+ "x-amz-target": "ACMPrivateCA.RestoreCertificateAuthority",
171
+ };
172
+ let body;
173
+ body = JSON.stringify(serializeAws_json1_1RestoreCertificateAuthorityRequest(input, context));
174
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
+ };
176
+ export const serializeAws_json1_1RevokeCertificateCommand = async (input, context) => {
177
+ const headers = {
178
+ "content-type": "application/x-amz-json-1.1",
179
+ "x-amz-target": "ACMPrivateCA.RevokeCertificate",
180
+ };
181
+ let body;
182
+ body = JSON.stringify(serializeAws_json1_1RevokeCertificateRequest(input, context));
183
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
+ };
185
+ export const serializeAws_json1_1TagCertificateAuthorityCommand = async (input, context) => {
186
+ const headers = {
187
+ "content-type": "application/x-amz-json-1.1",
188
+ "x-amz-target": "ACMPrivateCA.TagCertificateAuthority",
189
+ };
190
+ let body;
191
+ body = JSON.stringify(serializeAws_json1_1TagCertificateAuthorityRequest(input, context));
192
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
+ };
194
+ export const serializeAws_json1_1UntagCertificateAuthorityCommand = async (input, context) => {
195
+ const headers = {
196
+ "content-type": "application/x-amz-json-1.1",
197
+ "x-amz-target": "ACMPrivateCA.UntagCertificateAuthority",
198
+ };
199
+ let body;
200
+ body = JSON.stringify(serializeAws_json1_1UntagCertificateAuthorityRequest(input, context));
201
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
+ };
203
+ export const serializeAws_json1_1UpdateCertificateAuthorityCommand = async (input, context) => {
204
+ const headers = {
205
+ "content-type": "application/x-amz-json-1.1",
206
+ "x-amz-target": "ACMPrivateCA.UpdateCertificateAuthority",
207
+ };
208
+ let body;
209
+ body = JSON.stringify(serializeAws_json1_1UpdateCertificateAuthorityRequest(input, context));
210
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
+ };
212
+ export const deserializeAws_json1_1CreateCertificateAuthorityCommand = async (output, context) => {
213
+ if (output.statusCode >= 300) {
214
+ return deserializeAws_json1_1CreateCertificateAuthorityCommandError(output, context);
215
+ }
216
+ const data = await parseBody(output.body, context);
217
+ let contents = {};
218
+ contents = deserializeAws_json1_1CreateCertificateAuthorityResponse(data, context);
219
+ const response = {
220
+ $metadata: deserializeMetadata(output),
221
+ ...contents,
222
+ };
223
+ return Promise.resolve(response);
224
+ };
225
+ const deserializeAws_json1_1CreateCertificateAuthorityCommandError = async (output, context) => {
226
+ const parsedOutput = {
227
+ ...output,
228
+ body: await parseErrorBody(output.body, context),
229
+ };
230
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
231
+ switch (errorCode) {
232
+ case "InvalidArgsException":
233
+ case "com.amazonaws.acmpca#InvalidArgsException":
234
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
235
+ case "InvalidPolicyException":
236
+ case "com.amazonaws.acmpca#InvalidPolicyException":
237
+ throw await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context);
238
+ case "InvalidTagException":
239
+ case "com.amazonaws.acmpca#InvalidTagException":
240
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
241
+ case "LimitExceededException":
242
+ case "com.amazonaws.acmpca#LimitExceededException":
243
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
244
+ default:
245
+ const parsedBody = parsedOutput.body;
246
+ throwDefaultError({
247
+ output,
248
+ parsedBody,
249
+ exceptionCtor: __BaseException,
250
+ errorCode,
251
+ });
252
+ }
253
+ };
254
+ export const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (output, context) => {
255
+ if (output.statusCode >= 300) {
256
+ return deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError(output, context);
257
+ }
258
+ const data = await parseBody(output.body, context);
259
+ let contents = {};
260
+ contents = deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse(data, context);
261
+ const response = {
262
+ $metadata: deserializeMetadata(output),
263
+ ...contents,
264
+ };
265
+ return Promise.resolve(response);
266
+ };
267
+ const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError = async (output, context) => {
268
+ const parsedOutput = {
269
+ ...output,
270
+ body: await parseErrorBody(output.body, context),
271
+ };
272
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
273
+ switch (errorCode) {
274
+ case "InvalidArgsException":
275
+ case "com.amazonaws.acmpca#InvalidArgsException":
276
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
277
+ case "InvalidArnException":
278
+ case "com.amazonaws.acmpca#InvalidArnException":
279
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
280
+ case "InvalidStateException":
281
+ case "com.amazonaws.acmpca#InvalidStateException":
282
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
283
+ case "RequestFailedException":
284
+ case "com.amazonaws.acmpca#RequestFailedException":
285
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
286
+ case "RequestInProgressException":
287
+ case "com.amazonaws.acmpca#RequestInProgressException":
288
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
289
+ case "ResourceNotFoundException":
290
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
291
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
292
+ default:
293
+ const parsedBody = parsedOutput.body;
294
+ throwDefaultError({
295
+ output,
296
+ parsedBody,
297
+ exceptionCtor: __BaseException,
298
+ errorCode,
299
+ });
300
+ }
301
+ };
302
+ export const deserializeAws_json1_1CreatePermissionCommand = async (output, context) => {
303
+ if (output.statusCode >= 300) {
304
+ return deserializeAws_json1_1CreatePermissionCommandError(output, context);
305
+ }
306
+ await collectBody(output.body, context);
307
+ const response = {
308
+ $metadata: deserializeMetadata(output),
309
+ };
310
+ return Promise.resolve(response);
311
+ };
312
+ const deserializeAws_json1_1CreatePermissionCommandError = async (output, context) => {
313
+ const parsedOutput = {
314
+ ...output,
315
+ body: await parseErrorBody(output.body, context),
316
+ };
317
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
318
+ switch (errorCode) {
319
+ case "InvalidArnException":
320
+ case "com.amazonaws.acmpca#InvalidArnException":
321
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
322
+ case "InvalidStateException":
323
+ case "com.amazonaws.acmpca#InvalidStateException":
324
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
325
+ case "LimitExceededException":
326
+ case "com.amazonaws.acmpca#LimitExceededException":
327
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
328
+ case "PermissionAlreadyExistsException":
329
+ case "com.amazonaws.acmpca#PermissionAlreadyExistsException":
330
+ throw await deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse(parsedOutput, context);
331
+ case "RequestFailedException":
332
+ case "com.amazonaws.acmpca#RequestFailedException":
333
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
334
+ case "ResourceNotFoundException":
335
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
336
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
337
+ default:
338
+ const parsedBody = parsedOutput.body;
339
+ throwDefaultError({
340
+ output,
341
+ parsedBody,
342
+ exceptionCtor: __BaseException,
343
+ errorCode,
344
+ });
345
+ }
346
+ };
347
+ export const deserializeAws_json1_1DeleteCertificateAuthorityCommand = async (output, context) => {
348
+ if (output.statusCode >= 300) {
349
+ return deserializeAws_json1_1DeleteCertificateAuthorityCommandError(output, context);
350
+ }
351
+ await collectBody(output.body, context);
352
+ const response = {
353
+ $metadata: deserializeMetadata(output),
354
+ };
355
+ return Promise.resolve(response);
356
+ };
357
+ const deserializeAws_json1_1DeleteCertificateAuthorityCommandError = async (output, context) => {
358
+ const parsedOutput = {
359
+ ...output,
360
+ body: await parseErrorBody(output.body, context),
361
+ };
362
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
363
+ switch (errorCode) {
364
+ case "ConcurrentModificationException":
365
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
366
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
367
+ case "InvalidArnException":
368
+ case "com.amazonaws.acmpca#InvalidArnException":
369
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
370
+ case "InvalidStateException":
371
+ case "com.amazonaws.acmpca#InvalidStateException":
372
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
373
+ case "ResourceNotFoundException":
374
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
375
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
376
+ default:
377
+ const parsedBody = parsedOutput.body;
378
+ throwDefaultError({
379
+ output,
380
+ parsedBody,
381
+ exceptionCtor: __BaseException,
382
+ errorCode,
383
+ });
384
+ }
385
+ };
386
+ export const deserializeAws_json1_1DeletePermissionCommand = async (output, context) => {
387
+ if (output.statusCode >= 300) {
388
+ return deserializeAws_json1_1DeletePermissionCommandError(output, context);
389
+ }
390
+ await collectBody(output.body, context);
391
+ const response = {
392
+ $metadata: deserializeMetadata(output),
393
+ };
394
+ return Promise.resolve(response);
395
+ };
396
+ const deserializeAws_json1_1DeletePermissionCommandError = async (output, context) => {
397
+ const parsedOutput = {
398
+ ...output,
399
+ body: await parseErrorBody(output.body, context),
400
+ };
401
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
+ switch (errorCode) {
403
+ case "InvalidArnException":
404
+ case "com.amazonaws.acmpca#InvalidArnException":
405
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
406
+ case "InvalidStateException":
407
+ case "com.amazonaws.acmpca#InvalidStateException":
408
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
409
+ case "RequestFailedException":
410
+ case "com.amazonaws.acmpca#RequestFailedException":
411
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
412
+ case "ResourceNotFoundException":
413
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
414
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
415
+ default:
416
+ const parsedBody = parsedOutput.body;
417
+ throwDefaultError({
418
+ output,
419
+ parsedBody,
420
+ exceptionCtor: __BaseException,
421
+ errorCode,
422
+ });
423
+ }
424
+ };
425
+ export const deserializeAws_json1_1DeletePolicyCommand = async (output, context) => {
426
+ if (output.statusCode >= 300) {
427
+ return deserializeAws_json1_1DeletePolicyCommandError(output, context);
428
+ }
429
+ await collectBody(output.body, context);
430
+ const response = {
431
+ $metadata: deserializeMetadata(output),
432
+ };
433
+ return Promise.resolve(response);
434
+ };
435
+ const deserializeAws_json1_1DeletePolicyCommandError = async (output, context) => {
436
+ const parsedOutput = {
437
+ ...output,
438
+ body: await parseErrorBody(output.body, context),
439
+ };
440
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
441
+ switch (errorCode) {
442
+ case "ConcurrentModificationException":
443
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
444
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
445
+ case "InvalidArnException":
446
+ case "com.amazonaws.acmpca#InvalidArnException":
447
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
448
+ case "InvalidStateException":
449
+ case "com.amazonaws.acmpca#InvalidStateException":
450
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
451
+ case "LockoutPreventedException":
452
+ case "com.amazonaws.acmpca#LockoutPreventedException":
453
+ throw await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context);
454
+ case "RequestFailedException":
455
+ case "com.amazonaws.acmpca#RequestFailedException":
456
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
457
+ case "ResourceNotFoundException":
458
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
459
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
460
+ default:
461
+ const parsedBody = parsedOutput.body;
462
+ throwDefaultError({
463
+ output,
464
+ parsedBody,
465
+ exceptionCtor: __BaseException,
466
+ errorCode,
467
+ });
468
+ }
469
+ };
470
+ export const deserializeAws_json1_1DescribeCertificateAuthorityCommand = async (output, context) => {
471
+ if (output.statusCode >= 300) {
472
+ return deserializeAws_json1_1DescribeCertificateAuthorityCommandError(output, context);
473
+ }
474
+ const data = await parseBody(output.body, context);
475
+ let contents = {};
476
+ contents = deserializeAws_json1_1DescribeCertificateAuthorityResponse(data, context);
477
+ const response = {
478
+ $metadata: deserializeMetadata(output),
479
+ ...contents,
480
+ };
481
+ return Promise.resolve(response);
482
+ };
483
+ const deserializeAws_json1_1DescribeCertificateAuthorityCommandError = async (output, context) => {
484
+ const parsedOutput = {
485
+ ...output,
486
+ body: await parseErrorBody(output.body, context),
487
+ };
488
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
489
+ switch (errorCode) {
490
+ case "InvalidArnException":
491
+ case "com.amazonaws.acmpca#InvalidArnException":
492
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
493
+ case "ResourceNotFoundException":
494
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
495
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
496
+ default:
497
+ const parsedBody = parsedOutput.body;
498
+ throwDefaultError({
499
+ output,
500
+ parsedBody,
501
+ exceptionCtor: __BaseException,
502
+ errorCode,
503
+ });
504
+ }
505
+ };
506
+ export const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (output, context) => {
507
+ if (output.statusCode >= 300) {
508
+ return deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError(output, context);
509
+ }
510
+ const data = await parseBody(output.body, context);
511
+ let contents = {};
512
+ contents = deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse(data, context);
513
+ const response = {
514
+ $metadata: deserializeMetadata(output),
515
+ ...contents,
516
+ };
517
+ return Promise.resolve(response);
518
+ };
519
+ const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError = async (output, context) => {
520
+ const parsedOutput = {
521
+ ...output,
522
+ body: await parseErrorBody(output.body, context),
523
+ };
524
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
+ switch (errorCode) {
526
+ case "InvalidArgsException":
527
+ case "com.amazonaws.acmpca#InvalidArgsException":
528
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
529
+ case "InvalidArnException":
530
+ case "com.amazonaws.acmpca#InvalidArnException":
531
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
532
+ case "ResourceNotFoundException":
533
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
534
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
535
+ default:
536
+ const parsedBody = parsedOutput.body;
537
+ throwDefaultError({
538
+ output,
539
+ parsedBody,
540
+ exceptionCtor: __BaseException,
541
+ errorCode,
542
+ });
543
+ }
544
+ };
545
+ export const deserializeAws_json1_1GetCertificateCommand = async (output, context) => {
546
+ if (output.statusCode >= 300) {
547
+ return deserializeAws_json1_1GetCertificateCommandError(output, context);
548
+ }
549
+ const data = await parseBody(output.body, context);
550
+ let contents = {};
551
+ contents = deserializeAws_json1_1GetCertificateResponse(data, context);
552
+ const response = {
553
+ $metadata: deserializeMetadata(output),
554
+ ...contents,
555
+ };
556
+ return Promise.resolve(response);
557
+ };
558
+ const deserializeAws_json1_1GetCertificateCommandError = async (output, context) => {
559
+ const parsedOutput = {
560
+ ...output,
561
+ body: await parseErrorBody(output.body, context),
562
+ };
563
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
+ switch (errorCode) {
565
+ case "InvalidArnException":
566
+ case "com.amazonaws.acmpca#InvalidArnException":
567
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
568
+ case "InvalidStateException":
569
+ case "com.amazonaws.acmpca#InvalidStateException":
570
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
571
+ case "RequestFailedException":
572
+ case "com.amazonaws.acmpca#RequestFailedException":
573
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
574
+ case "RequestInProgressException":
575
+ case "com.amazonaws.acmpca#RequestInProgressException":
576
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
577
+ case "ResourceNotFoundException":
578
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
579
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
580
+ default:
581
+ const parsedBody = parsedOutput.body;
582
+ throwDefaultError({
583
+ output,
584
+ parsedBody,
585
+ exceptionCtor: __BaseException,
586
+ errorCode,
587
+ });
588
+ }
589
+ };
590
+ export const deserializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (output, context) => {
591
+ if (output.statusCode >= 300) {
592
+ return deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError(output, context);
593
+ }
594
+ const data = await parseBody(output.body, context);
595
+ let contents = {};
596
+ contents = deserializeAws_json1_1GetCertificateAuthorityCertificateResponse(data, context);
597
+ const response = {
598
+ $metadata: deserializeMetadata(output),
599
+ ...contents,
600
+ };
601
+ return Promise.resolve(response);
602
+ };
603
+ const deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError = async (output, context) => {
604
+ const parsedOutput = {
605
+ ...output,
606
+ body: await parseErrorBody(output.body, context),
607
+ };
608
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
+ switch (errorCode) {
610
+ case "InvalidArnException":
611
+ case "com.amazonaws.acmpca#InvalidArnException":
612
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
613
+ case "InvalidStateException":
614
+ case "com.amazonaws.acmpca#InvalidStateException":
615
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
616
+ case "ResourceNotFoundException":
617
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
618
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
619
+ default:
620
+ const parsedBody = parsedOutput.body;
621
+ throwDefaultError({
622
+ output,
623
+ parsedBody,
624
+ exceptionCtor: __BaseException,
625
+ errorCode,
626
+ });
627
+ }
628
+ };
629
+ export const deserializeAws_json1_1GetCertificateAuthorityCsrCommand = async (output, context) => {
630
+ if (output.statusCode >= 300) {
631
+ return deserializeAws_json1_1GetCertificateAuthorityCsrCommandError(output, context);
632
+ }
633
+ const data = await parseBody(output.body, context);
634
+ let contents = {};
635
+ contents = deserializeAws_json1_1GetCertificateAuthorityCsrResponse(data, context);
636
+ const response = {
637
+ $metadata: deserializeMetadata(output),
638
+ ...contents,
639
+ };
640
+ return Promise.resolve(response);
641
+ };
642
+ const deserializeAws_json1_1GetCertificateAuthorityCsrCommandError = async (output, context) => {
643
+ const parsedOutput = {
644
+ ...output,
645
+ body: await parseErrorBody(output.body, context),
646
+ };
647
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
+ switch (errorCode) {
649
+ case "InvalidArnException":
650
+ case "com.amazonaws.acmpca#InvalidArnException":
651
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
652
+ case "InvalidStateException":
653
+ case "com.amazonaws.acmpca#InvalidStateException":
654
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
655
+ case "RequestFailedException":
656
+ case "com.amazonaws.acmpca#RequestFailedException":
657
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
658
+ case "RequestInProgressException":
659
+ case "com.amazonaws.acmpca#RequestInProgressException":
660
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
661
+ case "ResourceNotFoundException":
662
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
663
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
664
+ default:
665
+ const parsedBody = parsedOutput.body;
666
+ throwDefaultError({
667
+ output,
668
+ parsedBody,
669
+ exceptionCtor: __BaseException,
670
+ errorCode,
671
+ });
672
+ }
673
+ };
674
+ export const deserializeAws_json1_1GetPolicyCommand = async (output, context) => {
675
+ if (output.statusCode >= 300) {
676
+ return deserializeAws_json1_1GetPolicyCommandError(output, context);
677
+ }
678
+ const data = await parseBody(output.body, context);
679
+ let contents = {};
680
+ contents = deserializeAws_json1_1GetPolicyResponse(data, context);
681
+ const response = {
682
+ $metadata: deserializeMetadata(output),
683
+ ...contents,
684
+ };
685
+ return Promise.resolve(response);
686
+ };
687
+ const deserializeAws_json1_1GetPolicyCommandError = async (output, context) => {
688
+ const parsedOutput = {
689
+ ...output,
690
+ body: await parseErrorBody(output.body, context),
691
+ };
692
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
693
+ switch (errorCode) {
694
+ case "InvalidArnException":
695
+ case "com.amazonaws.acmpca#InvalidArnException":
696
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
697
+ case "InvalidStateException":
698
+ case "com.amazonaws.acmpca#InvalidStateException":
699
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
700
+ case "RequestFailedException":
701
+ case "com.amazonaws.acmpca#RequestFailedException":
702
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
703
+ case "ResourceNotFoundException":
704
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
705
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
706
+ default:
707
+ const parsedBody = parsedOutput.body;
708
+ throwDefaultError({
709
+ output,
710
+ parsedBody,
711
+ exceptionCtor: __BaseException,
712
+ errorCode,
713
+ });
714
+ }
715
+ };
716
+ export const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (output, context) => {
717
+ if (output.statusCode >= 300) {
718
+ return deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError(output, context);
719
+ }
720
+ await collectBody(output.body, context);
721
+ const response = {
722
+ $metadata: deserializeMetadata(output),
723
+ };
724
+ return Promise.resolve(response);
725
+ };
726
+ const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError = async (output, context) => {
727
+ const parsedOutput = {
728
+ ...output,
729
+ body: await parseErrorBody(output.body, context),
730
+ };
731
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
732
+ switch (errorCode) {
733
+ case "CertificateMismatchException":
734
+ case "com.amazonaws.acmpca#CertificateMismatchException":
735
+ throw await deserializeAws_json1_1CertificateMismatchExceptionResponse(parsedOutput, context);
736
+ case "ConcurrentModificationException":
737
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
738
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
739
+ case "InvalidArnException":
740
+ case "com.amazonaws.acmpca#InvalidArnException":
741
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
742
+ case "InvalidRequestException":
743
+ case "com.amazonaws.acmpca#InvalidRequestException":
744
+ throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
745
+ case "InvalidStateException":
746
+ case "com.amazonaws.acmpca#InvalidStateException":
747
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
748
+ case "MalformedCertificateException":
749
+ case "com.amazonaws.acmpca#MalformedCertificateException":
750
+ throw await deserializeAws_json1_1MalformedCertificateExceptionResponse(parsedOutput, context);
751
+ case "RequestFailedException":
752
+ case "com.amazonaws.acmpca#RequestFailedException":
753
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
754
+ case "RequestInProgressException":
755
+ case "com.amazonaws.acmpca#RequestInProgressException":
756
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
757
+ case "ResourceNotFoundException":
758
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
759
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
760
+ default:
761
+ const parsedBody = parsedOutput.body;
762
+ throwDefaultError({
763
+ output,
764
+ parsedBody,
765
+ exceptionCtor: __BaseException,
766
+ errorCode,
767
+ });
768
+ }
769
+ };
770
+ export const deserializeAws_json1_1IssueCertificateCommand = async (output, context) => {
771
+ if (output.statusCode >= 300) {
772
+ return deserializeAws_json1_1IssueCertificateCommandError(output, context);
773
+ }
774
+ const data = await parseBody(output.body, context);
775
+ let contents = {};
776
+ contents = deserializeAws_json1_1IssueCertificateResponse(data, context);
777
+ const response = {
778
+ $metadata: deserializeMetadata(output),
779
+ ...contents,
780
+ };
781
+ return Promise.resolve(response);
782
+ };
783
+ const deserializeAws_json1_1IssueCertificateCommandError = async (output, context) => {
784
+ const parsedOutput = {
785
+ ...output,
786
+ body: await parseErrorBody(output.body, context),
787
+ };
788
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
789
+ switch (errorCode) {
790
+ case "InvalidArgsException":
791
+ case "com.amazonaws.acmpca#InvalidArgsException":
792
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
793
+ case "InvalidArnException":
794
+ case "com.amazonaws.acmpca#InvalidArnException":
795
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
796
+ case "InvalidStateException":
797
+ case "com.amazonaws.acmpca#InvalidStateException":
798
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
799
+ case "LimitExceededException":
800
+ case "com.amazonaws.acmpca#LimitExceededException":
801
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
802
+ case "MalformedCSRException":
803
+ case "com.amazonaws.acmpca#MalformedCSRException":
804
+ throw await deserializeAws_json1_1MalformedCSRExceptionResponse(parsedOutput, context);
805
+ case "ResourceNotFoundException":
806
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
807
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
808
+ default:
809
+ const parsedBody = parsedOutput.body;
810
+ throwDefaultError({
811
+ output,
812
+ parsedBody,
813
+ exceptionCtor: __BaseException,
814
+ errorCode,
815
+ });
816
+ }
817
+ };
818
+ export const deserializeAws_json1_1ListCertificateAuthoritiesCommand = async (output, context) => {
819
+ if (output.statusCode >= 300) {
820
+ return deserializeAws_json1_1ListCertificateAuthoritiesCommandError(output, context);
821
+ }
822
+ const data = await parseBody(output.body, context);
823
+ let contents = {};
824
+ contents = deserializeAws_json1_1ListCertificateAuthoritiesResponse(data, context);
825
+ const response = {
826
+ $metadata: deserializeMetadata(output),
827
+ ...contents,
828
+ };
829
+ return Promise.resolve(response);
830
+ };
831
+ const deserializeAws_json1_1ListCertificateAuthoritiesCommandError = async (output, context) => {
832
+ const parsedOutput = {
833
+ ...output,
834
+ body: await parseErrorBody(output.body, context),
835
+ };
836
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
837
+ switch (errorCode) {
838
+ case "InvalidNextTokenException":
839
+ case "com.amazonaws.acmpca#InvalidNextTokenException":
840
+ throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
841
+ default:
842
+ const parsedBody = parsedOutput.body;
843
+ throwDefaultError({
844
+ output,
845
+ parsedBody,
846
+ exceptionCtor: __BaseException,
847
+ errorCode,
848
+ });
849
+ }
850
+ };
851
+ export const deserializeAws_json1_1ListPermissionsCommand = async (output, context) => {
852
+ if (output.statusCode >= 300) {
853
+ return deserializeAws_json1_1ListPermissionsCommandError(output, context);
854
+ }
855
+ const data = await parseBody(output.body, context);
856
+ let contents = {};
857
+ contents = deserializeAws_json1_1ListPermissionsResponse(data, context);
858
+ const response = {
859
+ $metadata: deserializeMetadata(output),
860
+ ...contents,
861
+ };
862
+ return Promise.resolve(response);
1955
863
  };
1956
- var serializeAws_json1_1AccessDescriptionList = function (input, context) {
864
+ const deserializeAws_json1_1ListPermissionsCommandError = async (output, context) => {
865
+ const parsedOutput = {
866
+ ...output,
867
+ body: await parseErrorBody(output.body, context),
868
+ };
869
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
870
+ switch (errorCode) {
871
+ case "InvalidArnException":
872
+ case "com.amazonaws.acmpca#InvalidArnException":
873
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
874
+ case "InvalidNextTokenException":
875
+ case "com.amazonaws.acmpca#InvalidNextTokenException":
876
+ throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
877
+ case "InvalidStateException":
878
+ case "com.amazonaws.acmpca#InvalidStateException":
879
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
880
+ case "RequestFailedException":
881
+ case "com.amazonaws.acmpca#RequestFailedException":
882
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
883
+ case "ResourceNotFoundException":
884
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
885
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
886
+ default:
887
+ const parsedBody = parsedOutput.body;
888
+ throwDefaultError({
889
+ output,
890
+ parsedBody,
891
+ exceptionCtor: __BaseException,
892
+ errorCode,
893
+ });
894
+ }
895
+ };
896
+ export const deserializeAws_json1_1ListTagsCommand = async (output, context) => {
897
+ if (output.statusCode >= 300) {
898
+ return deserializeAws_json1_1ListTagsCommandError(output, context);
899
+ }
900
+ const data = await parseBody(output.body, context);
901
+ let contents = {};
902
+ contents = deserializeAws_json1_1ListTagsResponse(data, context);
903
+ const response = {
904
+ $metadata: deserializeMetadata(output),
905
+ ...contents,
906
+ };
907
+ return Promise.resolve(response);
908
+ };
909
+ const deserializeAws_json1_1ListTagsCommandError = async (output, context) => {
910
+ const parsedOutput = {
911
+ ...output,
912
+ body: await parseErrorBody(output.body, context),
913
+ };
914
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
915
+ switch (errorCode) {
916
+ case "InvalidArnException":
917
+ case "com.amazonaws.acmpca#InvalidArnException":
918
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
919
+ case "InvalidStateException":
920
+ case "com.amazonaws.acmpca#InvalidStateException":
921
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
922
+ case "ResourceNotFoundException":
923
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
924
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
925
+ default:
926
+ const parsedBody = parsedOutput.body;
927
+ throwDefaultError({
928
+ output,
929
+ parsedBody,
930
+ exceptionCtor: __BaseException,
931
+ errorCode,
932
+ });
933
+ }
934
+ };
935
+ export const deserializeAws_json1_1PutPolicyCommand = async (output, context) => {
936
+ if (output.statusCode >= 300) {
937
+ return deserializeAws_json1_1PutPolicyCommandError(output, context);
938
+ }
939
+ await collectBody(output.body, context);
940
+ const response = {
941
+ $metadata: deserializeMetadata(output),
942
+ };
943
+ return Promise.resolve(response);
944
+ };
945
+ const deserializeAws_json1_1PutPolicyCommandError = async (output, context) => {
946
+ const parsedOutput = {
947
+ ...output,
948
+ body: await parseErrorBody(output.body, context),
949
+ };
950
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
+ switch (errorCode) {
952
+ case "ConcurrentModificationException":
953
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
954
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
955
+ case "InvalidArnException":
956
+ case "com.amazonaws.acmpca#InvalidArnException":
957
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
958
+ case "InvalidPolicyException":
959
+ case "com.amazonaws.acmpca#InvalidPolicyException":
960
+ throw await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context);
961
+ case "InvalidStateException":
962
+ case "com.amazonaws.acmpca#InvalidStateException":
963
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
964
+ case "LockoutPreventedException":
965
+ case "com.amazonaws.acmpca#LockoutPreventedException":
966
+ throw await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context);
967
+ case "RequestFailedException":
968
+ case "com.amazonaws.acmpca#RequestFailedException":
969
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
970
+ case "ResourceNotFoundException":
971
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
972
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
973
+ default:
974
+ const parsedBody = parsedOutput.body;
975
+ throwDefaultError({
976
+ output,
977
+ parsedBody,
978
+ exceptionCtor: __BaseException,
979
+ errorCode,
980
+ });
981
+ }
982
+ };
983
+ export const deserializeAws_json1_1RestoreCertificateAuthorityCommand = async (output, context) => {
984
+ if (output.statusCode >= 300) {
985
+ return deserializeAws_json1_1RestoreCertificateAuthorityCommandError(output, context);
986
+ }
987
+ await collectBody(output.body, context);
988
+ const response = {
989
+ $metadata: deserializeMetadata(output),
990
+ };
991
+ return Promise.resolve(response);
992
+ };
993
+ const deserializeAws_json1_1RestoreCertificateAuthorityCommandError = async (output, context) => {
994
+ const parsedOutput = {
995
+ ...output,
996
+ body: await parseErrorBody(output.body, context),
997
+ };
998
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
999
+ switch (errorCode) {
1000
+ case "InvalidArnException":
1001
+ case "com.amazonaws.acmpca#InvalidArnException":
1002
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1003
+ case "InvalidStateException":
1004
+ case "com.amazonaws.acmpca#InvalidStateException":
1005
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1006
+ case "ResourceNotFoundException":
1007
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
1008
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1009
+ default:
1010
+ const parsedBody = parsedOutput.body;
1011
+ throwDefaultError({
1012
+ output,
1013
+ parsedBody,
1014
+ exceptionCtor: __BaseException,
1015
+ errorCode,
1016
+ });
1017
+ }
1018
+ };
1019
+ export const deserializeAws_json1_1RevokeCertificateCommand = async (output, context) => {
1020
+ if (output.statusCode >= 300) {
1021
+ return deserializeAws_json1_1RevokeCertificateCommandError(output, context);
1022
+ }
1023
+ await collectBody(output.body, context);
1024
+ const response = {
1025
+ $metadata: deserializeMetadata(output),
1026
+ };
1027
+ return Promise.resolve(response);
1028
+ };
1029
+ const deserializeAws_json1_1RevokeCertificateCommandError = async (output, context) => {
1030
+ const parsedOutput = {
1031
+ ...output,
1032
+ body: await parseErrorBody(output.body, context),
1033
+ };
1034
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1035
+ switch (errorCode) {
1036
+ case "ConcurrentModificationException":
1037
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
1038
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
1039
+ case "InvalidArnException":
1040
+ case "com.amazonaws.acmpca#InvalidArnException":
1041
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1042
+ case "InvalidRequestException":
1043
+ case "com.amazonaws.acmpca#InvalidRequestException":
1044
+ throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
1045
+ case "InvalidStateException":
1046
+ case "com.amazonaws.acmpca#InvalidStateException":
1047
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1048
+ case "LimitExceededException":
1049
+ case "com.amazonaws.acmpca#LimitExceededException":
1050
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1051
+ case "RequestAlreadyProcessedException":
1052
+ case "com.amazonaws.acmpca#RequestAlreadyProcessedException":
1053
+ throw await deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse(parsedOutput, context);
1054
+ case "RequestFailedException":
1055
+ case "com.amazonaws.acmpca#RequestFailedException":
1056
+ throw await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context);
1057
+ case "RequestInProgressException":
1058
+ case "com.amazonaws.acmpca#RequestInProgressException":
1059
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
1060
+ case "ResourceNotFoundException":
1061
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
1062
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1063
+ default:
1064
+ const parsedBody = parsedOutput.body;
1065
+ throwDefaultError({
1066
+ output,
1067
+ parsedBody,
1068
+ exceptionCtor: __BaseException,
1069
+ errorCode,
1070
+ });
1071
+ }
1072
+ };
1073
+ export const deserializeAws_json1_1TagCertificateAuthorityCommand = async (output, context) => {
1074
+ if (output.statusCode >= 300) {
1075
+ return deserializeAws_json1_1TagCertificateAuthorityCommandError(output, context);
1076
+ }
1077
+ await collectBody(output.body, context);
1078
+ const response = {
1079
+ $metadata: deserializeMetadata(output),
1080
+ };
1081
+ return Promise.resolve(response);
1082
+ };
1083
+ const deserializeAws_json1_1TagCertificateAuthorityCommandError = async (output, context) => {
1084
+ const parsedOutput = {
1085
+ ...output,
1086
+ body: await parseErrorBody(output.body, context),
1087
+ };
1088
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1089
+ switch (errorCode) {
1090
+ case "InvalidArnException":
1091
+ case "com.amazonaws.acmpca#InvalidArnException":
1092
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1093
+ case "InvalidStateException":
1094
+ case "com.amazonaws.acmpca#InvalidStateException":
1095
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1096
+ case "InvalidTagException":
1097
+ case "com.amazonaws.acmpca#InvalidTagException":
1098
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
1099
+ case "ResourceNotFoundException":
1100
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
1101
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1102
+ case "TooManyTagsException":
1103
+ case "com.amazonaws.acmpca#TooManyTagsException":
1104
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
1105
+ default:
1106
+ const parsedBody = parsedOutput.body;
1107
+ throwDefaultError({
1108
+ output,
1109
+ parsedBody,
1110
+ exceptionCtor: __BaseException,
1111
+ errorCode,
1112
+ });
1113
+ }
1114
+ };
1115
+ export const deserializeAws_json1_1UntagCertificateAuthorityCommand = async (output, context) => {
1116
+ if (output.statusCode >= 300) {
1117
+ return deserializeAws_json1_1UntagCertificateAuthorityCommandError(output, context);
1118
+ }
1119
+ await collectBody(output.body, context);
1120
+ const response = {
1121
+ $metadata: deserializeMetadata(output),
1122
+ };
1123
+ return Promise.resolve(response);
1124
+ };
1125
+ const deserializeAws_json1_1UntagCertificateAuthorityCommandError = async (output, context) => {
1126
+ const parsedOutput = {
1127
+ ...output,
1128
+ body: await parseErrorBody(output.body, context),
1129
+ };
1130
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1131
+ switch (errorCode) {
1132
+ case "InvalidArnException":
1133
+ case "com.amazonaws.acmpca#InvalidArnException":
1134
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1135
+ case "InvalidStateException":
1136
+ case "com.amazonaws.acmpca#InvalidStateException":
1137
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1138
+ case "InvalidTagException":
1139
+ case "com.amazonaws.acmpca#InvalidTagException":
1140
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
1141
+ case "ResourceNotFoundException":
1142
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
1143
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1144
+ default:
1145
+ const parsedBody = parsedOutput.body;
1146
+ throwDefaultError({
1147
+ output,
1148
+ parsedBody,
1149
+ exceptionCtor: __BaseException,
1150
+ errorCode,
1151
+ });
1152
+ }
1153
+ };
1154
+ export const deserializeAws_json1_1UpdateCertificateAuthorityCommand = async (output, context) => {
1155
+ if (output.statusCode >= 300) {
1156
+ return deserializeAws_json1_1UpdateCertificateAuthorityCommandError(output, context);
1157
+ }
1158
+ await collectBody(output.body, context);
1159
+ const response = {
1160
+ $metadata: deserializeMetadata(output),
1161
+ };
1162
+ return Promise.resolve(response);
1163
+ };
1164
+ const deserializeAws_json1_1UpdateCertificateAuthorityCommandError = async (output, context) => {
1165
+ const parsedOutput = {
1166
+ ...output,
1167
+ body: await parseErrorBody(output.body, context),
1168
+ };
1169
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1170
+ switch (errorCode) {
1171
+ case "ConcurrentModificationException":
1172
+ case "com.amazonaws.acmpca#ConcurrentModificationException":
1173
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
1174
+ case "InvalidArgsException":
1175
+ case "com.amazonaws.acmpca#InvalidArgsException":
1176
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
1177
+ case "InvalidArnException":
1178
+ case "com.amazonaws.acmpca#InvalidArnException":
1179
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
1180
+ case "InvalidPolicyException":
1181
+ case "com.amazonaws.acmpca#InvalidPolicyException":
1182
+ throw await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context);
1183
+ case "InvalidStateException":
1184
+ case "com.amazonaws.acmpca#InvalidStateException":
1185
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
1186
+ case "ResourceNotFoundException":
1187
+ case "com.amazonaws.acmpca#ResourceNotFoundException":
1188
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1189
+ default:
1190
+ const parsedBody = parsedOutput.body;
1191
+ throwDefaultError({
1192
+ output,
1193
+ parsedBody,
1194
+ exceptionCtor: __BaseException,
1195
+ errorCode,
1196
+ });
1197
+ }
1198
+ };
1199
+ const deserializeAws_json1_1CertificateMismatchExceptionResponse = async (parsedOutput, context) => {
1200
+ const body = parsedOutput.body;
1201
+ const deserialized = deserializeAws_json1_1CertificateMismatchException(body, context);
1202
+ const exception = new CertificateMismatchException({
1203
+ $metadata: deserializeMetadata(parsedOutput),
1204
+ ...deserialized,
1205
+ });
1206
+ return __decorateServiceException(exception, body);
1207
+ };
1208
+ const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
1209
+ const body = parsedOutput.body;
1210
+ const deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
1211
+ const exception = new ConcurrentModificationException({
1212
+ $metadata: deserializeMetadata(parsedOutput),
1213
+ ...deserialized,
1214
+ });
1215
+ return __decorateServiceException(exception, body);
1216
+ };
1217
+ const deserializeAws_json1_1InvalidArgsExceptionResponse = async (parsedOutput, context) => {
1218
+ const body = parsedOutput.body;
1219
+ const deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
1220
+ const exception = new InvalidArgsException({
1221
+ $metadata: deserializeMetadata(parsedOutput),
1222
+ ...deserialized,
1223
+ });
1224
+ return __decorateServiceException(exception, body);
1225
+ };
1226
+ const deserializeAws_json1_1InvalidArnExceptionResponse = async (parsedOutput, context) => {
1227
+ const body = parsedOutput.body;
1228
+ const deserialized = deserializeAws_json1_1InvalidArnException(body, context);
1229
+ const exception = new InvalidArnException({
1230
+ $metadata: deserializeMetadata(parsedOutput),
1231
+ ...deserialized,
1232
+ });
1233
+ return __decorateServiceException(exception, body);
1234
+ };
1235
+ const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (parsedOutput, context) => {
1236
+ const body = parsedOutput.body;
1237
+ const deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
1238
+ const exception = new InvalidNextTokenException({
1239
+ $metadata: deserializeMetadata(parsedOutput),
1240
+ ...deserialized,
1241
+ });
1242
+ return __decorateServiceException(exception, body);
1243
+ };
1244
+ const deserializeAws_json1_1InvalidPolicyExceptionResponse = async (parsedOutput, context) => {
1245
+ const body = parsedOutput.body;
1246
+ const deserialized = deserializeAws_json1_1InvalidPolicyException(body, context);
1247
+ const exception = new InvalidPolicyException({
1248
+ $metadata: deserializeMetadata(parsedOutput),
1249
+ ...deserialized,
1250
+ });
1251
+ return __decorateServiceException(exception, body);
1252
+ };
1253
+ const deserializeAws_json1_1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
1254
+ const body = parsedOutput.body;
1255
+ const deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
1256
+ const exception = new InvalidRequestException({
1257
+ $metadata: deserializeMetadata(parsedOutput),
1258
+ ...deserialized,
1259
+ });
1260
+ return __decorateServiceException(exception, body);
1261
+ };
1262
+ const deserializeAws_json1_1InvalidStateExceptionResponse = async (parsedOutput, context) => {
1263
+ const body = parsedOutput.body;
1264
+ const deserialized = deserializeAws_json1_1InvalidStateException(body, context);
1265
+ const exception = new InvalidStateException({
1266
+ $metadata: deserializeMetadata(parsedOutput),
1267
+ ...deserialized,
1268
+ });
1269
+ return __decorateServiceException(exception, body);
1270
+ };
1271
+ const deserializeAws_json1_1InvalidTagExceptionResponse = async (parsedOutput, context) => {
1272
+ const body = parsedOutput.body;
1273
+ const deserialized = deserializeAws_json1_1InvalidTagException(body, context);
1274
+ const exception = new InvalidTagException({
1275
+ $metadata: deserializeMetadata(parsedOutput),
1276
+ ...deserialized,
1277
+ });
1278
+ return __decorateServiceException(exception, body);
1279
+ };
1280
+ const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
1281
+ const body = parsedOutput.body;
1282
+ const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
1283
+ const exception = new LimitExceededException({
1284
+ $metadata: deserializeMetadata(parsedOutput),
1285
+ ...deserialized,
1286
+ });
1287
+ return __decorateServiceException(exception, body);
1288
+ };
1289
+ const deserializeAws_json1_1LockoutPreventedExceptionResponse = async (parsedOutput, context) => {
1290
+ const body = parsedOutput.body;
1291
+ const deserialized = deserializeAws_json1_1LockoutPreventedException(body, context);
1292
+ const exception = new LockoutPreventedException({
1293
+ $metadata: deserializeMetadata(parsedOutput),
1294
+ ...deserialized,
1295
+ });
1296
+ return __decorateServiceException(exception, body);
1297
+ };
1298
+ const deserializeAws_json1_1MalformedCertificateExceptionResponse = async (parsedOutput, context) => {
1299
+ const body = parsedOutput.body;
1300
+ const deserialized = deserializeAws_json1_1MalformedCertificateException(body, context);
1301
+ const exception = new MalformedCertificateException({
1302
+ $metadata: deserializeMetadata(parsedOutput),
1303
+ ...deserialized,
1304
+ });
1305
+ return __decorateServiceException(exception, body);
1306
+ };
1307
+ const deserializeAws_json1_1MalformedCSRExceptionResponse = async (parsedOutput, context) => {
1308
+ const body = parsedOutput.body;
1309
+ const deserialized = deserializeAws_json1_1MalformedCSRException(body, context);
1310
+ const exception = new MalformedCSRException({
1311
+ $metadata: deserializeMetadata(parsedOutput),
1312
+ ...deserialized,
1313
+ });
1314
+ return __decorateServiceException(exception, body);
1315
+ };
1316
+ const deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
1317
+ const body = parsedOutput.body;
1318
+ const deserialized = deserializeAws_json1_1PermissionAlreadyExistsException(body, context);
1319
+ const exception = new PermissionAlreadyExistsException({
1320
+ $metadata: deserializeMetadata(parsedOutput),
1321
+ ...deserialized,
1322
+ });
1323
+ return __decorateServiceException(exception, body);
1324
+ };
1325
+ const deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse = async (parsedOutput, context) => {
1326
+ const body = parsedOutput.body;
1327
+ const deserialized = deserializeAws_json1_1RequestAlreadyProcessedException(body, context);
1328
+ const exception = new RequestAlreadyProcessedException({
1329
+ $metadata: deserializeMetadata(parsedOutput),
1330
+ ...deserialized,
1331
+ });
1332
+ return __decorateServiceException(exception, body);
1333
+ };
1334
+ const deserializeAws_json1_1RequestFailedExceptionResponse = async (parsedOutput, context) => {
1335
+ const body = parsedOutput.body;
1336
+ const deserialized = deserializeAws_json1_1RequestFailedException(body, context);
1337
+ const exception = new RequestFailedException({
1338
+ $metadata: deserializeMetadata(parsedOutput),
1339
+ ...deserialized,
1340
+ });
1341
+ return __decorateServiceException(exception, body);
1342
+ };
1343
+ const deserializeAws_json1_1RequestInProgressExceptionResponse = async (parsedOutput, context) => {
1344
+ const body = parsedOutput.body;
1345
+ const deserialized = deserializeAws_json1_1RequestInProgressException(body, context);
1346
+ const exception = new RequestInProgressException({
1347
+ $metadata: deserializeMetadata(parsedOutput),
1348
+ ...deserialized,
1349
+ });
1350
+ return __decorateServiceException(exception, body);
1351
+ };
1352
+ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1353
+ const body = parsedOutput.body;
1354
+ const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1355
+ const exception = new ResourceNotFoundException({
1356
+ $metadata: deserializeMetadata(parsedOutput),
1357
+ ...deserialized,
1358
+ });
1359
+ return __decorateServiceException(exception, body);
1360
+ };
1361
+ const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
1362
+ const body = parsedOutput.body;
1363
+ const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1364
+ const exception = new TooManyTagsException({
1365
+ $metadata: deserializeMetadata(parsedOutput),
1366
+ ...deserialized,
1367
+ });
1368
+ return __decorateServiceException(exception, body);
1369
+ };
1370
+ const serializeAws_json1_1AccessDescription = (input, context) => {
1371
+ return {
1372
+ ...(input.AccessLocation != null && {
1373
+ AccessLocation: serializeAws_json1_1GeneralName(input.AccessLocation, context),
1374
+ }),
1375
+ ...(input.AccessMethod != null && { AccessMethod: serializeAws_json1_1AccessMethod(input.AccessMethod, context) }),
1376
+ };
1377
+ };
1378
+ const serializeAws_json1_1AccessDescriptionList = (input, context) => {
1957
1379
  return input
1958
- .filter(function (e) { return e != null; })
1959
- .map(function (entry) {
1380
+ .filter((e) => e != null)
1381
+ .map((entry) => {
1960
1382
  return serializeAws_json1_1AccessDescription(entry, context);
1961
1383
  });
1962
1384
  };
1963
- var serializeAws_json1_1AccessMethod = function (input, context) {
1964
- return __assign(__assign({}, (input.AccessMethodType != null && { AccessMethodType: input.AccessMethodType })), (input.CustomObjectIdentifier != null && { CustomObjectIdentifier: input.CustomObjectIdentifier }));
1385
+ const serializeAws_json1_1AccessMethod = (input, context) => {
1386
+ return {
1387
+ ...(input.AccessMethodType != null && { AccessMethodType: input.AccessMethodType }),
1388
+ ...(input.CustomObjectIdentifier != null && { CustomObjectIdentifier: input.CustomObjectIdentifier }),
1389
+ };
1965
1390
  };
1966
- var serializeAws_json1_1ActionList = function (input, context) {
1391
+ const serializeAws_json1_1ActionList = (input, context) => {
1967
1392
  return input
1968
- .filter(function (e) { return e != null; })
1969
- .map(function (entry) {
1393
+ .filter((e) => e != null)
1394
+ .map((entry) => {
1970
1395
  return entry;
1971
1396
  });
1972
1397
  };
1973
- var serializeAws_json1_1ApiPassthrough = function (input, context) {
1974
- return __assign(__assign({}, (input.Extensions != null && { Extensions: serializeAws_json1_1Extensions(input.Extensions, context) })), (input.Subject != null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }));
1398
+ const serializeAws_json1_1ApiPassthrough = (input, context) => {
1399
+ return {
1400
+ ...(input.Extensions != null && { Extensions: serializeAws_json1_1Extensions(input.Extensions, context) }),
1401
+ ...(input.Subject != null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
1402
+ };
1975
1403
  };
1976
- var serializeAws_json1_1ASN1Subject = function (input, context) {
1977
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CommonName != null && { CommonName: input.CommonName })), (input.Country != null && { Country: input.Country })), (input.CustomAttributes != null && {
1978
- CustomAttributes: serializeAws_json1_1CustomAttributeList(input.CustomAttributes, context),
1979
- })), (input.DistinguishedNameQualifier != null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier })), (input.GenerationQualifier != null && { GenerationQualifier: input.GenerationQualifier })), (input.GivenName != null && { GivenName: input.GivenName })), (input.Initials != null && { Initials: input.Initials })), (input.Locality != null && { Locality: input.Locality })), (input.Organization != null && { Organization: input.Organization })), (input.OrganizationalUnit != null && { OrganizationalUnit: input.OrganizationalUnit })), (input.Pseudonym != null && { Pseudonym: input.Pseudonym })), (input.SerialNumber != null && { SerialNumber: input.SerialNumber })), (input.State != null && { State: input.State })), (input.Surname != null && { Surname: input.Surname })), (input.Title != null && { Title: input.Title }));
1404
+ const serializeAws_json1_1ASN1Subject = (input, context) => {
1405
+ return {
1406
+ ...(input.CommonName != null && { CommonName: input.CommonName }),
1407
+ ...(input.Country != null && { Country: input.Country }),
1408
+ ...(input.CustomAttributes != null && {
1409
+ CustomAttributes: serializeAws_json1_1CustomAttributeList(input.CustomAttributes, context),
1410
+ }),
1411
+ ...(input.DistinguishedNameQualifier != null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier }),
1412
+ ...(input.GenerationQualifier != null && { GenerationQualifier: input.GenerationQualifier }),
1413
+ ...(input.GivenName != null && { GivenName: input.GivenName }),
1414
+ ...(input.Initials != null && { Initials: input.Initials }),
1415
+ ...(input.Locality != null && { Locality: input.Locality }),
1416
+ ...(input.Organization != null && { Organization: input.Organization }),
1417
+ ...(input.OrganizationalUnit != null && { OrganizationalUnit: input.OrganizationalUnit }),
1418
+ ...(input.Pseudonym != null && { Pseudonym: input.Pseudonym }),
1419
+ ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
1420
+ ...(input.State != null && { State: input.State }),
1421
+ ...(input.Surname != null && { Surname: input.Surname }),
1422
+ ...(input.Title != null && { Title: input.Title }),
1423
+ };
1980
1424
  };
1981
- var serializeAws_json1_1CertificateAuthorityConfiguration = function (input, context) {
1982
- return __assign(__assign(__assign(__assign({}, (input.CsrExtensions != null && {
1983
- CsrExtensions: serializeAws_json1_1CsrExtensions(input.CsrExtensions, context),
1984
- })), (input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm })), (input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm })), (input.Subject != null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }));
1425
+ const serializeAws_json1_1CertificateAuthorityConfiguration = (input, context) => {
1426
+ return {
1427
+ ...(input.CsrExtensions != null && {
1428
+ CsrExtensions: serializeAws_json1_1CsrExtensions(input.CsrExtensions, context),
1429
+ }),
1430
+ ...(input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm }),
1431
+ ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
1432
+ ...(input.Subject != null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
1433
+ };
1985
1434
  };
1986
- var serializeAws_json1_1CertificatePolicyList = function (input, context) {
1435
+ const serializeAws_json1_1CertificatePolicyList = (input, context) => {
1987
1436
  return input
1988
- .filter(function (e) { return e != null; })
1989
- .map(function (entry) {
1437
+ .filter((e) => e != null)
1438
+ .map((entry) => {
1990
1439
  return serializeAws_json1_1PolicyInformation(entry, context);
1991
1440
  });
1992
1441
  };
1993
- var serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest = function (input, context) {
1994
- return __assign(__assign(__assign({}, (input.AuditReportResponseFormat != null && { AuditReportResponseFormat: input.AuditReportResponseFormat })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.S3BucketName != null && { S3BucketName: input.S3BucketName }));
1442
+ const serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest = (input, context) => {
1443
+ return {
1444
+ ...(input.AuditReportResponseFormat != null && { AuditReportResponseFormat: input.AuditReportResponseFormat }),
1445
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1446
+ ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
1447
+ };
1995
1448
  };
1996
- var serializeAws_json1_1CreateCertificateAuthorityRequest = function (input, context) {
1997
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.CertificateAuthorityConfiguration != null && {
1998
- CertificateAuthorityConfiguration: serializeAws_json1_1CertificateAuthorityConfiguration(input.CertificateAuthorityConfiguration, context),
1999
- })), (input.CertificateAuthorityType != null && { CertificateAuthorityType: input.CertificateAuthorityType })), (input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken })), (input.KeyStorageSecurityStandard != null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard })), (input.RevocationConfiguration != null && {
2000
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
2001
- })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1449
+ const serializeAws_json1_1CreateCertificateAuthorityRequest = (input, context) => {
1450
+ return {
1451
+ ...(input.CertificateAuthorityConfiguration != null && {
1452
+ CertificateAuthorityConfiguration: serializeAws_json1_1CertificateAuthorityConfiguration(input.CertificateAuthorityConfiguration, context),
1453
+ }),
1454
+ ...(input.CertificateAuthorityType != null && { CertificateAuthorityType: input.CertificateAuthorityType }),
1455
+ ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1456
+ ...(input.KeyStorageSecurityStandard != null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard }),
1457
+ ...(input.RevocationConfiguration != null && {
1458
+ RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
1459
+ }),
1460
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1461
+ };
2002
1462
  };
2003
- var serializeAws_json1_1CreatePermissionRequest = function (input, context) {
2004
- return __assign(__assign(__assign(__assign({}, (input.Actions != null && { Actions: serializeAws_json1_1ActionList(input.Actions, context) })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.Principal != null && { Principal: input.Principal })), (input.SourceAccount != null && { SourceAccount: input.SourceAccount }));
1463
+ const serializeAws_json1_1CreatePermissionRequest = (input, context) => {
1464
+ return {
1465
+ ...(input.Actions != null && { Actions: serializeAws_json1_1ActionList(input.Actions, context) }),
1466
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1467
+ ...(input.Principal != null && { Principal: input.Principal }),
1468
+ ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }),
1469
+ };
2005
1470
  };
2006
- var serializeAws_json1_1CrlConfiguration = function (input, context) {
2007
- return __assign(__assign(__assign(__assign(__assign({}, (input.CustomCname != null && { CustomCname: input.CustomCname })), (input.Enabled != null && { Enabled: input.Enabled })), (input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays })), (input.S3BucketName != null && { S3BucketName: input.S3BucketName })), (input.S3ObjectAcl != null && { S3ObjectAcl: input.S3ObjectAcl }));
1471
+ const serializeAws_json1_1CrlConfiguration = (input, context) => {
1472
+ return {
1473
+ ...(input.CustomCname != null && { CustomCname: input.CustomCname }),
1474
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
1475
+ ...(input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays }),
1476
+ ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
1477
+ ...(input.S3ObjectAcl != null && { S3ObjectAcl: input.S3ObjectAcl }),
1478
+ };
2008
1479
  };
2009
- var serializeAws_json1_1CsrExtensions = function (input, context) {
2010
- return __assign(__assign({}, (input.KeyUsage != null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) })), (input.SubjectInformationAccess != null && {
2011
- SubjectInformationAccess: serializeAws_json1_1AccessDescriptionList(input.SubjectInformationAccess, context),
2012
- }));
1480
+ const serializeAws_json1_1CsrExtensions = (input, context) => {
1481
+ return {
1482
+ ...(input.KeyUsage != null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
1483
+ ...(input.SubjectInformationAccess != null && {
1484
+ SubjectInformationAccess: serializeAws_json1_1AccessDescriptionList(input.SubjectInformationAccess, context),
1485
+ }),
1486
+ };
2013
1487
  };
2014
- var serializeAws_json1_1CustomAttribute = function (input, context) {
2015
- return __assign(__assign({}, (input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier })), (input.Value != null && { Value: input.Value }));
1488
+ const serializeAws_json1_1CustomAttribute = (input, context) => {
1489
+ return {
1490
+ ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }),
1491
+ ...(input.Value != null && { Value: input.Value }),
1492
+ };
2016
1493
  };
2017
- var serializeAws_json1_1CustomAttributeList = function (input, context) {
1494
+ const serializeAws_json1_1CustomAttributeList = (input, context) => {
2018
1495
  return input
2019
- .filter(function (e) { return e != null; })
2020
- .map(function (entry) {
1496
+ .filter((e) => e != null)
1497
+ .map((entry) => {
2021
1498
  return serializeAws_json1_1CustomAttribute(entry, context);
2022
1499
  });
2023
1500
  };
2024
- var serializeAws_json1_1CustomExtension = function (input, context) {
2025
- return __assign(__assign(__assign({}, (input.Critical != null && { Critical: input.Critical })), (input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier })), (input.Value != null && { Value: input.Value }));
1501
+ const serializeAws_json1_1CustomExtension = (input, context) => {
1502
+ return {
1503
+ ...(input.Critical != null && { Critical: input.Critical }),
1504
+ ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }),
1505
+ ...(input.Value != null && { Value: input.Value }),
1506
+ };
2026
1507
  };
2027
- var serializeAws_json1_1CustomExtensionList = function (input, context) {
1508
+ const serializeAws_json1_1CustomExtensionList = (input, context) => {
2028
1509
  return input
2029
- .filter(function (e) { return e != null; })
2030
- .map(function (entry) {
1510
+ .filter((e) => e != null)
1511
+ .map((entry) => {
2031
1512
  return serializeAws_json1_1CustomExtension(entry, context);
2032
1513
  });
2033
1514
  };
2034
- var serializeAws_json1_1DeleteCertificateAuthorityRequest = function (input, context) {
2035
- return __assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.PermanentDeletionTimeInDays != null && {
2036
- PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays,
2037
- }));
1515
+ const serializeAws_json1_1DeleteCertificateAuthorityRequest = (input, context) => {
1516
+ return {
1517
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1518
+ ...(input.PermanentDeletionTimeInDays != null && {
1519
+ PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays,
1520
+ }),
1521
+ };
2038
1522
  };
2039
- var serializeAws_json1_1DeletePermissionRequest = function (input, context) {
2040
- return __assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.Principal != null && { Principal: input.Principal })), (input.SourceAccount != null && { SourceAccount: input.SourceAccount }));
1523
+ const serializeAws_json1_1DeletePermissionRequest = (input, context) => {
1524
+ return {
1525
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1526
+ ...(input.Principal != null && { Principal: input.Principal }),
1527
+ ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }),
1528
+ };
2041
1529
  };
2042
- var serializeAws_json1_1DeletePolicyRequest = function (input, context) {
2043
- return __assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
1530
+ const serializeAws_json1_1DeletePolicyRequest = (input, context) => {
1531
+ return {
1532
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1533
+ };
2044
1534
  };
2045
- var serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest = function (input, context) {
2046
- return __assign(__assign({}, (input.AuditReportId != null && { AuditReportId: input.AuditReportId })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1535
+ const serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest = (input, context) => {
1536
+ return {
1537
+ ...(input.AuditReportId != null && { AuditReportId: input.AuditReportId }),
1538
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1539
+ };
2047
1540
  };
2048
- var serializeAws_json1_1DescribeCertificateAuthorityRequest = function (input, context) {
2049
- return __assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1541
+ const serializeAws_json1_1DescribeCertificateAuthorityRequest = (input, context) => {
1542
+ return {
1543
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1544
+ };
2050
1545
  };
2051
- var serializeAws_json1_1EdiPartyName = function (input, context) {
2052
- return __assign(__assign({}, (input.NameAssigner != null && { NameAssigner: input.NameAssigner })), (input.PartyName != null && { PartyName: input.PartyName }));
1546
+ const serializeAws_json1_1EdiPartyName = (input, context) => {
1547
+ return {
1548
+ ...(input.NameAssigner != null && { NameAssigner: input.NameAssigner }),
1549
+ ...(input.PartyName != null && { PartyName: input.PartyName }),
1550
+ };
2053
1551
  };
2054
- var serializeAws_json1_1ExtendedKeyUsage = function (input, context) {
2055
- return __assign(__assign({}, (input.ExtendedKeyUsageObjectIdentifier != null && {
2056
- ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier,
2057
- })), (input.ExtendedKeyUsageType != null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }));
1552
+ const serializeAws_json1_1ExtendedKeyUsage = (input, context) => {
1553
+ return {
1554
+ ...(input.ExtendedKeyUsageObjectIdentifier != null && {
1555
+ ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier,
1556
+ }),
1557
+ ...(input.ExtendedKeyUsageType != null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }),
1558
+ };
2058
1559
  };
2059
- var serializeAws_json1_1ExtendedKeyUsageList = function (input, context) {
1560
+ const serializeAws_json1_1ExtendedKeyUsageList = (input, context) => {
2060
1561
  return input
2061
- .filter(function (e) { return e != null; })
2062
- .map(function (entry) {
1562
+ .filter((e) => e != null)
1563
+ .map((entry) => {
2063
1564
  return serializeAws_json1_1ExtendedKeyUsage(entry, context);
2064
1565
  });
2065
1566
  };
2066
- var serializeAws_json1_1Extensions = function (input, context) {
2067
- return __assign(__assign(__assign(__assign(__assign({}, (input.CertificatePolicies != null && {
2068
- CertificatePolicies: serializeAws_json1_1CertificatePolicyList(input.CertificatePolicies, context),
2069
- })), (input.CustomExtensions != null && {
2070
- CustomExtensions: serializeAws_json1_1CustomExtensionList(input.CustomExtensions, context),
2071
- })), (input.ExtendedKeyUsage != null && {
2072
- ExtendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageList(input.ExtendedKeyUsage, context),
2073
- })), (input.KeyUsage != null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) })), (input.SubjectAlternativeNames != null && {
2074
- SubjectAlternativeNames: serializeAws_json1_1GeneralNameList(input.SubjectAlternativeNames, context),
2075
- }));
2076
- };
2077
- var serializeAws_json1_1GeneralName = function (input, context) {
2078
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DirectoryName != null && {
2079
- DirectoryName: serializeAws_json1_1ASN1Subject(input.DirectoryName, context),
2080
- })), (input.DnsName != null && { DnsName: input.DnsName })), (input.EdiPartyName != null && { EdiPartyName: serializeAws_json1_1EdiPartyName(input.EdiPartyName, context) })), (input.IpAddress != null && { IpAddress: input.IpAddress })), (input.OtherName != null && { OtherName: serializeAws_json1_1OtherName(input.OtherName, context) })), (input.RegisteredId != null && { RegisteredId: input.RegisteredId })), (input.Rfc822Name != null && { Rfc822Name: input.Rfc822Name })), (input.UniformResourceIdentifier != null && { UniformResourceIdentifier: input.UniformResourceIdentifier }));
2081
- };
2082
- var serializeAws_json1_1GeneralNameList = function (input, context) {
1567
+ const serializeAws_json1_1Extensions = (input, context) => {
1568
+ return {
1569
+ ...(input.CertificatePolicies != null && {
1570
+ CertificatePolicies: serializeAws_json1_1CertificatePolicyList(input.CertificatePolicies, context),
1571
+ }),
1572
+ ...(input.CustomExtensions != null && {
1573
+ CustomExtensions: serializeAws_json1_1CustomExtensionList(input.CustomExtensions, context),
1574
+ }),
1575
+ ...(input.ExtendedKeyUsage != null && {
1576
+ ExtendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageList(input.ExtendedKeyUsage, context),
1577
+ }),
1578
+ ...(input.KeyUsage != null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
1579
+ ...(input.SubjectAlternativeNames != null && {
1580
+ SubjectAlternativeNames: serializeAws_json1_1GeneralNameList(input.SubjectAlternativeNames, context),
1581
+ }),
1582
+ };
1583
+ };
1584
+ const serializeAws_json1_1GeneralName = (input, context) => {
1585
+ return {
1586
+ ...(input.DirectoryName != null && {
1587
+ DirectoryName: serializeAws_json1_1ASN1Subject(input.DirectoryName, context),
1588
+ }),
1589
+ ...(input.DnsName != null && { DnsName: input.DnsName }),
1590
+ ...(input.EdiPartyName != null && { EdiPartyName: serializeAws_json1_1EdiPartyName(input.EdiPartyName, context) }),
1591
+ ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
1592
+ ...(input.OtherName != null && { OtherName: serializeAws_json1_1OtherName(input.OtherName, context) }),
1593
+ ...(input.RegisteredId != null && { RegisteredId: input.RegisteredId }),
1594
+ ...(input.Rfc822Name != null && { Rfc822Name: input.Rfc822Name }),
1595
+ ...(input.UniformResourceIdentifier != null && { UniformResourceIdentifier: input.UniformResourceIdentifier }),
1596
+ };
1597
+ };
1598
+ const serializeAws_json1_1GeneralNameList = (input, context) => {
2083
1599
  return input
2084
- .filter(function (e) { return e != null; })
2085
- .map(function (entry) {
1600
+ .filter((e) => e != null)
1601
+ .map((entry) => {
2086
1602
  return serializeAws_json1_1GeneralName(entry, context);
2087
1603
  });
2088
1604
  };
2089
- var serializeAws_json1_1GetCertificateAuthorityCertificateRequest = function (input, context) {
2090
- return __assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1605
+ const serializeAws_json1_1GetCertificateAuthorityCertificateRequest = (input, context) => {
1606
+ return {
1607
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1608
+ };
2091
1609
  };
2092
- var serializeAws_json1_1GetCertificateAuthorityCsrRequest = function (input, context) {
2093
- return __assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1610
+ const serializeAws_json1_1GetCertificateAuthorityCsrRequest = (input, context) => {
1611
+ return {
1612
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1613
+ };
2094
1614
  };
2095
- var serializeAws_json1_1GetCertificateRequest = function (input, context) {
2096
- return __assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1615
+ const serializeAws_json1_1GetCertificateRequest = (input, context) => {
1616
+ return {
1617
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1618
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1619
+ };
2097
1620
  };
2098
- var serializeAws_json1_1GetPolicyRequest = function (input, context) {
2099
- return __assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
1621
+ const serializeAws_json1_1GetPolicyRequest = (input, context) => {
1622
+ return {
1623
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1624
+ };
2100
1625
  };
2101
- var serializeAws_json1_1ImportCertificateAuthorityCertificateRequest = function (input, context) {
2102
- return __assign(__assign(__assign({}, (input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }));
1626
+ const serializeAws_json1_1ImportCertificateAuthorityCertificateRequest = (input, context) => {
1627
+ return {
1628
+ ...(input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) }),
1629
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1630
+ ...(input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }),
1631
+ };
2103
1632
  };
2104
- var serializeAws_json1_1IssueCertificateRequest = function (input, context) {
2105
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ApiPassthrough != null && {
2106
- ApiPassthrough: serializeAws_json1_1ApiPassthrough(input.ApiPassthrough, context),
2107
- })), (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.Csr != null && { Csr: context.base64Encoder(input.Csr) })), (input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken })), (input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm })), (input.TemplateArn != null && { TemplateArn: input.TemplateArn })), (input.Validity != null && { Validity: serializeAws_json1_1Validity(input.Validity, context) })), (input.ValidityNotBefore != null && {
2108
- ValidityNotBefore: serializeAws_json1_1Validity(input.ValidityNotBefore, context),
2109
- }));
1633
+ const serializeAws_json1_1IssueCertificateRequest = (input, context) => {
1634
+ return {
1635
+ ...(input.ApiPassthrough != null && {
1636
+ ApiPassthrough: serializeAws_json1_1ApiPassthrough(input.ApiPassthrough, context),
1637
+ }),
1638
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1639
+ ...(input.Csr != null && { Csr: context.base64Encoder(input.Csr) }),
1640
+ ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1641
+ ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }),
1642
+ ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }),
1643
+ ...(input.Validity != null && { Validity: serializeAws_json1_1Validity(input.Validity, context) }),
1644
+ ...(input.ValidityNotBefore != null && {
1645
+ ValidityNotBefore: serializeAws_json1_1Validity(input.ValidityNotBefore, context),
1646
+ }),
1647
+ };
2110
1648
  };
2111
- var serializeAws_json1_1KeyUsage = function (input, context) {
2112
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CRLSign != null && { CRLSign: input.CRLSign })), (input.DataEncipherment != null && { DataEncipherment: input.DataEncipherment })), (input.DecipherOnly != null && { DecipherOnly: input.DecipherOnly })), (input.DigitalSignature != null && { DigitalSignature: input.DigitalSignature })), (input.EncipherOnly != null && { EncipherOnly: input.EncipherOnly })), (input.KeyAgreement != null && { KeyAgreement: input.KeyAgreement })), (input.KeyCertSign != null && { KeyCertSign: input.KeyCertSign })), (input.KeyEncipherment != null && { KeyEncipherment: input.KeyEncipherment })), (input.NonRepudiation != null && { NonRepudiation: input.NonRepudiation }));
1649
+ const serializeAws_json1_1KeyUsage = (input, context) => {
1650
+ return {
1651
+ ...(input.CRLSign != null && { CRLSign: input.CRLSign }),
1652
+ ...(input.DataEncipherment != null && { DataEncipherment: input.DataEncipherment }),
1653
+ ...(input.DecipherOnly != null && { DecipherOnly: input.DecipherOnly }),
1654
+ ...(input.DigitalSignature != null && { DigitalSignature: input.DigitalSignature }),
1655
+ ...(input.EncipherOnly != null && { EncipherOnly: input.EncipherOnly }),
1656
+ ...(input.KeyAgreement != null && { KeyAgreement: input.KeyAgreement }),
1657
+ ...(input.KeyCertSign != null && { KeyCertSign: input.KeyCertSign }),
1658
+ ...(input.KeyEncipherment != null && { KeyEncipherment: input.KeyEncipherment }),
1659
+ ...(input.NonRepudiation != null && { NonRepudiation: input.NonRepudiation }),
1660
+ };
2113
1661
  };
2114
- var serializeAws_json1_1ListCertificateAuthoritiesRequest = function (input, context) {
2115
- return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceOwner != null && { ResourceOwner: input.ResourceOwner }));
1662
+ const serializeAws_json1_1ListCertificateAuthoritiesRequest = (input, context) => {
1663
+ return {
1664
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1665
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1666
+ ...(input.ResourceOwner != null && { ResourceOwner: input.ResourceOwner }),
1667
+ };
2116
1668
  };
2117
- var serializeAws_json1_1ListPermissionsRequest = function (input, context) {
2118
- return __assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1669
+ const serializeAws_json1_1ListPermissionsRequest = (input, context) => {
1670
+ return {
1671
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1672
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1673
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1674
+ };
2119
1675
  };
2120
- var serializeAws_json1_1ListTagsRequest = function (input, context) {
2121
- return __assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
1676
+ const serializeAws_json1_1ListTagsRequest = (input, context) => {
1677
+ return {
1678
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1679
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1680
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
1681
+ };
2122
1682
  };
2123
- var serializeAws_json1_1OcspConfiguration = function (input, context) {
2124
- return __assign(__assign({}, (input.Enabled != null && { Enabled: input.Enabled })), (input.OcspCustomCname != null && { OcspCustomCname: input.OcspCustomCname }));
1683
+ const serializeAws_json1_1OcspConfiguration = (input, context) => {
1684
+ return {
1685
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
1686
+ ...(input.OcspCustomCname != null && { OcspCustomCname: input.OcspCustomCname }),
1687
+ };
2125
1688
  };
2126
- var serializeAws_json1_1OtherName = function (input, context) {
2127
- return __assign(__assign({}, (input.TypeId != null && { TypeId: input.TypeId })), (input.Value != null && { Value: input.Value }));
1689
+ const serializeAws_json1_1OtherName = (input, context) => {
1690
+ return {
1691
+ ...(input.TypeId != null && { TypeId: input.TypeId }),
1692
+ ...(input.Value != null && { Value: input.Value }),
1693
+ };
2128
1694
  };
2129
- var serializeAws_json1_1PolicyInformation = function (input, context) {
2130
- return __assign(__assign({}, (input.CertPolicyId != null && { CertPolicyId: input.CertPolicyId })), (input.PolicyQualifiers != null && {
2131
- PolicyQualifiers: serializeAws_json1_1PolicyQualifierInfoList(input.PolicyQualifiers, context),
2132
- }));
1695
+ const serializeAws_json1_1PolicyInformation = (input, context) => {
1696
+ return {
1697
+ ...(input.CertPolicyId != null && { CertPolicyId: input.CertPolicyId }),
1698
+ ...(input.PolicyQualifiers != null && {
1699
+ PolicyQualifiers: serializeAws_json1_1PolicyQualifierInfoList(input.PolicyQualifiers, context),
1700
+ }),
1701
+ };
2133
1702
  };
2134
- var serializeAws_json1_1PolicyQualifierInfo = function (input, context) {
2135
- return __assign(__assign({}, (input.PolicyQualifierId != null && { PolicyQualifierId: input.PolicyQualifierId })), (input.Qualifier != null && { Qualifier: serializeAws_json1_1Qualifier(input.Qualifier, context) }));
1703
+ const serializeAws_json1_1PolicyQualifierInfo = (input, context) => {
1704
+ return {
1705
+ ...(input.PolicyQualifierId != null && { PolicyQualifierId: input.PolicyQualifierId }),
1706
+ ...(input.Qualifier != null && { Qualifier: serializeAws_json1_1Qualifier(input.Qualifier, context) }),
1707
+ };
2136
1708
  };
2137
- var serializeAws_json1_1PolicyQualifierInfoList = function (input, context) {
1709
+ const serializeAws_json1_1PolicyQualifierInfoList = (input, context) => {
2138
1710
  return input
2139
- .filter(function (e) { return e != null; })
2140
- .map(function (entry) {
1711
+ .filter((e) => e != null)
1712
+ .map((entry) => {
2141
1713
  return serializeAws_json1_1PolicyQualifierInfo(entry, context);
2142
1714
  });
2143
1715
  };
2144
- var serializeAws_json1_1PutPolicyRequest = function (input, context) {
2145
- return __assign(__assign({}, (input.Policy != null && { Policy: input.Policy })), (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
1716
+ const serializeAws_json1_1PutPolicyRequest = (input, context) => {
1717
+ return {
1718
+ ...(input.Policy != null && { Policy: input.Policy }),
1719
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1720
+ };
2146
1721
  };
2147
- var serializeAws_json1_1Qualifier = function (input, context) {
2148
- return __assign({}, (input.CpsUri != null && { CpsUri: input.CpsUri }));
1722
+ const serializeAws_json1_1Qualifier = (input, context) => {
1723
+ return {
1724
+ ...(input.CpsUri != null && { CpsUri: input.CpsUri }),
1725
+ };
2149
1726
  };
2150
- var serializeAws_json1_1RestoreCertificateAuthorityRequest = function (input, context) {
2151
- return __assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }));
1727
+ const serializeAws_json1_1RestoreCertificateAuthorityRequest = (input, context) => {
1728
+ return {
1729
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1730
+ };
2152
1731
  };
2153
- var serializeAws_json1_1RevocationConfiguration = function (input, context) {
2154
- return __assign(__assign({}, (input.CrlConfiguration != null && {
2155
- CrlConfiguration: serializeAws_json1_1CrlConfiguration(input.CrlConfiguration, context),
2156
- })), (input.OcspConfiguration != null && {
2157
- OcspConfiguration: serializeAws_json1_1OcspConfiguration(input.OcspConfiguration, context),
2158
- }));
1732
+ const serializeAws_json1_1RevocationConfiguration = (input, context) => {
1733
+ return {
1734
+ ...(input.CrlConfiguration != null && {
1735
+ CrlConfiguration: serializeAws_json1_1CrlConfiguration(input.CrlConfiguration, context),
1736
+ }),
1737
+ ...(input.OcspConfiguration != null && {
1738
+ OcspConfiguration: serializeAws_json1_1OcspConfiguration(input.OcspConfiguration, context),
1739
+ }),
1740
+ };
2159
1741
  };
2160
- var serializeAws_json1_1RevokeCertificateRequest = function (input, context) {
2161
- return __assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.CertificateSerial != null && { CertificateSerial: input.CertificateSerial })), (input.RevocationReason != null && { RevocationReason: input.RevocationReason }));
1742
+ const serializeAws_json1_1RevokeCertificateRequest = (input, context) => {
1743
+ return {
1744
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1745
+ ...(input.CertificateSerial != null && { CertificateSerial: input.CertificateSerial }),
1746
+ ...(input.RevocationReason != null && { RevocationReason: input.RevocationReason }),
1747
+ };
2162
1748
  };
2163
- var serializeAws_json1_1Tag = function (input, context) {
2164
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1749
+ const serializeAws_json1_1Tag = (input, context) => {
1750
+ return {
1751
+ ...(input.Key != null && { Key: input.Key }),
1752
+ ...(input.Value != null && { Value: input.Value }),
1753
+ };
2165
1754
  };
2166
- var serializeAws_json1_1TagCertificateAuthorityRequest = function (input, context) {
2167
- return __assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1755
+ const serializeAws_json1_1TagCertificateAuthorityRequest = (input, context) => {
1756
+ return {
1757
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1758
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1759
+ };
2168
1760
  };
2169
- var serializeAws_json1_1TagList = function (input, context) {
1761
+ const serializeAws_json1_1TagList = (input, context) => {
2170
1762
  return input
2171
- .filter(function (e) { return e != null; })
2172
- .map(function (entry) {
1763
+ .filter((e) => e != null)
1764
+ .map((entry) => {
2173
1765
  return serializeAws_json1_1Tag(entry, context);
2174
1766
  });
2175
1767
  };
2176
- var serializeAws_json1_1UntagCertificateAuthorityRequest = function (input, context) {
2177
- return __assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1768
+ const serializeAws_json1_1UntagCertificateAuthorityRequest = (input, context) => {
1769
+ return {
1770
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1771
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1772
+ };
2178
1773
  };
2179
- var serializeAws_json1_1UpdateCertificateAuthorityRequest = function (input, context) {
2180
- return __assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.RevocationConfiguration != null && {
2181
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
2182
- })), (input.Status != null && { Status: input.Status }));
1774
+ const serializeAws_json1_1UpdateCertificateAuthorityRequest = (input, context) => {
1775
+ return {
1776
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1777
+ ...(input.RevocationConfiguration != null && {
1778
+ RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
1779
+ }),
1780
+ ...(input.Status != null && { Status: input.Status }),
1781
+ };
2183
1782
  };
2184
- var serializeAws_json1_1Validity = function (input, context) {
2185
- return __assign(__assign({}, (input.Type != null && { Type: input.Type })), (input.Value != null && { Value: input.Value }));
1783
+ const serializeAws_json1_1Validity = (input, context) => {
1784
+ return {
1785
+ ...(input.Type != null && { Type: input.Type }),
1786
+ ...(input.Value != null && { Value: input.Value }),
1787
+ };
2186
1788
  };
2187
- var deserializeAws_json1_1AccessDescription = function (output, context) {
1789
+ const deserializeAws_json1_1AccessDescription = (output, context) => {
2188
1790
  return {
2189
1791
  AccessLocation: output.AccessLocation != null ? deserializeAws_json1_1GeneralName(output.AccessLocation, context) : undefined,
2190
1792
  AccessMethod: output.AccessMethod != null ? deserializeAws_json1_1AccessMethod(output.AccessMethod, context) : undefined,
2191
1793
  };
2192
1794
  };
2193
- var deserializeAws_json1_1AccessDescriptionList = function (output, context) {
2194
- var retVal = (output || [])
2195
- .filter(function (e) { return e != null; })
2196
- .map(function (entry) {
1795
+ const deserializeAws_json1_1AccessDescriptionList = (output, context) => {
1796
+ const retVal = (output || [])
1797
+ .filter((e) => e != null)
1798
+ .map((entry) => {
2197
1799
  if (entry === null) {
2198
1800
  return null;
2199
1801
  }
@@ -2201,16 +1803,16 @@ var deserializeAws_json1_1AccessDescriptionList = function (output, context) {
2201
1803
  });
2202
1804
  return retVal;
2203
1805
  };
2204
- var deserializeAws_json1_1AccessMethod = function (output, context) {
1806
+ const deserializeAws_json1_1AccessMethod = (output, context) => {
2205
1807
  return {
2206
1808
  AccessMethodType: __expectString(output.AccessMethodType),
2207
1809
  CustomObjectIdentifier: __expectString(output.CustomObjectIdentifier),
2208
1810
  };
2209
1811
  };
2210
- var deserializeAws_json1_1ActionList = function (output, context) {
2211
- var retVal = (output || [])
2212
- .filter(function (e) { return e != null; })
2213
- .map(function (entry) {
1812
+ const deserializeAws_json1_1ActionList = (output, context) => {
1813
+ const retVal = (output || [])
1814
+ .filter((e) => e != null)
1815
+ .map((entry) => {
2214
1816
  if (entry === null) {
2215
1817
  return null;
2216
1818
  }
@@ -2218,7 +1820,7 @@ var deserializeAws_json1_1ActionList = function (output, context) {
2218
1820
  });
2219
1821
  return retVal;
2220
1822
  };
2221
- var deserializeAws_json1_1ASN1Subject = function (output, context) {
1823
+ const deserializeAws_json1_1ASN1Subject = (output, context) => {
2222
1824
  return {
2223
1825
  CommonName: __expectString(output.CommonName),
2224
1826
  Country: __expectString(output.Country),
@@ -2239,10 +1841,10 @@ var deserializeAws_json1_1ASN1Subject = function (output, context) {
2239
1841
  Title: __expectString(output.Title),
2240
1842
  };
2241
1843
  };
2242
- var deserializeAws_json1_1CertificateAuthorities = function (output, context) {
2243
- var retVal = (output || [])
2244
- .filter(function (e) { return e != null; })
2245
- .map(function (entry) {
1844
+ const deserializeAws_json1_1CertificateAuthorities = (output, context) => {
1845
+ const retVal = (output || [])
1846
+ .filter((e) => e != null)
1847
+ .map((entry) => {
2246
1848
  if (entry === null) {
2247
1849
  return null;
2248
1850
  }
@@ -2250,7 +1852,7 @@ var deserializeAws_json1_1CertificateAuthorities = function (output, context) {
2250
1852
  });
2251
1853
  return retVal;
2252
1854
  };
2253
- var deserializeAws_json1_1CertificateAuthority = function (output, context) {
1855
+ const deserializeAws_json1_1CertificateAuthority = (output, context) => {
2254
1856
  return {
2255
1857
  Arn: __expectString(output.Arn),
2256
1858
  CertificateAuthorityConfiguration: output.CertificateAuthorityConfiguration != null
@@ -2276,7 +1878,7 @@ var deserializeAws_json1_1CertificateAuthority = function (output, context) {
2276
1878
  Type: __expectString(output.Type),
2277
1879
  };
2278
1880
  };
2279
- var deserializeAws_json1_1CertificateAuthorityConfiguration = function (output, context) {
1881
+ const deserializeAws_json1_1CertificateAuthorityConfiguration = (output, context) => {
2280
1882
  return {
2281
1883
  CsrExtensions: output.CsrExtensions != null ? deserializeAws_json1_1CsrExtensions(output.CsrExtensions, context) : undefined,
2282
1884
  KeyAlgorithm: __expectString(output.KeyAlgorithm),
@@ -2284,28 +1886,28 @@ var deserializeAws_json1_1CertificateAuthorityConfiguration = function (output,
2284
1886
  Subject: output.Subject != null ? deserializeAws_json1_1ASN1Subject(output.Subject, context) : undefined,
2285
1887
  };
2286
1888
  };
2287
- var deserializeAws_json1_1CertificateMismatchException = function (output, context) {
1889
+ const deserializeAws_json1_1CertificateMismatchException = (output, context) => {
2288
1890
  return {
2289
1891
  message: __expectString(output.message),
2290
1892
  };
2291
1893
  };
2292
- var deserializeAws_json1_1ConcurrentModificationException = function (output, context) {
1894
+ const deserializeAws_json1_1ConcurrentModificationException = (output, context) => {
2293
1895
  return {
2294
1896
  message: __expectString(output.message),
2295
1897
  };
2296
1898
  };
2297
- var deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse = function (output, context) {
1899
+ const deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse = (output, context) => {
2298
1900
  return {
2299
1901
  AuditReportId: __expectString(output.AuditReportId),
2300
1902
  S3Key: __expectString(output.S3Key),
2301
1903
  };
2302
1904
  };
2303
- var deserializeAws_json1_1CreateCertificateAuthorityResponse = function (output, context) {
1905
+ const deserializeAws_json1_1CreateCertificateAuthorityResponse = (output, context) => {
2304
1906
  return {
2305
1907
  CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
2306
1908
  };
2307
1909
  };
2308
- var deserializeAws_json1_1CrlConfiguration = function (output, context) {
1910
+ const deserializeAws_json1_1CrlConfiguration = (output, context) => {
2309
1911
  return {
2310
1912
  CustomCname: __expectString(output.CustomCname),
2311
1913
  Enabled: __expectBoolean(output.Enabled),
@@ -2314,7 +1916,7 @@ var deserializeAws_json1_1CrlConfiguration = function (output, context) {
2314
1916
  S3ObjectAcl: __expectString(output.S3ObjectAcl),
2315
1917
  };
2316
1918
  };
2317
- var deserializeAws_json1_1CsrExtensions = function (output, context) {
1919
+ const deserializeAws_json1_1CsrExtensions = (output, context) => {
2318
1920
  return {
2319
1921
  KeyUsage: output.KeyUsage != null ? deserializeAws_json1_1KeyUsage(output.KeyUsage, context) : undefined,
2320
1922
  SubjectInformationAccess: output.SubjectInformationAccess != null
@@ -2322,16 +1924,16 @@ var deserializeAws_json1_1CsrExtensions = function (output, context) {
2322
1924
  : undefined,
2323
1925
  };
2324
1926
  };
2325
- var deserializeAws_json1_1CustomAttribute = function (output, context) {
1927
+ const deserializeAws_json1_1CustomAttribute = (output, context) => {
2326
1928
  return {
2327
1929
  ObjectIdentifier: __expectString(output.ObjectIdentifier),
2328
1930
  Value: __expectString(output.Value),
2329
1931
  };
2330
1932
  };
2331
- var deserializeAws_json1_1CustomAttributeList = function (output, context) {
2332
- var retVal = (output || [])
2333
- .filter(function (e) { return e != null; })
2334
- .map(function (entry) {
1933
+ const deserializeAws_json1_1CustomAttributeList = (output, context) => {
1934
+ const retVal = (output || [])
1935
+ .filter((e) => e != null)
1936
+ .map((entry) => {
2335
1937
  if (entry === null) {
2336
1938
  return null;
2337
1939
  }
@@ -2339,7 +1941,7 @@ var deserializeAws_json1_1CustomAttributeList = function (output, context) {
2339
1941
  });
2340
1942
  return retVal;
2341
1943
  };
2342
- var deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse = function (output, context) {
1944
+ const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse = (output, context) => {
2343
1945
  return {
2344
1946
  AuditReportStatus: __expectString(output.AuditReportStatus),
2345
1947
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
@@ -2347,20 +1949,20 @@ var deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse = func
2347
1949
  S3Key: __expectString(output.S3Key),
2348
1950
  };
2349
1951
  };
2350
- var deserializeAws_json1_1DescribeCertificateAuthorityResponse = function (output, context) {
1952
+ const deserializeAws_json1_1DescribeCertificateAuthorityResponse = (output, context) => {
2351
1953
  return {
2352
1954
  CertificateAuthority: output.CertificateAuthority != null
2353
1955
  ? deserializeAws_json1_1CertificateAuthority(output.CertificateAuthority, context)
2354
1956
  : undefined,
2355
1957
  };
2356
1958
  };
2357
- var deserializeAws_json1_1EdiPartyName = function (output, context) {
1959
+ const deserializeAws_json1_1EdiPartyName = (output, context) => {
2358
1960
  return {
2359
1961
  NameAssigner: __expectString(output.NameAssigner),
2360
1962
  PartyName: __expectString(output.PartyName),
2361
1963
  };
2362
1964
  };
2363
- var deserializeAws_json1_1GeneralName = function (output, context) {
1965
+ const deserializeAws_json1_1GeneralName = (output, context) => {
2364
1966
  return {
2365
1967
  DirectoryName: output.DirectoryName != null ? deserializeAws_json1_1ASN1Subject(output.DirectoryName, context) : undefined,
2366
1968
  DnsName: __expectString(output.DnsName),
@@ -2372,69 +1974,69 @@ var deserializeAws_json1_1GeneralName = function (output, context) {
2372
1974
  UniformResourceIdentifier: __expectString(output.UniformResourceIdentifier),
2373
1975
  };
2374
1976
  };
2375
- var deserializeAws_json1_1GetCertificateAuthorityCertificateResponse = function (output, context) {
1977
+ const deserializeAws_json1_1GetCertificateAuthorityCertificateResponse = (output, context) => {
2376
1978
  return {
2377
1979
  Certificate: __expectString(output.Certificate),
2378
1980
  CertificateChain: __expectString(output.CertificateChain),
2379
1981
  };
2380
1982
  };
2381
- var deserializeAws_json1_1GetCertificateAuthorityCsrResponse = function (output, context) {
1983
+ const deserializeAws_json1_1GetCertificateAuthorityCsrResponse = (output, context) => {
2382
1984
  return {
2383
1985
  Csr: __expectString(output.Csr),
2384
1986
  };
2385
1987
  };
2386
- var deserializeAws_json1_1GetCertificateResponse = function (output, context) {
1988
+ const deserializeAws_json1_1GetCertificateResponse = (output, context) => {
2387
1989
  return {
2388
1990
  Certificate: __expectString(output.Certificate),
2389
1991
  CertificateChain: __expectString(output.CertificateChain),
2390
1992
  };
2391
1993
  };
2392
- var deserializeAws_json1_1GetPolicyResponse = function (output, context) {
1994
+ const deserializeAws_json1_1GetPolicyResponse = (output, context) => {
2393
1995
  return {
2394
1996
  Policy: __expectString(output.Policy),
2395
1997
  };
2396
1998
  };
2397
- var deserializeAws_json1_1InvalidArgsException = function (output, context) {
1999
+ const deserializeAws_json1_1InvalidArgsException = (output, context) => {
2398
2000
  return {
2399
2001
  message: __expectString(output.message),
2400
2002
  };
2401
2003
  };
2402
- var deserializeAws_json1_1InvalidArnException = function (output, context) {
2004
+ const deserializeAws_json1_1InvalidArnException = (output, context) => {
2403
2005
  return {
2404
2006
  message: __expectString(output.message),
2405
2007
  };
2406
2008
  };
2407
- var deserializeAws_json1_1InvalidNextTokenException = function (output, context) {
2009
+ const deserializeAws_json1_1InvalidNextTokenException = (output, context) => {
2408
2010
  return {
2409
2011
  message: __expectString(output.message),
2410
2012
  };
2411
2013
  };
2412
- var deserializeAws_json1_1InvalidPolicyException = function (output, context) {
2014
+ const deserializeAws_json1_1InvalidPolicyException = (output, context) => {
2413
2015
  return {
2414
2016
  message: __expectString(output.message),
2415
2017
  };
2416
2018
  };
2417
- var deserializeAws_json1_1InvalidRequestException = function (output, context) {
2019
+ const deserializeAws_json1_1InvalidRequestException = (output, context) => {
2418
2020
  return {
2419
2021
  message: __expectString(output.message),
2420
2022
  };
2421
2023
  };
2422
- var deserializeAws_json1_1InvalidStateException = function (output, context) {
2024
+ const deserializeAws_json1_1InvalidStateException = (output, context) => {
2423
2025
  return {
2424
2026
  message: __expectString(output.message),
2425
2027
  };
2426
2028
  };
2427
- var deserializeAws_json1_1InvalidTagException = function (output, context) {
2029
+ const deserializeAws_json1_1InvalidTagException = (output, context) => {
2428
2030
  return {
2429
2031
  message: __expectString(output.message),
2430
2032
  };
2431
2033
  };
2432
- var deserializeAws_json1_1IssueCertificateResponse = function (output, context) {
2034
+ const deserializeAws_json1_1IssueCertificateResponse = (output, context) => {
2433
2035
  return {
2434
2036
  CertificateArn: __expectString(output.CertificateArn),
2435
2037
  };
2436
2038
  };
2437
- var deserializeAws_json1_1KeyUsage = function (output, context) {
2039
+ const deserializeAws_json1_1KeyUsage = (output, context) => {
2438
2040
  return {
2439
2041
  CRLSign: __expectBoolean(output.CRLSign),
2440
2042
  DataEncipherment: __expectBoolean(output.DataEncipherment),
@@ -2447,12 +2049,12 @@ var deserializeAws_json1_1KeyUsage = function (output, context) {
2447
2049
  NonRepudiation: __expectBoolean(output.NonRepudiation),
2448
2050
  };
2449
2051
  };
2450
- var deserializeAws_json1_1LimitExceededException = function (output, context) {
2052
+ const deserializeAws_json1_1LimitExceededException = (output, context) => {
2451
2053
  return {
2452
2054
  message: __expectString(output.message),
2453
2055
  };
2454
2056
  };
2455
- var deserializeAws_json1_1ListCertificateAuthoritiesResponse = function (output, context) {
2057
+ const deserializeAws_json1_1ListCertificateAuthoritiesResponse = (output, context) => {
2456
2058
  return {
2457
2059
  CertificateAuthorities: output.CertificateAuthorities != null
2458
2060
  ? deserializeAws_json1_1CertificateAuthorities(output.CertificateAuthorities, context)
@@ -2460,46 +2062,46 @@ var deserializeAws_json1_1ListCertificateAuthoritiesResponse = function (output,
2460
2062
  NextToken: __expectString(output.NextToken),
2461
2063
  };
2462
2064
  };
2463
- var deserializeAws_json1_1ListPermissionsResponse = function (output, context) {
2065
+ const deserializeAws_json1_1ListPermissionsResponse = (output, context) => {
2464
2066
  return {
2465
2067
  NextToken: __expectString(output.NextToken),
2466
2068
  Permissions: output.Permissions != null ? deserializeAws_json1_1PermissionList(output.Permissions, context) : undefined,
2467
2069
  };
2468
2070
  };
2469
- var deserializeAws_json1_1ListTagsResponse = function (output, context) {
2071
+ const deserializeAws_json1_1ListTagsResponse = (output, context) => {
2470
2072
  return {
2471
2073
  NextToken: __expectString(output.NextToken),
2472
2074
  Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
2473
2075
  };
2474
2076
  };
2475
- var deserializeAws_json1_1LockoutPreventedException = function (output, context) {
2077
+ const deserializeAws_json1_1LockoutPreventedException = (output, context) => {
2476
2078
  return {
2477
2079
  message: __expectString(output.message),
2478
2080
  };
2479
2081
  };
2480
- var deserializeAws_json1_1MalformedCertificateException = function (output, context) {
2082
+ const deserializeAws_json1_1MalformedCertificateException = (output, context) => {
2481
2083
  return {
2482
2084
  message: __expectString(output.message),
2483
2085
  };
2484
2086
  };
2485
- var deserializeAws_json1_1MalformedCSRException = function (output, context) {
2087
+ const deserializeAws_json1_1MalformedCSRException = (output, context) => {
2486
2088
  return {
2487
2089
  message: __expectString(output.message),
2488
2090
  };
2489
2091
  };
2490
- var deserializeAws_json1_1OcspConfiguration = function (output, context) {
2092
+ const deserializeAws_json1_1OcspConfiguration = (output, context) => {
2491
2093
  return {
2492
2094
  Enabled: __expectBoolean(output.Enabled),
2493
2095
  OcspCustomCname: __expectString(output.OcspCustomCname),
2494
2096
  };
2495
2097
  };
2496
- var deserializeAws_json1_1OtherName = function (output, context) {
2098
+ const deserializeAws_json1_1OtherName = (output, context) => {
2497
2099
  return {
2498
2100
  TypeId: __expectString(output.TypeId),
2499
2101
  Value: __expectString(output.Value),
2500
2102
  };
2501
2103
  };
2502
- var deserializeAws_json1_1Permission = function (output, context) {
2104
+ const deserializeAws_json1_1Permission = (output, context) => {
2503
2105
  return {
2504
2106
  Actions: output.Actions != null ? deserializeAws_json1_1ActionList(output.Actions, context) : undefined,
2505
2107
  CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
@@ -2509,15 +2111,15 @@ var deserializeAws_json1_1Permission = function (output, context) {
2509
2111
  SourceAccount: __expectString(output.SourceAccount),
2510
2112
  };
2511
2113
  };
2512
- var deserializeAws_json1_1PermissionAlreadyExistsException = function (output, context) {
2114
+ const deserializeAws_json1_1PermissionAlreadyExistsException = (output, context) => {
2513
2115
  return {
2514
2116
  message: __expectString(output.message),
2515
2117
  };
2516
2118
  };
2517
- var deserializeAws_json1_1PermissionList = function (output, context) {
2518
- var retVal = (output || [])
2519
- .filter(function (e) { return e != null; })
2520
- .map(function (entry) {
2119
+ const deserializeAws_json1_1PermissionList = (output, context) => {
2120
+ const retVal = (output || [])
2121
+ .filter((e) => e != null)
2122
+ .map((entry) => {
2521
2123
  if (entry === null) {
2522
2124
  return null;
2523
2125
  }
@@ -2525,27 +2127,27 @@ var deserializeAws_json1_1PermissionList = function (output, context) {
2525
2127
  });
2526
2128
  return retVal;
2527
2129
  };
2528
- var deserializeAws_json1_1RequestAlreadyProcessedException = function (output, context) {
2130
+ const deserializeAws_json1_1RequestAlreadyProcessedException = (output, context) => {
2529
2131
  return {
2530
2132
  message: __expectString(output.message),
2531
2133
  };
2532
2134
  };
2533
- var deserializeAws_json1_1RequestFailedException = function (output, context) {
2135
+ const deserializeAws_json1_1RequestFailedException = (output, context) => {
2534
2136
  return {
2535
2137
  message: __expectString(output.message),
2536
2138
  };
2537
2139
  };
2538
- var deserializeAws_json1_1RequestInProgressException = function (output, context) {
2140
+ const deserializeAws_json1_1RequestInProgressException = (output, context) => {
2539
2141
  return {
2540
2142
  message: __expectString(output.message),
2541
2143
  };
2542
2144
  };
2543
- var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
2145
+ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
2544
2146
  return {
2545
2147
  message: __expectString(output.message),
2546
2148
  };
2547
2149
  };
2548
- var deserializeAws_json1_1RevocationConfiguration = function (output, context) {
2150
+ const deserializeAws_json1_1RevocationConfiguration = (output, context) => {
2549
2151
  return {
2550
2152
  CrlConfiguration: output.CrlConfiguration != null
2551
2153
  ? deserializeAws_json1_1CrlConfiguration(output.CrlConfiguration, context)
@@ -2555,16 +2157,16 @@ var deserializeAws_json1_1RevocationConfiguration = function (output, context) {
2555
2157
  : undefined,
2556
2158
  };
2557
2159
  };
2558
- var deserializeAws_json1_1Tag = function (output, context) {
2160
+ const deserializeAws_json1_1Tag = (output, context) => {
2559
2161
  return {
2560
2162
  Key: __expectString(output.Key),
2561
2163
  Value: __expectString(output.Value),
2562
2164
  };
2563
2165
  };
2564
- var deserializeAws_json1_1TagList = function (output, context) {
2565
- var retVal = (output || [])
2566
- .filter(function (e) { return e != null; })
2567
- .map(function (entry) {
2166
+ const deserializeAws_json1_1TagList = (output, context) => {
2167
+ const retVal = (output || [])
2168
+ .filter((e) => e != null)
2169
+ .map((entry) => {
2568
2170
  if (entry === null) {
2569
2171
  return null;
2570
2172
  }
@@ -2572,80 +2174,57 @@ var deserializeAws_json1_1TagList = function (output, context) {
2572
2174
  });
2573
2175
  return retVal;
2574
2176
  };
2575
- var deserializeAws_json1_1TooManyTagsException = function (output, context) {
2177
+ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
2576
2178
  return {
2577
2179
  message: __expectString(output.message),
2578
2180
  };
2579
2181
  };
2580
- var deserializeMetadata = function (output) {
2581
- var _a, _b;
2582
- return ({
2583
- httpStatusCode: output.statusCode,
2584
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2585
- extendedRequestId: output.headers["x-amz-id-2"],
2586
- cfId: output.headers["x-amz-cf-id"],
2587
- });
2588
- };
2589
- var collectBody = function (streamBody, context) {
2590
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
2182
+ const deserializeMetadata = (output) => ({
2183
+ httpStatusCode: output.statusCode,
2184
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2185
+ extendedRequestId: output.headers["x-amz-id-2"],
2186
+ cfId: output.headers["x-amz-cf-id"],
2187
+ });
2188
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2591
2189
  if (streamBody instanceof Uint8Array) {
2592
2190
  return Promise.resolve(streamBody);
2593
2191
  }
2594
2192
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2595
2193
  };
2596
- var collectBodyString = function (streamBody, context) {
2597
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
2598
- };
2599
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
2600
- var _a, hostname, _b, protocol, port, basePath, contents;
2601
- return __generator(this, function (_c) {
2602
- switch (_c.label) {
2603
- case 0: return [4, context.endpoint()];
2604
- case 1:
2605
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2606
- contents = {
2607
- protocol: protocol,
2608
- hostname: hostname,
2609
- port: port,
2610
- method: "POST",
2611
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2612
- headers: headers,
2613
- };
2614
- if (resolvedHostname !== undefined) {
2615
- contents.hostname = resolvedHostname;
2616
- }
2617
- if (body !== undefined) {
2618
- contents.body = body;
2619
- }
2620
- return [2, new __HttpRequest(contents)];
2621
- }
2622
- });
2623
- }); };
2624
- var parseBody = function (streamBody, context) {
2625
- return collectBodyString(streamBody, context).then(function (encoded) {
2626
- if (encoded.length) {
2627
- return JSON.parse(encoded);
2628
- }
2629
- return {};
2630
- });
2194
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2195
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2196
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2197
+ const contents = {
2198
+ protocol,
2199
+ hostname,
2200
+ port,
2201
+ method: "POST",
2202
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2203
+ headers,
2204
+ };
2205
+ if (resolvedHostname !== undefined) {
2206
+ contents.hostname = resolvedHostname;
2207
+ }
2208
+ if (body !== undefined) {
2209
+ contents.body = body;
2210
+ }
2211
+ return new __HttpRequest(contents);
2631
2212
  };
2632
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2633
- var value;
2634
- var _a;
2635
- return __generator(this, function (_b) {
2636
- switch (_b.label) {
2637
- case 0: return [4, parseBody(errorBody, context)];
2638
- case 1:
2639
- value = _b.sent();
2640
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2641
- return [2, value];
2642
- }
2643
- });
2644
- }); };
2645
- var loadRestJsonErrorCode = function (output, data) {
2646
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2647
- var sanitizeErrorCode = function (rawValue) {
2648
- var cleanValue = rawValue;
2213
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2214
+ if (encoded.length) {
2215
+ return JSON.parse(encoded);
2216
+ }
2217
+ return {};
2218
+ });
2219
+ const parseErrorBody = async (errorBody, context) => {
2220
+ const value = await parseBody(errorBody, context);
2221
+ value.message = value.message ?? value.Message;
2222
+ return value;
2223
+ };
2224
+ const loadRestJsonErrorCode = (output, data) => {
2225
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2226
+ const sanitizeErrorCode = (rawValue) => {
2227
+ let cleanValue = rawValue;
2649
2228
  if (typeof cleanValue === "number") {
2650
2229
  cleanValue = cleanValue.toString();
2651
2230
  }
@@ -2660,7 +2239,7 @@ var loadRestJsonErrorCode = function (output, data) {
2660
2239
  }
2661
2240
  return cleanValue;
2662
2241
  };
2663
- var headerKey = findKey(output.headers, "x-amzn-errortype");
2242
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
2664
2243
  if (headerKey !== undefined) {
2665
2244
  return sanitizeErrorCode(output.headers[headerKey]);
2666
2245
  }