@aws-sdk/client-cloudhsm 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,202 +6,142 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const CloudHSMServiceException_1 = require("../models/CloudHSMServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_AddTagsToResourceCommand = async (input, context) => {
9
- const headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "CloudHsmFrontendService.AddTagsToResource",
12
- };
9
+ const headers = sharedHeaders("AddTagsToResource");
13
10
  let body;
14
- body = JSON.stringify(se_AddTagsToResourceRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
15
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
13
  };
17
14
  exports.se_AddTagsToResourceCommand = se_AddTagsToResourceCommand;
18
15
  const se_CreateHapgCommand = async (input, context) => {
19
- const headers = {
20
- "content-type": "application/x-amz-json-1.1",
21
- "x-amz-target": "CloudHsmFrontendService.CreateHapg",
22
- };
16
+ const headers = sharedHeaders("CreateHapg");
23
17
  let body;
24
- body = JSON.stringify(se_CreateHapgRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
25
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
20
  };
27
21
  exports.se_CreateHapgCommand = se_CreateHapgCommand;
28
22
  const se_CreateHsmCommand = async (input, context) => {
29
- const headers = {
30
- "content-type": "application/x-amz-json-1.1",
31
- "x-amz-target": "CloudHsmFrontendService.CreateHsm",
32
- };
23
+ const headers = sharedHeaders("CreateHsm");
33
24
  let body;
34
- body = JSON.stringify(se_CreateHsmRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
35
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
27
  };
37
28
  exports.se_CreateHsmCommand = se_CreateHsmCommand;
38
29
  const se_CreateLunaClientCommand = async (input, context) => {
39
- const headers = {
40
- "content-type": "application/x-amz-json-1.1",
41
- "x-amz-target": "CloudHsmFrontendService.CreateLunaClient",
42
- };
30
+ const headers = sharedHeaders("CreateLunaClient");
43
31
  let body;
44
- body = JSON.stringify(se_CreateLunaClientRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
45
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
34
  };
47
35
  exports.se_CreateLunaClientCommand = se_CreateLunaClientCommand;
48
36
  const se_DeleteHapgCommand = async (input, context) => {
49
- const headers = {
50
- "content-type": "application/x-amz-json-1.1",
51
- "x-amz-target": "CloudHsmFrontendService.DeleteHapg",
52
- };
37
+ const headers = sharedHeaders("DeleteHapg");
53
38
  let body;
54
- body = JSON.stringify(se_DeleteHapgRequest(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
41
  };
57
42
  exports.se_DeleteHapgCommand = se_DeleteHapgCommand;
58
43
  const se_DeleteHsmCommand = async (input, context) => {
59
- const headers = {
60
- "content-type": "application/x-amz-json-1.1",
61
- "x-amz-target": "CloudHsmFrontendService.DeleteHsm",
62
- };
44
+ const headers = sharedHeaders("DeleteHsm");
63
45
  let body;
64
- body = JSON.stringify(se_DeleteHsmRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
65
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
48
  };
67
49
  exports.se_DeleteHsmCommand = se_DeleteHsmCommand;
68
50
  const se_DeleteLunaClientCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "CloudHsmFrontendService.DeleteLunaClient",
72
- };
51
+ const headers = sharedHeaders("DeleteLunaClient");
73
52
  let body;
74
- body = JSON.stringify(se_DeleteLunaClientRequest(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
55
  };
77
56
  exports.se_DeleteLunaClientCommand = se_DeleteLunaClientCommand;
78
57
  const se_DescribeHapgCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "CloudHsmFrontendService.DescribeHapg",
82
- };
58
+ const headers = sharedHeaders("DescribeHapg");
83
59
  let body;
84
- body = JSON.stringify(se_DescribeHapgRequest(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
85
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
62
  };
87
63
  exports.se_DescribeHapgCommand = se_DescribeHapgCommand;
88
64
  const se_DescribeHsmCommand = async (input, context) => {
89
- const headers = {
90
- "content-type": "application/x-amz-json-1.1",
91
- "x-amz-target": "CloudHsmFrontendService.DescribeHsm",
92
- };
65
+ const headers = sharedHeaders("DescribeHsm");
93
66
  let body;
94
- body = JSON.stringify(se_DescribeHsmRequest(input, context));
67
+ body = JSON.stringify((0, smithy_client_1._json)(input));
95
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
69
  };
97
70
  exports.se_DescribeHsmCommand = se_DescribeHsmCommand;
98
71
  const se_DescribeLunaClientCommand = async (input, context) => {
99
- const headers = {
100
- "content-type": "application/x-amz-json-1.1",
101
- "x-amz-target": "CloudHsmFrontendService.DescribeLunaClient",
102
- };
72
+ const headers = sharedHeaders("DescribeLunaClient");
103
73
  let body;
104
- body = JSON.stringify(se_DescribeLunaClientRequest(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
105
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
76
  };
107
77
  exports.se_DescribeLunaClientCommand = se_DescribeLunaClientCommand;
108
78
  const se_GetConfigCommand = async (input, context) => {
109
- const headers = {
110
- "content-type": "application/x-amz-json-1.1",
111
- "x-amz-target": "CloudHsmFrontendService.GetConfig",
112
- };
79
+ const headers = sharedHeaders("GetConfig");
113
80
  let body;
114
- body = JSON.stringify(se_GetConfigRequest(input, context));
81
+ body = JSON.stringify((0, smithy_client_1._json)(input));
115
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
116
83
  };
117
84
  exports.se_GetConfigCommand = se_GetConfigCommand;
118
85
  const se_ListAvailableZonesCommand = async (input, context) => {
119
- const headers = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "CloudHsmFrontendService.ListAvailableZones",
122
- };
86
+ const headers = sharedHeaders("ListAvailableZones");
123
87
  let body;
124
- body = JSON.stringify(se_ListAvailableZonesRequest(input, context));
88
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
90
  };
127
91
  exports.se_ListAvailableZonesCommand = se_ListAvailableZonesCommand;
128
92
  const se_ListHapgsCommand = async (input, context) => {
129
- const headers = {
130
- "content-type": "application/x-amz-json-1.1",
131
- "x-amz-target": "CloudHsmFrontendService.ListHapgs",
132
- };
93
+ const headers = sharedHeaders("ListHapgs");
133
94
  let body;
134
- body = JSON.stringify(se_ListHapgsRequest(input, context));
95
+ body = JSON.stringify((0, smithy_client_1._json)(input));
135
96
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
97
  };
137
98
  exports.se_ListHapgsCommand = se_ListHapgsCommand;
138
99
  const se_ListHsmsCommand = async (input, context) => {
139
- const headers = {
140
- "content-type": "application/x-amz-json-1.1",
141
- "x-amz-target": "CloudHsmFrontendService.ListHsms",
142
- };
100
+ const headers = sharedHeaders("ListHsms");
143
101
  let body;
144
- body = JSON.stringify(se_ListHsmsRequest(input, context));
102
+ body = JSON.stringify((0, smithy_client_1._json)(input));
145
103
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
146
104
  };
147
105
  exports.se_ListHsmsCommand = se_ListHsmsCommand;
148
106
  const se_ListLunaClientsCommand = async (input, context) => {
149
- const headers = {
150
- "content-type": "application/x-amz-json-1.1",
151
- "x-amz-target": "CloudHsmFrontendService.ListLunaClients",
152
- };
107
+ const headers = sharedHeaders("ListLunaClients");
153
108
  let body;
154
- body = JSON.stringify(se_ListLunaClientsRequest(input, context));
109
+ body = JSON.stringify((0, smithy_client_1._json)(input));
155
110
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
111
  };
157
112
  exports.se_ListLunaClientsCommand = se_ListLunaClientsCommand;
158
113
  const se_ListTagsForResourceCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "CloudHsmFrontendService.ListTagsForResource",
162
- };
114
+ const headers = sharedHeaders("ListTagsForResource");
163
115
  let body;
164
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
116
+ body = JSON.stringify((0, smithy_client_1._json)(input));
165
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
118
  };
167
119
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
168
120
  const se_ModifyHapgCommand = async (input, context) => {
169
- const headers = {
170
- "content-type": "application/x-amz-json-1.1",
171
- "x-amz-target": "CloudHsmFrontendService.ModifyHapg",
172
- };
121
+ const headers = sharedHeaders("ModifyHapg");
173
122
  let body;
174
- body = JSON.stringify(se_ModifyHapgRequest(input, context));
123
+ body = JSON.stringify((0, smithy_client_1._json)(input));
175
124
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
125
  };
177
126
  exports.se_ModifyHapgCommand = se_ModifyHapgCommand;
178
127
  const se_ModifyHsmCommand = async (input, context) => {
179
- const headers = {
180
- "content-type": "application/x-amz-json-1.1",
181
- "x-amz-target": "CloudHsmFrontendService.ModifyHsm",
182
- };
128
+ const headers = sharedHeaders("ModifyHsm");
183
129
  let body;
184
- body = JSON.stringify(se_ModifyHsmRequest(input, context));
130
+ body = JSON.stringify((0, smithy_client_1._json)(input));
185
131
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
132
  };
187
133
  exports.se_ModifyHsmCommand = se_ModifyHsmCommand;
188
134
  const se_ModifyLunaClientCommand = async (input, context) => {
189
- const headers = {
190
- "content-type": "application/x-amz-json-1.1",
191
- "x-amz-target": "CloudHsmFrontendService.ModifyLunaClient",
192
- };
135
+ const headers = sharedHeaders("ModifyLunaClient");
193
136
  let body;
194
- body = JSON.stringify(se_ModifyLunaClientRequest(input, context));
137
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
139
  };
197
140
  exports.se_ModifyLunaClientCommand = se_ModifyLunaClientCommand;
198
141
  const se_RemoveTagsFromResourceCommand = async (input, context) => {
199
- const headers = {
200
- "content-type": "application/x-amz-json-1.1",
201
- "x-amz-target": "CloudHsmFrontendService.RemoveTagsFromResource",
202
- };
142
+ const headers = sharedHeaders("RemoveTagsFromResource");
203
143
  let body;
204
- body = JSON.stringify(se_RemoveTagsFromResourceRequest(input, context));
144
+ body = JSON.stringify((0, smithy_client_1._json)(input));
205
145
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
206
146
  };
207
147
  exports.se_RemoveTagsFromResourceCommand = se_RemoveTagsFromResourceCommand;
@@ -211,12 +151,12 @@ const de_AddTagsToResourceCommand = async (output, context) => {
211
151
  }
212
152
  const data = await parseBody(output.body, context);
213
153
  let contents = {};
214
- contents = de_AddTagsToResourceResponse(data, context);
154
+ contents = (0, smithy_client_1._json)(data);
215
155
  const response = {
216
156
  $metadata: deserializeMetadata(output),
217
157
  ...contents,
218
158
  };
219
- return Promise.resolve(response);
159
+ return response;
220
160
  };
221
161
  exports.de_AddTagsToResourceCommand = de_AddTagsToResourceCommand;
222
162
  const de_AddTagsToResourceCommandError = async (output, context) => {
@@ -237,10 +177,9 @@ const de_AddTagsToResourceCommandError = async (output, context) => {
237
177
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
238
178
  default:
239
179
  const parsedBody = parsedOutput.body;
240
- (0, smithy_client_1.throwDefaultError)({
180
+ return throwDefaultError({
241
181
  output,
242
182
  parsedBody,
243
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
244
183
  errorCode,
245
184
  });
246
185
  }
@@ -251,12 +190,12 @@ const de_CreateHapgCommand = async (output, context) => {
251
190
  }
252
191
  const data = await parseBody(output.body, context);
253
192
  let contents = {};
254
- contents = de_CreateHapgResponse(data, context);
193
+ contents = (0, smithy_client_1._json)(data);
255
194
  const response = {
256
195
  $metadata: deserializeMetadata(output),
257
196
  ...contents,
258
197
  };
259
- return Promise.resolve(response);
198
+ return response;
260
199
  };
261
200
  exports.de_CreateHapgCommand = de_CreateHapgCommand;
262
201
  const de_CreateHapgCommandError = async (output, context) => {
@@ -277,10 +216,9 @@ const de_CreateHapgCommandError = async (output, context) => {
277
216
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
278
217
  default:
279
218
  const parsedBody = parsedOutput.body;
280
- (0, smithy_client_1.throwDefaultError)({
219
+ return throwDefaultError({
281
220
  output,
282
221
  parsedBody,
283
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
284
222
  errorCode,
285
223
  });
286
224
  }
@@ -291,12 +229,12 @@ const de_CreateHsmCommand = async (output, context) => {
291
229
  }
292
230
  const data = await parseBody(output.body, context);
293
231
  let contents = {};
294
- contents = de_CreateHsmResponse(data, context);
232
+ contents = (0, smithy_client_1._json)(data);
295
233
  const response = {
296
234
  $metadata: deserializeMetadata(output),
297
235
  ...contents,
298
236
  };
299
- return Promise.resolve(response);
237
+ return response;
300
238
  };
301
239
  exports.de_CreateHsmCommand = de_CreateHsmCommand;
302
240
  const de_CreateHsmCommandError = async (output, context) => {
@@ -317,10 +255,9 @@ const de_CreateHsmCommandError = async (output, context) => {
317
255
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
318
256
  default:
319
257
  const parsedBody = parsedOutput.body;
320
- (0, smithy_client_1.throwDefaultError)({
258
+ return throwDefaultError({
321
259
  output,
322
260
  parsedBody,
323
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
324
261
  errorCode,
325
262
  });
326
263
  }
@@ -331,12 +268,12 @@ const de_CreateLunaClientCommand = async (output, context) => {
331
268
  }
332
269
  const data = await parseBody(output.body, context);
333
270
  let contents = {};
334
- contents = de_CreateLunaClientResponse(data, context);
271
+ contents = (0, smithy_client_1._json)(data);
335
272
  const response = {
336
273
  $metadata: deserializeMetadata(output),
337
274
  ...contents,
338
275
  };
339
- return Promise.resolve(response);
276
+ return response;
340
277
  };
341
278
  exports.de_CreateLunaClientCommand = de_CreateLunaClientCommand;
342
279
  const de_CreateLunaClientCommandError = async (output, context) => {
@@ -357,10 +294,9 @@ const de_CreateLunaClientCommandError = async (output, context) => {
357
294
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
358
295
  default:
359
296
  const parsedBody = parsedOutput.body;
360
- (0, smithy_client_1.throwDefaultError)({
297
+ return throwDefaultError({
361
298
  output,
362
299
  parsedBody,
363
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
364
300
  errorCode,
365
301
  });
366
302
  }
@@ -371,12 +307,12 @@ const de_DeleteHapgCommand = async (output, context) => {
371
307
  }
372
308
  const data = await parseBody(output.body, context);
373
309
  let contents = {};
374
- contents = de_DeleteHapgResponse(data, context);
310
+ contents = (0, smithy_client_1._json)(data);
375
311
  const response = {
376
312
  $metadata: deserializeMetadata(output),
377
313
  ...contents,
378
314
  };
379
- return Promise.resolve(response);
315
+ return response;
380
316
  };
381
317
  exports.de_DeleteHapgCommand = de_DeleteHapgCommand;
382
318
  const de_DeleteHapgCommandError = async (output, context) => {
@@ -397,10 +333,9 @@ const de_DeleteHapgCommandError = async (output, context) => {
397
333
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
398
334
  default:
399
335
  const parsedBody = parsedOutput.body;
400
- (0, smithy_client_1.throwDefaultError)({
336
+ return throwDefaultError({
401
337
  output,
402
338
  parsedBody,
403
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
404
339
  errorCode,
405
340
  });
406
341
  }
@@ -411,12 +346,12 @@ const de_DeleteHsmCommand = async (output, context) => {
411
346
  }
412
347
  const data = await parseBody(output.body, context);
413
348
  let contents = {};
414
- contents = de_DeleteHsmResponse(data, context);
349
+ contents = (0, smithy_client_1._json)(data);
415
350
  const response = {
416
351
  $metadata: deserializeMetadata(output),
417
352
  ...contents,
418
353
  };
419
- return Promise.resolve(response);
354
+ return response;
420
355
  };
421
356
  exports.de_DeleteHsmCommand = de_DeleteHsmCommand;
422
357
  const de_DeleteHsmCommandError = async (output, context) => {
@@ -437,10 +372,9 @@ const de_DeleteHsmCommandError = async (output, context) => {
437
372
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
438
373
  default:
439
374
  const parsedBody = parsedOutput.body;
440
- (0, smithy_client_1.throwDefaultError)({
375
+ return throwDefaultError({
441
376
  output,
442
377
  parsedBody,
443
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
444
378
  errorCode,
445
379
  });
446
380
  }
@@ -451,12 +385,12 @@ const de_DeleteLunaClientCommand = async (output, context) => {
451
385
  }
452
386
  const data = await parseBody(output.body, context);
453
387
  let contents = {};
454
- contents = de_DeleteLunaClientResponse(data, context);
388
+ contents = (0, smithy_client_1._json)(data);
455
389
  const response = {
456
390
  $metadata: deserializeMetadata(output),
457
391
  ...contents,
458
392
  };
459
- return Promise.resolve(response);
393
+ return response;
460
394
  };
461
395
  exports.de_DeleteLunaClientCommand = de_DeleteLunaClientCommand;
462
396
  const de_DeleteLunaClientCommandError = async (output, context) => {
@@ -477,10 +411,9 @@ const de_DeleteLunaClientCommandError = async (output, context) => {
477
411
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
478
412
  default:
479
413
  const parsedBody = parsedOutput.body;
480
- (0, smithy_client_1.throwDefaultError)({
414
+ return throwDefaultError({
481
415
  output,
482
416
  parsedBody,
483
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
484
417
  errorCode,
485
418
  });
486
419
  }
@@ -491,12 +424,12 @@ const de_DescribeHapgCommand = async (output, context) => {
491
424
  }
492
425
  const data = await parseBody(output.body, context);
493
426
  let contents = {};
494
- contents = de_DescribeHapgResponse(data, context);
427
+ contents = (0, smithy_client_1._json)(data);
495
428
  const response = {
496
429
  $metadata: deserializeMetadata(output),
497
430
  ...contents,
498
431
  };
499
- return Promise.resolve(response);
432
+ return response;
500
433
  };
501
434
  exports.de_DescribeHapgCommand = de_DescribeHapgCommand;
502
435
  const de_DescribeHapgCommandError = async (output, context) => {
@@ -517,10 +450,9 @@ const de_DescribeHapgCommandError = async (output, context) => {
517
450
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
518
451
  default:
519
452
  const parsedBody = parsedOutput.body;
520
- (0, smithy_client_1.throwDefaultError)({
453
+ return throwDefaultError({
521
454
  output,
522
455
  parsedBody,
523
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
524
456
  errorCode,
525
457
  });
526
458
  }
@@ -531,12 +463,12 @@ const de_DescribeHsmCommand = async (output, context) => {
531
463
  }
532
464
  const data = await parseBody(output.body, context);
533
465
  let contents = {};
534
- contents = de_DescribeHsmResponse(data, context);
466
+ contents = (0, smithy_client_1._json)(data);
535
467
  const response = {
536
468
  $metadata: deserializeMetadata(output),
537
469
  ...contents,
538
470
  };
539
- return Promise.resolve(response);
471
+ return response;
540
472
  };
541
473
  exports.de_DescribeHsmCommand = de_DescribeHsmCommand;
542
474
  const de_DescribeHsmCommandError = async (output, context) => {
@@ -557,10 +489,9 @@ const de_DescribeHsmCommandError = async (output, context) => {
557
489
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
558
490
  default:
559
491
  const parsedBody = parsedOutput.body;
560
- (0, smithy_client_1.throwDefaultError)({
492
+ return throwDefaultError({
561
493
  output,
562
494
  parsedBody,
563
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
564
495
  errorCode,
565
496
  });
566
497
  }
@@ -571,12 +502,12 @@ const de_DescribeLunaClientCommand = async (output, context) => {
571
502
  }
572
503
  const data = await parseBody(output.body, context);
573
504
  let contents = {};
574
- contents = de_DescribeLunaClientResponse(data, context);
505
+ contents = (0, smithy_client_1._json)(data);
575
506
  const response = {
576
507
  $metadata: deserializeMetadata(output),
577
508
  ...contents,
578
509
  };
579
- return Promise.resolve(response);
510
+ return response;
580
511
  };
581
512
  exports.de_DescribeLunaClientCommand = de_DescribeLunaClientCommand;
582
513
  const de_DescribeLunaClientCommandError = async (output, context) => {
@@ -597,10 +528,9 @@ const de_DescribeLunaClientCommandError = async (output, context) => {
597
528
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
598
529
  default:
599
530
  const parsedBody = parsedOutput.body;
600
- (0, smithy_client_1.throwDefaultError)({
531
+ return throwDefaultError({
601
532
  output,
602
533
  parsedBody,
603
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
604
534
  errorCode,
605
535
  });
606
536
  }
@@ -611,12 +541,12 @@ const de_GetConfigCommand = async (output, context) => {
611
541
  }
612
542
  const data = await parseBody(output.body, context);
613
543
  let contents = {};
614
- contents = de_GetConfigResponse(data, context);
544
+ contents = (0, smithy_client_1._json)(data);
615
545
  const response = {
616
546
  $metadata: deserializeMetadata(output),
617
547
  ...contents,
618
548
  };
619
- return Promise.resolve(response);
549
+ return response;
620
550
  };
621
551
  exports.de_GetConfigCommand = de_GetConfigCommand;
622
552
  const de_GetConfigCommandError = async (output, context) => {
@@ -637,10 +567,9 @@ const de_GetConfigCommandError = async (output, context) => {
637
567
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
638
568
  default:
639
569
  const parsedBody = parsedOutput.body;
640
- (0, smithy_client_1.throwDefaultError)({
570
+ return throwDefaultError({
641
571
  output,
642
572
  parsedBody,
643
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
644
573
  errorCode,
645
574
  });
646
575
  }
@@ -651,12 +580,12 @@ const de_ListAvailableZonesCommand = async (output, context) => {
651
580
  }
652
581
  const data = await parseBody(output.body, context);
653
582
  let contents = {};
654
- contents = de_ListAvailableZonesResponse(data, context);
583
+ contents = (0, smithy_client_1._json)(data);
655
584
  const response = {
656
585
  $metadata: deserializeMetadata(output),
657
586
  ...contents,
658
587
  };
659
- return Promise.resolve(response);
588
+ return response;
660
589
  };
661
590
  exports.de_ListAvailableZonesCommand = de_ListAvailableZonesCommand;
662
591
  const de_ListAvailableZonesCommandError = async (output, context) => {
@@ -677,10 +606,9 @@ const de_ListAvailableZonesCommandError = async (output, context) => {
677
606
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
678
607
  default:
679
608
  const parsedBody = parsedOutput.body;
680
- (0, smithy_client_1.throwDefaultError)({
609
+ return throwDefaultError({
681
610
  output,
682
611
  parsedBody,
683
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
684
612
  errorCode,
685
613
  });
686
614
  }
@@ -691,12 +619,12 @@ const de_ListHapgsCommand = async (output, context) => {
691
619
  }
692
620
  const data = await parseBody(output.body, context);
693
621
  let contents = {};
694
- contents = de_ListHapgsResponse(data, context);
622
+ contents = (0, smithy_client_1._json)(data);
695
623
  const response = {
696
624
  $metadata: deserializeMetadata(output),
697
625
  ...contents,
698
626
  };
699
- return Promise.resolve(response);
627
+ return response;
700
628
  };
701
629
  exports.de_ListHapgsCommand = de_ListHapgsCommand;
702
630
  const de_ListHapgsCommandError = async (output, context) => {
@@ -717,10 +645,9 @@ const de_ListHapgsCommandError = async (output, context) => {
717
645
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
718
646
  default:
719
647
  const parsedBody = parsedOutput.body;
720
- (0, smithy_client_1.throwDefaultError)({
648
+ return throwDefaultError({
721
649
  output,
722
650
  parsedBody,
723
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
724
651
  errorCode,
725
652
  });
726
653
  }
@@ -731,12 +658,12 @@ const de_ListHsmsCommand = async (output, context) => {
731
658
  }
732
659
  const data = await parseBody(output.body, context);
733
660
  let contents = {};
734
- contents = de_ListHsmsResponse(data, context);
661
+ contents = (0, smithy_client_1._json)(data);
735
662
  const response = {
736
663
  $metadata: deserializeMetadata(output),
737
664
  ...contents,
738
665
  };
739
- return Promise.resolve(response);
666
+ return response;
740
667
  };
741
668
  exports.de_ListHsmsCommand = de_ListHsmsCommand;
742
669
  const de_ListHsmsCommandError = async (output, context) => {
@@ -757,10 +684,9 @@ const de_ListHsmsCommandError = async (output, context) => {
757
684
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
758
685
  default:
759
686
  const parsedBody = parsedOutput.body;
760
- (0, smithy_client_1.throwDefaultError)({
687
+ return throwDefaultError({
761
688
  output,
762
689
  parsedBody,
763
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
764
690
  errorCode,
765
691
  });
766
692
  }
@@ -771,12 +697,12 @@ const de_ListLunaClientsCommand = async (output, context) => {
771
697
  }
772
698
  const data = await parseBody(output.body, context);
773
699
  let contents = {};
774
- contents = de_ListLunaClientsResponse(data, context);
700
+ contents = (0, smithy_client_1._json)(data);
775
701
  const response = {
776
702
  $metadata: deserializeMetadata(output),
777
703
  ...contents,
778
704
  };
779
- return Promise.resolve(response);
705
+ return response;
780
706
  };
781
707
  exports.de_ListLunaClientsCommand = de_ListLunaClientsCommand;
782
708
  const de_ListLunaClientsCommandError = async (output, context) => {
@@ -797,10 +723,9 @@ const de_ListLunaClientsCommandError = async (output, context) => {
797
723
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
798
724
  default:
799
725
  const parsedBody = parsedOutput.body;
800
- (0, smithy_client_1.throwDefaultError)({
726
+ return throwDefaultError({
801
727
  output,
802
728
  parsedBody,
803
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
804
729
  errorCode,
805
730
  });
806
731
  }
@@ -811,12 +736,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
811
736
  }
812
737
  const data = await parseBody(output.body, context);
813
738
  let contents = {};
814
- contents = de_ListTagsForResourceResponse(data, context);
739
+ contents = (0, smithy_client_1._json)(data);
815
740
  const response = {
816
741
  $metadata: deserializeMetadata(output),
817
742
  ...contents,
818
743
  };
819
- return Promise.resolve(response);
744
+ return response;
820
745
  };
821
746
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
822
747
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -837,10 +762,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
837
762
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
838
763
  default:
839
764
  const parsedBody = parsedOutput.body;
840
- (0, smithy_client_1.throwDefaultError)({
765
+ return throwDefaultError({
841
766
  output,
842
767
  parsedBody,
843
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
844
768
  errorCode,
845
769
  });
846
770
  }
@@ -851,12 +775,12 @@ const de_ModifyHapgCommand = async (output, context) => {
851
775
  }
852
776
  const data = await parseBody(output.body, context);
853
777
  let contents = {};
854
- contents = de_ModifyHapgResponse(data, context);
778
+ contents = (0, smithy_client_1._json)(data);
855
779
  const response = {
856
780
  $metadata: deserializeMetadata(output),
857
781
  ...contents,
858
782
  };
859
- return Promise.resolve(response);
783
+ return response;
860
784
  };
861
785
  exports.de_ModifyHapgCommand = de_ModifyHapgCommand;
862
786
  const de_ModifyHapgCommandError = async (output, context) => {
@@ -877,10 +801,9 @@ const de_ModifyHapgCommandError = async (output, context) => {
877
801
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
878
802
  default:
879
803
  const parsedBody = parsedOutput.body;
880
- (0, smithy_client_1.throwDefaultError)({
804
+ return throwDefaultError({
881
805
  output,
882
806
  parsedBody,
883
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
884
807
  errorCode,
885
808
  });
886
809
  }
@@ -891,12 +814,12 @@ const de_ModifyHsmCommand = async (output, context) => {
891
814
  }
892
815
  const data = await parseBody(output.body, context);
893
816
  let contents = {};
894
- contents = de_ModifyHsmResponse(data, context);
817
+ contents = (0, smithy_client_1._json)(data);
895
818
  const response = {
896
819
  $metadata: deserializeMetadata(output),
897
820
  ...contents,
898
821
  };
899
- return Promise.resolve(response);
822
+ return response;
900
823
  };
901
824
  exports.de_ModifyHsmCommand = de_ModifyHsmCommand;
902
825
  const de_ModifyHsmCommandError = async (output, context) => {
@@ -917,10 +840,9 @@ const de_ModifyHsmCommandError = async (output, context) => {
917
840
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
918
841
  default:
919
842
  const parsedBody = parsedOutput.body;
920
- (0, smithy_client_1.throwDefaultError)({
843
+ return throwDefaultError({
921
844
  output,
922
845
  parsedBody,
923
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
924
846
  errorCode,
925
847
  });
926
848
  }
@@ -931,12 +853,12 @@ const de_ModifyLunaClientCommand = async (output, context) => {
931
853
  }
932
854
  const data = await parseBody(output.body, context);
933
855
  let contents = {};
934
- contents = de_ModifyLunaClientResponse(data, context);
856
+ contents = (0, smithy_client_1._json)(data);
935
857
  const response = {
936
858
  $metadata: deserializeMetadata(output),
937
859
  ...contents,
938
860
  };
939
- return Promise.resolve(response);
861
+ return response;
940
862
  };
941
863
  exports.de_ModifyLunaClientCommand = de_ModifyLunaClientCommand;
942
864
  const de_ModifyLunaClientCommandError = async (output, context) => {
@@ -951,10 +873,9 @@ const de_ModifyLunaClientCommandError = async (output, context) => {
951
873
  throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
952
874
  default:
953
875
  const parsedBody = parsedOutput.body;
954
- (0, smithy_client_1.throwDefaultError)({
876
+ return throwDefaultError({
955
877
  output,
956
878
  parsedBody,
957
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
958
879
  errorCode,
959
880
  });
960
881
  }
@@ -965,12 +886,12 @@ const de_RemoveTagsFromResourceCommand = async (output, context) => {
965
886
  }
966
887
  const data = await parseBody(output.body, context);
967
888
  let contents = {};
968
- contents = de_RemoveTagsFromResourceResponse(data, context);
889
+ contents = (0, smithy_client_1._json)(data);
969
890
  const response = {
970
891
  $metadata: deserializeMetadata(output),
971
892
  ...contents,
972
893
  };
973
- return Promise.resolve(response);
894
+ return response;
974
895
  };
975
896
  exports.de_RemoveTagsFromResourceCommand = de_RemoveTagsFromResourceCommand;
976
897
  const de_RemoveTagsFromResourceCommandError = async (output, context) => {
@@ -991,17 +912,16 @@ const de_RemoveTagsFromResourceCommandError = async (output, context) => {
991
912
  throw await de_InvalidRequestExceptionRes(parsedOutput, context);
992
913
  default:
993
914
  const parsedBody = parsedOutput.body;
994
- (0, smithy_client_1.throwDefaultError)({
915
+ return throwDefaultError({
995
916
  output,
996
917
  parsedBody,
997
- exceptionCtor: CloudHSMServiceException_1.CloudHSMServiceException,
998
918
  errorCode,
999
919
  });
1000
920
  }
1001
921
  };
1002
922
  const de_CloudHsmInternalExceptionRes = async (parsedOutput, context) => {
1003
923
  const body = parsedOutput.body;
1004
- const deserialized = de_CloudHsmInternalException(body, context);
924
+ const deserialized = (0, smithy_client_1._json)(body);
1005
925
  const exception = new models_0_1.CloudHsmInternalException({
1006
926
  $metadata: deserializeMetadata(parsedOutput),
1007
927
  ...deserialized,
@@ -1010,7 +930,7 @@ const de_CloudHsmInternalExceptionRes = async (parsedOutput, context) => {
1010
930
  };
1011
931
  const de_CloudHsmServiceExceptionRes = async (parsedOutput, context) => {
1012
932
  const body = parsedOutput.body;
1013
- const deserialized = de_CloudHsmServiceException(body, context);
933
+ const deserialized = (0, smithy_client_1._json)(body);
1014
934
  const exception = new models_0_1.CloudHsmServiceException({
1015
935
  $metadata: deserializeMetadata(parsedOutput),
1016
936
  ...deserialized,
@@ -1019,407 +939,13 @@ const de_CloudHsmServiceExceptionRes = async (parsedOutput, context) => {
1019
939
  };
1020
940
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1021
941
  const body = parsedOutput.body;
1022
- const deserialized = de_InvalidRequestException(body, context);
942
+ const deserialized = (0, smithy_client_1._json)(body);
1023
943
  const exception = new models_0_1.InvalidRequestException({
1024
944
  $metadata: deserializeMetadata(parsedOutput),
1025
945
  ...deserialized,
1026
946
  });
1027
947
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1028
948
  };
1029
- const se_AddTagsToResourceRequest = (input, context) => {
1030
- return {
1031
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1032
- ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
1033
- };
1034
- };
1035
- const se_CreateHapgRequest = (input, context) => {
1036
- return {
1037
- ...(input.Label != null && { Label: input.Label }),
1038
- };
1039
- };
1040
- const se_CreateHsmRequest = (input, context) => {
1041
- return {
1042
- ...(input.ClientToken != null && { ClientToken: input.ClientToken }),
1043
- ...(input.EniIp != null && { EniIp: input.EniIp }),
1044
- ...(input.ExternalId != null && { ExternalId: input.ExternalId }),
1045
- ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
1046
- ...(input.SshKey != null && { SshKey: input.SshKey }),
1047
- ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
1048
- ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }),
1049
- ...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }),
1050
- };
1051
- };
1052
- const se_CreateLunaClientRequest = (input, context) => {
1053
- return {
1054
- ...(input.Certificate != null && { Certificate: input.Certificate }),
1055
- ...(input.Label != null && { Label: input.Label }),
1056
- };
1057
- };
1058
- const se_DeleteHapgRequest = (input, context) => {
1059
- return {
1060
- ...(input.HapgArn != null && { HapgArn: input.HapgArn }),
1061
- };
1062
- };
1063
- const se_DeleteHsmRequest = (input, context) => {
1064
- return {
1065
- ...(input.HsmArn != null && { HsmArn: input.HsmArn }),
1066
- };
1067
- };
1068
- const se_DeleteLunaClientRequest = (input, context) => {
1069
- return {
1070
- ...(input.ClientArn != null && { ClientArn: input.ClientArn }),
1071
- };
1072
- };
1073
- const se_DescribeHapgRequest = (input, context) => {
1074
- return {
1075
- ...(input.HapgArn != null && { HapgArn: input.HapgArn }),
1076
- };
1077
- };
1078
- const se_DescribeHsmRequest = (input, context) => {
1079
- return {
1080
- ...(input.HsmArn != null && { HsmArn: input.HsmArn }),
1081
- ...(input.HsmSerialNumber != null && { HsmSerialNumber: input.HsmSerialNumber }),
1082
- };
1083
- };
1084
- const se_DescribeLunaClientRequest = (input, context) => {
1085
- return {
1086
- ...(input.CertificateFingerprint != null && { CertificateFingerprint: input.CertificateFingerprint }),
1087
- ...(input.ClientArn != null && { ClientArn: input.ClientArn }),
1088
- };
1089
- };
1090
- const se_GetConfigRequest = (input, context) => {
1091
- return {
1092
- ...(input.ClientArn != null && { ClientArn: input.ClientArn }),
1093
- ...(input.ClientVersion != null && { ClientVersion: input.ClientVersion }),
1094
- ...(input.HapgList != null && { HapgList: se_HapgList(input.HapgList, context) }),
1095
- };
1096
- };
1097
- const se_HapgList = (input, context) => {
1098
- return input
1099
- .filter((e) => e != null)
1100
- .map((entry) => {
1101
- return entry;
1102
- });
1103
- };
1104
- const se_ListAvailableZonesRequest = (input, context) => {
1105
- return {};
1106
- };
1107
- const se_ListHapgsRequest = (input, context) => {
1108
- return {
1109
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1110
- };
1111
- };
1112
- const se_ListHsmsRequest = (input, context) => {
1113
- return {
1114
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1115
- };
1116
- };
1117
- const se_ListLunaClientsRequest = (input, context) => {
1118
- return {
1119
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1120
- };
1121
- };
1122
- const se_ListTagsForResourceRequest = (input, context) => {
1123
- return {
1124
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1125
- };
1126
- };
1127
- const se_ModifyHapgRequest = (input, context) => {
1128
- return {
1129
- ...(input.HapgArn != null && { HapgArn: input.HapgArn }),
1130
- ...(input.Label != null && { Label: input.Label }),
1131
- ...(input.PartitionSerialList != null && {
1132
- PartitionSerialList: se_PartitionSerialList(input.PartitionSerialList, context),
1133
- }),
1134
- };
1135
- };
1136
- const se_ModifyHsmRequest = (input, context) => {
1137
- return {
1138
- ...(input.EniIp != null && { EniIp: input.EniIp }),
1139
- ...(input.ExternalId != null && { ExternalId: input.ExternalId }),
1140
- ...(input.HsmArn != null && { HsmArn: input.HsmArn }),
1141
- ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
1142
- ...(input.SubnetId != null && { SubnetId: input.SubnetId }),
1143
- ...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }),
1144
- };
1145
- };
1146
- const se_ModifyLunaClientRequest = (input, context) => {
1147
- return {
1148
- ...(input.Certificate != null && { Certificate: input.Certificate }),
1149
- ...(input.ClientArn != null && { ClientArn: input.ClientArn }),
1150
- };
1151
- };
1152
- const se_PartitionSerialList = (input, context) => {
1153
- return input
1154
- .filter((e) => e != null)
1155
- .map((entry) => {
1156
- return entry;
1157
- });
1158
- };
1159
- const se_RemoveTagsFromResourceRequest = (input, context) => {
1160
- return {
1161
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1162
- ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }),
1163
- };
1164
- };
1165
- const se_Tag = (input, context) => {
1166
- return {
1167
- ...(input.Key != null && { Key: input.Key }),
1168
- ...(input.Value != null && { Value: input.Value }),
1169
- };
1170
- };
1171
- const se_TagKeyList = (input, context) => {
1172
- return input
1173
- .filter((e) => e != null)
1174
- .map((entry) => {
1175
- return entry;
1176
- });
1177
- };
1178
- const se_TagList = (input, context) => {
1179
- return input
1180
- .filter((e) => e != null)
1181
- .map((entry) => {
1182
- return se_Tag(entry, context);
1183
- });
1184
- };
1185
- const de_AddTagsToResourceResponse = (output, context) => {
1186
- return {
1187
- Status: (0, smithy_client_1.expectString)(output.Status),
1188
- };
1189
- };
1190
- const de_AZList = (output, context) => {
1191
- const retVal = (output || [])
1192
- .filter((e) => e != null)
1193
- .map((entry) => {
1194
- if (entry === null) {
1195
- return null;
1196
- }
1197
- return (0, smithy_client_1.expectString)(entry);
1198
- });
1199
- return retVal;
1200
- };
1201
- const de_ClientList = (output, context) => {
1202
- const retVal = (output || [])
1203
- .filter((e) => e != null)
1204
- .map((entry) => {
1205
- if (entry === null) {
1206
- return null;
1207
- }
1208
- return (0, smithy_client_1.expectString)(entry);
1209
- });
1210
- return retVal;
1211
- };
1212
- const de_CloudHsmInternalException = (output, context) => {
1213
- return {
1214
- message: (0, smithy_client_1.expectString)(output.message),
1215
- retryable: (0, smithy_client_1.expectBoolean)(output.retryable),
1216
- };
1217
- };
1218
- const de_CloudHsmServiceException = (output, context) => {
1219
- return {
1220
- message: (0, smithy_client_1.expectString)(output.message),
1221
- retryable: (0, smithy_client_1.expectBoolean)(output.retryable),
1222
- };
1223
- };
1224
- const de_CreateHapgResponse = (output, context) => {
1225
- return {
1226
- HapgArn: (0, smithy_client_1.expectString)(output.HapgArn),
1227
- };
1228
- };
1229
- const de_CreateHsmResponse = (output, context) => {
1230
- return {
1231
- HsmArn: (0, smithy_client_1.expectString)(output.HsmArn),
1232
- };
1233
- };
1234
- const de_CreateLunaClientResponse = (output, context) => {
1235
- return {
1236
- ClientArn: (0, smithy_client_1.expectString)(output.ClientArn),
1237
- };
1238
- };
1239
- const de_DeleteHapgResponse = (output, context) => {
1240
- return {
1241
- Status: (0, smithy_client_1.expectString)(output.Status),
1242
- };
1243
- };
1244
- const de_DeleteHsmResponse = (output, context) => {
1245
- return {
1246
- Status: (0, smithy_client_1.expectString)(output.Status),
1247
- };
1248
- };
1249
- const de_DeleteLunaClientResponse = (output, context) => {
1250
- return {
1251
- Status: (0, smithy_client_1.expectString)(output.Status),
1252
- };
1253
- };
1254
- const de_DescribeHapgResponse = (output, context) => {
1255
- return {
1256
- HapgArn: (0, smithy_client_1.expectString)(output.HapgArn),
1257
- HapgSerial: (0, smithy_client_1.expectString)(output.HapgSerial),
1258
- HsmsLastActionFailed: output.HsmsLastActionFailed != null ? de_HsmList(output.HsmsLastActionFailed, context) : undefined,
1259
- HsmsPendingDeletion: output.HsmsPendingDeletion != null ? de_HsmList(output.HsmsPendingDeletion, context) : undefined,
1260
- HsmsPendingRegistration: output.HsmsPendingRegistration != null ? de_HsmList(output.HsmsPendingRegistration, context) : undefined,
1261
- Label: (0, smithy_client_1.expectString)(output.Label),
1262
- LastModifiedTimestamp: (0, smithy_client_1.expectString)(output.LastModifiedTimestamp),
1263
- PartitionSerialList: output.PartitionSerialList != null ? de_PartitionSerialList(output.PartitionSerialList, context) : undefined,
1264
- State: (0, smithy_client_1.expectString)(output.State),
1265
- };
1266
- };
1267
- const de_DescribeHsmResponse = (output, context) => {
1268
- return {
1269
- AvailabilityZone: (0, smithy_client_1.expectString)(output.AvailabilityZone),
1270
- EniId: (0, smithy_client_1.expectString)(output.EniId),
1271
- EniIp: (0, smithy_client_1.expectString)(output.EniIp),
1272
- HsmArn: (0, smithy_client_1.expectString)(output.HsmArn),
1273
- HsmType: (0, smithy_client_1.expectString)(output.HsmType),
1274
- IamRoleArn: (0, smithy_client_1.expectString)(output.IamRoleArn),
1275
- Partitions: output.Partitions != null ? de_PartitionList(output.Partitions, context) : undefined,
1276
- SerialNumber: (0, smithy_client_1.expectString)(output.SerialNumber),
1277
- ServerCertLastUpdated: (0, smithy_client_1.expectString)(output.ServerCertLastUpdated),
1278
- ServerCertUri: (0, smithy_client_1.expectString)(output.ServerCertUri),
1279
- SoftwareVersion: (0, smithy_client_1.expectString)(output.SoftwareVersion),
1280
- SshKeyLastUpdated: (0, smithy_client_1.expectString)(output.SshKeyLastUpdated),
1281
- SshPublicKey: (0, smithy_client_1.expectString)(output.SshPublicKey),
1282
- Status: (0, smithy_client_1.expectString)(output.Status),
1283
- StatusDetails: (0, smithy_client_1.expectString)(output.StatusDetails),
1284
- SubnetId: (0, smithy_client_1.expectString)(output.SubnetId),
1285
- SubscriptionEndDate: (0, smithy_client_1.expectString)(output.SubscriptionEndDate),
1286
- SubscriptionStartDate: (0, smithy_client_1.expectString)(output.SubscriptionStartDate),
1287
- SubscriptionType: (0, smithy_client_1.expectString)(output.SubscriptionType),
1288
- VendorName: (0, smithy_client_1.expectString)(output.VendorName),
1289
- VpcId: (0, smithy_client_1.expectString)(output.VpcId),
1290
- };
1291
- };
1292
- const de_DescribeLunaClientResponse = (output, context) => {
1293
- return {
1294
- Certificate: (0, smithy_client_1.expectString)(output.Certificate),
1295
- CertificateFingerprint: (0, smithy_client_1.expectString)(output.CertificateFingerprint),
1296
- ClientArn: (0, smithy_client_1.expectString)(output.ClientArn),
1297
- Label: (0, smithy_client_1.expectString)(output.Label),
1298
- LastModifiedTimestamp: (0, smithy_client_1.expectString)(output.LastModifiedTimestamp),
1299
- };
1300
- };
1301
- const de_GetConfigResponse = (output, context) => {
1302
- return {
1303
- ConfigCred: (0, smithy_client_1.expectString)(output.ConfigCred),
1304
- ConfigFile: (0, smithy_client_1.expectString)(output.ConfigFile),
1305
- ConfigType: (0, smithy_client_1.expectString)(output.ConfigType),
1306
- };
1307
- };
1308
- const de_HapgList = (output, context) => {
1309
- const retVal = (output || [])
1310
- .filter((e) => e != null)
1311
- .map((entry) => {
1312
- if (entry === null) {
1313
- return null;
1314
- }
1315
- return (0, smithy_client_1.expectString)(entry);
1316
- });
1317
- return retVal;
1318
- };
1319
- const de_HsmList = (output, context) => {
1320
- const retVal = (output || [])
1321
- .filter((e) => e != null)
1322
- .map((entry) => {
1323
- if (entry === null) {
1324
- return null;
1325
- }
1326
- return (0, smithy_client_1.expectString)(entry);
1327
- });
1328
- return retVal;
1329
- };
1330
- const de_InvalidRequestException = (output, context) => {
1331
- return {
1332
- message: (0, smithy_client_1.expectString)(output.message),
1333
- retryable: (0, smithy_client_1.expectBoolean)(output.retryable),
1334
- };
1335
- };
1336
- const de_ListAvailableZonesResponse = (output, context) => {
1337
- return {
1338
- AZList: output.AZList != null ? de_AZList(output.AZList, context) : undefined,
1339
- };
1340
- };
1341
- const de_ListHapgsResponse = (output, context) => {
1342
- return {
1343
- HapgList: output.HapgList != null ? de_HapgList(output.HapgList, context) : undefined,
1344
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1345
- };
1346
- };
1347
- const de_ListHsmsResponse = (output, context) => {
1348
- return {
1349
- HsmList: output.HsmList != null ? de_HsmList(output.HsmList, context) : undefined,
1350
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1351
- };
1352
- };
1353
- const de_ListLunaClientsResponse = (output, context) => {
1354
- return {
1355
- ClientList: output.ClientList != null ? de_ClientList(output.ClientList, context) : undefined,
1356
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1357
- };
1358
- };
1359
- const de_ListTagsForResourceResponse = (output, context) => {
1360
- return {
1361
- TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined,
1362
- };
1363
- };
1364
- const de_ModifyHapgResponse = (output, context) => {
1365
- return {
1366
- HapgArn: (0, smithy_client_1.expectString)(output.HapgArn),
1367
- };
1368
- };
1369
- const de_ModifyHsmResponse = (output, context) => {
1370
- return {
1371
- HsmArn: (0, smithy_client_1.expectString)(output.HsmArn),
1372
- };
1373
- };
1374
- const de_ModifyLunaClientResponse = (output, context) => {
1375
- return {
1376
- ClientArn: (0, smithy_client_1.expectString)(output.ClientArn),
1377
- };
1378
- };
1379
- const de_PartitionList = (output, context) => {
1380
- const retVal = (output || [])
1381
- .filter((e) => e != null)
1382
- .map((entry) => {
1383
- if (entry === null) {
1384
- return null;
1385
- }
1386
- return (0, smithy_client_1.expectString)(entry);
1387
- });
1388
- return retVal;
1389
- };
1390
- const de_PartitionSerialList = (output, context) => {
1391
- const retVal = (output || [])
1392
- .filter((e) => e != null)
1393
- .map((entry) => {
1394
- if (entry === null) {
1395
- return null;
1396
- }
1397
- return (0, smithy_client_1.expectString)(entry);
1398
- });
1399
- return retVal;
1400
- };
1401
- const de_RemoveTagsFromResourceResponse = (output, context) => {
1402
- return {
1403
- Status: (0, smithy_client_1.expectString)(output.Status),
1404
- };
1405
- };
1406
- const de_Tag = (output, context) => {
1407
- return {
1408
- Key: (0, smithy_client_1.expectString)(output.Key),
1409
- Value: (0, smithy_client_1.expectString)(output.Value),
1410
- };
1411
- };
1412
- const de_TagList = (output, context) => {
1413
- const retVal = (output || [])
1414
- .filter((e) => e != null)
1415
- .map((entry) => {
1416
- if (entry === null) {
1417
- return null;
1418
- }
1419
- return de_Tag(entry, context);
1420
- });
1421
- return retVal;
1422
- };
1423
949
  const deserializeMetadata = (output) => ({
1424
950
  httpStatusCode: output.statusCode,
1425
951
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1433,6 +959,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1433
959
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1434
960
  };
1435
961
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
962
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudHSMServiceException_1.CloudHSMServiceException);
1436
963
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1437
964
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1438
965
  const contents = {
@@ -1451,6 +978,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1451
978
  }
1452
979
  return new protocol_http_1.HttpRequest(contents);
1453
980
  };
981
+ function sharedHeaders(operation) {
982
+ return {
983
+ "content-type": "application/x-amz-json-1.1",
984
+ "x-amz-target": `CloudHsmFrontendService.${operation}`,
985
+ };
986
+ }
1454
987
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1455
988
  if (encoded.length) {
1456
989
  return JSON.parse(encoded);