@aws-sdk/client-cloudhsm 3.185.0 → 3.188.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist-es/CloudHSM.js +82 -89
- package/dist-es/CloudHSMClient.js +22 -28
- package/dist-es/commands/AddTagsToResourceCommand.js +21 -28
- package/dist-es/commands/CreateHapgCommand.js +21 -28
- package/dist-es/commands/CreateHsmCommand.js +21 -28
- package/dist-es/commands/CreateLunaClientCommand.js +21 -28
- package/dist-es/commands/DeleteHapgCommand.js +21 -28
- package/dist-es/commands/DeleteHsmCommand.js +21 -28
- package/dist-es/commands/DeleteLunaClientCommand.js +21 -28
- package/dist-es/commands/DescribeHapgCommand.js +21 -28
- package/dist-es/commands/DescribeHsmCommand.js +21 -28
- package/dist-es/commands/DescribeLunaClientCommand.js +21 -28
- package/dist-es/commands/GetConfigCommand.js +21 -28
- package/dist-es/commands/ListAvailableZonesCommand.js +21 -28
- package/dist-es/commands/ListHapgsCommand.js +21 -28
- package/dist-es/commands/ListHsmsCommand.js +21 -28
- package/dist-es/commands/ListLunaClientsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ModifyHapgCommand.js +21 -28
- package/dist-es/commands/ModifyHsmCommand.js +21 -28
- package/dist-es/commands/ModifyLunaClientCommand.js +21 -28
- package/dist-es/commands/RemoveTagsFromResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CloudHSMServiceException.js +5 -10
- package/dist-es/models/models_0.js +159 -78
- package/dist-es/protocols/Aws_json1_1.js +1192 -1591
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1529 +1,1153 @@
|
|
|
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, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { CloudHSMServiceException as __BaseException } from "../models/CloudHSMServiceException";
|
|
5
4
|
import { CloudHsmInternalException, CloudHsmServiceException, InvalidRequestException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
export
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
}); };
|
|
303
|
-
var deserializeAws_json1_1CreateHapgCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
305
|
-
var _c;
|
|
306
|
-
return __generator(this, function (_d) {
|
|
307
|
-
switch (_d.label) {
|
|
308
|
-
case 0:
|
|
309
|
-
_a = [__assign({}, output)];
|
|
310
|
-
_c = {};
|
|
311
|
-
return [4, parseErrorBody(output.body, context)];
|
|
312
|
-
case 1:
|
|
313
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
314
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
|
-
_b = errorCode;
|
|
316
|
-
switch (_b) {
|
|
317
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
318
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
319
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
320
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
321
|
-
case "InvalidRequestException": return [3, 6];
|
|
322
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
323
|
-
}
|
|
324
|
-
return [3, 8];
|
|
325
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
326
|
-
case 3: throw _d.sent();
|
|
327
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
328
|
-
case 5: throw _d.sent();
|
|
329
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
330
|
-
case 7: throw _d.sent();
|
|
331
|
-
case 8:
|
|
332
|
-
parsedBody = parsedOutput.body;
|
|
333
|
-
throwDefaultError({
|
|
334
|
-
output: output,
|
|
335
|
-
parsedBody: parsedBody,
|
|
336
|
-
exceptionCtor: __BaseException,
|
|
337
|
-
errorCode: errorCode,
|
|
338
|
-
});
|
|
339
|
-
_d.label = 9;
|
|
340
|
-
case 9: return [2];
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}); };
|
|
344
|
-
export var deserializeAws_json1_1CreateHsmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
345
|
-
var data, contents, response;
|
|
346
|
-
return __generator(this, function (_a) {
|
|
347
|
-
switch (_a.label) {
|
|
348
|
-
case 0:
|
|
349
|
-
if (output.statusCode >= 300) {
|
|
350
|
-
return [2, deserializeAws_json1_1CreateHsmCommandError(output, context)];
|
|
351
|
-
}
|
|
352
|
-
return [4, parseBody(output.body, context)];
|
|
353
|
-
case 1:
|
|
354
|
-
data = _a.sent();
|
|
355
|
-
contents = {};
|
|
356
|
-
contents = deserializeAws_json1_1CreateHsmResponse(data, context);
|
|
357
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
358
|
-
return [2, Promise.resolve(response)];
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
}); };
|
|
362
|
-
var deserializeAws_json1_1CreateHsmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
363
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
364
|
-
var _c;
|
|
365
|
-
return __generator(this, function (_d) {
|
|
366
|
-
switch (_d.label) {
|
|
367
|
-
case 0:
|
|
368
|
-
_a = [__assign({}, output)];
|
|
369
|
-
_c = {};
|
|
370
|
-
return [4, parseErrorBody(output.body, context)];
|
|
371
|
-
case 1:
|
|
372
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
373
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
374
|
-
_b = errorCode;
|
|
375
|
-
switch (_b) {
|
|
376
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
377
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
378
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
379
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
380
|
-
case "InvalidRequestException": return [3, 6];
|
|
381
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
382
|
-
}
|
|
383
|
-
return [3, 8];
|
|
384
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
385
|
-
case 3: throw _d.sent();
|
|
386
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
387
|
-
case 5: throw _d.sent();
|
|
388
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
389
|
-
case 7: throw _d.sent();
|
|
390
|
-
case 8:
|
|
391
|
-
parsedBody = parsedOutput.body;
|
|
392
|
-
throwDefaultError({
|
|
393
|
-
output: output,
|
|
394
|
-
parsedBody: parsedBody,
|
|
395
|
-
exceptionCtor: __BaseException,
|
|
396
|
-
errorCode: errorCode,
|
|
397
|
-
});
|
|
398
|
-
_d.label = 9;
|
|
399
|
-
case 9: return [2];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
}); };
|
|
403
|
-
export var deserializeAws_json1_1CreateLunaClientCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
404
|
-
var data, contents, response;
|
|
405
|
-
return __generator(this, function (_a) {
|
|
406
|
-
switch (_a.label) {
|
|
407
|
-
case 0:
|
|
408
|
-
if (output.statusCode >= 300) {
|
|
409
|
-
return [2, deserializeAws_json1_1CreateLunaClientCommandError(output, context)];
|
|
410
|
-
}
|
|
411
|
-
return [4, parseBody(output.body, context)];
|
|
412
|
-
case 1:
|
|
413
|
-
data = _a.sent();
|
|
414
|
-
contents = {};
|
|
415
|
-
contents = deserializeAws_json1_1CreateLunaClientResponse(data, context);
|
|
416
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
417
|
-
return [2, Promise.resolve(response)];
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}); };
|
|
421
|
-
var deserializeAws_json1_1CreateLunaClientCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
422
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
423
|
-
var _c;
|
|
424
|
-
return __generator(this, function (_d) {
|
|
425
|
-
switch (_d.label) {
|
|
426
|
-
case 0:
|
|
427
|
-
_a = [__assign({}, output)];
|
|
428
|
-
_c = {};
|
|
429
|
-
return [4, parseErrorBody(output.body, context)];
|
|
430
|
-
case 1:
|
|
431
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
432
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
433
|
-
_b = errorCode;
|
|
434
|
-
switch (_b) {
|
|
435
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
436
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
437
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
438
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
439
|
-
case "InvalidRequestException": return [3, 6];
|
|
440
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
441
|
-
}
|
|
442
|
-
return [3, 8];
|
|
443
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
444
|
-
case 3: throw _d.sent();
|
|
445
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
446
|
-
case 5: throw _d.sent();
|
|
447
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
448
|
-
case 7: throw _d.sent();
|
|
449
|
-
case 8:
|
|
450
|
-
parsedBody = parsedOutput.body;
|
|
451
|
-
throwDefaultError({
|
|
452
|
-
output: output,
|
|
453
|
-
parsedBody: parsedBody,
|
|
454
|
-
exceptionCtor: __BaseException,
|
|
455
|
-
errorCode: errorCode,
|
|
456
|
-
});
|
|
457
|
-
_d.label = 9;
|
|
458
|
-
case 9: return [2];
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
|
-
}); };
|
|
462
|
-
export var deserializeAws_json1_1DeleteHapgCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
463
|
-
var data, contents, response;
|
|
464
|
-
return __generator(this, function (_a) {
|
|
465
|
-
switch (_a.label) {
|
|
466
|
-
case 0:
|
|
467
|
-
if (output.statusCode >= 300) {
|
|
468
|
-
return [2, deserializeAws_json1_1DeleteHapgCommandError(output, context)];
|
|
469
|
-
}
|
|
470
|
-
return [4, parseBody(output.body, context)];
|
|
471
|
-
case 1:
|
|
472
|
-
data = _a.sent();
|
|
473
|
-
contents = {};
|
|
474
|
-
contents = deserializeAws_json1_1DeleteHapgResponse(data, context);
|
|
475
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
476
|
-
return [2, Promise.resolve(response)];
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
}); };
|
|
480
|
-
var deserializeAws_json1_1DeleteHapgCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
481
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
482
|
-
var _c;
|
|
483
|
-
return __generator(this, function (_d) {
|
|
484
|
-
switch (_d.label) {
|
|
485
|
-
case 0:
|
|
486
|
-
_a = [__assign({}, output)];
|
|
487
|
-
_c = {};
|
|
488
|
-
return [4, parseErrorBody(output.body, context)];
|
|
489
|
-
case 1:
|
|
490
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
491
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
492
|
-
_b = errorCode;
|
|
493
|
-
switch (_b) {
|
|
494
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
495
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
496
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
497
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
498
|
-
case "InvalidRequestException": return [3, 6];
|
|
499
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
500
|
-
}
|
|
501
|
-
return [3, 8];
|
|
502
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
503
|
-
case 3: throw _d.sent();
|
|
504
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
505
|
-
case 5: throw _d.sent();
|
|
506
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
507
|
-
case 7: throw _d.sent();
|
|
508
|
-
case 8:
|
|
509
|
-
parsedBody = parsedOutput.body;
|
|
510
|
-
throwDefaultError({
|
|
511
|
-
output: output,
|
|
512
|
-
parsedBody: parsedBody,
|
|
513
|
-
exceptionCtor: __BaseException,
|
|
514
|
-
errorCode: errorCode,
|
|
515
|
-
});
|
|
516
|
-
_d.label = 9;
|
|
517
|
-
case 9: return [2];
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
}); };
|
|
521
|
-
export var deserializeAws_json1_1DeleteHsmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
522
|
-
var data, contents, response;
|
|
523
|
-
return __generator(this, function (_a) {
|
|
524
|
-
switch (_a.label) {
|
|
525
|
-
case 0:
|
|
526
|
-
if (output.statusCode >= 300) {
|
|
527
|
-
return [2, deserializeAws_json1_1DeleteHsmCommandError(output, context)];
|
|
528
|
-
}
|
|
529
|
-
return [4, parseBody(output.body, context)];
|
|
530
|
-
case 1:
|
|
531
|
-
data = _a.sent();
|
|
532
|
-
contents = {};
|
|
533
|
-
contents = deserializeAws_json1_1DeleteHsmResponse(data, context);
|
|
534
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
535
|
-
return [2, Promise.resolve(response)];
|
|
536
|
-
}
|
|
537
|
-
});
|
|
538
|
-
}); };
|
|
539
|
-
var deserializeAws_json1_1DeleteHsmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
540
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
541
|
-
var _c;
|
|
542
|
-
return __generator(this, function (_d) {
|
|
543
|
-
switch (_d.label) {
|
|
544
|
-
case 0:
|
|
545
|
-
_a = [__assign({}, output)];
|
|
546
|
-
_c = {};
|
|
547
|
-
return [4, parseErrorBody(output.body, context)];
|
|
548
|
-
case 1:
|
|
549
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
550
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
551
|
-
_b = errorCode;
|
|
552
|
-
switch (_b) {
|
|
553
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
554
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
555
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
556
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
557
|
-
case "InvalidRequestException": return [3, 6];
|
|
558
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
559
|
-
}
|
|
560
|
-
return [3, 8];
|
|
561
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
562
|
-
case 3: throw _d.sent();
|
|
563
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
564
|
-
case 5: throw _d.sent();
|
|
565
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
566
|
-
case 7: throw _d.sent();
|
|
567
|
-
case 8:
|
|
568
|
-
parsedBody = parsedOutput.body;
|
|
569
|
-
throwDefaultError({
|
|
570
|
-
output: output,
|
|
571
|
-
parsedBody: parsedBody,
|
|
572
|
-
exceptionCtor: __BaseException,
|
|
573
|
-
errorCode: errorCode,
|
|
574
|
-
});
|
|
575
|
-
_d.label = 9;
|
|
576
|
-
case 9: return [2];
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
}); };
|
|
580
|
-
export var deserializeAws_json1_1DeleteLunaClientCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
581
|
-
var data, contents, response;
|
|
582
|
-
return __generator(this, function (_a) {
|
|
583
|
-
switch (_a.label) {
|
|
584
|
-
case 0:
|
|
585
|
-
if (output.statusCode >= 300) {
|
|
586
|
-
return [2, deserializeAws_json1_1DeleteLunaClientCommandError(output, context)];
|
|
587
|
-
}
|
|
588
|
-
return [4, parseBody(output.body, context)];
|
|
589
|
-
case 1:
|
|
590
|
-
data = _a.sent();
|
|
591
|
-
contents = {};
|
|
592
|
-
contents = deserializeAws_json1_1DeleteLunaClientResponse(data, context);
|
|
593
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
594
|
-
return [2, Promise.resolve(response)];
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
}); };
|
|
598
|
-
var deserializeAws_json1_1DeleteLunaClientCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
599
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
600
|
-
var _c;
|
|
601
|
-
return __generator(this, function (_d) {
|
|
602
|
-
switch (_d.label) {
|
|
603
|
-
case 0:
|
|
604
|
-
_a = [__assign({}, output)];
|
|
605
|
-
_c = {};
|
|
606
|
-
return [4, parseErrorBody(output.body, context)];
|
|
607
|
-
case 1:
|
|
608
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
609
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
610
|
-
_b = errorCode;
|
|
611
|
-
switch (_b) {
|
|
612
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
613
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
614
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
615
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
616
|
-
case "InvalidRequestException": return [3, 6];
|
|
617
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
618
|
-
}
|
|
619
|
-
return [3, 8];
|
|
620
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
621
|
-
case 3: throw _d.sent();
|
|
622
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
623
|
-
case 5: throw _d.sent();
|
|
624
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
625
|
-
case 7: throw _d.sent();
|
|
626
|
-
case 8:
|
|
627
|
-
parsedBody = parsedOutput.body;
|
|
628
|
-
throwDefaultError({
|
|
629
|
-
output: output,
|
|
630
|
-
parsedBody: parsedBody,
|
|
631
|
-
exceptionCtor: __BaseException,
|
|
632
|
-
errorCode: errorCode,
|
|
633
|
-
});
|
|
634
|
-
_d.label = 9;
|
|
635
|
-
case 9: return [2];
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
}); };
|
|
639
|
-
export var deserializeAws_json1_1DescribeHapgCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
640
|
-
var data, contents, response;
|
|
641
|
-
return __generator(this, function (_a) {
|
|
642
|
-
switch (_a.label) {
|
|
643
|
-
case 0:
|
|
644
|
-
if (output.statusCode >= 300) {
|
|
645
|
-
return [2, deserializeAws_json1_1DescribeHapgCommandError(output, context)];
|
|
646
|
-
}
|
|
647
|
-
return [4, parseBody(output.body, context)];
|
|
648
|
-
case 1:
|
|
649
|
-
data = _a.sent();
|
|
650
|
-
contents = {};
|
|
651
|
-
contents = deserializeAws_json1_1DescribeHapgResponse(data, context);
|
|
652
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
653
|
-
return [2, Promise.resolve(response)];
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
}); };
|
|
657
|
-
var deserializeAws_json1_1DescribeHapgCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
658
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
659
|
-
var _c;
|
|
660
|
-
return __generator(this, function (_d) {
|
|
661
|
-
switch (_d.label) {
|
|
662
|
-
case 0:
|
|
663
|
-
_a = [__assign({}, output)];
|
|
664
|
-
_c = {};
|
|
665
|
-
return [4, parseErrorBody(output.body, context)];
|
|
666
|
-
case 1:
|
|
667
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
668
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
669
|
-
_b = errorCode;
|
|
670
|
-
switch (_b) {
|
|
671
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
672
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
673
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
674
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
675
|
-
case "InvalidRequestException": return [3, 6];
|
|
676
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
677
|
-
}
|
|
678
|
-
return [3, 8];
|
|
679
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
680
|
-
case 3: throw _d.sent();
|
|
681
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
682
|
-
case 5: throw _d.sent();
|
|
683
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
684
|
-
case 7: throw _d.sent();
|
|
685
|
-
case 8:
|
|
686
|
-
parsedBody = parsedOutput.body;
|
|
687
|
-
throwDefaultError({
|
|
688
|
-
output: output,
|
|
689
|
-
parsedBody: parsedBody,
|
|
690
|
-
exceptionCtor: __BaseException,
|
|
691
|
-
errorCode: errorCode,
|
|
692
|
-
});
|
|
693
|
-
_d.label = 9;
|
|
694
|
-
case 9: return [2];
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
}); };
|
|
698
|
-
export var deserializeAws_json1_1DescribeHsmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
699
|
-
var data, contents, response;
|
|
700
|
-
return __generator(this, function (_a) {
|
|
701
|
-
switch (_a.label) {
|
|
702
|
-
case 0:
|
|
703
|
-
if (output.statusCode >= 300) {
|
|
704
|
-
return [2, deserializeAws_json1_1DescribeHsmCommandError(output, context)];
|
|
705
|
-
}
|
|
706
|
-
return [4, parseBody(output.body, context)];
|
|
707
|
-
case 1:
|
|
708
|
-
data = _a.sent();
|
|
709
|
-
contents = {};
|
|
710
|
-
contents = deserializeAws_json1_1DescribeHsmResponse(data, context);
|
|
711
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
712
|
-
return [2, Promise.resolve(response)];
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
}); };
|
|
716
|
-
var deserializeAws_json1_1DescribeHsmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
717
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
718
|
-
var _c;
|
|
719
|
-
return __generator(this, function (_d) {
|
|
720
|
-
switch (_d.label) {
|
|
721
|
-
case 0:
|
|
722
|
-
_a = [__assign({}, output)];
|
|
723
|
-
_c = {};
|
|
724
|
-
return [4, parseErrorBody(output.body, context)];
|
|
725
|
-
case 1:
|
|
726
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
727
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
728
|
-
_b = errorCode;
|
|
729
|
-
switch (_b) {
|
|
730
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
731
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
732
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
733
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
734
|
-
case "InvalidRequestException": return [3, 6];
|
|
735
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
736
|
-
}
|
|
737
|
-
return [3, 8];
|
|
738
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 3: throw _d.sent();
|
|
740
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
741
|
-
case 5: throw _d.sent();
|
|
742
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
743
|
-
case 7: throw _d.sent();
|
|
744
|
-
case 8:
|
|
745
|
-
parsedBody = parsedOutput.body;
|
|
746
|
-
throwDefaultError({
|
|
747
|
-
output: output,
|
|
748
|
-
parsedBody: parsedBody,
|
|
749
|
-
exceptionCtor: __BaseException,
|
|
750
|
-
errorCode: errorCode,
|
|
751
|
-
});
|
|
752
|
-
_d.label = 9;
|
|
753
|
-
case 9: return [2];
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
}); };
|
|
757
|
-
export var deserializeAws_json1_1DescribeLunaClientCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
758
|
-
var data, contents, response;
|
|
759
|
-
return __generator(this, function (_a) {
|
|
760
|
-
switch (_a.label) {
|
|
761
|
-
case 0:
|
|
762
|
-
if (output.statusCode >= 300) {
|
|
763
|
-
return [2, deserializeAws_json1_1DescribeLunaClientCommandError(output, context)];
|
|
764
|
-
}
|
|
765
|
-
return [4, parseBody(output.body, context)];
|
|
766
|
-
case 1:
|
|
767
|
-
data = _a.sent();
|
|
768
|
-
contents = {};
|
|
769
|
-
contents = deserializeAws_json1_1DescribeLunaClientResponse(data, context);
|
|
770
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
771
|
-
return [2, Promise.resolve(response)];
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
}); };
|
|
775
|
-
var deserializeAws_json1_1DescribeLunaClientCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
776
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
777
|
-
var _c;
|
|
778
|
-
return __generator(this, function (_d) {
|
|
779
|
-
switch (_d.label) {
|
|
780
|
-
case 0:
|
|
781
|
-
_a = [__assign({}, output)];
|
|
782
|
-
_c = {};
|
|
783
|
-
return [4, parseErrorBody(output.body, context)];
|
|
784
|
-
case 1:
|
|
785
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
786
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
787
|
-
_b = errorCode;
|
|
788
|
-
switch (_b) {
|
|
789
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
790
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
791
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
792
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
793
|
-
case "InvalidRequestException": return [3, 6];
|
|
794
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
795
|
-
}
|
|
796
|
-
return [3, 8];
|
|
797
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
798
|
-
case 3: throw _d.sent();
|
|
799
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
800
|
-
case 5: throw _d.sent();
|
|
801
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
802
|
-
case 7: throw _d.sent();
|
|
803
|
-
case 8:
|
|
804
|
-
parsedBody = parsedOutput.body;
|
|
805
|
-
throwDefaultError({
|
|
806
|
-
output: output,
|
|
807
|
-
parsedBody: parsedBody,
|
|
808
|
-
exceptionCtor: __BaseException,
|
|
809
|
-
errorCode: errorCode,
|
|
810
|
-
});
|
|
811
|
-
_d.label = 9;
|
|
812
|
-
case 9: return [2];
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
}); };
|
|
816
|
-
export var deserializeAws_json1_1GetConfigCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
817
|
-
var data, contents, response;
|
|
818
|
-
return __generator(this, function (_a) {
|
|
819
|
-
switch (_a.label) {
|
|
820
|
-
case 0:
|
|
821
|
-
if (output.statusCode >= 300) {
|
|
822
|
-
return [2, deserializeAws_json1_1GetConfigCommandError(output, context)];
|
|
823
|
-
}
|
|
824
|
-
return [4, parseBody(output.body, context)];
|
|
825
|
-
case 1:
|
|
826
|
-
data = _a.sent();
|
|
827
|
-
contents = {};
|
|
828
|
-
contents = deserializeAws_json1_1GetConfigResponse(data, context);
|
|
829
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
830
|
-
return [2, Promise.resolve(response)];
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
}); };
|
|
834
|
-
var deserializeAws_json1_1GetConfigCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
835
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
836
|
-
var _c;
|
|
837
|
-
return __generator(this, function (_d) {
|
|
838
|
-
switch (_d.label) {
|
|
839
|
-
case 0:
|
|
840
|
-
_a = [__assign({}, output)];
|
|
841
|
-
_c = {};
|
|
842
|
-
return [4, parseErrorBody(output.body, context)];
|
|
843
|
-
case 1:
|
|
844
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
845
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
846
|
-
_b = errorCode;
|
|
847
|
-
switch (_b) {
|
|
848
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
849
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
850
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
851
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
852
|
-
case "InvalidRequestException": return [3, 6];
|
|
853
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
854
|
-
}
|
|
855
|
-
return [3, 8];
|
|
856
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
857
|
-
case 3: throw _d.sent();
|
|
858
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
859
|
-
case 5: throw _d.sent();
|
|
860
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
861
|
-
case 7: throw _d.sent();
|
|
862
|
-
case 8:
|
|
863
|
-
parsedBody = parsedOutput.body;
|
|
864
|
-
throwDefaultError({
|
|
865
|
-
output: output,
|
|
866
|
-
parsedBody: parsedBody,
|
|
867
|
-
exceptionCtor: __BaseException,
|
|
868
|
-
errorCode: errorCode,
|
|
869
|
-
});
|
|
870
|
-
_d.label = 9;
|
|
871
|
-
case 9: return [2];
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
}); };
|
|
875
|
-
export var deserializeAws_json1_1ListAvailableZonesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
876
|
-
var data, contents, response;
|
|
877
|
-
return __generator(this, function (_a) {
|
|
878
|
-
switch (_a.label) {
|
|
879
|
-
case 0:
|
|
880
|
-
if (output.statusCode >= 300) {
|
|
881
|
-
return [2, deserializeAws_json1_1ListAvailableZonesCommandError(output, context)];
|
|
882
|
-
}
|
|
883
|
-
return [4, parseBody(output.body, context)];
|
|
884
|
-
case 1:
|
|
885
|
-
data = _a.sent();
|
|
886
|
-
contents = {};
|
|
887
|
-
contents = deserializeAws_json1_1ListAvailableZonesResponse(data, context);
|
|
888
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
889
|
-
return [2, Promise.resolve(response)];
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
}); };
|
|
893
|
-
var deserializeAws_json1_1ListAvailableZonesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
894
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
895
|
-
var _c;
|
|
896
|
-
return __generator(this, function (_d) {
|
|
897
|
-
switch (_d.label) {
|
|
898
|
-
case 0:
|
|
899
|
-
_a = [__assign({}, output)];
|
|
900
|
-
_c = {};
|
|
901
|
-
return [4, parseErrorBody(output.body, context)];
|
|
902
|
-
case 1:
|
|
903
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
904
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
905
|
-
_b = errorCode;
|
|
906
|
-
switch (_b) {
|
|
907
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
908
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
909
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
910
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
911
|
-
case "InvalidRequestException": return [3, 6];
|
|
912
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
913
|
-
}
|
|
914
|
-
return [3, 8];
|
|
915
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
916
|
-
case 3: throw _d.sent();
|
|
917
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
918
|
-
case 5: throw _d.sent();
|
|
919
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
920
|
-
case 7: throw _d.sent();
|
|
921
|
-
case 8:
|
|
922
|
-
parsedBody = parsedOutput.body;
|
|
923
|
-
throwDefaultError({
|
|
924
|
-
output: output,
|
|
925
|
-
parsedBody: parsedBody,
|
|
926
|
-
exceptionCtor: __BaseException,
|
|
927
|
-
errorCode: errorCode,
|
|
928
|
-
});
|
|
929
|
-
_d.label = 9;
|
|
930
|
-
case 9: return [2];
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
}); };
|
|
934
|
-
export var deserializeAws_json1_1ListHapgsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
935
|
-
var data, contents, response;
|
|
936
|
-
return __generator(this, function (_a) {
|
|
937
|
-
switch (_a.label) {
|
|
938
|
-
case 0:
|
|
939
|
-
if (output.statusCode >= 300) {
|
|
940
|
-
return [2, deserializeAws_json1_1ListHapgsCommandError(output, context)];
|
|
941
|
-
}
|
|
942
|
-
return [4, parseBody(output.body, context)];
|
|
943
|
-
case 1:
|
|
944
|
-
data = _a.sent();
|
|
945
|
-
contents = {};
|
|
946
|
-
contents = deserializeAws_json1_1ListHapgsResponse(data, context);
|
|
947
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
948
|
-
return [2, Promise.resolve(response)];
|
|
949
|
-
}
|
|
950
|
-
});
|
|
951
|
-
}); };
|
|
952
|
-
var deserializeAws_json1_1ListHapgsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
953
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
954
|
-
var _c;
|
|
955
|
-
return __generator(this, function (_d) {
|
|
956
|
-
switch (_d.label) {
|
|
957
|
-
case 0:
|
|
958
|
-
_a = [__assign({}, output)];
|
|
959
|
-
_c = {};
|
|
960
|
-
return [4, parseErrorBody(output.body, context)];
|
|
961
|
-
case 1:
|
|
962
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
963
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
964
|
-
_b = errorCode;
|
|
965
|
-
switch (_b) {
|
|
966
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
967
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
968
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
969
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
970
|
-
case "InvalidRequestException": return [3, 6];
|
|
971
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
972
|
-
}
|
|
973
|
-
return [3, 8];
|
|
974
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
975
|
-
case 3: throw _d.sent();
|
|
976
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
977
|
-
case 5: throw _d.sent();
|
|
978
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
979
|
-
case 7: throw _d.sent();
|
|
980
|
-
case 8:
|
|
981
|
-
parsedBody = parsedOutput.body;
|
|
982
|
-
throwDefaultError({
|
|
983
|
-
output: output,
|
|
984
|
-
parsedBody: parsedBody,
|
|
985
|
-
exceptionCtor: __BaseException,
|
|
986
|
-
errorCode: errorCode,
|
|
987
|
-
});
|
|
988
|
-
_d.label = 9;
|
|
989
|
-
case 9: return [2];
|
|
990
|
-
}
|
|
991
|
-
});
|
|
992
|
-
}); };
|
|
993
|
-
export var deserializeAws_json1_1ListHsmsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
994
|
-
var data, contents, response;
|
|
995
|
-
return __generator(this, function (_a) {
|
|
996
|
-
switch (_a.label) {
|
|
997
|
-
case 0:
|
|
998
|
-
if (output.statusCode >= 300) {
|
|
999
|
-
return [2, deserializeAws_json1_1ListHsmsCommandError(output, context)];
|
|
1000
|
-
}
|
|
1001
|
-
return [4, parseBody(output.body, context)];
|
|
1002
|
-
case 1:
|
|
1003
|
-
data = _a.sent();
|
|
1004
|
-
contents = {};
|
|
1005
|
-
contents = deserializeAws_json1_1ListHsmsResponse(data, context);
|
|
1006
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1007
|
-
return [2, Promise.resolve(response)];
|
|
1008
|
-
}
|
|
1009
|
-
});
|
|
1010
|
-
}); };
|
|
1011
|
-
var deserializeAws_json1_1ListHsmsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1012
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1013
|
-
var _c;
|
|
1014
|
-
return __generator(this, function (_d) {
|
|
1015
|
-
switch (_d.label) {
|
|
1016
|
-
case 0:
|
|
1017
|
-
_a = [__assign({}, output)];
|
|
1018
|
-
_c = {};
|
|
1019
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1020
|
-
case 1:
|
|
1021
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1022
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1023
|
-
_b = errorCode;
|
|
1024
|
-
switch (_b) {
|
|
1025
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1026
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1027
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1028
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1029
|
-
case "InvalidRequestException": return [3, 6];
|
|
1030
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1031
|
-
}
|
|
1032
|
-
return [3, 8];
|
|
1033
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1034
|
-
case 3: throw _d.sent();
|
|
1035
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1036
|
-
case 5: throw _d.sent();
|
|
1037
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1038
|
-
case 7: throw _d.sent();
|
|
1039
|
-
case 8:
|
|
1040
|
-
parsedBody = parsedOutput.body;
|
|
1041
|
-
throwDefaultError({
|
|
1042
|
-
output: output,
|
|
1043
|
-
parsedBody: parsedBody,
|
|
1044
|
-
exceptionCtor: __BaseException,
|
|
1045
|
-
errorCode: errorCode,
|
|
1046
|
-
});
|
|
1047
|
-
_d.label = 9;
|
|
1048
|
-
case 9: return [2];
|
|
1049
|
-
}
|
|
1050
|
-
});
|
|
1051
|
-
}); };
|
|
1052
|
-
export var deserializeAws_json1_1ListLunaClientsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1053
|
-
var data, contents, response;
|
|
1054
|
-
return __generator(this, function (_a) {
|
|
1055
|
-
switch (_a.label) {
|
|
1056
|
-
case 0:
|
|
1057
|
-
if (output.statusCode >= 300) {
|
|
1058
|
-
return [2, deserializeAws_json1_1ListLunaClientsCommandError(output, context)];
|
|
1059
|
-
}
|
|
1060
|
-
return [4, parseBody(output.body, context)];
|
|
1061
|
-
case 1:
|
|
1062
|
-
data = _a.sent();
|
|
1063
|
-
contents = {};
|
|
1064
|
-
contents = deserializeAws_json1_1ListLunaClientsResponse(data, context);
|
|
1065
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1066
|
-
return [2, Promise.resolve(response)];
|
|
1067
|
-
}
|
|
1068
|
-
});
|
|
1069
|
-
}); };
|
|
1070
|
-
var deserializeAws_json1_1ListLunaClientsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1071
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1072
|
-
var _c;
|
|
1073
|
-
return __generator(this, function (_d) {
|
|
1074
|
-
switch (_d.label) {
|
|
1075
|
-
case 0:
|
|
1076
|
-
_a = [__assign({}, output)];
|
|
1077
|
-
_c = {};
|
|
1078
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1079
|
-
case 1:
|
|
1080
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1081
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1082
|
-
_b = errorCode;
|
|
1083
|
-
switch (_b) {
|
|
1084
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1085
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1086
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1087
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1088
|
-
case "InvalidRequestException": return [3, 6];
|
|
1089
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1090
|
-
}
|
|
1091
|
-
return [3, 8];
|
|
1092
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1093
|
-
case 3: throw _d.sent();
|
|
1094
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1095
|
-
case 5: throw _d.sent();
|
|
1096
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1097
|
-
case 7: throw _d.sent();
|
|
1098
|
-
case 8:
|
|
1099
|
-
parsedBody = parsedOutput.body;
|
|
1100
|
-
throwDefaultError({
|
|
1101
|
-
output: output,
|
|
1102
|
-
parsedBody: parsedBody,
|
|
1103
|
-
exceptionCtor: __BaseException,
|
|
1104
|
-
errorCode: errorCode,
|
|
1105
|
-
});
|
|
1106
|
-
_d.label = 9;
|
|
1107
|
-
case 9: return [2];
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
}); };
|
|
1111
|
-
export var deserializeAws_json1_1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1112
|
-
var data, contents, response;
|
|
1113
|
-
return __generator(this, function (_a) {
|
|
1114
|
-
switch (_a.label) {
|
|
1115
|
-
case 0:
|
|
1116
|
-
if (output.statusCode >= 300) {
|
|
1117
|
-
return [2, deserializeAws_json1_1ListTagsForResourceCommandError(output, context)];
|
|
1118
|
-
}
|
|
1119
|
-
return [4, parseBody(output.body, context)];
|
|
1120
|
-
case 1:
|
|
1121
|
-
data = _a.sent();
|
|
1122
|
-
contents = {};
|
|
1123
|
-
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
1124
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1125
|
-
return [2, Promise.resolve(response)];
|
|
1126
|
-
}
|
|
1127
|
-
});
|
|
1128
|
-
}); };
|
|
1129
|
-
var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1130
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1131
|
-
var _c;
|
|
1132
|
-
return __generator(this, function (_d) {
|
|
1133
|
-
switch (_d.label) {
|
|
1134
|
-
case 0:
|
|
1135
|
-
_a = [__assign({}, output)];
|
|
1136
|
-
_c = {};
|
|
1137
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1138
|
-
case 1:
|
|
1139
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1140
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1141
|
-
_b = errorCode;
|
|
1142
|
-
switch (_b) {
|
|
1143
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1144
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1145
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1146
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1147
|
-
case "InvalidRequestException": return [3, 6];
|
|
1148
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1149
|
-
}
|
|
1150
|
-
return [3, 8];
|
|
1151
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1152
|
-
case 3: throw _d.sent();
|
|
1153
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1154
|
-
case 5: throw _d.sent();
|
|
1155
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1156
|
-
case 7: throw _d.sent();
|
|
1157
|
-
case 8:
|
|
1158
|
-
parsedBody = parsedOutput.body;
|
|
1159
|
-
throwDefaultError({
|
|
1160
|
-
output: output,
|
|
1161
|
-
parsedBody: parsedBody,
|
|
1162
|
-
exceptionCtor: __BaseException,
|
|
1163
|
-
errorCode: errorCode,
|
|
1164
|
-
});
|
|
1165
|
-
_d.label = 9;
|
|
1166
|
-
case 9: return [2];
|
|
1167
|
-
}
|
|
1168
|
-
});
|
|
1169
|
-
}); };
|
|
1170
|
-
export var deserializeAws_json1_1ModifyHapgCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1171
|
-
var data, contents, response;
|
|
1172
|
-
return __generator(this, function (_a) {
|
|
1173
|
-
switch (_a.label) {
|
|
1174
|
-
case 0:
|
|
1175
|
-
if (output.statusCode >= 300) {
|
|
1176
|
-
return [2, deserializeAws_json1_1ModifyHapgCommandError(output, context)];
|
|
1177
|
-
}
|
|
1178
|
-
return [4, parseBody(output.body, context)];
|
|
1179
|
-
case 1:
|
|
1180
|
-
data = _a.sent();
|
|
1181
|
-
contents = {};
|
|
1182
|
-
contents = deserializeAws_json1_1ModifyHapgResponse(data, context);
|
|
1183
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1184
|
-
return [2, Promise.resolve(response)];
|
|
1185
|
-
}
|
|
1186
|
-
});
|
|
1187
|
-
}); };
|
|
1188
|
-
var deserializeAws_json1_1ModifyHapgCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1189
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1190
|
-
var _c;
|
|
1191
|
-
return __generator(this, function (_d) {
|
|
1192
|
-
switch (_d.label) {
|
|
1193
|
-
case 0:
|
|
1194
|
-
_a = [__assign({}, output)];
|
|
1195
|
-
_c = {};
|
|
1196
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1197
|
-
case 1:
|
|
1198
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1199
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1200
|
-
_b = errorCode;
|
|
1201
|
-
switch (_b) {
|
|
1202
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1203
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1204
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1205
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1206
|
-
case "InvalidRequestException": return [3, 6];
|
|
1207
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1208
|
-
}
|
|
1209
|
-
return [3, 8];
|
|
1210
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1211
|
-
case 3: throw _d.sent();
|
|
1212
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1213
|
-
case 5: throw _d.sent();
|
|
1214
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1215
|
-
case 7: throw _d.sent();
|
|
1216
|
-
case 8:
|
|
1217
|
-
parsedBody = parsedOutput.body;
|
|
1218
|
-
throwDefaultError({
|
|
1219
|
-
output: output,
|
|
1220
|
-
parsedBody: parsedBody,
|
|
1221
|
-
exceptionCtor: __BaseException,
|
|
1222
|
-
errorCode: errorCode,
|
|
1223
|
-
});
|
|
1224
|
-
_d.label = 9;
|
|
1225
|
-
case 9: return [2];
|
|
1226
|
-
}
|
|
1227
|
-
});
|
|
1228
|
-
}); };
|
|
1229
|
-
export var deserializeAws_json1_1ModifyHsmCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1230
|
-
var data, contents, response;
|
|
1231
|
-
return __generator(this, function (_a) {
|
|
1232
|
-
switch (_a.label) {
|
|
1233
|
-
case 0:
|
|
1234
|
-
if (output.statusCode >= 300) {
|
|
1235
|
-
return [2, deserializeAws_json1_1ModifyHsmCommandError(output, context)];
|
|
1236
|
-
}
|
|
1237
|
-
return [4, parseBody(output.body, context)];
|
|
1238
|
-
case 1:
|
|
1239
|
-
data = _a.sent();
|
|
1240
|
-
contents = {};
|
|
1241
|
-
contents = deserializeAws_json1_1ModifyHsmResponse(data, context);
|
|
1242
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1243
|
-
return [2, Promise.resolve(response)];
|
|
1244
|
-
}
|
|
1245
|
-
});
|
|
1246
|
-
}); };
|
|
1247
|
-
var deserializeAws_json1_1ModifyHsmCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1248
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1249
|
-
var _c;
|
|
1250
|
-
return __generator(this, function (_d) {
|
|
1251
|
-
switch (_d.label) {
|
|
1252
|
-
case 0:
|
|
1253
|
-
_a = [__assign({}, output)];
|
|
1254
|
-
_c = {};
|
|
1255
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1256
|
-
case 1:
|
|
1257
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1258
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1259
|
-
_b = errorCode;
|
|
1260
|
-
switch (_b) {
|
|
1261
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1262
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1263
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1264
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1265
|
-
case "InvalidRequestException": return [3, 6];
|
|
1266
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1267
|
-
}
|
|
1268
|
-
return [3, 8];
|
|
1269
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1270
|
-
case 3: throw _d.sent();
|
|
1271
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1272
|
-
case 5: throw _d.sent();
|
|
1273
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1274
|
-
case 7: throw _d.sent();
|
|
1275
|
-
case 8:
|
|
1276
|
-
parsedBody = parsedOutput.body;
|
|
1277
|
-
throwDefaultError({
|
|
1278
|
-
output: output,
|
|
1279
|
-
parsedBody: parsedBody,
|
|
1280
|
-
exceptionCtor: __BaseException,
|
|
1281
|
-
errorCode: errorCode,
|
|
1282
|
-
});
|
|
1283
|
-
_d.label = 9;
|
|
1284
|
-
case 9: return [2];
|
|
1285
|
-
}
|
|
1286
|
-
});
|
|
1287
|
-
}); };
|
|
1288
|
-
export var deserializeAws_json1_1ModifyLunaClientCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1289
|
-
var data, contents, response;
|
|
1290
|
-
return __generator(this, function (_a) {
|
|
1291
|
-
switch (_a.label) {
|
|
1292
|
-
case 0:
|
|
1293
|
-
if (output.statusCode >= 300) {
|
|
1294
|
-
return [2, deserializeAws_json1_1ModifyLunaClientCommandError(output, context)];
|
|
1295
|
-
}
|
|
1296
|
-
return [4, parseBody(output.body, context)];
|
|
1297
|
-
case 1:
|
|
1298
|
-
data = _a.sent();
|
|
1299
|
-
contents = {};
|
|
1300
|
-
contents = deserializeAws_json1_1ModifyLunaClientResponse(data, context);
|
|
1301
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1302
|
-
return [2, Promise.resolve(response)];
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
}); };
|
|
1306
|
-
var deserializeAws_json1_1ModifyLunaClientCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1307
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1308
|
-
var _c;
|
|
1309
|
-
return __generator(this, function (_d) {
|
|
1310
|
-
switch (_d.label) {
|
|
1311
|
-
case 0:
|
|
1312
|
-
_a = [__assign({}, output)];
|
|
1313
|
-
_c = {};
|
|
1314
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1315
|
-
case 1:
|
|
1316
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1317
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1318
|
-
_b = errorCode;
|
|
1319
|
-
switch (_b) {
|
|
1320
|
-
case "CloudHsmServiceException": return [3, 2];
|
|
1321
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 2];
|
|
1322
|
-
}
|
|
1323
|
-
return [3, 4];
|
|
1324
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1325
|
-
case 3: throw _d.sent();
|
|
1326
|
-
case 4:
|
|
1327
|
-
parsedBody = parsedOutput.body;
|
|
1328
|
-
throwDefaultError({
|
|
1329
|
-
output: output,
|
|
1330
|
-
parsedBody: parsedBody,
|
|
1331
|
-
exceptionCtor: __BaseException,
|
|
1332
|
-
errorCode: errorCode,
|
|
1333
|
-
});
|
|
1334
|
-
_d.label = 5;
|
|
1335
|
-
case 5: return [2];
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
}); };
|
|
1339
|
-
export var deserializeAws_json1_1RemoveTagsFromResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1340
|
-
var data, contents, response;
|
|
1341
|
-
return __generator(this, function (_a) {
|
|
1342
|
-
switch (_a.label) {
|
|
1343
|
-
case 0:
|
|
1344
|
-
if (output.statusCode >= 300) {
|
|
1345
|
-
return [2, deserializeAws_json1_1RemoveTagsFromResourceCommandError(output, context)];
|
|
1346
|
-
}
|
|
1347
|
-
return [4, parseBody(output.body, context)];
|
|
1348
|
-
case 1:
|
|
1349
|
-
data = _a.sent();
|
|
1350
|
-
contents = {};
|
|
1351
|
-
contents = deserializeAws_json1_1RemoveTagsFromResourceResponse(data, context);
|
|
1352
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1353
|
-
return [2, Promise.resolve(response)];
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
}); };
|
|
1357
|
-
var deserializeAws_json1_1RemoveTagsFromResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1358
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1359
|
-
var _c;
|
|
1360
|
-
return __generator(this, function (_d) {
|
|
1361
|
-
switch (_d.label) {
|
|
1362
|
-
case 0:
|
|
1363
|
-
_a = [__assign({}, output)];
|
|
1364
|
-
_c = {};
|
|
1365
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1366
|
-
case 1:
|
|
1367
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1368
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1369
|
-
_b = errorCode;
|
|
1370
|
-
switch (_b) {
|
|
1371
|
-
case "CloudHsmInternalException": return [3, 2];
|
|
1372
|
-
case "com.amazonaws.cloudhsm#CloudHsmInternalException": return [3, 2];
|
|
1373
|
-
case "CloudHsmServiceException": return [3, 4];
|
|
1374
|
-
case "com.amazonaws.cloudhsm#CloudHsmServiceException": return [3, 4];
|
|
1375
|
-
case "InvalidRequestException": return [3, 6];
|
|
1376
|
-
case "com.amazonaws.cloudhsm#InvalidRequestException": return [3, 6];
|
|
1377
|
-
}
|
|
1378
|
-
return [3, 8];
|
|
1379
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context)];
|
|
1380
|
-
case 3: throw _d.sent();
|
|
1381
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1382
|
-
case 5: throw _d.sent();
|
|
1383
|
-
case 6: return [4, deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1384
|
-
case 7: throw _d.sent();
|
|
1385
|
-
case 8:
|
|
1386
|
-
parsedBody = parsedOutput.body;
|
|
1387
|
-
throwDefaultError({
|
|
1388
|
-
output: output,
|
|
1389
|
-
parsedBody: parsedBody,
|
|
1390
|
-
exceptionCtor: __BaseException,
|
|
1391
|
-
errorCode: errorCode,
|
|
1392
|
-
});
|
|
1393
|
-
_d.label = 9;
|
|
1394
|
-
case 9: return [2];
|
|
1395
|
-
}
|
|
1396
|
-
});
|
|
1397
|
-
}); };
|
|
1398
|
-
var deserializeAws_json1_1CloudHsmInternalExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1399
|
-
var body, deserialized, exception;
|
|
1400
|
-
return __generator(this, function (_a) {
|
|
1401
|
-
body = parsedOutput.body;
|
|
1402
|
-
deserialized = deserializeAws_json1_1CloudHsmInternalException(body, context);
|
|
1403
|
-
exception = new CloudHsmInternalException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1404
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1405
|
-
});
|
|
1406
|
-
}); };
|
|
1407
|
-
var deserializeAws_json1_1CloudHsmServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1408
|
-
var body, deserialized, exception;
|
|
1409
|
-
return __generator(this, function (_a) {
|
|
1410
|
-
body = parsedOutput.body;
|
|
1411
|
-
deserialized = deserializeAws_json1_1CloudHsmServiceException(body, context);
|
|
1412
|
-
exception = new CloudHsmServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1413
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1414
|
-
});
|
|
1415
|
-
}); };
|
|
1416
|
-
var deserializeAws_json1_1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1417
|
-
var body, deserialized, exception;
|
|
1418
|
-
return __generator(this, function (_a) {
|
|
1419
|
-
body = parsedOutput.body;
|
|
1420
|
-
deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
1421
|
-
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1422
|
-
return [2, __decorateServiceException(exception, body)];
|
|
1423
|
-
});
|
|
1424
|
-
}); };
|
|
1425
|
-
var serializeAws_json1_1AddTagsToResourceRequest = function (input, context) {
|
|
1426
|
-
return __assign(__assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.TagList != null && { TagList: serializeAws_json1_1TagList(input.TagList, context) }));
|
|
5
|
+
export const serializeAws_json1_1AddTagsToResourceCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "CloudHsmFrontendService.AddTagsToResource",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1AddTagsToResourceRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1CreateHapgCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "CloudHsmFrontendService.CreateHapg",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1CreateHapgRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1CreateHsmCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "CloudHsmFrontendService.CreateHsm",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1CreateHsmRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1CreateLunaClientCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "CloudHsmFrontendService.CreateLunaClient",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1CreateLunaClientRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1DeleteHapgCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "CloudHsmFrontendService.DeleteHapg",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1DeleteHapgRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1DeleteHsmCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "CloudHsmFrontendService.DeleteHsm",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1DeleteHsmRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_1DeleteLunaClientCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "CloudHsmFrontendService.DeleteLunaClient",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1DeleteLunaClientRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_1DescribeHapgCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.1",
|
|
71
|
+
"x-amz-target": "CloudHsmFrontendService.DescribeHapg",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_1DescribeHapgRequest(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const serializeAws_json1_1DescribeHsmCommand = async (input, context) => {
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/x-amz-json-1.1",
|
|
80
|
+
"x-amz-target": "CloudHsmFrontendService.DescribeHsm",
|
|
81
|
+
};
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify(serializeAws_json1_1DescribeHsmRequest(input, context));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
export const serializeAws_json1_1DescribeLunaClientCommand = async (input, context) => {
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.1",
|
|
89
|
+
"x-amz-target": "CloudHsmFrontendService.DescribeLunaClient",
|
|
90
|
+
};
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(serializeAws_json1_1DescribeLunaClientRequest(input, context));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_json1_1GetConfigCommand = async (input, context) => {
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/x-amz-json-1.1",
|
|
98
|
+
"x-amz-target": "CloudHsmFrontendService.GetConfig",
|
|
99
|
+
};
|
|
100
|
+
let body;
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_1GetConfigRequest(input, context));
|
|
102
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_json1_1ListAvailableZonesCommand = async (input, context) => {
|
|
105
|
+
const headers = {
|
|
106
|
+
"content-type": "application/x-amz-json-1.1",
|
|
107
|
+
"x-amz-target": "CloudHsmFrontendService.ListAvailableZones",
|
|
108
|
+
};
|
|
109
|
+
let body;
|
|
110
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableZonesRequest(input, context));
|
|
111
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
+
};
|
|
113
|
+
export const serializeAws_json1_1ListHapgsCommand = async (input, context) => {
|
|
114
|
+
const headers = {
|
|
115
|
+
"content-type": "application/x-amz-json-1.1",
|
|
116
|
+
"x-amz-target": "CloudHsmFrontendService.ListHapgs",
|
|
117
|
+
};
|
|
118
|
+
let body;
|
|
119
|
+
body = JSON.stringify(serializeAws_json1_1ListHapgsRequest(input, context));
|
|
120
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
121
|
+
};
|
|
122
|
+
export const serializeAws_json1_1ListHsmsCommand = async (input, context) => {
|
|
123
|
+
const headers = {
|
|
124
|
+
"content-type": "application/x-amz-json-1.1",
|
|
125
|
+
"x-amz-target": "CloudHsmFrontendService.ListHsms",
|
|
126
|
+
};
|
|
127
|
+
let body;
|
|
128
|
+
body = JSON.stringify(serializeAws_json1_1ListHsmsRequest(input, context));
|
|
129
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
130
|
+
};
|
|
131
|
+
export const serializeAws_json1_1ListLunaClientsCommand = async (input, context) => {
|
|
132
|
+
const headers = {
|
|
133
|
+
"content-type": "application/x-amz-json-1.1",
|
|
134
|
+
"x-amz-target": "CloudHsmFrontendService.ListLunaClients",
|
|
135
|
+
};
|
|
136
|
+
let body;
|
|
137
|
+
body = JSON.stringify(serializeAws_json1_1ListLunaClientsRequest(input, context));
|
|
138
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
+
};
|
|
140
|
+
export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
|
|
141
|
+
const headers = {
|
|
142
|
+
"content-type": "application/x-amz-json-1.1",
|
|
143
|
+
"x-amz-target": "CloudHsmFrontendService.ListTagsForResource",
|
|
144
|
+
};
|
|
145
|
+
let body;
|
|
146
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
147
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
+
};
|
|
149
|
+
export const serializeAws_json1_1ModifyHapgCommand = async (input, context) => {
|
|
150
|
+
const headers = {
|
|
151
|
+
"content-type": "application/x-amz-json-1.1",
|
|
152
|
+
"x-amz-target": "CloudHsmFrontendService.ModifyHapg",
|
|
153
|
+
};
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify(serializeAws_json1_1ModifyHapgRequest(input, context));
|
|
156
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
157
|
+
};
|
|
158
|
+
export const serializeAws_json1_1ModifyHsmCommand = async (input, context) => {
|
|
159
|
+
const headers = {
|
|
160
|
+
"content-type": "application/x-amz-json-1.1",
|
|
161
|
+
"x-amz-target": "CloudHsmFrontendService.ModifyHsm",
|
|
162
|
+
};
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify(serializeAws_json1_1ModifyHsmRequest(input, context));
|
|
165
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
166
|
+
};
|
|
167
|
+
export const serializeAws_json1_1ModifyLunaClientCommand = async (input, context) => {
|
|
168
|
+
const headers = {
|
|
169
|
+
"content-type": "application/x-amz-json-1.1",
|
|
170
|
+
"x-amz-target": "CloudHsmFrontendService.ModifyLunaClient",
|
|
171
|
+
};
|
|
172
|
+
let body;
|
|
173
|
+
body = JSON.stringify(serializeAws_json1_1ModifyLunaClientRequest(input, context));
|
|
174
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
+
};
|
|
176
|
+
export const serializeAws_json1_1RemoveTagsFromResourceCommand = async (input, context) => {
|
|
177
|
+
const headers = {
|
|
178
|
+
"content-type": "application/x-amz-json-1.1",
|
|
179
|
+
"x-amz-target": "CloudHsmFrontendService.RemoveTagsFromResource",
|
|
180
|
+
};
|
|
181
|
+
let body;
|
|
182
|
+
body = JSON.stringify(serializeAws_json1_1RemoveTagsFromResourceRequest(input, context));
|
|
183
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
184
|
+
};
|
|
185
|
+
export const deserializeAws_json1_1AddTagsToResourceCommand = async (output, context) => {
|
|
186
|
+
if (output.statusCode >= 300) {
|
|
187
|
+
return deserializeAws_json1_1AddTagsToResourceCommandError(output, context);
|
|
188
|
+
}
|
|
189
|
+
const data = await parseBody(output.body, context);
|
|
190
|
+
let contents = {};
|
|
191
|
+
contents = deserializeAws_json1_1AddTagsToResourceResponse(data, context);
|
|
192
|
+
const response = {
|
|
193
|
+
$metadata: deserializeMetadata(output),
|
|
194
|
+
...contents,
|
|
195
|
+
};
|
|
196
|
+
return Promise.resolve(response);
|
|
197
|
+
};
|
|
198
|
+
const deserializeAws_json1_1AddTagsToResourceCommandError = async (output, context) => {
|
|
199
|
+
const parsedOutput = {
|
|
200
|
+
...output,
|
|
201
|
+
body: await parseErrorBody(output.body, context),
|
|
202
|
+
};
|
|
203
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
204
|
+
switch (errorCode) {
|
|
205
|
+
case "CloudHsmInternalException":
|
|
206
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
207
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
208
|
+
case "CloudHsmServiceException":
|
|
209
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
210
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
211
|
+
case "InvalidRequestException":
|
|
212
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
213
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
214
|
+
default:
|
|
215
|
+
const parsedBody = parsedOutput.body;
|
|
216
|
+
throwDefaultError({
|
|
217
|
+
output,
|
|
218
|
+
parsedBody,
|
|
219
|
+
exceptionCtor: __BaseException,
|
|
220
|
+
errorCode,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
export const deserializeAws_json1_1CreateHapgCommand = async (output, context) => {
|
|
225
|
+
if (output.statusCode >= 300) {
|
|
226
|
+
return deserializeAws_json1_1CreateHapgCommandError(output, context);
|
|
227
|
+
}
|
|
228
|
+
const data = await parseBody(output.body, context);
|
|
229
|
+
let contents = {};
|
|
230
|
+
contents = deserializeAws_json1_1CreateHapgResponse(data, context);
|
|
231
|
+
const response = {
|
|
232
|
+
$metadata: deserializeMetadata(output),
|
|
233
|
+
...contents,
|
|
234
|
+
};
|
|
235
|
+
return Promise.resolve(response);
|
|
236
|
+
};
|
|
237
|
+
const deserializeAws_json1_1CreateHapgCommandError = async (output, context) => {
|
|
238
|
+
const parsedOutput = {
|
|
239
|
+
...output,
|
|
240
|
+
body: await parseErrorBody(output.body, context),
|
|
241
|
+
};
|
|
242
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
+
switch (errorCode) {
|
|
244
|
+
case "CloudHsmInternalException":
|
|
245
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
246
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
247
|
+
case "CloudHsmServiceException":
|
|
248
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
249
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
250
|
+
case "InvalidRequestException":
|
|
251
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
252
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
253
|
+
default:
|
|
254
|
+
const parsedBody = parsedOutput.body;
|
|
255
|
+
throwDefaultError({
|
|
256
|
+
output,
|
|
257
|
+
parsedBody,
|
|
258
|
+
exceptionCtor: __BaseException,
|
|
259
|
+
errorCode,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
export const deserializeAws_json1_1CreateHsmCommand = async (output, context) => {
|
|
264
|
+
if (output.statusCode >= 300) {
|
|
265
|
+
return deserializeAws_json1_1CreateHsmCommandError(output, context);
|
|
266
|
+
}
|
|
267
|
+
const data = await parseBody(output.body, context);
|
|
268
|
+
let contents = {};
|
|
269
|
+
contents = deserializeAws_json1_1CreateHsmResponse(data, context);
|
|
270
|
+
const response = {
|
|
271
|
+
$metadata: deserializeMetadata(output),
|
|
272
|
+
...contents,
|
|
273
|
+
};
|
|
274
|
+
return Promise.resolve(response);
|
|
275
|
+
};
|
|
276
|
+
const deserializeAws_json1_1CreateHsmCommandError = async (output, context) => {
|
|
277
|
+
const parsedOutput = {
|
|
278
|
+
...output,
|
|
279
|
+
body: await parseErrorBody(output.body, context),
|
|
280
|
+
};
|
|
281
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
|
+
switch (errorCode) {
|
|
283
|
+
case "CloudHsmInternalException":
|
|
284
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
285
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
286
|
+
case "CloudHsmServiceException":
|
|
287
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
288
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
289
|
+
case "InvalidRequestException":
|
|
290
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
291
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
292
|
+
default:
|
|
293
|
+
const parsedBody = parsedOutput.body;
|
|
294
|
+
throwDefaultError({
|
|
295
|
+
output,
|
|
296
|
+
parsedBody,
|
|
297
|
+
exceptionCtor: __BaseException,
|
|
298
|
+
errorCode,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
1427
301
|
};
|
|
1428
|
-
|
|
1429
|
-
|
|
302
|
+
export const deserializeAws_json1_1CreateLunaClientCommand = async (output, context) => {
|
|
303
|
+
if (output.statusCode >= 300) {
|
|
304
|
+
return deserializeAws_json1_1CreateLunaClientCommandError(output, context);
|
|
305
|
+
}
|
|
306
|
+
const data = await parseBody(output.body, context);
|
|
307
|
+
let contents = {};
|
|
308
|
+
contents = deserializeAws_json1_1CreateLunaClientResponse(data, context);
|
|
309
|
+
const response = {
|
|
310
|
+
$metadata: deserializeMetadata(output),
|
|
311
|
+
...contents,
|
|
312
|
+
};
|
|
313
|
+
return Promise.resolve(response);
|
|
314
|
+
};
|
|
315
|
+
const deserializeAws_json1_1CreateLunaClientCommandError = async (output, context) => {
|
|
316
|
+
const parsedOutput = {
|
|
317
|
+
...output,
|
|
318
|
+
body: await parseErrorBody(output.body, context),
|
|
319
|
+
};
|
|
320
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
321
|
+
switch (errorCode) {
|
|
322
|
+
case "CloudHsmInternalException":
|
|
323
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
324
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
325
|
+
case "CloudHsmServiceException":
|
|
326
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
327
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
328
|
+
case "InvalidRequestException":
|
|
329
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
330
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
331
|
+
default:
|
|
332
|
+
const parsedBody = parsedOutput.body;
|
|
333
|
+
throwDefaultError({
|
|
334
|
+
output,
|
|
335
|
+
parsedBody,
|
|
336
|
+
exceptionCtor: __BaseException,
|
|
337
|
+
errorCode,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
export const deserializeAws_json1_1DeleteHapgCommand = async (output, context) => {
|
|
342
|
+
if (output.statusCode >= 300) {
|
|
343
|
+
return deserializeAws_json1_1DeleteHapgCommandError(output, context);
|
|
344
|
+
}
|
|
345
|
+
const data = await parseBody(output.body, context);
|
|
346
|
+
let contents = {};
|
|
347
|
+
contents = deserializeAws_json1_1DeleteHapgResponse(data, context);
|
|
348
|
+
const response = {
|
|
349
|
+
$metadata: deserializeMetadata(output),
|
|
350
|
+
...contents,
|
|
351
|
+
};
|
|
352
|
+
return Promise.resolve(response);
|
|
353
|
+
};
|
|
354
|
+
const deserializeAws_json1_1DeleteHapgCommandError = async (output, context) => {
|
|
355
|
+
const parsedOutput = {
|
|
356
|
+
...output,
|
|
357
|
+
body: await parseErrorBody(output.body, context),
|
|
358
|
+
};
|
|
359
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
|
+
switch (errorCode) {
|
|
361
|
+
case "CloudHsmInternalException":
|
|
362
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
363
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
364
|
+
case "CloudHsmServiceException":
|
|
365
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
366
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
367
|
+
case "InvalidRequestException":
|
|
368
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
369
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
370
|
+
default:
|
|
371
|
+
const parsedBody = parsedOutput.body;
|
|
372
|
+
throwDefaultError({
|
|
373
|
+
output,
|
|
374
|
+
parsedBody,
|
|
375
|
+
exceptionCtor: __BaseException,
|
|
376
|
+
errorCode,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
export const deserializeAws_json1_1DeleteHsmCommand = async (output, context) => {
|
|
381
|
+
if (output.statusCode >= 300) {
|
|
382
|
+
return deserializeAws_json1_1DeleteHsmCommandError(output, context);
|
|
383
|
+
}
|
|
384
|
+
const data = await parseBody(output.body, context);
|
|
385
|
+
let contents = {};
|
|
386
|
+
contents = deserializeAws_json1_1DeleteHsmResponse(data, context);
|
|
387
|
+
const response = {
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
...contents,
|
|
390
|
+
};
|
|
391
|
+
return Promise.resolve(response);
|
|
392
|
+
};
|
|
393
|
+
const deserializeAws_json1_1DeleteHsmCommandError = async (output, context) => {
|
|
394
|
+
const parsedOutput = {
|
|
395
|
+
...output,
|
|
396
|
+
body: await parseErrorBody(output.body, context),
|
|
397
|
+
};
|
|
398
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
399
|
+
switch (errorCode) {
|
|
400
|
+
case "CloudHsmInternalException":
|
|
401
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
402
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
403
|
+
case "CloudHsmServiceException":
|
|
404
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
405
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
406
|
+
case "InvalidRequestException":
|
|
407
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
408
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
409
|
+
default:
|
|
410
|
+
const parsedBody = parsedOutput.body;
|
|
411
|
+
throwDefaultError({
|
|
412
|
+
output,
|
|
413
|
+
parsedBody,
|
|
414
|
+
exceptionCtor: __BaseException,
|
|
415
|
+
errorCode,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
export const deserializeAws_json1_1DeleteLunaClientCommand = async (output, context) => {
|
|
420
|
+
if (output.statusCode >= 300) {
|
|
421
|
+
return deserializeAws_json1_1DeleteLunaClientCommandError(output, context);
|
|
422
|
+
}
|
|
423
|
+
const data = await parseBody(output.body, context);
|
|
424
|
+
let contents = {};
|
|
425
|
+
contents = deserializeAws_json1_1DeleteLunaClientResponse(data, context);
|
|
426
|
+
const response = {
|
|
427
|
+
$metadata: deserializeMetadata(output),
|
|
428
|
+
...contents,
|
|
429
|
+
};
|
|
430
|
+
return Promise.resolve(response);
|
|
431
|
+
};
|
|
432
|
+
const deserializeAws_json1_1DeleteLunaClientCommandError = async (output, context) => {
|
|
433
|
+
const parsedOutput = {
|
|
434
|
+
...output,
|
|
435
|
+
body: await parseErrorBody(output.body, context),
|
|
436
|
+
};
|
|
437
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
+
switch (errorCode) {
|
|
439
|
+
case "CloudHsmInternalException":
|
|
440
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
441
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
442
|
+
case "CloudHsmServiceException":
|
|
443
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
444
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
445
|
+
case "InvalidRequestException":
|
|
446
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
447
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
448
|
+
default:
|
|
449
|
+
const parsedBody = parsedOutput.body;
|
|
450
|
+
throwDefaultError({
|
|
451
|
+
output,
|
|
452
|
+
parsedBody,
|
|
453
|
+
exceptionCtor: __BaseException,
|
|
454
|
+
errorCode,
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
export const deserializeAws_json1_1DescribeHapgCommand = async (output, context) => {
|
|
459
|
+
if (output.statusCode >= 300) {
|
|
460
|
+
return deserializeAws_json1_1DescribeHapgCommandError(output, context);
|
|
461
|
+
}
|
|
462
|
+
const data = await parseBody(output.body, context);
|
|
463
|
+
let contents = {};
|
|
464
|
+
contents = deserializeAws_json1_1DescribeHapgResponse(data, context);
|
|
465
|
+
const response = {
|
|
466
|
+
$metadata: deserializeMetadata(output),
|
|
467
|
+
...contents,
|
|
468
|
+
};
|
|
469
|
+
return Promise.resolve(response);
|
|
470
|
+
};
|
|
471
|
+
const deserializeAws_json1_1DescribeHapgCommandError = async (output, context) => {
|
|
472
|
+
const parsedOutput = {
|
|
473
|
+
...output,
|
|
474
|
+
body: await parseErrorBody(output.body, context),
|
|
475
|
+
};
|
|
476
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
477
|
+
switch (errorCode) {
|
|
478
|
+
case "CloudHsmInternalException":
|
|
479
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
480
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
481
|
+
case "CloudHsmServiceException":
|
|
482
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
483
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
484
|
+
case "InvalidRequestException":
|
|
485
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
486
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
487
|
+
default:
|
|
488
|
+
const parsedBody = parsedOutput.body;
|
|
489
|
+
throwDefaultError({
|
|
490
|
+
output,
|
|
491
|
+
parsedBody,
|
|
492
|
+
exceptionCtor: __BaseException,
|
|
493
|
+
errorCode,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
export const deserializeAws_json1_1DescribeHsmCommand = async (output, context) => {
|
|
498
|
+
if (output.statusCode >= 300) {
|
|
499
|
+
return deserializeAws_json1_1DescribeHsmCommandError(output, context);
|
|
500
|
+
}
|
|
501
|
+
const data = await parseBody(output.body, context);
|
|
502
|
+
let contents = {};
|
|
503
|
+
contents = deserializeAws_json1_1DescribeHsmResponse(data, context);
|
|
504
|
+
const response = {
|
|
505
|
+
$metadata: deserializeMetadata(output),
|
|
506
|
+
...contents,
|
|
507
|
+
};
|
|
508
|
+
return Promise.resolve(response);
|
|
509
|
+
};
|
|
510
|
+
const deserializeAws_json1_1DescribeHsmCommandError = async (output, context) => {
|
|
511
|
+
const parsedOutput = {
|
|
512
|
+
...output,
|
|
513
|
+
body: await parseErrorBody(output.body, context),
|
|
514
|
+
};
|
|
515
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
+
switch (errorCode) {
|
|
517
|
+
case "CloudHsmInternalException":
|
|
518
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
519
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
520
|
+
case "CloudHsmServiceException":
|
|
521
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
522
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
523
|
+
case "InvalidRequestException":
|
|
524
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
525
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
526
|
+
default:
|
|
527
|
+
const parsedBody = parsedOutput.body;
|
|
528
|
+
throwDefaultError({
|
|
529
|
+
output,
|
|
530
|
+
parsedBody,
|
|
531
|
+
exceptionCtor: __BaseException,
|
|
532
|
+
errorCode,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
export const deserializeAws_json1_1DescribeLunaClientCommand = async (output, context) => {
|
|
537
|
+
if (output.statusCode >= 300) {
|
|
538
|
+
return deserializeAws_json1_1DescribeLunaClientCommandError(output, context);
|
|
539
|
+
}
|
|
540
|
+
const data = await parseBody(output.body, context);
|
|
541
|
+
let contents = {};
|
|
542
|
+
contents = deserializeAws_json1_1DescribeLunaClientResponse(data, context);
|
|
543
|
+
const response = {
|
|
544
|
+
$metadata: deserializeMetadata(output),
|
|
545
|
+
...contents,
|
|
546
|
+
};
|
|
547
|
+
return Promise.resolve(response);
|
|
548
|
+
};
|
|
549
|
+
const deserializeAws_json1_1DescribeLunaClientCommandError = async (output, context) => {
|
|
550
|
+
const parsedOutput = {
|
|
551
|
+
...output,
|
|
552
|
+
body: await parseErrorBody(output.body, context),
|
|
553
|
+
};
|
|
554
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
555
|
+
switch (errorCode) {
|
|
556
|
+
case "CloudHsmInternalException":
|
|
557
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
558
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
559
|
+
case "CloudHsmServiceException":
|
|
560
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
561
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
562
|
+
case "InvalidRequestException":
|
|
563
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
564
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
565
|
+
default:
|
|
566
|
+
const parsedBody = parsedOutput.body;
|
|
567
|
+
throwDefaultError({
|
|
568
|
+
output,
|
|
569
|
+
parsedBody,
|
|
570
|
+
exceptionCtor: __BaseException,
|
|
571
|
+
errorCode,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
export const deserializeAws_json1_1GetConfigCommand = async (output, context) => {
|
|
576
|
+
if (output.statusCode >= 300) {
|
|
577
|
+
return deserializeAws_json1_1GetConfigCommandError(output, context);
|
|
578
|
+
}
|
|
579
|
+
const data = await parseBody(output.body, context);
|
|
580
|
+
let contents = {};
|
|
581
|
+
contents = deserializeAws_json1_1GetConfigResponse(data, context);
|
|
582
|
+
const response = {
|
|
583
|
+
$metadata: deserializeMetadata(output),
|
|
584
|
+
...contents,
|
|
585
|
+
};
|
|
586
|
+
return Promise.resolve(response);
|
|
587
|
+
};
|
|
588
|
+
const deserializeAws_json1_1GetConfigCommandError = async (output, context) => {
|
|
589
|
+
const parsedOutput = {
|
|
590
|
+
...output,
|
|
591
|
+
body: await parseErrorBody(output.body, context),
|
|
592
|
+
};
|
|
593
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
594
|
+
switch (errorCode) {
|
|
595
|
+
case "CloudHsmInternalException":
|
|
596
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
597
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
598
|
+
case "CloudHsmServiceException":
|
|
599
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
600
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
601
|
+
case "InvalidRequestException":
|
|
602
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
603
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
604
|
+
default:
|
|
605
|
+
const parsedBody = parsedOutput.body;
|
|
606
|
+
throwDefaultError({
|
|
607
|
+
output,
|
|
608
|
+
parsedBody,
|
|
609
|
+
exceptionCtor: __BaseException,
|
|
610
|
+
errorCode,
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
export const deserializeAws_json1_1ListAvailableZonesCommand = async (output, context) => {
|
|
615
|
+
if (output.statusCode >= 300) {
|
|
616
|
+
return deserializeAws_json1_1ListAvailableZonesCommandError(output, context);
|
|
617
|
+
}
|
|
618
|
+
const data = await parseBody(output.body, context);
|
|
619
|
+
let contents = {};
|
|
620
|
+
contents = deserializeAws_json1_1ListAvailableZonesResponse(data, context);
|
|
621
|
+
const response = {
|
|
622
|
+
$metadata: deserializeMetadata(output),
|
|
623
|
+
...contents,
|
|
624
|
+
};
|
|
625
|
+
return Promise.resolve(response);
|
|
626
|
+
};
|
|
627
|
+
const deserializeAws_json1_1ListAvailableZonesCommandError = async (output, context) => {
|
|
628
|
+
const parsedOutput = {
|
|
629
|
+
...output,
|
|
630
|
+
body: await parseErrorBody(output.body, context),
|
|
631
|
+
};
|
|
632
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
+
switch (errorCode) {
|
|
634
|
+
case "CloudHsmInternalException":
|
|
635
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
636
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "CloudHsmServiceException":
|
|
638
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
639
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
640
|
+
case "InvalidRequestException":
|
|
641
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
642
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
643
|
+
default:
|
|
644
|
+
const parsedBody = parsedOutput.body;
|
|
645
|
+
throwDefaultError({
|
|
646
|
+
output,
|
|
647
|
+
parsedBody,
|
|
648
|
+
exceptionCtor: __BaseException,
|
|
649
|
+
errorCode,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
export const deserializeAws_json1_1ListHapgsCommand = async (output, context) => {
|
|
654
|
+
if (output.statusCode >= 300) {
|
|
655
|
+
return deserializeAws_json1_1ListHapgsCommandError(output, context);
|
|
656
|
+
}
|
|
657
|
+
const data = await parseBody(output.body, context);
|
|
658
|
+
let contents = {};
|
|
659
|
+
contents = deserializeAws_json1_1ListHapgsResponse(data, context);
|
|
660
|
+
const response = {
|
|
661
|
+
$metadata: deserializeMetadata(output),
|
|
662
|
+
...contents,
|
|
663
|
+
};
|
|
664
|
+
return Promise.resolve(response);
|
|
665
|
+
};
|
|
666
|
+
const deserializeAws_json1_1ListHapgsCommandError = async (output, context) => {
|
|
667
|
+
const parsedOutput = {
|
|
668
|
+
...output,
|
|
669
|
+
body: await parseErrorBody(output.body, context),
|
|
670
|
+
};
|
|
671
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
+
switch (errorCode) {
|
|
673
|
+
case "CloudHsmInternalException":
|
|
674
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
675
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "CloudHsmServiceException":
|
|
677
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
678
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
679
|
+
case "InvalidRequestException":
|
|
680
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
681
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
682
|
+
default:
|
|
683
|
+
const parsedBody = parsedOutput.body;
|
|
684
|
+
throwDefaultError({
|
|
685
|
+
output,
|
|
686
|
+
parsedBody,
|
|
687
|
+
exceptionCtor: __BaseException,
|
|
688
|
+
errorCode,
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
export const deserializeAws_json1_1ListHsmsCommand = async (output, context) => {
|
|
693
|
+
if (output.statusCode >= 300) {
|
|
694
|
+
return deserializeAws_json1_1ListHsmsCommandError(output, context);
|
|
695
|
+
}
|
|
696
|
+
const data = await parseBody(output.body, context);
|
|
697
|
+
let contents = {};
|
|
698
|
+
contents = deserializeAws_json1_1ListHsmsResponse(data, context);
|
|
699
|
+
const response = {
|
|
700
|
+
$metadata: deserializeMetadata(output),
|
|
701
|
+
...contents,
|
|
702
|
+
};
|
|
703
|
+
return Promise.resolve(response);
|
|
704
|
+
};
|
|
705
|
+
const deserializeAws_json1_1ListHsmsCommandError = async (output, context) => {
|
|
706
|
+
const parsedOutput = {
|
|
707
|
+
...output,
|
|
708
|
+
body: await parseErrorBody(output.body, context),
|
|
709
|
+
};
|
|
710
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
711
|
+
switch (errorCode) {
|
|
712
|
+
case "CloudHsmInternalException":
|
|
713
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
714
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
715
|
+
case "CloudHsmServiceException":
|
|
716
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
717
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
718
|
+
case "InvalidRequestException":
|
|
719
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
720
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
721
|
+
default:
|
|
722
|
+
const parsedBody = parsedOutput.body;
|
|
723
|
+
throwDefaultError({
|
|
724
|
+
output,
|
|
725
|
+
parsedBody,
|
|
726
|
+
exceptionCtor: __BaseException,
|
|
727
|
+
errorCode,
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
export const deserializeAws_json1_1ListLunaClientsCommand = async (output, context) => {
|
|
732
|
+
if (output.statusCode >= 300) {
|
|
733
|
+
return deserializeAws_json1_1ListLunaClientsCommandError(output, context);
|
|
734
|
+
}
|
|
735
|
+
const data = await parseBody(output.body, context);
|
|
736
|
+
let contents = {};
|
|
737
|
+
contents = deserializeAws_json1_1ListLunaClientsResponse(data, context);
|
|
738
|
+
const response = {
|
|
739
|
+
$metadata: deserializeMetadata(output),
|
|
740
|
+
...contents,
|
|
741
|
+
};
|
|
742
|
+
return Promise.resolve(response);
|
|
743
|
+
};
|
|
744
|
+
const deserializeAws_json1_1ListLunaClientsCommandError = async (output, context) => {
|
|
745
|
+
const parsedOutput = {
|
|
746
|
+
...output,
|
|
747
|
+
body: await parseErrorBody(output.body, context),
|
|
748
|
+
};
|
|
749
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
750
|
+
switch (errorCode) {
|
|
751
|
+
case "CloudHsmInternalException":
|
|
752
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
753
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
754
|
+
case "CloudHsmServiceException":
|
|
755
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
756
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
757
|
+
case "InvalidRequestException":
|
|
758
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
759
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
760
|
+
default:
|
|
761
|
+
const parsedBody = parsedOutput.body;
|
|
762
|
+
throwDefaultError({
|
|
763
|
+
output,
|
|
764
|
+
parsedBody,
|
|
765
|
+
exceptionCtor: __BaseException,
|
|
766
|
+
errorCode,
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
771
|
+
if (output.statusCode >= 300) {
|
|
772
|
+
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
773
|
+
}
|
|
774
|
+
const data = await parseBody(output.body, context);
|
|
775
|
+
let contents = {};
|
|
776
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
777
|
+
const response = {
|
|
778
|
+
$metadata: deserializeMetadata(output),
|
|
779
|
+
...contents,
|
|
780
|
+
};
|
|
781
|
+
return Promise.resolve(response);
|
|
782
|
+
};
|
|
783
|
+
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
|
|
784
|
+
const parsedOutput = {
|
|
785
|
+
...output,
|
|
786
|
+
body: await parseErrorBody(output.body, context),
|
|
787
|
+
};
|
|
788
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
789
|
+
switch (errorCode) {
|
|
790
|
+
case "CloudHsmInternalException":
|
|
791
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
792
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
793
|
+
case "CloudHsmServiceException":
|
|
794
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
795
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
796
|
+
case "InvalidRequestException":
|
|
797
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
798
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
799
|
+
default:
|
|
800
|
+
const parsedBody = parsedOutput.body;
|
|
801
|
+
throwDefaultError({
|
|
802
|
+
output,
|
|
803
|
+
parsedBody,
|
|
804
|
+
exceptionCtor: __BaseException,
|
|
805
|
+
errorCode,
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
export const deserializeAws_json1_1ModifyHapgCommand = async (output, context) => {
|
|
810
|
+
if (output.statusCode >= 300) {
|
|
811
|
+
return deserializeAws_json1_1ModifyHapgCommandError(output, context);
|
|
812
|
+
}
|
|
813
|
+
const data = await parseBody(output.body, context);
|
|
814
|
+
let contents = {};
|
|
815
|
+
contents = deserializeAws_json1_1ModifyHapgResponse(data, context);
|
|
816
|
+
const response = {
|
|
817
|
+
$metadata: deserializeMetadata(output),
|
|
818
|
+
...contents,
|
|
819
|
+
};
|
|
820
|
+
return Promise.resolve(response);
|
|
1430
821
|
};
|
|
1431
|
-
|
|
1432
|
-
|
|
822
|
+
const deserializeAws_json1_1ModifyHapgCommandError = async (output, context) => {
|
|
823
|
+
const parsedOutput = {
|
|
824
|
+
...output,
|
|
825
|
+
body: await parseErrorBody(output.body, context),
|
|
826
|
+
};
|
|
827
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
828
|
+
switch (errorCode) {
|
|
829
|
+
case "CloudHsmInternalException":
|
|
830
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
831
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
832
|
+
case "CloudHsmServiceException":
|
|
833
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
834
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
835
|
+
case "InvalidRequestException":
|
|
836
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
837
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
838
|
+
default:
|
|
839
|
+
const parsedBody = parsedOutput.body;
|
|
840
|
+
throwDefaultError({
|
|
841
|
+
output,
|
|
842
|
+
parsedBody,
|
|
843
|
+
exceptionCtor: __BaseException,
|
|
844
|
+
errorCode,
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
export const deserializeAws_json1_1ModifyHsmCommand = async (output, context) => {
|
|
849
|
+
if (output.statusCode >= 300) {
|
|
850
|
+
return deserializeAws_json1_1ModifyHsmCommandError(output, context);
|
|
851
|
+
}
|
|
852
|
+
const data = await parseBody(output.body, context);
|
|
853
|
+
let contents = {};
|
|
854
|
+
contents = deserializeAws_json1_1ModifyHsmResponse(data, context);
|
|
855
|
+
const response = {
|
|
856
|
+
$metadata: deserializeMetadata(output),
|
|
857
|
+
...contents,
|
|
858
|
+
};
|
|
859
|
+
return Promise.resolve(response);
|
|
860
|
+
};
|
|
861
|
+
const deserializeAws_json1_1ModifyHsmCommandError = async (output, context) => {
|
|
862
|
+
const parsedOutput = {
|
|
863
|
+
...output,
|
|
864
|
+
body: await parseErrorBody(output.body, context),
|
|
865
|
+
};
|
|
866
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
867
|
+
switch (errorCode) {
|
|
868
|
+
case "CloudHsmInternalException":
|
|
869
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
870
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
871
|
+
case "CloudHsmServiceException":
|
|
872
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
873
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
874
|
+
case "InvalidRequestException":
|
|
875
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
876
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
877
|
+
default:
|
|
878
|
+
const parsedBody = parsedOutput.body;
|
|
879
|
+
throwDefaultError({
|
|
880
|
+
output,
|
|
881
|
+
parsedBody,
|
|
882
|
+
exceptionCtor: __BaseException,
|
|
883
|
+
errorCode,
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
export const deserializeAws_json1_1ModifyLunaClientCommand = async (output, context) => {
|
|
888
|
+
if (output.statusCode >= 300) {
|
|
889
|
+
return deserializeAws_json1_1ModifyLunaClientCommandError(output, context);
|
|
890
|
+
}
|
|
891
|
+
const data = await parseBody(output.body, context);
|
|
892
|
+
let contents = {};
|
|
893
|
+
contents = deserializeAws_json1_1ModifyLunaClientResponse(data, context);
|
|
894
|
+
const response = {
|
|
895
|
+
$metadata: deserializeMetadata(output),
|
|
896
|
+
...contents,
|
|
897
|
+
};
|
|
898
|
+
return Promise.resolve(response);
|
|
899
|
+
};
|
|
900
|
+
const deserializeAws_json1_1ModifyLunaClientCommandError = async (output, context) => {
|
|
901
|
+
const parsedOutput = {
|
|
902
|
+
...output,
|
|
903
|
+
body: await parseErrorBody(output.body, context),
|
|
904
|
+
};
|
|
905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
906
|
+
switch (errorCode) {
|
|
907
|
+
case "CloudHsmServiceException":
|
|
908
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
909
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
910
|
+
default:
|
|
911
|
+
const parsedBody = parsedOutput.body;
|
|
912
|
+
throwDefaultError({
|
|
913
|
+
output,
|
|
914
|
+
parsedBody,
|
|
915
|
+
exceptionCtor: __BaseException,
|
|
916
|
+
errorCode,
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
export const deserializeAws_json1_1RemoveTagsFromResourceCommand = async (output, context) => {
|
|
921
|
+
if (output.statusCode >= 300) {
|
|
922
|
+
return deserializeAws_json1_1RemoveTagsFromResourceCommandError(output, context);
|
|
923
|
+
}
|
|
924
|
+
const data = await parseBody(output.body, context);
|
|
925
|
+
let contents = {};
|
|
926
|
+
contents = deserializeAws_json1_1RemoveTagsFromResourceResponse(data, context);
|
|
927
|
+
const response = {
|
|
928
|
+
$metadata: deserializeMetadata(output),
|
|
929
|
+
...contents,
|
|
930
|
+
};
|
|
931
|
+
return Promise.resolve(response);
|
|
932
|
+
};
|
|
933
|
+
const deserializeAws_json1_1RemoveTagsFromResourceCommandError = async (output, context) => {
|
|
934
|
+
const parsedOutput = {
|
|
935
|
+
...output,
|
|
936
|
+
body: await parseErrorBody(output.body, context),
|
|
937
|
+
};
|
|
938
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
939
|
+
switch (errorCode) {
|
|
940
|
+
case "CloudHsmInternalException":
|
|
941
|
+
case "com.amazonaws.cloudhsm#CloudHsmInternalException":
|
|
942
|
+
throw await deserializeAws_json1_1CloudHsmInternalExceptionResponse(parsedOutput, context);
|
|
943
|
+
case "CloudHsmServiceException":
|
|
944
|
+
case "com.amazonaws.cloudhsm#CloudHsmServiceException":
|
|
945
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
946
|
+
case "InvalidRequestException":
|
|
947
|
+
case "com.amazonaws.cloudhsm#InvalidRequestException":
|
|
948
|
+
throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
949
|
+
default:
|
|
950
|
+
const parsedBody = parsedOutput.body;
|
|
951
|
+
throwDefaultError({
|
|
952
|
+
output,
|
|
953
|
+
parsedBody,
|
|
954
|
+
exceptionCtor: __BaseException,
|
|
955
|
+
errorCode,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
1433
958
|
};
|
|
1434
|
-
|
|
1435
|
-
|
|
959
|
+
const deserializeAws_json1_1CloudHsmInternalExceptionResponse = async (parsedOutput, context) => {
|
|
960
|
+
const body = parsedOutput.body;
|
|
961
|
+
const deserialized = deserializeAws_json1_1CloudHsmInternalException(body, context);
|
|
962
|
+
const exception = new CloudHsmInternalException({
|
|
963
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
964
|
+
...deserialized,
|
|
965
|
+
});
|
|
966
|
+
return __decorateServiceException(exception, body);
|
|
1436
967
|
};
|
|
1437
|
-
|
|
1438
|
-
|
|
968
|
+
const deserializeAws_json1_1CloudHsmServiceExceptionResponse = async (parsedOutput, context) => {
|
|
969
|
+
const body = parsedOutput.body;
|
|
970
|
+
const deserialized = deserializeAws_json1_1CloudHsmServiceException(body, context);
|
|
971
|
+
const exception = new CloudHsmServiceException({
|
|
972
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
973
|
+
...deserialized,
|
|
974
|
+
});
|
|
975
|
+
return __decorateServiceException(exception, body);
|
|
1439
976
|
};
|
|
1440
|
-
|
|
1441
|
-
|
|
977
|
+
const deserializeAws_json1_1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
978
|
+
const body = parsedOutput.body;
|
|
979
|
+
const deserialized = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
980
|
+
const exception = new InvalidRequestException({
|
|
981
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
982
|
+
...deserialized,
|
|
983
|
+
});
|
|
984
|
+
return __decorateServiceException(exception, body);
|
|
1442
985
|
};
|
|
1443
|
-
|
|
1444
|
-
return
|
|
986
|
+
const serializeAws_json1_1AddTagsToResourceRequest = (input, context) => {
|
|
987
|
+
return {
|
|
988
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
989
|
+
...(input.TagList != null && { TagList: serializeAws_json1_1TagList(input.TagList, context) }),
|
|
990
|
+
};
|
|
991
|
+
};
|
|
992
|
+
const serializeAws_json1_1CreateHapgRequest = (input, context) => {
|
|
993
|
+
return {
|
|
994
|
+
...(input.Label != null && { Label: input.Label }),
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
const serializeAws_json1_1CreateHsmRequest = (input, context) => {
|
|
998
|
+
return {
|
|
999
|
+
...(input.ClientToken != null && { ClientToken: input.ClientToken }),
|
|
1000
|
+
...(input.EniIp != null && { EniIp: input.EniIp }),
|
|
1001
|
+
...(input.ExternalId != null && { ExternalId: input.ExternalId }),
|
|
1002
|
+
...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
|
|
1003
|
+
...(input.SshKey != null && { SshKey: input.SshKey }),
|
|
1004
|
+
...(input.SubnetId != null && { SubnetId: input.SubnetId }),
|
|
1005
|
+
...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
|
|
1006
|
+
...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }),
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
const serializeAws_json1_1CreateLunaClientRequest = (input, context) => {
|
|
1010
|
+
return {
|
|
1011
|
+
...(input.Certificate != null && { Certificate: input.Certificate }),
|
|
1012
|
+
...(input.Label != null && { Label: input.Label }),
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
const serializeAws_json1_1DeleteHapgRequest = (input, context) => {
|
|
1016
|
+
return {
|
|
1017
|
+
...(input.HapgArn != null && { HapgArn: input.HapgArn }),
|
|
1018
|
+
};
|
|
1019
|
+
};
|
|
1020
|
+
const serializeAws_json1_1DeleteHsmRequest = (input, context) => {
|
|
1021
|
+
return {
|
|
1022
|
+
...(input.HsmArn != null && { HsmArn: input.HsmArn }),
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
const serializeAws_json1_1DeleteLunaClientRequest = (input, context) => {
|
|
1026
|
+
return {
|
|
1027
|
+
...(input.ClientArn != null && { ClientArn: input.ClientArn }),
|
|
1028
|
+
};
|
|
1445
1029
|
};
|
|
1446
|
-
|
|
1447
|
-
return
|
|
1030
|
+
const serializeAws_json1_1DescribeHapgRequest = (input, context) => {
|
|
1031
|
+
return {
|
|
1032
|
+
...(input.HapgArn != null && { HapgArn: input.HapgArn }),
|
|
1033
|
+
};
|
|
1448
1034
|
};
|
|
1449
|
-
|
|
1450
|
-
return
|
|
1035
|
+
const serializeAws_json1_1DescribeHsmRequest = (input, context) => {
|
|
1036
|
+
return {
|
|
1037
|
+
...(input.HsmArn != null && { HsmArn: input.HsmArn }),
|
|
1038
|
+
...(input.HsmSerialNumber != null && { HsmSerialNumber: input.HsmSerialNumber }),
|
|
1039
|
+
};
|
|
1451
1040
|
};
|
|
1452
|
-
|
|
1453
|
-
return
|
|
1041
|
+
const serializeAws_json1_1DescribeLunaClientRequest = (input, context) => {
|
|
1042
|
+
return {
|
|
1043
|
+
...(input.CertificateFingerprint != null && { CertificateFingerprint: input.CertificateFingerprint }),
|
|
1044
|
+
...(input.ClientArn != null && { ClientArn: input.ClientArn }),
|
|
1045
|
+
};
|
|
1454
1046
|
};
|
|
1455
|
-
|
|
1456
|
-
return
|
|
1047
|
+
const serializeAws_json1_1GetConfigRequest = (input, context) => {
|
|
1048
|
+
return {
|
|
1049
|
+
...(input.ClientArn != null && { ClientArn: input.ClientArn }),
|
|
1050
|
+
...(input.ClientVersion != null && { ClientVersion: input.ClientVersion }),
|
|
1051
|
+
...(input.HapgList != null && { HapgList: serializeAws_json1_1HapgList(input.HapgList, context) }),
|
|
1052
|
+
};
|
|
1457
1053
|
};
|
|
1458
|
-
|
|
1054
|
+
const serializeAws_json1_1HapgList = (input, context) => {
|
|
1459
1055
|
return input
|
|
1460
|
-
.filter(
|
|
1461
|
-
.map(
|
|
1056
|
+
.filter((e) => e != null)
|
|
1057
|
+
.map((entry) => {
|
|
1462
1058
|
return entry;
|
|
1463
1059
|
});
|
|
1464
1060
|
};
|
|
1465
|
-
|
|
1061
|
+
const serializeAws_json1_1ListAvailableZonesRequest = (input, context) => {
|
|
1466
1062
|
return {};
|
|
1467
1063
|
};
|
|
1468
|
-
|
|
1469
|
-
return
|
|
1064
|
+
const serializeAws_json1_1ListHapgsRequest = (input, context) => {
|
|
1065
|
+
return {
|
|
1066
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1067
|
+
};
|
|
1470
1068
|
};
|
|
1471
|
-
|
|
1472
|
-
return
|
|
1069
|
+
const serializeAws_json1_1ListHsmsRequest = (input, context) => {
|
|
1070
|
+
return {
|
|
1071
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1072
|
+
};
|
|
1473
1073
|
};
|
|
1474
|
-
|
|
1475
|
-
return
|
|
1074
|
+
const serializeAws_json1_1ListLunaClientsRequest = (input, context) => {
|
|
1075
|
+
return {
|
|
1076
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1077
|
+
};
|
|
1476
1078
|
};
|
|
1477
|
-
|
|
1478
|
-
return
|
|
1079
|
+
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
|
|
1080
|
+
return {
|
|
1081
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1082
|
+
};
|
|
1479
1083
|
};
|
|
1480
|
-
|
|
1481
|
-
return
|
|
1482
|
-
|
|
1483
|
-
|
|
1084
|
+
const serializeAws_json1_1ModifyHapgRequest = (input, context) => {
|
|
1085
|
+
return {
|
|
1086
|
+
...(input.HapgArn != null && { HapgArn: input.HapgArn }),
|
|
1087
|
+
...(input.Label != null && { Label: input.Label }),
|
|
1088
|
+
...(input.PartitionSerialList != null && {
|
|
1089
|
+
PartitionSerialList: serializeAws_json1_1PartitionSerialList(input.PartitionSerialList, context),
|
|
1090
|
+
}),
|
|
1091
|
+
};
|
|
1484
1092
|
};
|
|
1485
|
-
|
|
1486
|
-
return
|
|
1093
|
+
const serializeAws_json1_1ModifyHsmRequest = (input, context) => {
|
|
1094
|
+
return {
|
|
1095
|
+
...(input.EniIp != null && { EniIp: input.EniIp }),
|
|
1096
|
+
...(input.ExternalId != null && { ExternalId: input.ExternalId }),
|
|
1097
|
+
...(input.HsmArn != null && { HsmArn: input.HsmArn }),
|
|
1098
|
+
...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
|
|
1099
|
+
...(input.SubnetId != null && { SubnetId: input.SubnetId }),
|
|
1100
|
+
...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }),
|
|
1101
|
+
};
|
|
1487
1102
|
};
|
|
1488
|
-
|
|
1489
|
-
return
|
|
1103
|
+
const serializeAws_json1_1ModifyLunaClientRequest = (input, context) => {
|
|
1104
|
+
return {
|
|
1105
|
+
...(input.Certificate != null && { Certificate: input.Certificate }),
|
|
1106
|
+
...(input.ClientArn != null && { ClientArn: input.ClientArn }),
|
|
1107
|
+
};
|
|
1490
1108
|
};
|
|
1491
|
-
|
|
1109
|
+
const serializeAws_json1_1PartitionSerialList = (input, context) => {
|
|
1492
1110
|
return input
|
|
1493
|
-
.filter(
|
|
1494
|
-
.map(
|
|
1111
|
+
.filter((e) => e != null)
|
|
1112
|
+
.map((entry) => {
|
|
1495
1113
|
return entry;
|
|
1496
1114
|
});
|
|
1497
1115
|
};
|
|
1498
|
-
|
|
1499
|
-
return
|
|
1116
|
+
const serializeAws_json1_1RemoveTagsFromResourceRequest = (input, context) => {
|
|
1117
|
+
return {
|
|
1118
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1119
|
+
...(input.TagKeyList != null && { TagKeyList: serializeAws_json1_1TagKeyList(input.TagKeyList, context) }),
|
|
1120
|
+
};
|
|
1500
1121
|
};
|
|
1501
|
-
|
|
1502
|
-
return
|
|
1122
|
+
const serializeAws_json1_1Tag = (input, context) => {
|
|
1123
|
+
return {
|
|
1124
|
+
...(input.Key != null && { Key: input.Key }),
|
|
1125
|
+
...(input.Value != null && { Value: input.Value }),
|
|
1126
|
+
};
|
|
1503
1127
|
};
|
|
1504
|
-
|
|
1128
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
1505
1129
|
return input
|
|
1506
|
-
.filter(
|
|
1507
|
-
.map(
|
|
1130
|
+
.filter((e) => e != null)
|
|
1131
|
+
.map((entry) => {
|
|
1508
1132
|
return entry;
|
|
1509
1133
|
});
|
|
1510
1134
|
};
|
|
1511
|
-
|
|
1135
|
+
const serializeAws_json1_1TagList = (input, context) => {
|
|
1512
1136
|
return input
|
|
1513
|
-
.filter(
|
|
1514
|
-
.map(
|
|
1137
|
+
.filter((e) => e != null)
|
|
1138
|
+
.map((entry) => {
|
|
1515
1139
|
return serializeAws_json1_1Tag(entry, context);
|
|
1516
1140
|
});
|
|
1517
1141
|
};
|
|
1518
|
-
|
|
1142
|
+
const deserializeAws_json1_1AddTagsToResourceResponse = (output, context) => {
|
|
1519
1143
|
return {
|
|
1520
1144
|
Status: __expectString(output.Status),
|
|
1521
1145
|
};
|
|
1522
1146
|
};
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
.filter(
|
|
1526
|
-
.map(
|
|
1147
|
+
const deserializeAws_json1_1AZList = (output, context) => {
|
|
1148
|
+
const retVal = (output || [])
|
|
1149
|
+
.filter((e) => e != null)
|
|
1150
|
+
.map((entry) => {
|
|
1527
1151
|
if (entry === null) {
|
|
1528
1152
|
return null;
|
|
1529
1153
|
}
|
|
@@ -1531,10 +1155,10 @@ var deserializeAws_json1_1AZList = function (output, context) {
|
|
|
1531
1155
|
});
|
|
1532
1156
|
return retVal;
|
|
1533
1157
|
};
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
.filter(
|
|
1537
|
-
.map(
|
|
1158
|
+
const deserializeAws_json1_1ClientList = (output, context) => {
|
|
1159
|
+
const retVal = (output || [])
|
|
1160
|
+
.filter((e) => e != null)
|
|
1161
|
+
.map((entry) => {
|
|
1538
1162
|
if (entry === null) {
|
|
1539
1163
|
return null;
|
|
1540
1164
|
}
|
|
@@ -1542,49 +1166,49 @@ var deserializeAws_json1_1ClientList = function (output, context) {
|
|
|
1542
1166
|
});
|
|
1543
1167
|
return retVal;
|
|
1544
1168
|
};
|
|
1545
|
-
|
|
1169
|
+
const deserializeAws_json1_1CloudHsmInternalException = (output, context) => {
|
|
1546
1170
|
return {
|
|
1547
1171
|
message: __expectString(output.message),
|
|
1548
1172
|
retryable: __expectBoolean(output.retryable),
|
|
1549
1173
|
};
|
|
1550
1174
|
};
|
|
1551
|
-
|
|
1175
|
+
const deserializeAws_json1_1CloudHsmServiceException = (output, context) => {
|
|
1552
1176
|
return {
|
|
1553
1177
|
message: __expectString(output.message),
|
|
1554
1178
|
retryable: __expectBoolean(output.retryable),
|
|
1555
1179
|
};
|
|
1556
1180
|
};
|
|
1557
|
-
|
|
1181
|
+
const deserializeAws_json1_1CreateHapgResponse = (output, context) => {
|
|
1558
1182
|
return {
|
|
1559
1183
|
HapgArn: __expectString(output.HapgArn),
|
|
1560
1184
|
};
|
|
1561
1185
|
};
|
|
1562
|
-
|
|
1186
|
+
const deserializeAws_json1_1CreateHsmResponse = (output, context) => {
|
|
1563
1187
|
return {
|
|
1564
1188
|
HsmArn: __expectString(output.HsmArn),
|
|
1565
1189
|
};
|
|
1566
1190
|
};
|
|
1567
|
-
|
|
1191
|
+
const deserializeAws_json1_1CreateLunaClientResponse = (output, context) => {
|
|
1568
1192
|
return {
|
|
1569
1193
|
ClientArn: __expectString(output.ClientArn),
|
|
1570
1194
|
};
|
|
1571
1195
|
};
|
|
1572
|
-
|
|
1196
|
+
const deserializeAws_json1_1DeleteHapgResponse = (output, context) => {
|
|
1573
1197
|
return {
|
|
1574
1198
|
Status: __expectString(output.Status),
|
|
1575
1199
|
};
|
|
1576
1200
|
};
|
|
1577
|
-
|
|
1201
|
+
const deserializeAws_json1_1DeleteHsmResponse = (output, context) => {
|
|
1578
1202
|
return {
|
|
1579
1203
|
Status: __expectString(output.Status),
|
|
1580
1204
|
};
|
|
1581
1205
|
};
|
|
1582
|
-
|
|
1206
|
+
const deserializeAws_json1_1DeleteLunaClientResponse = (output, context) => {
|
|
1583
1207
|
return {
|
|
1584
1208
|
Status: __expectString(output.Status),
|
|
1585
1209
|
};
|
|
1586
1210
|
};
|
|
1587
|
-
|
|
1211
|
+
const deserializeAws_json1_1DescribeHapgResponse = (output, context) => {
|
|
1588
1212
|
return {
|
|
1589
1213
|
HapgArn: __expectString(output.HapgArn),
|
|
1590
1214
|
HapgSerial: __expectString(output.HapgSerial),
|
|
@@ -1605,7 +1229,7 @@ var deserializeAws_json1_1DescribeHapgResponse = function (output, context) {
|
|
|
1605
1229
|
State: __expectString(output.State),
|
|
1606
1230
|
};
|
|
1607
1231
|
};
|
|
1608
|
-
|
|
1232
|
+
const deserializeAws_json1_1DescribeHsmResponse = (output, context) => {
|
|
1609
1233
|
return {
|
|
1610
1234
|
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
1611
1235
|
EniId: __expectString(output.EniId),
|
|
@@ -1630,7 +1254,7 @@ var deserializeAws_json1_1DescribeHsmResponse = function (output, context) {
|
|
|
1630
1254
|
VpcId: __expectString(output.VpcId),
|
|
1631
1255
|
};
|
|
1632
1256
|
};
|
|
1633
|
-
|
|
1257
|
+
const deserializeAws_json1_1DescribeLunaClientResponse = (output, context) => {
|
|
1634
1258
|
return {
|
|
1635
1259
|
Certificate: __expectString(output.Certificate),
|
|
1636
1260
|
CertificateFingerprint: __expectString(output.CertificateFingerprint),
|
|
@@ -1639,17 +1263,17 @@ var deserializeAws_json1_1DescribeLunaClientResponse = function (output, context
|
|
|
1639
1263
|
LastModifiedTimestamp: __expectString(output.LastModifiedTimestamp),
|
|
1640
1264
|
};
|
|
1641
1265
|
};
|
|
1642
|
-
|
|
1266
|
+
const deserializeAws_json1_1GetConfigResponse = (output, context) => {
|
|
1643
1267
|
return {
|
|
1644
1268
|
ConfigCred: __expectString(output.ConfigCred),
|
|
1645
1269
|
ConfigFile: __expectString(output.ConfigFile),
|
|
1646
1270
|
ConfigType: __expectString(output.ConfigType),
|
|
1647
1271
|
};
|
|
1648
1272
|
};
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
.filter(
|
|
1652
|
-
.map(
|
|
1273
|
+
const deserializeAws_json1_1HapgList = (output, context) => {
|
|
1274
|
+
const retVal = (output || [])
|
|
1275
|
+
.filter((e) => e != null)
|
|
1276
|
+
.map((entry) => {
|
|
1653
1277
|
if (entry === null) {
|
|
1654
1278
|
return null;
|
|
1655
1279
|
}
|
|
@@ -1657,10 +1281,10 @@ var deserializeAws_json1_1HapgList = function (output, context) {
|
|
|
1657
1281
|
});
|
|
1658
1282
|
return retVal;
|
|
1659
1283
|
};
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
.filter(
|
|
1663
|
-
.map(
|
|
1284
|
+
const deserializeAws_json1_1HsmList = (output, context) => {
|
|
1285
|
+
const retVal = (output || [])
|
|
1286
|
+
.filter((e) => e != null)
|
|
1287
|
+
.map((entry) => {
|
|
1664
1288
|
if (entry === null) {
|
|
1665
1289
|
return null;
|
|
1666
1290
|
}
|
|
@@ -1668,59 +1292,59 @@ var deserializeAws_json1_1HsmList = function (output, context) {
|
|
|
1668
1292
|
});
|
|
1669
1293
|
return retVal;
|
|
1670
1294
|
};
|
|
1671
|
-
|
|
1295
|
+
const deserializeAws_json1_1InvalidRequestException = (output, context) => {
|
|
1672
1296
|
return {
|
|
1673
1297
|
message: __expectString(output.message),
|
|
1674
1298
|
retryable: __expectBoolean(output.retryable),
|
|
1675
1299
|
};
|
|
1676
1300
|
};
|
|
1677
|
-
|
|
1301
|
+
const deserializeAws_json1_1ListAvailableZonesResponse = (output, context) => {
|
|
1678
1302
|
return {
|
|
1679
1303
|
AZList: output.AZList != null ? deserializeAws_json1_1AZList(output.AZList, context) : undefined,
|
|
1680
1304
|
};
|
|
1681
1305
|
};
|
|
1682
|
-
|
|
1306
|
+
const deserializeAws_json1_1ListHapgsResponse = (output, context) => {
|
|
1683
1307
|
return {
|
|
1684
1308
|
HapgList: output.HapgList != null ? deserializeAws_json1_1HapgList(output.HapgList, context) : undefined,
|
|
1685
1309
|
NextToken: __expectString(output.NextToken),
|
|
1686
1310
|
};
|
|
1687
1311
|
};
|
|
1688
|
-
|
|
1312
|
+
const deserializeAws_json1_1ListHsmsResponse = (output, context) => {
|
|
1689
1313
|
return {
|
|
1690
1314
|
HsmList: output.HsmList != null ? deserializeAws_json1_1HsmList(output.HsmList, context) : undefined,
|
|
1691
1315
|
NextToken: __expectString(output.NextToken),
|
|
1692
1316
|
};
|
|
1693
1317
|
};
|
|
1694
|
-
|
|
1318
|
+
const deserializeAws_json1_1ListLunaClientsResponse = (output, context) => {
|
|
1695
1319
|
return {
|
|
1696
1320
|
ClientList: output.ClientList != null ? deserializeAws_json1_1ClientList(output.ClientList, context) : undefined,
|
|
1697
1321
|
NextToken: __expectString(output.NextToken),
|
|
1698
1322
|
};
|
|
1699
1323
|
};
|
|
1700
|
-
|
|
1324
|
+
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
|
|
1701
1325
|
return {
|
|
1702
1326
|
TagList: output.TagList != null ? deserializeAws_json1_1TagList(output.TagList, context) : undefined,
|
|
1703
1327
|
};
|
|
1704
1328
|
};
|
|
1705
|
-
|
|
1329
|
+
const deserializeAws_json1_1ModifyHapgResponse = (output, context) => {
|
|
1706
1330
|
return {
|
|
1707
1331
|
HapgArn: __expectString(output.HapgArn),
|
|
1708
1332
|
};
|
|
1709
1333
|
};
|
|
1710
|
-
|
|
1334
|
+
const deserializeAws_json1_1ModifyHsmResponse = (output, context) => {
|
|
1711
1335
|
return {
|
|
1712
1336
|
HsmArn: __expectString(output.HsmArn),
|
|
1713
1337
|
};
|
|
1714
1338
|
};
|
|
1715
|
-
|
|
1339
|
+
const deserializeAws_json1_1ModifyLunaClientResponse = (output, context) => {
|
|
1716
1340
|
return {
|
|
1717
1341
|
ClientArn: __expectString(output.ClientArn),
|
|
1718
1342
|
};
|
|
1719
1343
|
};
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
.filter(
|
|
1723
|
-
.map(
|
|
1344
|
+
const deserializeAws_json1_1PartitionList = (output, context) => {
|
|
1345
|
+
const retVal = (output || [])
|
|
1346
|
+
.filter((e) => e != null)
|
|
1347
|
+
.map((entry) => {
|
|
1724
1348
|
if (entry === null) {
|
|
1725
1349
|
return null;
|
|
1726
1350
|
}
|
|
@@ -1728,10 +1352,10 @@ var deserializeAws_json1_1PartitionList = function (output, context) {
|
|
|
1728
1352
|
});
|
|
1729
1353
|
return retVal;
|
|
1730
1354
|
};
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
.filter(
|
|
1734
|
-
.map(
|
|
1355
|
+
const deserializeAws_json1_1PartitionSerialList = (output, context) => {
|
|
1356
|
+
const retVal = (output || [])
|
|
1357
|
+
.filter((e) => e != null)
|
|
1358
|
+
.map((entry) => {
|
|
1735
1359
|
if (entry === null) {
|
|
1736
1360
|
return null;
|
|
1737
1361
|
}
|
|
@@ -1739,21 +1363,21 @@ var deserializeAws_json1_1PartitionSerialList = function (output, context) {
|
|
|
1739
1363
|
});
|
|
1740
1364
|
return retVal;
|
|
1741
1365
|
};
|
|
1742
|
-
|
|
1366
|
+
const deserializeAws_json1_1RemoveTagsFromResourceResponse = (output, context) => {
|
|
1743
1367
|
return {
|
|
1744
1368
|
Status: __expectString(output.Status),
|
|
1745
1369
|
};
|
|
1746
1370
|
};
|
|
1747
|
-
|
|
1371
|
+
const deserializeAws_json1_1Tag = (output, context) => {
|
|
1748
1372
|
return {
|
|
1749
1373
|
Key: __expectString(output.Key),
|
|
1750
1374
|
Value: __expectString(output.Value),
|
|
1751
1375
|
};
|
|
1752
1376
|
};
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
.filter(
|
|
1756
|
-
.map(
|
|
1377
|
+
const deserializeAws_json1_1TagList = (output, context) => {
|
|
1378
|
+
const retVal = (output || [])
|
|
1379
|
+
.filter((e) => e != null)
|
|
1380
|
+
.map((entry) => {
|
|
1757
1381
|
if (entry === null) {
|
|
1758
1382
|
return null;
|
|
1759
1383
|
}
|
|
@@ -1761,75 +1385,52 @@ var deserializeAws_json1_1TagList = function (output, context) {
|
|
|
1761
1385
|
});
|
|
1762
1386
|
return retVal;
|
|
1763
1387
|
};
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
});
|
|
1772
|
-
};
|
|
1773
|
-
var collectBody = function (streamBody, context) {
|
|
1774
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1388
|
+
const deserializeMetadata = (output) => ({
|
|
1389
|
+
httpStatusCode: output.statusCode,
|
|
1390
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1391
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1392
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1393
|
+
});
|
|
1394
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1775
1395
|
if (streamBody instanceof Uint8Array) {
|
|
1776
1396
|
return Promise.resolve(streamBody);
|
|
1777
1397
|
}
|
|
1778
1398
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1779
1399
|
};
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
if (resolvedHostname !== undefined) {
|
|
1799
|
-
contents.hostname = resolvedHostname;
|
|
1800
|
-
}
|
|
1801
|
-
if (body !== undefined) {
|
|
1802
|
-
contents.body = body;
|
|
1803
|
-
}
|
|
1804
|
-
return [2, new __HttpRequest(contents)];
|
|
1805
|
-
}
|
|
1806
|
-
});
|
|
1807
|
-
}); };
|
|
1808
|
-
var parseBody = function (streamBody, context) {
|
|
1809
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1810
|
-
if (encoded.length) {
|
|
1811
|
-
return JSON.parse(encoded);
|
|
1812
|
-
}
|
|
1813
|
-
return {};
|
|
1814
|
-
});
|
|
1400
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1401
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1402
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1403
|
+
const contents = {
|
|
1404
|
+
protocol,
|
|
1405
|
+
hostname,
|
|
1406
|
+
port,
|
|
1407
|
+
method: "POST",
|
|
1408
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1409
|
+
headers,
|
|
1410
|
+
};
|
|
1411
|
+
if (resolvedHostname !== undefined) {
|
|
1412
|
+
contents.hostname = resolvedHostname;
|
|
1413
|
+
}
|
|
1414
|
+
if (body !== undefined) {
|
|
1415
|
+
contents.body = body;
|
|
1416
|
+
}
|
|
1417
|
+
return new __HttpRequest(contents);
|
|
1815
1418
|
};
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1832
|
-
var cleanValue = rawValue;
|
|
1419
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1420
|
+
if (encoded.length) {
|
|
1421
|
+
return JSON.parse(encoded);
|
|
1422
|
+
}
|
|
1423
|
+
return {};
|
|
1424
|
+
});
|
|
1425
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1426
|
+
const value = await parseBody(errorBody, context);
|
|
1427
|
+
value.message = value.message ?? value.Message;
|
|
1428
|
+
return value;
|
|
1429
|
+
};
|
|
1430
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1431
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1432
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1433
|
+
let cleanValue = rawValue;
|
|
1833
1434
|
if (typeof cleanValue === "number") {
|
|
1834
1435
|
cleanValue = cleanValue.toString();
|
|
1835
1436
|
}
|
|
@@ -1844,7 +1445,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1844
1445
|
}
|
|
1845
1446
|
return cleanValue;
|
|
1846
1447
|
};
|
|
1847
|
-
|
|
1448
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1848
1449
|
if (headerKey !== undefined) {
|
|
1849
1450
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1850
1451
|
}
|