@aws-sdk/client-acm 3.181.0 → 3.183.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 (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/ACM.js +62 -69
  3. package/dist-es/ACMClient.js +22 -28
  4. package/dist-es/commands/AddTagsToCertificateCommand.js +22 -29
  5. package/dist-es/commands/DeleteCertificateCommand.js +22 -29
  6. package/dist-es/commands/DescribeCertificateCommand.js +21 -28
  7. package/dist-es/commands/ExportCertificateCommand.js +21 -28
  8. package/dist-es/commands/GetAccountConfigurationCommand.js +22 -29
  9. package/dist-es/commands/GetCertificateCommand.js +21 -28
  10. package/dist-es/commands/ImportCertificateCommand.js +21 -28
  11. package/dist-es/commands/ListCertificatesCommand.js +21 -28
  12. package/dist-es/commands/ListTagsForCertificateCommand.js +21 -28
  13. package/dist-es/commands/PutAccountConfigurationCommand.js +22 -29
  14. package/dist-es/commands/RemoveTagsFromCertificateCommand.js +22 -29
  15. package/dist-es/commands/RenewCertificateCommand.js +22 -29
  16. package/dist-es/commands/RequestCertificateCommand.js +21 -28
  17. package/dist-es/commands/ResendValidationEmailCommand.js +22 -29
  18. package/dist-es/commands/UpdateCertificateOptionsCommand.js +22 -29
  19. package/dist-es/endpoints.js +8 -8
  20. package/dist-es/models/ACMServiceException.js +5 -10
  21. package/dist-es/models/models_0.js +282 -212
  22. package/dist-es/pagination/ListCertificatesPaginator.js +25 -68
  23. package/dist-es/protocols/Aws_json1_1.js +1129 -1452
  24. package/dist-es/runtimeConfig.browser.js +26 -12
  25. package/dist-es/runtimeConfig.js +30 -12
  26. package/dist-es/runtimeConfig.native.js +8 -5
  27. package/dist-es/runtimeConfig.shared.js +8 -11
  28. package/dist-es/waiters/waitForCertificateValidated.js +61 -102
  29. package/package.json +34 -34
@@ -1,1374 +1,1074 @@
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 { ACMServiceException as __BaseException } from "../models/ACMServiceException";
5
4
  import { AccessDeniedException, ConflictException, InvalidArgsException, InvalidArnException, InvalidDomainValidationOptionsException, InvalidParameterException, InvalidStateException, InvalidTagException, LimitExceededException, RequestInProgressException, ResourceInUseException, ResourceNotFoundException, TagPolicyException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
6
- export var serializeAws_json1_1AddTagsToCertificateCommand = 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": "CertificateManager.AddTagsToCertificate",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1AddTagsToCertificateRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_1DeleteCertificateCommand = 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": "CertificateManager.DeleteCertificate",
23
- };
24
- body = JSON.stringify(serializeAws_json1_1DeleteCertificateRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_1DescribeCertificateCommand = 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": "CertificateManager.DescribeCertificate",
34
- };
35
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_1ExportCertificateCommand = 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": "CertificateManager.ExportCertificate",
45
- };
46
- body = JSON.stringify(serializeAws_json1_1ExportCertificateRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_1GetAccountConfigurationCommand = 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": "CertificateManager.GetAccountConfiguration",
56
- };
57
- body = "{}";
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_1GetCertificateCommand = 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": "CertificateManager.GetCertificate",
67
- };
68
- body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_1ImportCertificateCommand = 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": "CertificateManager.ImportCertificate",
78
- };
79
- body = JSON.stringify(serializeAws_json1_1ImportCertificateRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_1ListCertificatesCommand = 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": "CertificateManager.ListCertificates",
89
- };
90
- body = JSON.stringify(serializeAws_json1_1ListCertificatesRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_1ListTagsForCertificateCommand = 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": "CertificateManager.ListTagsForCertificate",
100
- };
101
- body = JSON.stringify(serializeAws_json1_1ListTagsForCertificateRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_1PutAccountConfigurationCommand = 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": "CertificateManager.PutAccountConfiguration",
111
- };
112
- body = JSON.stringify(serializeAws_json1_1PutAccountConfigurationRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_1RemoveTagsFromCertificateCommand = 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": "CertificateManager.RemoveTagsFromCertificate",
122
- };
123
- body = JSON.stringify(serializeAws_json1_1RemoveTagsFromCertificateRequest(input, context));
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_1RenewCertificateCommand = 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": "CertificateManager.RenewCertificate",
133
- };
134
- body = JSON.stringify(serializeAws_json1_1RenewCertificateRequest(input, context));
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_1RequestCertificateCommand = 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": "CertificateManager.RequestCertificate",
144
- };
145
- body = JSON.stringify(serializeAws_json1_1RequestCertificateRequest(input, context));
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var serializeAws_json1_1ResendValidationEmailCommand = 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": "CertificateManager.ResendValidationEmail",
155
- };
156
- body = JSON.stringify(serializeAws_json1_1ResendValidationEmailRequest(input, context));
157
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
- });
159
- }); };
160
- export var serializeAws_json1_1UpdateCertificateOptionsCommand = 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": "CertificateManager.UpdateCertificateOptions",
166
- };
167
- body = JSON.stringify(serializeAws_json1_1UpdateCertificateOptionsRequest(input, context));
168
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
- });
170
- }); };
171
- export var deserializeAws_json1_1AddTagsToCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var response;
173
- return __generator(this, function (_a) {
174
- switch (_a.label) {
175
- case 0:
176
- if (output.statusCode >= 300) {
177
- return [2, deserializeAws_json1_1AddTagsToCertificateCommandError(output, context)];
178
- }
179
- return [4, collectBody(output.body, context)];
180
- case 1:
181
- _a.sent();
182
- response = {
183
- $metadata: deserializeMetadata(output),
184
- };
185
- return [2, Promise.resolve(response)];
186
- }
187
- });
188
- }); };
189
- var deserializeAws_json1_1AddTagsToCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
190
- var parsedOutput, _a, errorCode, _b, parsedBody;
191
- var _c;
192
- return __generator(this, function (_d) {
193
- switch (_d.label) {
194
- case 0:
195
- _a = [__assign({}, output)];
196
- _c = {};
197
- return [4, parseErrorBody(output.body, context)];
198
- case 1:
199
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
200
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
201
- _b = errorCode;
202
- switch (_b) {
203
- case "InvalidArnException": return [3, 2];
204
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
205
- case "InvalidParameterException": return [3, 4];
206
- case "com.amazonaws.acm#InvalidParameterException": return [3, 4];
207
- case "InvalidTagException": return [3, 6];
208
- case "com.amazonaws.acm#InvalidTagException": return [3, 6];
209
- case "ResourceNotFoundException": return [3, 8];
210
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 8];
211
- case "TagPolicyException": return [3, 10];
212
- case "com.amazonaws.acm#TagPolicyException": return [3, 10];
213
- case "ThrottlingException": return [3, 12];
214
- case "com.amazonaws.acm#ThrottlingException": return [3, 12];
215
- case "TooManyTagsException": return [3, 14];
216
- case "com.amazonaws.acm#TooManyTagsException": return [3, 14];
217
- }
218
- return [3, 16];
219
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
220
- case 3: throw _d.sent();
221
- case 4: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
222
- case 5: throw _d.sent();
223
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
224
- case 7: throw _d.sent();
225
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
226
- case 9: throw _d.sent();
227
- case 10: return [4, deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)];
228
- case 11: throw _d.sent();
229
- case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
230
- case 13: throw _d.sent();
231
- case 14: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
232
- case 15: throw _d.sent();
233
- case 16:
234
- parsedBody = parsedOutput.body;
235
- throwDefaultError({
236
- output: output,
237
- parsedBody: parsedBody,
238
- exceptionCtor: __BaseException,
239
- errorCode: errorCode,
240
- });
241
- _d.label = 17;
242
- case 17: return [2];
243
- }
244
- });
245
- }); };
246
- export var deserializeAws_json1_1DeleteCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
247
- var response;
248
- return __generator(this, function (_a) {
249
- switch (_a.label) {
250
- case 0:
251
- if (output.statusCode >= 300) {
252
- return [2, deserializeAws_json1_1DeleteCertificateCommandError(output, context)];
253
- }
254
- return [4, collectBody(output.body, context)];
255
- case 1:
256
- _a.sent();
257
- response = {
258
- $metadata: deserializeMetadata(output),
259
- };
260
- return [2, Promise.resolve(response)];
261
- }
262
- });
263
- }); };
264
- var deserializeAws_json1_1DeleteCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
265
- var parsedOutput, _a, errorCode, _b, parsedBody;
266
- var _c;
267
- return __generator(this, function (_d) {
268
- switch (_d.label) {
269
- case 0:
270
- _a = [__assign({}, output)];
271
- _c = {};
272
- return [4, parseErrorBody(output.body, context)];
273
- case 1:
274
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
275
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
276
- _b = errorCode;
277
- switch (_b) {
278
- case "InvalidArnException": return [3, 2];
279
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
280
- case "ResourceInUseException": return [3, 4];
281
- case "com.amazonaws.acm#ResourceInUseException": return [3, 4];
282
- case "ResourceNotFoundException": return [3, 6];
283
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 6];
284
- }
285
- return [3, 8];
286
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
287
- case 3: throw _d.sent();
288
- case 4: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
289
- case 5: throw _d.sent();
290
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
291
- case 7: throw _d.sent();
292
- case 8:
293
- parsedBody = parsedOutput.body;
294
- throwDefaultError({
295
- output: output,
296
- parsedBody: parsedBody,
297
- exceptionCtor: __BaseException,
298
- errorCode: errorCode,
299
- });
300
- _d.label = 9;
301
- case 9: return [2];
302
- }
303
- });
304
- }); };
305
- export var deserializeAws_json1_1DescribeCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
306
- var data, contents, response;
307
- return __generator(this, function (_a) {
308
- switch (_a.label) {
309
- case 0:
310
- if (output.statusCode >= 300) {
311
- return [2, deserializeAws_json1_1DescribeCertificateCommandError(output, context)];
312
- }
313
- return [4, parseBody(output.body, context)];
314
- case 1:
315
- data = _a.sent();
316
- contents = {};
317
- contents = deserializeAws_json1_1DescribeCertificateResponse(data, context);
318
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
319
- return [2, Promise.resolve(response)];
320
- }
321
- });
322
- }); };
323
- var deserializeAws_json1_1DescribeCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
324
- var parsedOutput, _a, errorCode, _b, parsedBody;
325
- var _c;
326
- return __generator(this, function (_d) {
327
- switch (_d.label) {
328
- case 0:
329
- _a = [__assign({}, output)];
330
- _c = {};
331
- return [4, parseErrorBody(output.body, context)];
332
- case 1:
333
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
334
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
335
- _b = errorCode;
336
- switch (_b) {
337
- case "InvalidArnException": return [3, 2];
338
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
339
- case "ResourceNotFoundException": return [3, 4];
340
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 4];
341
- }
342
- return [3, 6];
343
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
344
- case 3: throw _d.sent();
345
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
346
- case 5: throw _d.sent();
347
- case 6:
348
- parsedBody = parsedOutput.body;
349
- throwDefaultError({
350
- output: output,
351
- parsedBody: parsedBody,
352
- exceptionCtor: __BaseException,
353
- errorCode: errorCode,
354
- });
355
- _d.label = 7;
356
- case 7: return [2];
357
- }
358
- });
359
- }); };
360
- export var deserializeAws_json1_1ExportCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
361
- var data, contents, response;
362
- return __generator(this, function (_a) {
363
- switch (_a.label) {
364
- case 0:
365
- if (output.statusCode >= 300) {
366
- return [2, deserializeAws_json1_1ExportCertificateCommandError(output, context)];
367
- }
368
- return [4, parseBody(output.body, context)];
369
- case 1:
370
- data = _a.sent();
371
- contents = {};
372
- contents = deserializeAws_json1_1ExportCertificateResponse(data, context);
373
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
374
- return [2, Promise.resolve(response)];
375
- }
376
- });
377
- }); };
378
- var deserializeAws_json1_1ExportCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
379
- var parsedOutput, _a, errorCode, _b, parsedBody;
380
- var _c;
381
- return __generator(this, function (_d) {
382
- switch (_d.label) {
383
- case 0:
384
- _a = [__assign({}, output)];
385
- _c = {};
386
- return [4, parseErrorBody(output.body, context)];
387
- case 1:
388
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
389
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
390
- _b = errorCode;
391
- switch (_b) {
392
- case "InvalidArnException": return [3, 2];
393
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
394
- case "RequestInProgressException": return [3, 4];
395
- case "com.amazonaws.acm#RequestInProgressException": return [3, 4];
396
- case "ResourceNotFoundException": return [3, 6];
397
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 6];
398
- }
399
- return [3, 8];
400
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
401
- case 3: throw _d.sent();
402
- case 4: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
403
- case 5: throw _d.sent();
404
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
405
- case 7: throw _d.sent();
406
- case 8:
407
- parsedBody = parsedOutput.body;
408
- throwDefaultError({
409
- output: output,
410
- parsedBody: parsedBody,
411
- exceptionCtor: __BaseException,
412
- errorCode: errorCode,
413
- });
414
- _d.label = 9;
415
- case 9: return [2];
416
- }
417
- });
418
- }); };
419
- export var deserializeAws_json1_1GetAccountConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
420
- var data, contents, response;
421
- return __generator(this, function (_a) {
422
- switch (_a.label) {
423
- case 0:
424
- if (output.statusCode >= 300) {
425
- return [2, deserializeAws_json1_1GetAccountConfigurationCommandError(output, context)];
426
- }
427
- return [4, parseBody(output.body, context)];
428
- case 1:
429
- data = _a.sent();
430
- contents = {};
431
- contents = deserializeAws_json1_1GetAccountConfigurationResponse(data, context);
432
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
433
- return [2, Promise.resolve(response)];
434
- }
435
- });
436
- }); };
437
- var deserializeAws_json1_1GetAccountConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
438
- var parsedOutput, _a, errorCode, _b, parsedBody;
439
- var _c;
440
- return __generator(this, function (_d) {
441
- switch (_d.label) {
442
- case 0:
443
- _a = [__assign({}, output)];
444
- _c = {};
445
- return [4, parseErrorBody(output.body, context)];
446
- case 1:
447
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
448
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
449
- _b = errorCode;
450
- switch (_b) {
451
- case "AccessDeniedException": return [3, 2];
452
- case "com.amazonaws.acm#AccessDeniedException": return [3, 2];
453
- case "ThrottlingException": return [3, 4];
454
- case "com.amazonaws.acm#ThrottlingException": return [3, 4];
455
- }
456
- return [3, 6];
457
- case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
458
- case 3: throw _d.sent();
459
- case 4: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
460
- case 5: throw _d.sent();
461
- case 6:
462
- parsedBody = parsedOutput.body;
463
- throwDefaultError({
464
- output: output,
465
- parsedBody: parsedBody,
466
- exceptionCtor: __BaseException,
467
- errorCode: errorCode,
468
- });
469
- _d.label = 7;
470
- case 7: return [2];
471
- }
472
- });
473
- }); };
474
- export var deserializeAws_json1_1GetCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
475
- var data, contents, response;
476
- return __generator(this, function (_a) {
477
- switch (_a.label) {
478
- case 0:
479
- if (output.statusCode >= 300) {
480
- return [2, deserializeAws_json1_1GetCertificateCommandError(output, context)];
481
- }
482
- return [4, parseBody(output.body, context)];
483
- case 1:
484
- data = _a.sent();
485
- contents = {};
486
- contents = deserializeAws_json1_1GetCertificateResponse(data, context);
487
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
488
- return [2, Promise.resolve(response)];
489
- }
490
- });
491
- }); };
492
- var deserializeAws_json1_1GetCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
493
- var parsedOutput, _a, errorCode, _b, parsedBody;
494
- var _c;
495
- return __generator(this, function (_d) {
496
- switch (_d.label) {
497
- case 0:
498
- _a = [__assign({}, output)];
499
- _c = {};
500
- return [4, parseErrorBody(output.body, context)];
501
- case 1:
502
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
503
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
- _b = errorCode;
505
- switch (_b) {
506
- case "InvalidArnException": return [3, 2];
507
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
508
- case "RequestInProgressException": return [3, 4];
509
- case "com.amazonaws.acm#RequestInProgressException": return [3, 4];
510
- case "ResourceNotFoundException": return [3, 6];
511
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 6];
512
- }
513
- return [3, 8];
514
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
515
- case 3: throw _d.sent();
516
- case 4: return [4, deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)];
517
- case 5: throw _d.sent();
518
- case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
519
- case 7: throw _d.sent();
520
- case 8:
521
- parsedBody = parsedOutput.body;
522
- throwDefaultError({
523
- output: output,
524
- parsedBody: parsedBody,
525
- exceptionCtor: __BaseException,
526
- errorCode: errorCode,
527
- });
528
- _d.label = 9;
529
- case 9: return [2];
530
- }
531
- });
532
- }); };
533
- export var deserializeAws_json1_1ImportCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
534
- var data, contents, response;
535
- return __generator(this, function (_a) {
536
- switch (_a.label) {
537
- case 0:
538
- if (output.statusCode >= 300) {
539
- return [2, deserializeAws_json1_1ImportCertificateCommandError(output, context)];
540
- }
541
- return [4, parseBody(output.body, context)];
542
- case 1:
543
- data = _a.sent();
544
- contents = {};
545
- contents = deserializeAws_json1_1ImportCertificateResponse(data, context);
546
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
547
- return [2, Promise.resolve(response)];
548
- }
549
- });
550
- }); };
551
- var deserializeAws_json1_1ImportCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
552
- var parsedOutput, _a, errorCode, _b, parsedBody;
553
- var _c;
554
- return __generator(this, function (_d) {
555
- switch (_d.label) {
556
- case 0:
557
- _a = [__assign({}, output)];
558
- _c = {};
559
- return [4, parseErrorBody(output.body, context)];
560
- case 1:
561
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
562
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
- _b = errorCode;
564
- switch (_b) {
565
- case "InvalidArnException": return [3, 2];
566
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
567
- case "InvalidParameterException": return [3, 4];
568
- case "com.amazonaws.acm#InvalidParameterException": return [3, 4];
569
- case "InvalidTagException": return [3, 6];
570
- case "com.amazonaws.acm#InvalidTagException": return [3, 6];
571
- case "LimitExceededException": return [3, 8];
572
- case "com.amazonaws.acm#LimitExceededException": return [3, 8];
573
- case "ResourceNotFoundException": return [3, 10];
574
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 10];
575
- case "TagPolicyException": return [3, 12];
576
- case "com.amazonaws.acm#TagPolicyException": return [3, 12];
577
- case "TooManyTagsException": return [3, 14];
578
- case "com.amazonaws.acm#TooManyTagsException": return [3, 14];
579
- }
580
- return [3, 16];
581
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
582
- case 3: throw _d.sent();
583
- case 4: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
584
- case 5: throw _d.sent();
585
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
586
- case 7: throw _d.sent();
587
- case 8: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
588
- case 9: throw _d.sent();
589
- case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
590
- case 11: throw _d.sent();
591
- case 12: return [4, deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)];
592
- case 13: throw _d.sent();
593
- case 14: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
594
- case 15: throw _d.sent();
595
- case 16:
596
- parsedBody = parsedOutput.body;
597
- throwDefaultError({
598
- output: output,
599
- parsedBody: parsedBody,
600
- exceptionCtor: __BaseException,
601
- errorCode: errorCode,
602
- });
603
- _d.label = 17;
604
- case 17: return [2];
605
- }
606
- });
607
- }); };
608
- export var deserializeAws_json1_1ListCertificatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
609
- var data, contents, response;
610
- return __generator(this, function (_a) {
611
- switch (_a.label) {
612
- case 0:
613
- if (output.statusCode >= 300) {
614
- return [2, deserializeAws_json1_1ListCertificatesCommandError(output, context)];
615
- }
616
- return [4, parseBody(output.body, context)];
617
- case 1:
618
- data = _a.sent();
619
- contents = {};
620
- contents = deserializeAws_json1_1ListCertificatesResponse(data, context);
621
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
622
- return [2, Promise.resolve(response)];
623
- }
624
- });
625
- }); };
626
- var deserializeAws_json1_1ListCertificatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
627
- var parsedOutput, _a, errorCode, _b, parsedBody;
628
- var _c;
629
- return __generator(this, function (_d) {
630
- switch (_d.label) {
631
- case 0:
632
- _a = [__assign({}, output)];
633
- _c = {};
634
- return [4, parseErrorBody(output.body, context)];
635
- case 1:
636
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
637
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
638
- _b = errorCode;
639
- switch (_b) {
640
- case "InvalidArgsException": return [3, 2];
641
- case "com.amazonaws.acm#InvalidArgsException": return [3, 2];
642
- }
643
- return [3, 4];
644
- case 2: return [4, deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)];
645
- case 3: throw _d.sent();
646
- case 4:
647
- parsedBody = parsedOutput.body;
648
- throwDefaultError({
649
- output: output,
650
- parsedBody: parsedBody,
651
- exceptionCtor: __BaseException,
652
- errorCode: errorCode,
653
- });
654
- _d.label = 5;
655
- case 5: return [2];
656
- }
657
- });
658
- }); };
659
- export var deserializeAws_json1_1ListTagsForCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
660
- var data, contents, response;
661
- return __generator(this, function (_a) {
662
- switch (_a.label) {
663
- case 0:
664
- if (output.statusCode >= 300) {
665
- return [2, deserializeAws_json1_1ListTagsForCertificateCommandError(output, context)];
666
- }
667
- return [4, parseBody(output.body, context)];
668
- case 1:
669
- data = _a.sent();
670
- contents = {};
671
- contents = deserializeAws_json1_1ListTagsForCertificateResponse(data, context);
672
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
673
- return [2, Promise.resolve(response)];
674
- }
675
- });
676
- }); };
677
- var deserializeAws_json1_1ListTagsForCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
678
- var parsedOutput, _a, errorCode, _b, parsedBody;
679
- var _c;
680
- return __generator(this, function (_d) {
681
- switch (_d.label) {
682
- case 0:
683
- _a = [__assign({}, output)];
684
- _c = {};
685
- return [4, parseErrorBody(output.body, context)];
686
- case 1:
687
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
688
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
689
- _b = errorCode;
690
- switch (_b) {
691
- case "InvalidArnException": return [3, 2];
692
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
693
- case "ResourceNotFoundException": return [3, 4];
694
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 4];
695
- }
696
- return [3, 6];
697
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
698
- case 3: throw _d.sent();
699
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
700
- case 5: throw _d.sent();
701
- case 6:
702
- parsedBody = parsedOutput.body;
703
- throwDefaultError({
704
- output: output,
705
- parsedBody: parsedBody,
706
- exceptionCtor: __BaseException,
707
- errorCode: errorCode,
708
- });
709
- _d.label = 7;
710
- case 7: return [2];
711
- }
712
- });
713
- }); };
714
- export var deserializeAws_json1_1PutAccountConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
715
- var response;
716
- return __generator(this, function (_a) {
717
- switch (_a.label) {
718
- case 0:
719
- if (output.statusCode >= 300) {
720
- return [2, deserializeAws_json1_1PutAccountConfigurationCommandError(output, context)];
721
- }
722
- return [4, collectBody(output.body, context)];
723
- case 1:
724
- _a.sent();
725
- response = {
726
- $metadata: deserializeMetadata(output),
727
- };
728
- return [2, Promise.resolve(response)];
729
- }
730
- });
731
- }); };
732
- var deserializeAws_json1_1PutAccountConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
733
- var parsedOutput, _a, errorCode, _b, parsedBody;
734
- var _c;
735
- return __generator(this, function (_d) {
736
- switch (_d.label) {
737
- case 0:
738
- _a = [__assign({}, output)];
739
- _c = {};
740
- return [4, parseErrorBody(output.body, context)];
741
- case 1:
742
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
743
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
- _b = errorCode;
745
- switch (_b) {
746
- case "AccessDeniedException": return [3, 2];
747
- case "com.amazonaws.acm#AccessDeniedException": return [3, 2];
748
- case "ConflictException": return [3, 4];
749
- case "com.amazonaws.acm#ConflictException": return [3, 4];
750
- case "ThrottlingException": return [3, 6];
751
- case "com.amazonaws.acm#ThrottlingException": return [3, 6];
752
- case "ValidationException": return [3, 8];
753
- case "com.amazonaws.acm#ValidationException": return [3, 8];
754
- }
755
- return [3, 10];
756
- case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
757
- case 3: throw _d.sent();
758
- case 4: return [4, deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context)];
759
- case 5: throw _d.sent();
760
- case 6: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
761
- case 7: throw _d.sent();
762
- case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
763
- case 9: throw _d.sent();
764
- case 10:
765
- parsedBody = parsedOutput.body;
766
- throwDefaultError({
767
- output: output,
768
- parsedBody: parsedBody,
769
- exceptionCtor: __BaseException,
770
- errorCode: errorCode,
771
- });
772
- _d.label = 11;
773
- case 11: return [2];
774
- }
775
- });
776
- }); };
777
- export var deserializeAws_json1_1RemoveTagsFromCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
778
- var response;
779
- return __generator(this, function (_a) {
780
- switch (_a.label) {
781
- case 0:
782
- if (output.statusCode >= 300) {
783
- return [2, deserializeAws_json1_1RemoveTagsFromCertificateCommandError(output, context)];
784
- }
785
- return [4, collectBody(output.body, context)];
786
- case 1:
787
- _a.sent();
788
- response = {
789
- $metadata: deserializeMetadata(output),
790
- };
791
- return [2, Promise.resolve(response)];
792
- }
793
- });
794
- }); };
795
- var deserializeAws_json1_1RemoveTagsFromCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
796
- var parsedOutput, _a, errorCode, _b, parsedBody;
797
- var _c;
798
- return __generator(this, function (_d) {
799
- switch (_d.label) {
800
- case 0:
801
- _a = [__assign({}, output)];
802
- _c = {};
803
- return [4, parseErrorBody(output.body, context)];
804
- case 1:
805
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
806
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
807
- _b = errorCode;
808
- switch (_b) {
809
- case "InvalidArnException": return [3, 2];
810
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
811
- case "InvalidParameterException": return [3, 4];
812
- case "com.amazonaws.acm#InvalidParameterException": return [3, 4];
813
- case "InvalidTagException": return [3, 6];
814
- case "com.amazonaws.acm#InvalidTagException": return [3, 6];
815
- case "ResourceNotFoundException": return [3, 8];
816
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 8];
817
- case "TagPolicyException": return [3, 10];
818
- case "com.amazonaws.acm#TagPolicyException": return [3, 10];
819
- case "ThrottlingException": return [3, 12];
820
- case "com.amazonaws.acm#ThrottlingException": return [3, 12];
821
- }
822
- return [3, 14];
823
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
824
- case 3: throw _d.sent();
825
- case 4: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
826
- case 5: throw _d.sent();
827
- case 6: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
828
- case 7: throw _d.sent();
829
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
830
- case 9: throw _d.sent();
831
- case 10: return [4, deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)];
832
- case 11: throw _d.sent();
833
- case 12: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
834
- case 13: throw _d.sent();
835
- case 14:
836
- parsedBody = parsedOutput.body;
837
- throwDefaultError({
838
- output: output,
839
- parsedBody: parsedBody,
840
- exceptionCtor: __BaseException,
841
- errorCode: errorCode,
842
- });
843
- _d.label = 15;
844
- case 15: return [2];
845
- }
846
- });
847
- }); };
848
- export var deserializeAws_json1_1RenewCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
849
- var response;
850
- return __generator(this, function (_a) {
851
- switch (_a.label) {
852
- case 0:
853
- if (output.statusCode >= 300) {
854
- return [2, deserializeAws_json1_1RenewCertificateCommandError(output, context)];
855
- }
856
- return [4, collectBody(output.body, context)];
857
- case 1:
858
- _a.sent();
859
- response = {
860
- $metadata: deserializeMetadata(output),
861
- };
862
- return [2, Promise.resolve(response)];
863
- }
864
- });
865
- }); };
866
- var deserializeAws_json1_1RenewCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
867
- var parsedOutput, _a, errorCode, _b, parsedBody;
868
- var _c;
869
- return __generator(this, function (_d) {
870
- switch (_d.label) {
871
- case 0:
872
- _a = [__assign({}, output)];
873
- _c = {};
874
- return [4, parseErrorBody(output.body, context)];
875
- case 1:
876
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
877
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
878
- _b = errorCode;
879
- switch (_b) {
880
- case "InvalidArnException": return [3, 2];
881
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
882
- case "ResourceNotFoundException": return [3, 4];
883
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 4];
884
- }
885
- return [3, 6];
886
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
887
- case 3: throw _d.sent();
888
- case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
889
- case 5: throw _d.sent();
890
- case 6:
891
- parsedBody = parsedOutput.body;
892
- throwDefaultError({
893
- output: output,
894
- parsedBody: parsedBody,
895
- exceptionCtor: __BaseException,
896
- errorCode: errorCode,
897
- });
898
- _d.label = 7;
899
- case 7: return [2];
900
- }
901
- });
902
- }); };
903
- export var deserializeAws_json1_1RequestCertificateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
904
- var data, contents, response;
905
- return __generator(this, function (_a) {
906
- switch (_a.label) {
907
- case 0:
908
- if (output.statusCode >= 300) {
909
- return [2, deserializeAws_json1_1RequestCertificateCommandError(output, context)];
910
- }
911
- return [4, parseBody(output.body, context)];
912
- case 1:
913
- data = _a.sent();
914
- contents = {};
915
- contents = deserializeAws_json1_1RequestCertificateResponse(data, context);
916
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
917
- return [2, Promise.resolve(response)];
918
- }
919
- });
920
- }); };
921
- var deserializeAws_json1_1RequestCertificateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
922
- var parsedOutput, _a, errorCode, _b, parsedBody;
923
- var _c;
924
- return __generator(this, function (_d) {
925
- switch (_d.label) {
926
- case 0:
927
- _a = [__assign({}, output)];
928
- _c = {};
929
- return [4, parseErrorBody(output.body, context)];
930
- case 1:
931
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
932
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
933
- _b = errorCode;
934
- switch (_b) {
935
- case "InvalidArnException": return [3, 2];
936
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
937
- case "InvalidDomainValidationOptionsException": return [3, 4];
938
- case "com.amazonaws.acm#InvalidDomainValidationOptionsException": return [3, 4];
939
- case "InvalidParameterException": return [3, 6];
940
- case "com.amazonaws.acm#InvalidParameterException": return [3, 6];
941
- case "InvalidTagException": return [3, 8];
942
- case "com.amazonaws.acm#InvalidTagException": return [3, 8];
943
- case "LimitExceededException": return [3, 10];
944
- case "com.amazonaws.acm#LimitExceededException": return [3, 10];
945
- case "TagPolicyException": return [3, 12];
946
- case "com.amazonaws.acm#TagPolicyException": return [3, 12];
947
- case "TooManyTagsException": return [3, 14];
948
- case "com.amazonaws.acm#TooManyTagsException": return [3, 14];
949
- }
950
- return [3, 16];
951
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
952
- case 3: throw _d.sent();
953
- case 4: return [4, deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context)];
954
- case 5: throw _d.sent();
955
- case 6: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
956
- case 7: throw _d.sent();
957
- case 8: return [4, deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)];
958
- case 9: throw _d.sent();
959
- case 10: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
960
- case 11: throw _d.sent();
961
- case 12: return [4, deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context)];
962
- case 13: throw _d.sent();
963
- case 14: return [4, deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)];
964
- case 15: throw _d.sent();
965
- case 16:
966
- parsedBody = parsedOutput.body;
967
- throwDefaultError({
968
- output: output,
969
- parsedBody: parsedBody,
970
- exceptionCtor: __BaseException,
971
- errorCode: errorCode,
972
- });
973
- _d.label = 17;
974
- case 17: return [2];
975
- }
976
- });
977
- }); };
978
- export var deserializeAws_json1_1ResendValidationEmailCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
979
- var response;
980
- return __generator(this, function (_a) {
981
- switch (_a.label) {
982
- case 0:
983
- if (output.statusCode >= 300) {
984
- return [2, deserializeAws_json1_1ResendValidationEmailCommandError(output, context)];
985
- }
986
- return [4, collectBody(output.body, context)];
987
- case 1:
988
- _a.sent();
989
- response = {
990
- $metadata: deserializeMetadata(output),
991
- };
992
- return [2, Promise.resolve(response)];
993
- }
994
- });
995
- }); };
996
- var deserializeAws_json1_1ResendValidationEmailCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
997
- var parsedOutput, _a, errorCode, _b, parsedBody;
998
- var _c;
999
- return __generator(this, function (_d) {
1000
- switch (_d.label) {
1001
- case 0:
1002
- _a = [__assign({}, output)];
1003
- _c = {};
1004
- return [4, parseErrorBody(output.body, context)];
1005
- case 1:
1006
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1007
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1008
- _b = errorCode;
1009
- switch (_b) {
1010
- case "InvalidArnException": return [3, 2];
1011
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
1012
- case "InvalidDomainValidationOptionsException": return [3, 4];
1013
- case "com.amazonaws.acm#InvalidDomainValidationOptionsException": return [3, 4];
1014
- case "InvalidStateException": return [3, 6];
1015
- case "com.amazonaws.acm#InvalidStateException": return [3, 6];
1016
- case "ResourceNotFoundException": return [3, 8];
1017
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 8];
1018
- }
1019
- return [3, 10];
1020
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1021
- case 3: throw _d.sent();
1022
- case 4: return [4, deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context)];
1023
- case 5: throw _d.sent();
1024
- case 6: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1025
- case 7: throw _d.sent();
1026
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1027
- case 9: throw _d.sent();
1028
- case 10:
1029
- parsedBody = parsedOutput.body;
1030
- throwDefaultError({
1031
- output: output,
1032
- parsedBody: parsedBody,
1033
- exceptionCtor: __BaseException,
1034
- errorCode: errorCode,
1035
- });
1036
- _d.label = 11;
1037
- case 11: return [2];
1038
- }
1039
- });
1040
- }); };
1041
- export var deserializeAws_json1_1UpdateCertificateOptionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1042
- var response;
1043
- return __generator(this, function (_a) {
1044
- switch (_a.label) {
1045
- case 0:
1046
- if (output.statusCode >= 300) {
1047
- return [2, deserializeAws_json1_1UpdateCertificateOptionsCommandError(output, context)];
1048
- }
1049
- return [4, collectBody(output.body, context)];
1050
- case 1:
1051
- _a.sent();
1052
- response = {
1053
- $metadata: deserializeMetadata(output),
1054
- };
1055
- return [2, Promise.resolve(response)];
1056
- }
1057
- });
1058
- }); };
1059
- var deserializeAws_json1_1UpdateCertificateOptionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1060
- var parsedOutput, _a, errorCode, _b, parsedBody;
1061
- var _c;
1062
- return __generator(this, function (_d) {
1063
- switch (_d.label) {
1064
- case 0:
1065
- _a = [__assign({}, output)];
1066
- _c = {};
1067
- return [4, parseErrorBody(output.body, context)];
1068
- case 1:
1069
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1070
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1071
- _b = errorCode;
1072
- switch (_b) {
1073
- case "InvalidArnException": return [3, 2];
1074
- case "com.amazonaws.acm#InvalidArnException": return [3, 2];
1075
- case "InvalidStateException": return [3, 4];
1076
- case "com.amazonaws.acm#InvalidStateException": return [3, 4];
1077
- case "LimitExceededException": return [3, 6];
1078
- case "com.amazonaws.acm#LimitExceededException": return [3, 6];
1079
- case "ResourceNotFoundException": return [3, 8];
1080
- case "com.amazonaws.acm#ResourceNotFoundException": return [3, 8];
1081
- }
1082
- return [3, 10];
1083
- case 2: return [4, deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)];
1084
- case 3: throw _d.sent();
1085
- case 4: return [4, deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)];
1086
- case 5: throw _d.sent();
1087
- case 6: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
1088
- case 7: throw _d.sent();
1089
- case 8: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1090
- case 9: throw _d.sent();
1091
- case 10:
1092
- parsedBody = parsedOutput.body;
1093
- throwDefaultError({
1094
- output: output,
1095
- parsedBody: parsedBody,
1096
- exceptionCtor: __BaseException,
1097
- errorCode: errorCode,
1098
- });
1099
- _d.label = 11;
1100
- case 11: return [2];
1101
- }
1102
- });
1103
- }); };
1104
- var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1105
- var body, deserialized, exception;
1106
- return __generator(this, function (_a) {
1107
- body = parsedOutput.body;
1108
- deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
1109
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1110
- return [2, __decorateServiceException(exception, body)];
1111
- });
1112
- }); };
1113
- var deserializeAws_json1_1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1114
- var body, deserialized, exception;
1115
- return __generator(this, function (_a) {
1116
- body = parsedOutput.body;
1117
- deserialized = deserializeAws_json1_1ConflictException(body, context);
1118
- exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1119
- return [2, __decorateServiceException(exception, body)];
1120
- });
1121
- }); };
1122
- var deserializeAws_json1_1InvalidArgsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1123
- var body, deserialized, exception;
1124
- return __generator(this, function (_a) {
1125
- body = parsedOutput.body;
1126
- deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
1127
- exception = new InvalidArgsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1128
- return [2, __decorateServiceException(exception, body)];
1129
- });
1130
- }); };
1131
- var deserializeAws_json1_1InvalidArnExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1132
- var body, deserialized, exception;
1133
- return __generator(this, function (_a) {
1134
- body = parsedOutput.body;
1135
- deserialized = deserializeAws_json1_1InvalidArnException(body, context);
1136
- exception = new InvalidArnException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1137
- return [2, __decorateServiceException(exception, body)];
1138
- });
1139
- }); };
1140
- var deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1141
- var body, deserialized, exception;
1142
- return __generator(this, function (_a) {
1143
- body = parsedOutput.body;
1144
- deserialized = deserializeAws_json1_1InvalidDomainValidationOptionsException(body, context);
1145
- exception = new InvalidDomainValidationOptionsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1146
- return [2, __decorateServiceException(exception, body)];
1147
- });
1148
- }); };
1149
- var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1150
- var body, deserialized, exception;
1151
- return __generator(this, function (_a) {
1152
- body = parsedOutput.body;
1153
- deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
1154
- exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1155
- return [2, __decorateServiceException(exception, body)];
1156
- });
1157
- }); };
1158
- var deserializeAws_json1_1InvalidStateExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1159
- var body, deserialized, exception;
1160
- return __generator(this, function (_a) {
1161
- body = parsedOutput.body;
1162
- deserialized = deserializeAws_json1_1InvalidStateException(body, context);
1163
- exception = new InvalidStateException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1164
- return [2, __decorateServiceException(exception, body)];
1165
- });
1166
- }); };
1167
- var deserializeAws_json1_1InvalidTagExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1168
- var body, deserialized, exception;
1169
- return __generator(this, function (_a) {
1170
- body = parsedOutput.body;
1171
- deserialized = deserializeAws_json1_1InvalidTagException(body, context);
1172
- exception = new InvalidTagException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1173
- return [2, __decorateServiceException(exception, body)];
1174
- });
1175
- }); };
1176
- var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1177
- var body, deserialized, exception;
1178
- return __generator(this, function (_a) {
1179
- body = parsedOutput.body;
1180
- deserialized = deserializeAws_json1_1LimitExceededException(body, context);
1181
- exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1182
- return [2, __decorateServiceException(exception, body)];
1183
- });
1184
- }); };
1185
- var deserializeAws_json1_1RequestInProgressExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1186
- var body, deserialized, exception;
1187
- return __generator(this, function (_a) {
1188
- body = parsedOutput.body;
1189
- deserialized = deserializeAws_json1_1RequestInProgressException(body, context);
1190
- exception = new RequestInProgressException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1191
- return [2, __decorateServiceException(exception, body)];
1192
- });
1193
- }); };
1194
- var deserializeAws_json1_1ResourceInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1195
- var body, deserialized, exception;
1196
- return __generator(this, function (_a) {
1197
- body = parsedOutput.body;
1198
- deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
1199
- exception = new ResourceInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1200
- return [2, __decorateServiceException(exception, body)];
1201
- });
1202
- }); };
1203
- var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1204
- var body, deserialized, exception;
1205
- return __generator(this, function (_a) {
1206
- body = parsedOutput.body;
1207
- deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
1208
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1209
- return [2, __decorateServiceException(exception, body)];
1210
- });
1211
- }); };
1212
- var deserializeAws_json1_1TagPolicyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1213
- var body, deserialized, exception;
1214
- return __generator(this, function (_a) {
1215
- body = parsedOutput.body;
1216
- deserialized = deserializeAws_json1_1TagPolicyException(body, context);
1217
- exception = new TagPolicyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1218
- return [2, __decorateServiceException(exception, body)];
1219
- });
1220
- }); };
1221
- var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1222
- var body, deserialized, exception;
1223
- return __generator(this, function (_a) {
1224
- body = parsedOutput.body;
1225
- deserialized = deserializeAws_json1_1ThrottlingException(body, context);
1226
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1227
- return [2, __decorateServiceException(exception, body)];
1228
- });
1229
- }); };
1230
- var deserializeAws_json1_1TooManyTagsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1231
- var body, deserialized, exception;
1232
- return __generator(this, function (_a) {
1233
- body = parsedOutput.body;
1234
- deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
1235
- exception = new TooManyTagsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1236
- return [2, __decorateServiceException(exception, body)];
1237
- });
1238
- }); };
1239
- var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1240
- var body, deserialized, exception;
1241
- return __generator(this, function (_a) {
1242
- body = parsedOutput.body;
1243
- deserialized = deserializeAws_json1_1ValidationException(body, context);
1244
- exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1245
- return [2, __decorateServiceException(exception, body)];
1246
- });
1247
- }); };
1248
- var serializeAws_json1_1AddTagsToCertificateRequest = function (input, context) {
1249
- return __assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5
+ export const serializeAws_json1_1AddTagsToCertificateCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "CertificateManager.AddTagsToCertificate",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1AddTagsToCertificateRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_1DeleteCertificateCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.1",
17
+ "x-amz-target": "CertificateManager.DeleteCertificate",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_1DeleteCertificateRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_1DescribeCertificateCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.1",
26
+ "x-amz-target": "CertificateManager.DescribeCertificate",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_1DescribeCertificateRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_1ExportCertificateCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.1",
35
+ "x-amz-target": "CertificateManager.ExportCertificate",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_1ExportCertificateRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_1GetAccountConfigurationCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "CertificateManager.GetAccountConfiguration",
45
+ };
46
+ const body = "{}";
47
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
+ };
49
+ export const serializeAws_json1_1GetCertificateCommand = async (input, context) => {
50
+ const headers = {
51
+ "content-type": "application/x-amz-json-1.1",
52
+ "x-amz-target": "CertificateManager.GetCertificate",
53
+ };
54
+ let body;
55
+ body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
56
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
+ };
58
+ export const serializeAws_json1_1ImportCertificateCommand = async (input, context) => {
59
+ const headers = {
60
+ "content-type": "application/x-amz-json-1.1",
61
+ "x-amz-target": "CertificateManager.ImportCertificate",
62
+ };
63
+ let body;
64
+ body = JSON.stringify(serializeAws_json1_1ImportCertificateRequest(input, context));
65
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
+ };
67
+ export const serializeAws_json1_1ListCertificatesCommand = async (input, context) => {
68
+ const headers = {
69
+ "content-type": "application/x-amz-json-1.1",
70
+ "x-amz-target": "CertificateManager.ListCertificates",
71
+ };
72
+ let body;
73
+ body = JSON.stringify(serializeAws_json1_1ListCertificatesRequest(input, context));
74
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
75
+ };
76
+ export const serializeAws_json1_1ListTagsForCertificateCommand = async (input, context) => {
77
+ const headers = {
78
+ "content-type": "application/x-amz-json-1.1",
79
+ "x-amz-target": "CertificateManager.ListTagsForCertificate",
80
+ };
81
+ let body;
82
+ body = JSON.stringify(serializeAws_json1_1ListTagsForCertificateRequest(input, context));
83
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
+ };
85
+ export const serializeAws_json1_1PutAccountConfigurationCommand = async (input, context) => {
86
+ const headers = {
87
+ "content-type": "application/x-amz-json-1.1",
88
+ "x-amz-target": "CertificateManager.PutAccountConfiguration",
89
+ };
90
+ let body;
91
+ body = JSON.stringify(serializeAws_json1_1PutAccountConfigurationRequest(input, context));
92
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
+ };
94
+ export const serializeAws_json1_1RemoveTagsFromCertificateCommand = async (input, context) => {
95
+ const headers = {
96
+ "content-type": "application/x-amz-json-1.1",
97
+ "x-amz-target": "CertificateManager.RemoveTagsFromCertificate",
98
+ };
99
+ let body;
100
+ body = JSON.stringify(serializeAws_json1_1RemoveTagsFromCertificateRequest(input, context));
101
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
+ };
103
+ export const serializeAws_json1_1RenewCertificateCommand = async (input, context) => {
104
+ const headers = {
105
+ "content-type": "application/x-amz-json-1.1",
106
+ "x-amz-target": "CertificateManager.RenewCertificate",
107
+ };
108
+ let body;
109
+ body = JSON.stringify(serializeAws_json1_1RenewCertificateRequest(input, context));
110
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
+ };
112
+ export const serializeAws_json1_1RequestCertificateCommand = async (input, context) => {
113
+ const headers = {
114
+ "content-type": "application/x-amz-json-1.1",
115
+ "x-amz-target": "CertificateManager.RequestCertificate",
116
+ };
117
+ let body;
118
+ body = JSON.stringify(serializeAws_json1_1RequestCertificateRequest(input, context));
119
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
+ };
121
+ export const serializeAws_json1_1ResendValidationEmailCommand = async (input, context) => {
122
+ const headers = {
123
+ "content-type": "application/x-amz-json-1.1",
124
+ "x-amz-target": "CertificateManager.ResendValidationEmail",
125
+ };
126
+ let body;
127
+ body = JSON.stringify(serializeAws_json1_1ResendValidationEmailRequest(input, context));
128
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
129
+ };
130
+ export const serializeAws_json1_1UpdateCertificateOptionsCommand = async (input, context) => {
131
+ const headers = {
132
+ "content-type": "application/x-amz-json-1.1",
133
+ "x-amz-target": "CertificateManager.UpdateCertificateOptions",
134
+ };
135
+ let body;
136
+ body = JSON.stringify(serializeAws_json1_1UpdateCertificateOptionsRequest(input, context));
137
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
+ };
139
+ export const deserializeAws_json1_1AddTagsToCertificateCommand = async (output, context) => {
140
+ if (output.statusCode >= 300) {
141
+ return deserializeAws_json1_1AddTagsToCertificateCommandError(output, context);
142
+ }
143
+ await collectBody(output.body, context);
144
+ const response = {
145
+ $metadata: deserializeMetadata(output),
146
+ };
147
+ return Promise.resolve(response);
148
+ };
149
+ const deserializeAws_json1_1AddTagsToCertificateCommandError = async (output, context) => {
150
+ const parsedOutput = {
151
+ ...output,
152
+ body: await parseErrorBody(output.body, context),
153
+ };
154
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
155
+ switch (errorCode) {
156
+ case "InvalidArnException":
157
+ case "com.amazonaws.acm#InvalidArnException":
158
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
159
+ case "InvalidParameterException":
160
+ case "com.amazonaws.acm#InvalidParameterException":
161
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
162
+ case "InvalidTagException":
163
+ case "com.amazonaws.acm#InvalidTagException":
164
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
165
+ case "ResourceNotFoundException":
166
+ case "com.amazonaws.acm#ResourceNotFoundException":
167
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
168
+ case "TagPolicyException":
169
+ case "com.amazonaws.acm#TagPolicyException":
170
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
171
+ case "ThrottlingException":
172
+ case "com.amazonaws.acm#ThrottlingException":
173
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
174
+ case "TooManyTagsException":
175
+ case "com.amazonaws.acm#TooManyTagsException":
176
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
177
+ default:
178
+ const parsedBody = parsedOutput.body;
179
+ throwDefaultError({
180
+ output,
181
+ parsedBody,
182
+ exceptionCtor: __BaseException,
183
+ errorCode,
184
+ });
185
+ }
186
+ };
187
+ export const deserializeAws_json1_1DeleteCertificateCommand = async (output, context) => {
188
+ if (output.statusCode >= 300) {
189
+ return deserializeAws_json1_1DeleteCertificateCommandError(output, context);
190
+ }
191
+ await collectBody(output.body, context);
192
+ const response = {
193
+ $metadata: deserializeMetadata(output),
194
+ };
195
+ return Promise.resolve(response);
196
+ };
197
+ const deserializeAws_json1_1DeleteCertificateCommandError = async (output, context) => {
198
+ const parsedOutput = {
199
+ ...output,
200
+ body: await parseErrorBody(output.body, context),
201
+ };
202
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
203
+ switch (errorCode) {
204
+ case "InvalidArnException":
205
+ case "com.amazonaws.acm#InvalidArnException":
206
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
207
+ case "ResourceInUseException":
208
+ case "com.amazonaws.acm#ResourceInUseException":
209
+ throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
210
+ case "ResourceNotFoundException":
211
+ case "com.amazonaws.acm#ResourceNotFoundException":
212
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
213
+ default:
214
+ const parsedBody = parsedOutput.body;
215
+ throwDefaultError({
216
+ output,
217
+ parsedBody,
218
+ exceptionCtor: __BaseException,
219
+ errorCode,
220
+ });
221
+ }
222
+ };
223
+ export const deserializeAws_json1_1DescribeCertificateCommand = async (output, context) => {
224
+ if (output.statusCode >= 300) {
225
+ return deserializeAws_json1_1DescribeCertificateCommandError(output, context);
226
+ }
227
+ const data = await parseBody(output.body, context);
228
+ let contents = {};
229
+ contents = deserializeAws_json1_1DescribeCertificateResponse(data, context);
230
+ const response = {
231
+ $metadata: deserializeMetadata(output),
232
+ ...contents,
233
+ };
234
+ return Promise.resolve(response);
235
+ };
236
+ const deserializeAws_json1_1DescribeCertificateCommandError = async (output, context) => {
237
+ const parsedOutput = {
238
+ ...output,
239
+ body: await parseErrorBody(output.body, context),
240
+ };
241
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
242
+ switch (errorCode) {
243
+ case "InvalidArnException":
244
+ case "com.amazonaws.acm#InvalidArnException":
245
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
246
+ case "ResourceNotFoundException":
247
+ case "com.amazonaws.acm#ResourceNotFoundException":
248
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
249
+ default:
250
+ const parsedBody = parsedOutput.body;
251
+ throwDefaultError({
252
+ output,
253
+ parsedBody,
254
+ exceptionCtor: __BaseException,
255
+ errorCode,
256
+ });
257
+ }
258
+ };
259
+ export const deserializeAws_json1_1ExportCertificateCommand = async (output, context) => {
260
+ if (output.statusCode >= 300) {
261
+ return deserializeAws_json1_1ExportCertificateCommandError(output, context);
262
+ }
263
+ const data = await parseBody(output.body, context);
264
+ let contents = {};
265
+ contents = deserializeAws_json1_1ExportCertificateResponse(data, context);
266
+ const response = {
267
+ $metadata: deserializeMetadata(output),
268
+ ...contents,
269
+ };
270
+ return Promise.resolve(response);
271
+ };
272
+ const deserializeAws_json1_1ExportCertificateCommandError = async (output, context) => {
273
+ const parsedOutput = {
274
+ ...output,
275
+ body: await parseErrorBody(output.body, context),
276
+ };
277
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
278
+ switch (errorCode) {
279
+ case "InvalidArnException":
280
+ case "com.amazonaws.acm#InvalidArnException":
281
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
282
+ case "RequestInProgressException":
283
+ case "com.amazonaws.acm#RequestInProgressException":
284
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
285
+ case "ResourceNotFoundException":
286
+ case "com.amazonaws.acm#ResourceNotFoundException":
287
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
288
+ default:
289
+ const parsedBody = parsedOutput.body;
290
+ throwDefaultError({
291
+ output,
292
+ parsedBody,
293
+ exceptionCtor: __BaseException,
294
+ errorCode,
295
+ });
296
+ }
297
+ };
298
+ export const deserializeAws_json1_1GetAccountConfigurationCommand = async (output, context) => {
299
+ if (output.statusCode >= 300) {
300
+ return deserializeAws_json1_1GetAccountConfigurationCommandError(output, context);
301
+ }
302
+ const data = await parseBody(output.body, context);
303
+ let contents = {};
304
+ contents = deserializeAws_json1_1GetAccountConfigurationResponse(data, context);
305
+ const response = {
306
+ $metadata: deserializeMetadata(output),
307
+ ...contents,
308
+ };
309
+ return Promise.resolve(response);
310
+ };
311
+ const deserializeAws_json1_1GetAccountConfigurationCommandError = async (output, context) => {
312
+ const parsedOutput = {
313
+ ...output,
314
+ body: await parseErrorBody(output.body, context),
315
+ };
316
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
317
+ switch (errorCode) {
318
+ case "AccessDeniedException":
319
+ case "com.amazonaws.acm#AccessDeniedException":
320
+ throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
321
+ case "ThrottlingException":
322
+ case "com.amazonaws.acm#ThrottlingException":
323
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
324
+ default:
325
+ const parsedBody = parsedOutput.body;
326
+ throwDefaultError({
327
+ output,
328
+ parsedBody,
329
+ exceptionCtor: __BaseException,
330
+ errorCode,
331
+ });
332
+ }
333
+ };
334
+ export const deserializeAws_json1_1GetCertificateCommand = async (output, context) => {
335
+ if (output.statusCode >= 300) {
336
+ return deserializeAws_json1_1GetCertificateCommandError(output, context);
337
+ }
338
+ const data = await parseBody(output.body, context);
339
+ let contents = {};
340
+ contents = deserializeAws_json1_1GetCertificateResponse(data, context);
341
+ const response = {
342
+ $metadata: deserializeMetadata(output),
343
+ ...contents,
344
+ };
345
+ return Promise.resolve(response);
346
+ };
347
+ const deserializeAws_json1_1GetCertificateCommandError = async (output, context) => {
348
+ const parsedOutput = {
349
+ ...output,
350
+ body: await parseErrorBody(output.body, context),
351
+ };
352
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
353
+ switch (errorCode) {
354
+ case "InvalidArnException":
355
+ case "com.amazonaws.acm#InvalidArnException":
356
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
357
+ case "RequestInProgressException":
358
+ case "com.amazonaws.acm#RequestInProgressException":
359
+ throw await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context);
360
+ case "ResourceNotFoundException":
361
+ case "com.amazonaws.acm#ResourceNotFoundException":
362
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
363
+ default:
364
+ const parsedBody = parsedOutput.body;
365
+ throwDefaultError({
366
+ output,
367
+ parsedBody,
368
+ exceptionCtor: __BaseException,
369
+ errorCode,
370
+ });
371
+ }
372
+ };
373
+ export const deserializeAws_json1_1ImportCertificateCommand = async (output, context) => {
374
+ if (output.statusCode >= 300) {
375
+ return deserializeAws_json1_1ImportCertificateCommandError(output, context);
376
+ }
377
+ const data = await parseBody(output.body, context);
378
+ let contents = {};
379
+ contents = deserializeAws_json1_1ImportCertificateResponse(data, context);
380
+ const response = {
381
+ $metadata: deserializeMetadata(output),
382
+ ...contents,
383
+ };
384
+ return Promise.resolve(response);
385
+ };
386
+ const deserializeAws_json1_1ImportCertificateCommandError = async (output, context) => {
387
+ const parsedOutput = {
388
+ ...output,
389
+ body: await parseErrorBody(output.body, context),
390
+ };
391
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
+ switch (errorCode) {
393
+ case "InvalidArnException":
394
+ case "com.amazonaws.acm#InvalidArnException":
395
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
396
+ case "InvalidParameterException":
397
+ case "com.amazonaws.acm#InvalidParameterException":
398
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
399
+ case "InvalidTagException":
400
+ case "com.amazonaws.acm#InvalidTagException":
401
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
402
+ case "LimitExceededException":
403
+ case "com.amazonaws.acm#LimitExceededException":
404
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
405
+ case "ResourceNotFoundException":
406
+ case "com.amazonaws.acm#ResourceNotFoundException":
407
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
408
+ case "TagPolicyException":
409
+ case "com.amazonaws.acm#TagPolicyException":
410
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
411
+ case "TooManyTagsException":
412
+ case "com.amazonaws.acm#TooManyTagsException":
413
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
414
+ default:
415
+ const parsedBody = parsedOutput.body;
416
+ throwDefaultError({
417
+ output,
418
+ parsedBody,
419
+ exceptionCtor: __BaseException,
420
+ errorCode,
421
+ });
422
+ }
423
+ };
424
+ export const deserializeAws_json1_1ListCertificatesCommand = async (output, context) => {
425
+ if (output.statusCode >= 300) {
426
+ return deserializeAws_json1_1ListCertificatesCommandError(output, context);
427
+ }
428
+ const data = await parseBody(output.body, context);
429
+ let contents = {};
430
+ contents = deserializeAws_json1_1ListCertificatesResponse(data, context);
431
+ const response = {
432
+ $metadata: deserializeMetadata(output),
433
+ ...contents,
434
+ };
435
+ return Promise.resolve(response);
436
+ };
437
+ const deserializeAws_json1_1ListCertificatesCommandError = async (output, context) => {
438
+ const parsedOutput = {
439
+ ...output,
440
+ body: await parseErrorBody(output.body, context),
441
+ };
442
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
+ switch (errorCode) {
444
+ case "InvalidArgsException":
445
+ case "com.amazonaws.acm#InvalidArgsException":
446
+ throw await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context);
447
+ default:
448
+ const parsedBody = parsedOutput.body;
449
+ throwDefaultError({
450
+ output,
451
+ parsedBody,
452
+ exceptionCtor: __BaseException,
453
+ errorCode,
454
+ });
455
+ }
456
+ };
457
+ export const deserializeAws_json1_1ListTagsForCertificateCommand = async (output, context) => {
458
+ if (output.statusCode >= 300) {
459
+ return deserializeAws_json1_1ListTagsForCertificateCommandError(output, context);
460
+ }
461
+ const data = await parseBody(output.body, context);
462
+ let contents = {};
463
+ contents = deserializeAws_json1_1ListTagsForCertificateResponse(data, context);
464
+ const response = {
465
+ $metadata: deserializeMetadata(output),
466
+ ...contents,
467
+ };
468
+ return Promise.resolve(response);
469
+ };
470
+ const deserializeAws_json1_1ListTagsForCertificateCommandError = async (output, context) => {
471
+ const parsedOutput = {
472
+ ...output,
473
+ body: await parseErrorBody(output.body, context),
474
+ };
475
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
476
+ switch (errorCode) {
477
+ case "InvalidArnException":
478
+ case "com.amazonaws.acm#InvalidArnException":
479
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
480
+ case "ResourceNotFoundException":
481
+ case "com.amazonaws.acm#ResourceNotFoundException":
482
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
483
+ default:
484
+ const parsedBody = parsedOutput.body;
485
+ throwDefaultError({
486
+ output,
487
+ parsedBody,
488
+ exceptionCtor: __BaseException,
489
+ errorCode,
490
+ });
491
+ }
492
+ };
493
+ export const deserializeAws_json1_1PutAccountConfigurationCommand = async (output, context) => {
494
+ if (output.statusCode >= 300) {
495
+ return deserializeAws_json1_1PutAccountConfigurationCommandError(output, context);
496
+ }
497
+ await collectBody(output.body, context);
498
+ const response = {
499
+ $metadata: deserializeMetadata(output),
500
+ };
501
+ return Promise.resolve(response);
502
+ };
503
+ const deserializeAws_json1_1PutAccountConfigurationCommandError = async (output, context) => {
504
+ const parsedOutput = {
505
+ ...output,
506
+ body: await parseErrorBody(output.body, context),
507
+ };
508
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
509
+ switch (errorCode) {
510
+ case "AccessDeniedException":
511
+ case "com.amazonaws.acm#AccessDeniedException":
512
+ throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
513
+ case "ConflictException":
514
+ case "com.amazonaws.acm#ConflictException":
515
+ throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context);
516
+ case "ThrottlingException":
517
+ case "com.amazonaws.acm#ThrottlingException":
518
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
519
+ case "ValidationException":
520
+ case "com.amazonaws.acm#ValidationException":
521
+ throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
522
+ default:
523
+ const parsedBody = parsedOutput.body;
524
+ throwDefaultError({
525
+ output,
526
+ parsedBody,
527
+ exceptionCtor: __BaseException,
528
+ errorCode,
529
+ });
530
+ }
531
+ };
532
+ export const deserializeAws_json1_1RemoveTagsFromCertificateCommand = async (output, context) => {
533
+ if (output.statusCode >= 300) {
534
+ return deserializeAws_json1_1RemoveTagsFromCertificateCommandError(output, context);
535
+ }
536
+ await collectBody(output.body, context);
537
+ const response = {
538
+ $metadata: deserializeMetadata(output),
539
+ };
540
+ return Promise.resolve(response);
541
+ };
542
+ const deserializeAws_json1_1RemoveTagsFromCertificateCommandError = async (output, context) => {
543
+ const parsedOutput = {
544
+ ...output,
545
+ body: await parseErrorBody(output.body, context),
546
+ };
547
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
548
+ switch (errorCode) {
549
+ case "InvalidArnException":
550
+ case "com.amazonaws.acm#InvalidArnException":
551
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
552
+ case "InvalidParameterException":
553
+ case "com.amazonaws.acm#InvalidParameterException":
554
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
555
+ case "InvalidTagException":
556
+ case "com.amazonaws.acm#InvalidTagException":
557
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
558
+ case "ResourceNotFoundException":
559
+ case "com.amazonaws.acm#ResourceNotFoundException":
560
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
561
+ case "TagPolicyException":
562
+ case "com.amazonaws.acm#TagPolicyException":
563
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
564
+ case "ThrottlingException":
565
+ case "com.amazonaws.acm#ThrottlingException":
566
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
567
+ default:
568
+ const parsedBody = parsedOutput.body;
569
+ throwDefaultError({
570
+ output,
571
+ parsedBody,
572
+ exceptionCtor: __BaseException,
573
+ errorCode,
574
+ });
575
+ }
576
+ };
577
+ export const deserializeAws_json1_1RenewCertificateCommand = async (output, context) => {
578
+ if (output.statusCode >= 300) {
579
+ return deserializeAws_json1_1RenewCertificateCommandError(output, context);
580
+ }
581
+ await collectBody(output.body, context);
582
+ const response = {
583
+ $metadata: deserializeMetadata(output),
584
+ };
585
+ return Promise.resolve(response);
586
+ };
587
+ const deserializeAws_json1_1RenewCertificateCommandError = async (output, context) => {
588
+ const parsedOutput = {
589
+ ...output,
590
+ body: await parseErrorBody(output.body, context),
591
+ };
592
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
593
+ switch (errorCode) {
594
+ case "InvalidArnException":
595
+ case "com.amazonaws.acm#InvalidArnException":
596
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
597
+ case "ResourceNotFoundException":
598
+ case "com.amazonaws.acm#ResourceNotFoundException":
599
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
600
+ default:
601
+ const parsedBody = parsedOutput.body;
602
+ throwDefaultError({
603
+ output,
604
+ parsedBody,
605
+ exceptionCtor: __BaseException,
606
+ errorCode,
607
+ });
608
+ }
609
+ };
610
+ export const deserializeAws_json1_1RequestCertificateCommand = async (output, context) => {
611
+ if (output.statusCode >= 300) {
612
+ return deserializeAws_json1_1RequestCertificateCommandError(output, context);
613
+ }
614
+ const data = await parseBody(output.body, context);
615
+ let contents = {};
616
+ contents = deserializeAws_json1_1RequestCertificateResponse(data, context);
617
+ const response = {
618
+ $metadata: deserializeMetadata(output),
619
+ ...contents,
620
+ };
621
+ return Promise.resolve(response);
622
+ };
623
+ const deserializeAws_json1_1RequestCertificateCommandError = async (output, context) => {
624
+ const parsedOutput = {
625
+ ...output,
626
+ body: await parseErrorBody(output.body, context),
627
+ };
628
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
629
+ switch (errorCode) {
630
+ case "InvalidArnException":
631
+ case "com.amazonaws.acm#InvalidArnException":
632
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
633
+ case "InvalidDomainValidationOptionsException":
634
+ case "com.amazonaws.acm#InvalidDomainValidationOptionsException":
635
+ throw await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context);
636
+ case "InvalidParameterException":
637
+ case "com.amazonaws.acm#InvalidParameterException":
638
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
639
+ case "InvalidTagException":
640
+ case "com.amazonaws.acm#InvalidTagException":
641
+ throw await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context);
642
+ case "LimitExceededException":
643
+ case "com.amazonaws.acm#LimitExceededException":
644
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
645
+ case "TagPolicyException":
646
+ case "com.amazonaws.acm#TagPolicyException":
647
+ throw await deserializeAws_json1_1TagPolicyExceptionResponse(parsedOutput, context);
648
+ case "TooManyTagsException":
649
+ case "com.amazonaws.acm#TooManyTagsException":
650
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
651
+ default:
652
+ const parsedBody = parsedOutput.body;
653
+ throwDefaultError({
654
+ output,
655
+ parsedBody,
656
+ exceptionCtor: __BaseException,
657
+ errorCode,
658
+ });
659
+ }
660
+ };
661
+ export const deserializeAws_json1_1ResendValidationEmailCommand = async (output, context) => {
662
+ if (output.statusCode >= 300) {
663
+ return deserializeAws_json1_1ResendValidationEmailCommandError(output, context);
664
+ }
665
+ await collectBody(output.body, context);
666
+ const response = {
667
+ $metadata: deserializeMetadata(output),
668
+ };
669
+ return Promise.resolve(response);
670
+ };
671
+ const deserializeAws_json1_1ResendValidationEmailCommandError = async (output, context) => {
672
+ const parsedOutput = {
673
+ ...output,
674
+ body: await parseErrorBody(output.body, context),
675
+ };
676
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
677
+ switch (errorCode) {
678
+ case "InvalidArnException":
679
+ case "com.amazonaws.acm#InvalidArnException":
680
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
681
+ case "InvalidDomainValidationOptionsException":
682
+ case "com.amazonaws.acm#InvalidDomainValidationOptionsException":
683
+ throw await deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse(parsedOutput, context);
684
+ case "InvalidStateException":
685
+ case "com.amazonaws.acm#InvalidStateException":
686
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
687
+ case "ResourceNotFoundException":
688
+ case "com.amazonaws.acm#ResourceNotFoundException":
689
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
690
+ default:
691
+ const parsedBody = parsedOutput.body;
692
+ throwDefaultError({
693
+ output,
694
+ parsedBody,
695
+ exceptionCtor: __BaseException,
696
+ errorCode,
697
+ });
698
+ }
699
+ };
700
+ export const deserializeAws_json1_1UpdateCertificateOptionsCommand = async (output, context) => {
701
+ if (output.statusCode >= 300) {
702
+ return deserializeAws_json1_1UpdateCertificateOptionsCommandError(output, context);
703
+ }
704
+ await collectBody(output.body, context);
705
+ const response = {
706
+ $metadata: deserializeMetadata(output),
707
+ };
708
+ return Promise.resolve(response);
1250
709
  };
1251
- var serializeAws_json1_1CertificateOptions = function (input, context) {
1252
- return __assign({}, (input.CertificateTransparencyLoggingPreference != null && {
1253
- CertificateTransparencyLoggingPreference: input.CertificateTransparencyLoggingPreference,
1254
- }));
710
+ const deserializeAws_json1_1UpdateCertificateOptionsCommandError = async (output, context) => {
711
+ const parsedOutput = {
712
+ ...output,
713
+ body: await parseErrorBody(output.body, context),
714
+ };
715
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
716
+ switch (errorCode) {
717
+ case "InvalidArnException":
718
+ case "com.amazonaws.acm#InvalidArnException":
719
+ throw await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context);
720
+ case "InvalidStateException":
721
+ case "com.amazonaws.acm#InvalidStateException":
722
+ throw await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context);
723
+ case "LimitExceededException":
724
+ case "com.amazonaws.acm#LimitExceededException":
725
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
726
+ case "ResourceNotFoundException":
727
+ case "com.amazonaws.acm#ResourceNotFoundException":
728
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
729
+ default:
730
+ const parsedBody = parsedOutput.body;
731
+ throwDefaultError({
732
+ output,
733
+ parsedBody,
734
+ exceptionCtor: __BaseException,
735
+ errorCode,
736
+ });
737
+ }
738
+ };
739
+ const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
740
+ const body = parsedOutput.body;
741
+ const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
742
+ const exception = new AccessDeniedException({
743
+ $metadata: deserializeMetadata(parsedOutput),
744
+ ...deserialized,
745
+ });
746
+ return __decorateServiceException(exception, body);
747
+ };
748
+ const deserializeAws_json1_1ConflictExceptionResponse = async (parsedOutput, context) => {
749
+ const body = parsedOutput.body;
750
+ const deserialized = deserializeAws_json1_1ConflictException(body, context);
751
+ const exception = new ConflictException({
752
+ $metadata: deserializeMetadata(parsedOutput),
753
+ ...deserialized,
754
+ });
755
+ return __decorateServiceException(exception, body);
756
+ };
757
+ const deserializeAws_json1_1InvalidArgsExceptionResponse = async (parsedOutput, context) => {
758
+ const body = parsedOutput.body;
759
+ const deserialized = deserializeAws_json1_1InvalidArgsException(body, context);
760
+ const exception = new InvalidArgsException({
761
+ $metadata: deserializeMetadata(parsedOutput),
762
+ ...deserialized,
763
+ });
764
+ return __decorateServiceException(exception, body);
765
+ };
766
+ const deserializeAws_json1_1InvalidArnExceptionResponse = async (parsedOutput, context) => {
767
+ const body = parsedOutput.body;
768
+ const deserialized = deserializeAws_json1_1InvalidArnException(body, context);
769
+ const exception = new InvalidArnException({
770
+ $metadata: deserializeMetadata(parsedOutput),
771
+ ...deserialized,
772
+ });
773
+ return __decorateServiceException(exception, body);
774
+ };
775
+ const deserializeAws_json1_1InvalidDomainValidationOptionsExceptionResponse = async (parsedOutput, context) => {
776
+ const body = parsedOutput.body;
777
+ const deserialized = deserializeAws_json1_1InvalidDomainValidationOptionsException(body, context);
778
+ const exception = new InvalidDomainValidationOptionsException({
779
+ $metadata: deserializeMetadata(parsedOutput),
780
+ ...deserialized,
781
+ });
782
+ return __decorateServiceException(exception, body);
783
+ };
784
+ const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
785
+ const body = parsedOutput.body;
786
+ const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
787
+ const exception = new InvalidParameterException({
788
+ $metadata: deserializeMetadata(parsedOutput),
789
+ ...deserialized,
790
+ });
791
+ return __decorateServiceException(exception, body);
792
+ };
793
+ const deserializeAws_json1_1InvalidStateExceptionResponse = async (parsedOutput, context) => {
794
+ const body = parsedOutput.body;
795
+ const deserialized = deserializeAws_json1_1InvalidStateException(body, context);
796
+ const exception = new InvalidStateException({
797
+ $metadata: deserializeMetadata(parsedOutput),
798
+ ...deserialized,
799
+ });
800
+ return __decorateServiceException(exception, body);
801
+ };
802
+ const deserializeAws_json1_1InvalidTagExceptionResponse = async (parsedOutput, context) => {
803
+ const body = parsedOutput.body;
804
+ const deserialized = deserializeAws_json1_1InvalidTagException(body, context);
805
+ const exception = new InvalidTagException({
806
+ $metadata: deserializeMetadata(parsedOutput),
807
+ ...deserialized,
808
+ });
809
+ return __decorateServiceException(exception, body);
810
+ };
811
+ const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
812
+ const body = parsedOutput.body;
813
+ const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
814
+ const exception = new LimitExceededException({
815
+ $metadata: deserializeMetadata(parsedOutput),
816
+ ...deserialized,
817
+ });
818
+ return __decorateServiceException(exception, body);
819
+ };
820
+ const deserializeAws_json1_1RequestInProgressExceptionResponse = async (parsedOutput, context) => {
821
+ const body = parsedOutput.body;
822
+ const deserialized = deserializeAws_json1_1RequestInProgressException(body, context);
823
+ const exception = new RequestInProgressException({
824
+ $metadata: deserializeMetadata(parsedOutput),
825
+ ...deserialized,
826
+ });
827
+ return __decorateServiceException(exception, body);
828
+ };
829
+ const deserializeAws_json1_1ResourceInUseExceptionResponse = async (parsedOutput, context) => {
830
+ const body = parsedOutput.body;
831
+ const deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
832
+ const exception = new ResourceInUseException({
833
+ $metadata: deserializeMetadata(parsedOutput),
834
+ ...deserialized,
835
+ });
836
+ return __decorateServiceException(exception, body);
837
+ };
838
+ const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
839
+ const body = parsedOutput.body;
840
+ const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
841
+ const exception = new ResourceNotFoundException({
842
+ $metadata: deserializeMetadata(parsedOutput),
843
+ ...deserialized,
844
+ });
845
+ return __decorateServiceException(exception, body);
846
+ };
847
+ const deserializeAws_json1_1TagPolicyExceptionResponse = async (parsedOutput, context) => {
848
+ const body = parsedOutput.body;
849
+ const deserialized = deserializeAws_json1_1TagPolicyException(body, context);
850
+ const exception = new TagPolicyException({
851
+ $metadata: deserializeMetadata(parsedOutput),
852
+ ...deserialized,
853
+ });
854
+ return __decorateServiceException(exception, body);
855
+ };
856
+ const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
857
+ const body = parsedOutput.body;
858
+ const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
859
+ const exception = new ThrottlingException({
860
+ $metadata: deserializeMetadata(parsedOutput),
861
+ ...deserialized,
862
+ });
863
+ return __decorateServiceException(exception, body);
864
+ };
865
+ const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
866
+ const body = parsedOutput.body;
867
+ const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
868
+ const exception = new TooManyTagsException({
869
+ $metadata: deserializeMetadata(parsedOutput),
870
+ ...deserialized,
871
+ });
872
+ return __decorateServiceException(exception, body);
873
+ };
874
+ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
875
+ const body = parsedOutput.body;
876
+ const deserialized = deserializeAws_json1_1ValidationException(body, context);
877
+ const exception = new ValidationException({
878
+ $metadata: deserializeMetadata(parsedOutput),
879
+ ...deserialized,
880
+ });
881
+ return __decorateServiceException(exception, body);
882
+ };
883
+ const serializeAws_json1_1AddTagsToCertificateRequest = (input, context) => {
884
+ return {
885
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
886
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
887
+ };
888
+ };
889
+ const serializeAws_json1_1CertificateOptions = (input, context) => {
890
+ return {
891
+ ...(input.CertificateTransparencyLoggingPreference != null && {
892
+ CertificateTransparencyLoggingPreference: input.CertificateTransparencyLoggingPreference,
893
+ }),
894
+ };
1255
895
  };
1256
- var serializeAws_json1_1CertificateStatuses = function (input, context) {
896
+ const serializeAws_json1_1CertificateStatuses = (input, context) => {
1257
897
  return input
1258
- .filter(function (e) { return e != null; })
1259
- .map(function (entry) {
898
+ .filter((e) => e != null)
899
+ .map((entry) => {
1260
900
  return entry;
1261
901
  });
1262
902
  };
1263
- var serializeAws_json1_1DeleteCertificateRequest = function (input, context) {
1264
- return __assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn }));
903
+ const serializeAws_json1_1DeleteCertificateRequest = (input, context) => {
904
+ return {
905
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
906
+ };
1265
907
  };
1266
- var serializeAws_json1_1DescribeCertificateRequest = function (input, context) {
1267
- return __assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn }));
908
+ const serializeAws_json1_1DescribeCertificateRequest = (input, context) => {
909
+ return {
910
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
911
+ };
1268
912
  };
1269
- var serializeAws_json1_1DomainList = function (input, context) {
913
+ const serializeAws_json1_1DomainList = (input, context) => {
1270
914
  return input
1271
- .filter(function (e) { return e != null; })
1272
- .map(function (entry) {
915
+ .filter((e) => e != null)
916
+ .map((entry) => {
1273
917
  return entry;
1274
918
  });
1275
919
  };
1276
- var serializeAws_json1_1DomainValidationOption = function (input, context) {
1277
- return __assign(__assign({}, (input.DomainName != null && { DomainName: input.DomainName })), (input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }));
920
+ const serializeAws_json1_1DomainValidationOption = (input, context) => {
921
+ return {
922
+ ...(input.DomainName != null && { DomainName: input.DomainName }),
923
+ ...(input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }),
924
+ };
1278
925
  };
1279
- var serializeAws_json1_1DomainValidationOptionList = function (input, context) {
926
+ const serializeAws_json1_1DomainValidationOptionList = (input, context) => {
1280
927
  return input
1281
- .filter(function (e) { return e != null; })
1282
- .map(function (entry) {
928
+ .filter((e) => e != null)
929
+ .map((entry) => {
1283
930
  return serializeAws_json1_1DomainValidationOption(entry, context);
1284
931
  });
1285
932
  };
1286
- var serializeAws_json1_1ExpiryEventsConfiguration = function (input, context) {
1287
- return __assign({}, (input.DaysBeforeExpiry != null && { DaysBeforeExpiry: input.DaysBeforeExpiry }));
933
+ const serializeAws_json1_1ExpiryEventsConfiguration = (input, context) => {
934
+ return {
935
+ ...(input.DaysBeforeExpiry != null && { DaysBeforeExpiry: input.DaysBeforeExpiry }),
936
+ };
1288
937
  };
1289
- var serializeAws_json1_1ExportCertificateRequest = function (input, context) {
1290
- return __assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.Passphrase != null && { Passphrase: context.base64Encoder(input.Passphrase) }));
938
+ const serializeAws_json1_1ExportCertificateRequest = (input, context) => {
939
+ return {
940
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
941
+ ...(input.Passphrase != null && { Passphrase: context.base64Encoder(input.Passphrase) }),
942
+ };
1291
943
  };
1292
- var serializeAws_json1_1ExtendedKeyUsageFilterList = function (input, context) {
944
+ const serializeAws_json1_1ExtendedKeyUsageFilterList = (input, context) => {
1293
945
  return input
1294
- .filter(function (e) { return e != null; })
1295
- .map(function (entry) {
946
+ .filter((e) => e != null)
947
+ .map((entry) => {
1296
948
  return entry;
1297
949
  });
1298
950
  };
1299
- var serializeAws_json1_1Filters = function (input, context) {
1300
- return __assign(__assign(__assign({}, (input.extendedKeyUsage != null && {
1301
- extendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageFilterList(input.extendedKeyUsage, context),
1302
- })), (input.keyTypes != null && { keyTypes: serializeAws_json1_1KeyAlgorithmList(input.keyTypes, context) })), (input.keyUsage != null && { keyUsage: serializeAws_json1_1KeyUsageFilterList(input.keyUsage, context) }));
951
+ const serializeAws_json1_1Filters = (input, context) => {
952
+ return {
953
+ ...(input.extendedKeyUsage != null && {
954
+ extendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageFilterList(input.extendedKeyUsage, context),
955
+ }),
956
+ ...(input.keyTypes != null && { keyTypes: serializeAws_json1_1KeyAlgorithmList(input.keyTypes, context) }),
957
+ ...(input.keyUsage != null && { keyUsage: serializeAws_json1_1KeyUsageFilterList(input.keyUsage, context) }),
958
+ };
1303
959
  };
1304
- var serializeAws_json1_1GetCertificateRequest = function (input, context) {
1305
- return __assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn }));
960
+ const serializeAws_json1_1GetCertificateRequest = (input, context) => {
961
+ return {
962
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
963
+ };
1306
964
  };
1307
- var serializeAws_json1_1ImportCertificateRequest = function (input, context) {
1308
- return __assign(__assign(__assign(__assign(__assign({}, (input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) })), (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) })), (input.PrivateKey != null && { PrivateKey: context.base64Encoder(input.PrivateKey) })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
965
+ const serializeAws_json1_1ImportCertificateRequest = (input, context) => {
966
+ return {
967
+ ...(input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) }),
968
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
969
+ ...(input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }),
970
+ ...(input.PrivateKey != null && { PrivateKey: context.base64Encoder(input.PrivateKey) }),
971
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
972
+ };
1309
973
  };
1310
- var serializeAws_json1_1KeyAlgorithmList = function (input, context) {
974
+ const serializeAws_json1_1KeyAlgorithmList = (input, context) => {
1311
975
  return input
1312
- .filter(function (e) { return e != null; })
1313
- .map(function (entry) {
976
+ .filter((e) => e != null)
977
+ .map((entry) => {
1314
978
  return entry;
1315
979
  });
1316
980
  };
1317
- var serializeAws_json1_1KeyUsageFilterList = function (input, context) {
981
+ const serializeAws_json1_1KeyUsageFilterList = (input, context) => {
1318
982
  return input
1319
- .filter(function (e) { return e != null; })
1320
- .map(function (entry) {
983
+ .filter((e) => e != null)
984
+ .map((entry) => {
1321
985
  return entry;
1322
986
  });
1323
987
  };
1324
- var serializeAws_json1_1ListCertificatesRequest = function (input, context) {
1325
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.CertificateStatuses != null && {
1326
- CertificateStatuses: serializeAws_json1_1CertificateStatuses(input.CertificateStatuses, context),
1327
- })), (input.Includes != null && { Includes: serializeAws_json1_1Filters(input.Includes, context) })), (input.MaxItems != null && { MaxItems: input.MaxItems })), (input.NextToken != null && { NextToken: input.NextToken })), (input.SortBy != null && { SortBy: input.SortBy })), (input.SortOrder != null && { SortOrder: input.SortOrder }));
988
+ const serializeAws_json1_1ListCertificatesRequest = (input, context) => {
989
+ return {
990
+ ...(input.CertificateStatuses != null && {
991
+ CertificateStatuses: serializeAws_json1_1CertificateStatuses(input.CertificateStatuses, context),
992
+ }),
993
+ ...(input.Includes != null && { Includes: serializeAws_json1_1Filters(input.Includes, context) }),
994
+ ...(input.MaxItems != null && { MaxItems: input.MaxItems }),
995
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
996
+ ...(input.SortBy != null && { SortBy: input.SortBy }),
997
+ ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
998
+ };
1328
999
  };
1329
- var serializeAws_json1_1ListTagsForCertificateRequest = function (input, context) {
1330
- return __assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn }));
1000
+ const serializeAws_json1_1ListTagsForCertificateRequest = (input, context) => {
1001
+ return {
1002
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1003
+ };
1331
1004
  };
1332
- var serializeAws_json1_1PutAccountConfigurationRequest = function (input, context) {
1333
- return __assign(__assign({}, (input.ExpiryEvents != null && {
1334
- ExpiryEvents: serializeAws_json1_1ExpiryEventsConfiguration(input.ExpiryEvents, context),
1335
- })), (input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }));
1005
+ const serializeAws_json1_1PutAccountConfigurationRequest = (input, context) => {
1006
+ return {
1007
+ ...(input.ExpiryEvents != null && {
1008
+ ExpiryEvents: serializeAws_json1_1ExpiryEventsConfiguration(input.ExpiryEvents, context),
1009
+ }),
1010
+ ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1011
+ };
1336
1012
  };
1337
- var serializeAws_json1_1RemoveTagsFromCertificateRequest = function (input, context) {
1338
- return __assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
1013
+ const serializeAws_json1_1RemoveTagsFromCertificateRequest = (input, context) => {
1014
+ return {
1015
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1016
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1017
+ };
1339
1018
  };
1340
- var serializeAws_json1_1RenewCertificateRequest = function (input, context) {
1341
- return __assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn }));
1019
+ const serializeAws_json1_1RenewCertificateRequest = (input, context) => {
1020
+ return {
1021
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1022
+ };
1342
1023
  };
1343
- var serializeAws_json1_1RequestCertificateRequest = function (input, context) {
1344
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn })), (input.DomainName != null && { DomainName: input.DomainName })), (input.DomainValidationOptions != null && {
1345
- DomainValidationOptions: serializeAws_json1_1DomainValidationOptionList(input.DomainValidationOptions, context),
1346
- })), (input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken })), (input.Options != null && { Options: serializeAws_json1_1CertificateOptions(input.Options, context) })), (input.SubjectAlternativeNames != null && {
1347
- SubjectAlternativeNames: serializeAws_json1_1DomainList(input.SubjectAlternativeNames, context),
1348
- })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.ValidationMethod != null && { ValidationMethod: input.ValidationMethod }));
1024
+ const serializeAws_json1_1RequestCertificateRequest = (input, context) => {
1025
+ return {
1026
+ ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
1027
+ ...(input.DomainName != null && { DomainName: input.DomainName }),
1028
+ ...(input.DomainValidationOptions != null && {
1029
+ DomainValidationOptions: serializeAws_json1_1DomainValidationOptionList(input.DomainValidationOptions, context),
1030
+ }),
1031
+ ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }),
1032
+ ...(input.Options != null && { Options: serializeAws_json1_1CertificateOptions(input.Options, context) }),
1033
+ ...(input.SubjectAlternativeNames != null && {
1034
+ SubjectAlternativeNames: serializeAws_json1_1DomainList(input.SubjectAlternativeNames, context),
1035
+ }),
1036
+ ...(input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
1037
+ ...(input.ValidationMethod != null && { ValidationMethod: input.ValidationMethod }),
1038
+ };
1349
1039
  };
1350
- var serializeAws_json1_1ResendValidationEmailRequest = function (input, context) {
1351
- return __assign(__assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.Domain != null && { Domain: input.Domain })), (input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }));
1040
+ const serializeAws_json1_1ResendValidationEmailRequest = (input, context) => {
1041
+ return {
1042
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1043
+ ...(input.Domain != null && { Domain: input.Domain }),
1044
+ ...(input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }),
1045
+ };
1352
1046
  };
1353
- var serializeAws_json1_1Tag = function (input, context) {
1354
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1047
+ const serializeAws_json1_1Tag = (input, context) => {
1048
+ return {
1049
+ ...(input.Key != null && { Key: input.Key }),
1050
+ ...(input.Value != null && { Value: input.Value }),
1051
+ };
1355
1052
  };
1356
- var serializeAws_json1_1TagList = function (input, context) {
1053
+ const serializeAws_json1_1TagList = (input, context) => {
1357
1054
  return input
1358
- .filter(function (e) { return e != null; })
1359
- .map(function (entry) {
1055
+ .filter((e) => e != null)
1056
+ .map((entry) => {
1360
1057
  return serializeAws_json1_1Tag(entry, context);
1361
1058
  });
1362
1059
  };
1363
- var serializeAws_json1_1UpdateCertificateOptionsRequest = function (input, context) {
1364
- return __assign(__assign({}, (input.CertificateArn != null && { CertificateArn: input.CertificateArn })), (input.Options != null && { Options: serializeAws_json1_1CertificateOptions(input.Options, context) }));
1060
+ const serializeAws_json1_1UpdateCertificateOptionsRequest = (input, context) => {
1061
+ return {
1062
+ ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
1063
+ ...(input.Options != null && { Options: serializeAws_json1_1CertificateOptions(input.Options, context) }),
1064
+ };
1365
1065
  };
1366
- var deserializeAws_json1_1AccessDeniedException = function (output, context) {
1066
+ const deserializeAws_json1_1AccessDeniedException = (output, context) => {
1367
1067
  return {
1368
1068
  Message: __expectString(output.Message),
1369
1069
  };
1370
1070
  };
1371
- var deserializeAws_json1_1CertificateDetail = function (output, context) {
1071
+ const deserializeAws_json1_1CertificateDetail = (output, context) => {
1372
1072
  return {
1373
1073
  CertificateArn: __expectString(output.CertificateArn),
1374
1074
  CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
@@ -1404,12 +1104,12 @@ var deserializeAws_json1_1CertificateDetail = function (output, context) {
1404
1104
  Type: __expectString(output.Type),
1405
1105
  };
1406
1106
  };
1407
- var deserializeAws_json1_1CertificateOptions = function (output, context) {
1107
+ const deserializeAws_json1_1CertificateOptions = (output, context) => {
1408
1108
  return {
1409
1109
  CertificateTransparencyLoggingPreference: __expectString(output.CertificateTransparencyLoggingPreference),
1410
1110
  };
1411
1111
  };
1412
- var deserializeAws_json1_1CertificateSummary = function (output, context) {
1112
+ const deserializeAws_json1_1CertificateSummary = (output, context) => {
1413
1113
  return {
1414
1114
  CertificateArn: __expectString(output.CertificateArn),
1415
1115
  CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
@@ -1435,10 +1135,10 @@ var deserializeAws_json1_1CertificateSummary = function (output, context) {
1435
1135
  Type: __expectString(output.Type),
1436
1136
  };
1437
1137
  };
1438
- var deserializeAws_json1_1CertificateSummaryList = function (output, context) {
1439
- var retVal = (output || [])
1440
- .filter(function (e) { return e != null; })
1441
- .map(function (entry) {
1138
+ const deserializeAws_json1_1CertificateSummaryList = (output, context) => {
1139
+ const retVal = (output || [])
1140
+ .filter((e) => e != null)
1141
+ .map((entry) => {
1442
1142
  if (entry === null) {
1443
1143
  return null;
1444
1144
  }
@@ -1446,20 +1146,20 @@ var deserializeAws_json1_1CertificateSummaryList = function (output, context) {
1446
1146
  });
1447
1147
  return retVal;
1448
1148
  };
1449
- var deserializeAws_json1_1ConflictException = function (output, context) {
1149
+ const deserializeAws_json1_1ConflictException = (output, context) => {
1450
1150
  return {
1451
1151
  message: __expectString(output.message),
1452
1152
  };
1453
1153
  };
1454
- var deserializeAws_json1_1DescribeCertificateResponse = function (output, context) {
1154
+ const deserializeAws_json1_1DescribeCertificateResponse = (output, context) => {
1455
1155
  return {
1456
1156
  Certificate: output.Certificate != null ? deserializeAws_json1_1CertificateDetail(output.Certificate, context) : undefined,
1457
1157
  };
1458
1158
  };
1459
- var deserializeAws_json1_1DomainList = function (output, context) {
1460
- var retVal = (output || [])
1461
- .filter(function (e) { return e != null; })
1462
- .map(function (entry) {
1159
+ const deserializeAws_json1_1DomainList = (output, context) => {
1160
+ const retVal = (output || [])
1161
+ .filter((e) => e != null)
1162
+ .map((entry) => {
1463
1163
  if (entry === null) {
1464
1164
  return null;
1465
1165
  }
@@ -1467,7 +1167,7 @@ var deserializeAws_json1_1DomainList = function (output, context) {
1467
1167
  });
1468
1168
  return retVal;
1469
1169
  };
1470
- var deserializeAws_json1_1DomainValidation = function (output, context) {
1170
+ const deserializeAws_json1_1DomainValidation = (output, context) => {
1471
1171
  return {
1472
1172
  DomainName: __expectString(output.DomainName),
1473
1173
  ResourceRecord: output.ResourceRecord != null ? deserializeAws_json1_1ResourceRecord(output.ResourceRecord, context) : undefined,
@@ -1479,10 +1179,10 @@ var deserializeAws_json1_1DomainValidation = function (output, context) {
1479
1179
  ValidationStatus: __expectString(output.ValidationStatus),
1480
1180
  };
1481
1181
  };
1482
- var deserializeAws_json1_1DomainValidationList = function (output, context) {
1483
- var retVal = (output || [])
1484
- .filter(function (e) { return e != null; })
1485
- .map(function (entry) {
1182
+ const deserializeAws_json1_1DomainValidationList = (output, context) => {
1183
+ const retVal = (output || [])
1184
+ .filter((e) => e != null)
1185
+ .map((entry) => {
1486
1186
  if (entry === null) {
1487
1187
  return null;
1488
1188
  }
@@ -1490,28 +1190,28 @@ var deserializeAws_json1_1DomainValidationList = function (output, context) {
1490
1190
  });
1491
1191
  return retVal;
1492
1192
  };
1493
- var deserializeAws_json1_1ExpiryEventsConfiguration = function (output, context) {
1193
+ const deserializeAws_json1_1ExpiryEventsConfiguration = (output, context) => {
1494
1194
  return {
1495
1195
  DaysBeforeExpiry: __expectInt32(output.DaysBeforeExpiry),
1496
1196
  };
1497
1197
  };
1498
- var deserializeAws_json1_1ExportCertificateResponse = function (output, context) {
1198
+ const deserializeAws_json1_1ExportCertificateResponse = (output, context) => {
1499
1199
  return {
1500
1200
  Certificate: __expectString(output.Certificate),
1501
1201
  CertificateChain: __expectString(output.CertificateChain),
1502
1202
  PrivateKey: __expectString(output.PrivateKey),
1503
1203
  };
1504
1204
  };
1505
- var deserializeAws_json1_1ExtendedKeyUsage = function (output, context) {
1205
+ const deserializeAws_json1_1ExtendedKeyUsage = (output, context) => {
1506
1206
  return {
1507
1207
  Name: __expectString(output.Name),
1508
1208
  OID: __expectString(output.OID),
1509
1209
  };
1510
1210
  };
1511
- var deserializeAws_json1_1ExtendedKeyUsageList = function (output, context) {
1512
- var retVal = (output || [])
1513
- .filter(function (e) { return e != null; })
1514
- .map(function (entry) {
1211
+ const deserializeAws_json1_1ExtendedKeyUsageList = (output, context) => {
1212
+ const retVal = (output || [])
1213
+ .filter((e) => e != null)
1214
+ .map((entry) => {
1515
1215
  if (entry === null) {
1516
1216
  return null;
1517
1217
  }
@@ -1519,10 +1219,10 @@ var deserializeAws_json1_1ExtendedKeyUsageList = function (output, context) {
1519
1219
  });
1520
1220
  return retVal;
1521
1221
  };
1522
- var deserializeAws_json1_1ExtendedKeyUsageNames = function (output, context) {
1523
- var retVal = (output || [])
1524
- .filter(function (e) { return e != null; })
1525
- .map(function (entry) {
1222
+ const deserializeAws_json1_1ExtendedKeyUsageNames = (output, context) => {
1223
+ const retVal = (output || [])
1224
+ .filter((e) => e != null)
1225
+ .map((entry) => {
1526
1226
  if (entry === null) {
1527
1227
  return null;
1528
1228
  }
@@ -1530,28 +1230,28 @@ var deserializeAws_json1_1ExtendedKeyUsageNames = function (output, context) {
1530
1230
  });
1531
1231
  return retVal;
1532
1232
  };
1533
- var deserializeAws_json1_1GetAccountConfigurationResponse = function (output, context) {
1233
+ const deserializeAws_json1_1GetAccountConfigurationResponse = (output, context) => {
1534
1234
  return {
1535
1235
  ExpiryEvents: output.ExpiryEvents != null
1536
1236
  ? deserializeAws_json1_1ExpiryEventsConfiguration(output.ExpiryEvents, context)
1537
1237
  : undefined,
1538
1238
  };
1539
1239
  };
1540
- var deserializeAws_json1_1GetCertificateResponse = function (output, context) {
1240
+ const deserializeAws_json1_1GetCertificateResponse = (output, context) => {
1541
1241
  return {
1542
1242
  Certificate: __expectString(output.Certificate),
1543
1243
  CertificateChain: __expectString(output.CertificateChain),
1544
1244
  };
1545
1245
  };
1546
- var deserializeAws_json1_1ImportCertificateResponse = function (output, context) {
1246
+ const deserializeAws_json1_1ImportCertificateResponse = (output, context) => {
1547
1247
  return {
1548
1248
  CertificateArn: __expectString(output.CertificateArn),
1549
1249
  };
1550
1250
  };
1551
- var deserializeAws_json1_1InUseList = function (output, context) {
1552
- var retVal = (output || [])
1553
- .filter(function (e) { return e != null; })
1554
- .map(function (entry) {
1251
+ const deserializeAws_json1_1InUseList = (output, context) => {
1252
+ const retVal = (output || [])
1253
+ .filter((e) => e != null)
1254
+ .map((entry) => {
1555
1255
  if (entry === null) {
1556
1256
  return null;
1557
1257
  }
@@ -1559,45 +1259,45 @@ var deserializeAws_json1_1InUseList = function (output, context) {
1559
1259
  });
1560
1260
  return retVal;
1561
1261
  };
1562
- var deserializeAws_json1_1InvalidArgsException = function (output, context) {
1262
+ const deserializeAws_json1_1InvalidArgsException = (output, context) => {
1563
1263
  return {
1564
1264
  message: __expectString(output.message),
1565
1265
  };
1566
1266
  };
1567
- var deserializeAws_json1_1InvalidArnException = function (output, context) {
1267
+ const deserializeAws_json1_1InvalidArnException = (output, context) => {
1568
1268
  return {
1569
1269
  message: __expectString(output.message),
1570
1270
  };
1571
1271
  };
1572
- var deserializeAws_json1_1InvalidDomainValidationOptionsException = function (output, context) {
1272
+ const deserializeAws_json1_1InvalidDomainValidationOptionsException = (output, context) => {
1573
1273
  return {
1574
1274
  message: __expectString(output.message),
1575
1275
  };
1576
1276
  };
1577
- var deserializeAws_json1_1InvalidParameterException = function (output, context) {
1277
+ const deserializeAws_json1_1InvalidParameterException = (output, context) => {
1578
1278
  return {
1579
1279
  message: __expectString(output.message),
1580
1280
  };
1581
1281
  };
1582
- var deserializeAws_json1_1InvalidStateException = function (output, context) {
1282
+ const deserializeAws_json1_1InvalidStateException = (output, context) => {
1583
1283
  return {
1584
1284
  message: __expectString(output.message),
1585
1285
  };
1586
1286
  };
1587
- var deserializeAws_json1_1InvalidTagException = function (output, context) {
1287
+ const deserializeAws_json1_1InvalidTagException = (output, context) => {
1588
1288
  return {
1589
1289
  message: __expectString(output.message),
1590
1290
  };
1591
1291
  };
1592
- var deserializeAws_json1_1KeyUsage = function (output, context) {
1292
+ const deserializeAws_json1_1KeyUsage = (output, context) => {
1593
1293
  return {
1594
1294
  Name: __expectString(output.Name),
1595
1295
  };
1596
1296
  };
1597
- var deserializeAws_json1_1KeyUsageList = function (output, context) {
1598
- var retVal = (output || [])
1599
- .filter(function (e) { return e != null; })
1600
- .map(function (entry) {
1297
+ const deserializeAws_json1_1KeyUsageList = (output, context) => {
1298
+ const retVal = (output || [])
1299
+ .filter((e) => e != null)
1300
+ .map((entry) => {
1601
1301
  if (entry === null) {
1602
1302
  return null;
1603
1303
  }
@@ -1605,10 +1305,10 @@ var deserializeAws_json1_1KeyUsageList = function (output, context) {
1605
1305
  });
1606
1306
  return retVal;
1607
1307
  };
1608
- var deserializeAws_json1_1KeyUsageNames = function (output, context) {
1609
- var retVal = (output || [])
1610
- .filter(function (e) { return e != null; })
1611
- .map(function (entry) {
1308
+ const deserializeAws_json1_1KeyUsageNames = (output, context) => {
1309
+ const retVal = (output || [])
1310
+ .filter((e) => e != null)
1311
+ .map((entry) => {
1612
1312
  if (entry === null) {
1613
1313
  return null;
1614
1314
  }
@@ -1616,12 +1316,12 @@ var deserializeAws_json1_1KeyUsageNames = function (output, context) {
1616
1316
  });
1617
1317
  return retVal;
1618
1318
  };
1619
- var deserializeAws_json1_1LimitExceededException = function (output, context) {
1319
+ const deserializeAws_json1_1LimitExceededException = (output, context) => {
1620
1320
  return {
1621
1321
  message: __expectString(output.message),
1622
1322
  };
1623
1323
  };
1624
- var deserializeAws_json1_1ListCertificatesResponse = function (output, context) {
1324
+ const deserializeAws_json1_1ListCertificatesResponse = (output, context) => {
1625
1325
  return {
1626
1326
  CertificateSummaryList: output.CertificateSummaryList != null
1627
1327
  ? deserializeAws_json1_1CertificateSummaryList(output.CertificateSummaryList, context)
@@ -1629,12 +1329,12 @@ var deserializeAws_json1_1ListCertificatesResponse = function (output, context)
1629
1329
  NextToken: __expectString(output.NextToken),
1630
1330
  };
1631
1331
  };
1632
- var deserializeAws_json1_1ListTagsForCertificateResponse = function (output, context) {
1332
+ const deserializeAws_json1_1ListTagsForCertificateResponse = (output, context) => {
1633
1333
  return {
1634
1334
  Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
1635
1335
  };
1636
1336
  };
1637
- var deserializeAws_json1_1RenewalSummary = function (output, context) {
1337
+ const deserializeAws_json1_1RenewalSummary = (output, context) => {
1638
1338
  return {
1639
1339
  DomainValidationOptions: output.DomainValidationOptions != null
1640
1340
  ? deserializeAws_json1_1DomainValidationList(output.DomainValidationOptions, context)
@@ -1644,43 +1344,43 @@ var deserializeAws_json1_1RenewalSummary = function (output, context) {
1644
1344
  UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
1645
1345
  };
1646
1346
  };
1647
- var deserializeAws_json1_1RequestCertificateResponse = function (output, context) {
1347
+ const deserializeAws_json1_1RequestCertificateResponse = (output, context) => {
1648
1348
  return {
1649
1349
  CertificateArn: __expectString(output.CertificateArn),
1650
1350
  };
1651
1351
  };
1652
- var deserializeAws_json1_1RequestInProgressException = function (output, context) {
1352
+ const deserializeAws_json1_1RequestInProgressException = (output, context) => {
1653
1353
  return {
1654
1354
  message: __expectString(output.message),
1655
1355
  };
1656
1356
  };
1657
- var deserializeAws_json1_1ResourceInUseException = function (output, context) {
1357
+ const deserializeAws_json1_1ResourceInUseException = (output, context) => {
1658
1358
  return {
1659
1359
  message: __expectString(output.message),
1660
1360
  };
1661
1361
  };
1662
- var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
1362
+ const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
1663
1363
  return {
1664
1364
  message: __expectString(output.message),
1665
1365
  };
1666
1366
  };
1667
- var deserializeAws_json1_1ResourceRecord = function (output, context) {
1367
+ const deserializeAws_json1_1ResourceRecord = (output, context) => {
1668
1368
  return {
1669
1369
  Name: __expectString(output.Name),
1670
1370
  Type: __expectString(output.Type),
1671
1371
  Value: __expectString(output.Value),
1672
1372
  };
1673
1373
  };
1674
- var deserializeAws_json1_1Tag = function (output, context) {
1374
+ const deserializeAws_json1_1Tag = (output, context) => {
1675
1375
  return {
1676
1376
  Key: __expectString(output.Key),
1677
1377
  Value: __expectString(output.Value),
1678
1378
  };
1679
1379
  };
1680
- var deserializeAws_json1_1TagList = function (output, context) {
1681
- var retVal = (output || [])
1682
- .filter(function (e) { return e != null; })
1683
- .map(function (entry) {
1380
+ const deserializeAws_json1_1TagList = (output, context) => {
1381
+ const retVal = (output || [])
1382
+ .filter((e) => e != null)
1383
+ .map((entry) => {
1684
1384
  if (entry === null) {
1685
1385
  return null;
1686
1386
  }
@@ -1688,25 +1388,25 @@ var deserializeAws_json1_1TagList = function (output, context) {
1688
1388
  });
1689
1389
  return retVal;
1690
1390
  };
1691
- var deserializeAws_json1_1TagPolicyException = function (output, context) {
1391
+ const deserializeAws_json1_1TagPolicyException = (output, context) => {
1692
1392
  return {
1693
1393
  message: __expectString(output.message),
1694
1394
  };
1695
1395
  };
1696
- var deserializeAws_json1_1ThrottlingException = function (output, context) {
1396
+ const deserializeAws_json1_1ThrottlingException = (output, context) => {
1697
1397
  return {
1698
1398
  message: __expectString(output.message),
1699
1399
  };
1700
1400
  };
1701
- var deserializeAws_json1_1TooManyTagsException = function (output, context) {
1401
+ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
1702
1402
  return {
1703
1403
  message: __expectString(output.message),
1704
1404
  };
1705
1405
  };
1706
- var deserializeAws_json1_1ValidationEmailList = function (output, context) {
1707
- var retVal = (output || [])
1708
- .filter(function (e) { return e != null; })
1709
- .map(function (entry) {
1406
+ const deserializeAws_json1_1ValidationEmailList = (output, context) => {
1407
+ const retVal = (output || [])
1408
+ .filter((e) => e != null)
1409
+ .map((entry) => {
1710
1410
  if (entry === null) {
1711
1411
  return null;
1712
1412
  }
@@ -1714,80 +1414,57 @@ var deserializeAws_json1_1ValidationEmailList = function (output, context) {
1714
1414
  });
1715
1415
  return retVal;
1716
1416
  };
1717
- var deserializeAws_json1_1ValidationException = function (output, context) {
1417
+ const deserializeAws_json1_1ValidationException = (output, context) => {
1718
1418
  return {
1719
1419
  message: __expectString(output.message),
1720
1420
  };
1721
1421
  };
1722
- var deserializeMetadata = function (output) {
1723
- var _a;
1724
- return ({
1725
- httpStatusCode: output.statusCode,
1726
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
1727
- extendedRequestId: output.headers["x-amz-id-2"],
1728
- cfId: output.headers["x-amz-cf-id"],
1729
- });
1730
- };
1731
- var collectBody = function (streamBody, context) {
1732
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
1422
+ const deserializeMetadata = (output) => ({
1423
+ httpStatusCode: output.statusCode,
1424
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1425
+ extendedRequestId: output.headers["x-amz-id-2"],
1426
+ cfId: output.headers["x-amz-cf-id"],
1427
+ });
1428
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1733
1429
  if (streamBody instanceof Uint8Array) {
1734
1430
  return Promise.resolve(streamBody);
1735
1431
  }
1736
1432
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1737
1433
  };
1738
- var collectBodyString = function (streamBody, context) {
1739
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1740
- };
1741
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1742
- var _a, hostname, _b, protocol, port, basePath, contents;
1743
- return __generator(this, function (_c) {
1744
- switch (_c.label) {
1745
- case 0: return [4, context.endpoint()];
1746
- case 1:
1747
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1748
- contents = {
1749
- protocol: protocol,
1750
- hostname: hostname,
1751
- port: port,
1752
- method: "POST",
1753
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1754
- headers: headers,
1755
- };
1756
- if (resolvedHostname !== undefined) {
1757
- contents.hostname = resolvedHostname;
1758
- }
1759
- if (body !== undefined) {
1760
- contents.body = body;
1761
- }
1762
- return [2, new __HttpRequest(contents)];
1763
- }
1764
- });
1765
- }); };
1766
- var parseBody = function (streamBody, context) {
1767
- return collectBodyString(streamBody, context).then(function (encoded) {
1768
- if (encoded.length) {
1769
- return JSON.parse(encoded);
1770
- }
1771
- return {};
1772
- });
1434
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1435
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1436
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1437
+ const contents = {
1438
+ protocol,
1439
+ hostname,
1440
+ port,
1441
+ method: "POST",
1442
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1443
+ headers,
1444
+ };
1445
+ if (resolvedHostname !== undefined) {
1446
+ contents.hostname = resolvedHostname;
1447
+ }
1448
+ if (body !== undefined) {
1449
+ contents.body = body;
1450
+ }
1451
+ return new __HttpRequest(contents);
1773
1452
  };
1774
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1775
- var value;
1776
- var _a;
1777
- return __generator(this, function (_b) {
1778
- switch (_b.label) {
1779
- case 0: return [4, parseBody(errorBody, context)];
1780
- case 1:
1781
- value = _b.sent();
1782
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1783
- return [2, value];
1784
- }
1785
- });
1786
- }); };
1787
- var loadRestJsonErrorCode = function (output, data) {
1788
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1789
- var sanitizeErrorCode = function (rawValue) {
1790
- var cleanValue = rawValue;
1453
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1454
+ if (encoded.length) {
1455
+ return JSON.parse(encoded);
1456
+ }
1457
+ return {};
1458
+ });
1459
+ const parseErrorBody = async (errorBody, context) => {
1460
+ const value = await parseBody(errorBody, context);
1461
+ value.message = value.message ?? value.Message;
1462
+ return value;
1463
+ };
1464
+ const loadRestJsonErrorCode = (output, data) => {
1465
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1466
+ const sanitizeErrorCode = (rawValue) => {
1467
+ let cleanValue = rawValue;
1791
1468
  if (typeof cleanValue === "number") {
1792
1469
  cleanValue = cleanValue.toString();
1793
1470
  }
@@ -1802,7 +1479,7 @@ var loadRestJsonErrorCode = function (output, data) {
1802
1479
  }
1803
1480
  return cleanValue;
1804
1481
  };
1805
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1482
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1806
1483
  if (headerKey !== undefined) {
1807
1484
  return sanitizeErrorCode(output.headers[headerKey]);
1808
1485
  }