@aws-sdk/client-shield 3.312.0 → 3.316.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.
@@ -9,175 +9,175 @@ const ShieldServiceException_1 = require("../models/ShieldServiceException");
9
9
  const se_AssociateDRTLogBucketCommand = async (input, context) => {
10
10
  const headers = sharedHeaders("AssociateDRTLogBucket");
11
11
  let body;
12
- body = JSON.stringify(se_AssociateDRTLogBucketRequest(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
13
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
14
  };
15
15
  exports.se_AssociateDRTLogBucketCommand = se_AssociateDRTLogBucketCommand;
16
16
  const se_AssociateDRTRoleCommand = async (input, context) => {
17
17
  const headers = sharedHeaders("AssociateDRTRole");
18
18
  let body;
19
- body = JSON.stringify(se_AssociateDRTRoleRequest(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
20
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
21
  };
22
22
  exports.se_AssociateDRTRoleCommand = se_AssociateDRTRoleCommand;
23
23
  const se_AssociateHealthCheckCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("AssociateHealthCheck");
25
25
  let body;
26
- body = JSON.stringify(se_AssociateHealthCheckRequest(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  exports.se_AssociateHealthCheckCommand = se_AssociateHealthCheckCommand;
30
30
  const se_AssociateProactiveEngagementDetailsCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("AssociateProactiveEngagementDetails");
32
32
  let body;
33
- body = JSON.stringify(se_AssociateProactiveEngagementDetailsRequest(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  exports.se_AssociateProactiveEngagementDetailsCommand = se_AssociateProactiveEngagementDetailsCommand;
37
37
  const se_CreateProtectionCommand = async (input, context) => {
38
38
  const headers = sharedHeaders("CreateProtection");
39
39
  let body;
40
- body = JSON.stringify(se_CreateProtectionRequest(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
41
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
42
  };
43
43
  exports.se_CreateProtectionCommand = se_CreateProtectionCommand;
44
44
  const se_CreateProtectionGroupCommand = async (input, context) => {
45
45
  const headers = sharedHeaders("CreateProtectionGroup");
46
46
  let body;
47
- body = JSON.stringify(se_CreateProtectionGroupRequest(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
50
  exports.se_CreateProtectionGroupCommand = se_CreateProtectionGroupCommand;
51
51
  const se_CreateSubscriptionCommand = async (input, context) => {
52
52
  const headers = sharedHeaders("CreateSubscription");
53
53
  let body;
54
- body = JSON.stringify(se_CreateSubscriptionRequest(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.se_CreateSubscriptionCommand = se_CreateSubscriptionCommand;
58
58
  const se_DeleteProtectionCommand = async (input, context) => {
59
59
  const headers = sharedHeaders("DeleteProtection");
60
60
  let body;
61
- body = JSON.stringify(se_DeleteProtectionRequest(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
62
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
63
  };
64
64
  exports.se_DeleteProtectionCommand = se_DeleteProtectionCommand;
65
65
  const se_DeleteProtectionGroupCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DeleteProtectionGroup");
67
67
  let body;
68
- body = JSON.stringify(se_DeleteProtectionGroupRequest(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  exports.se_DeleteProtectionGroupCommand = se_DeleteProtectionGroupCommand;
72
72
  const se_DeleteSubscriptionCommand = async (input, context) => {
73
73
  const headers = sharedHeaders("DeleteSubscription");
74
74
  let body;
75
- body = JSON.stringify(se_DeleteSubscriptionRequest(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
77
  };
78
78
  exports.se_DeleteSubscriptionCommand = se_DeleteSubscriptionCommand;
79
79
  const se_DescribeAttackCommand = async (input, context) => {
80
80
  const headers = sharedHeaders("DescribeAttack");
81
81
  let body;
82
- body = JSON.stringify(se_DescribeAttackRequest(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
83
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
84
  };
85
85
  exports.se_DescribeAttackCommand = se_DescribeAttackCommand;
86
86
  const se_DescribeAttackStatisticsCommand = async (input, context) => {
87
87
  const headers = sharedHeaders("DescribeAttackStatistics");
88
88
  let body;
89
- body = JSON.stringify(se_DescribeAttackStatisticsRequest(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
90
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
91
  };
92
92
  exports.se_DescribeAttackStatisticsCommand = se_DescribeAttackStatisticsCommand;
93
93
  const se_DescribeDRTAccessCommand = async (input, context) => {
94
94
  const headers = sharedHeaders("DescribeDRTAccess");
95
95
  let body;
96
- body = JSON.stringify(se_DescribeDRTAccessRequest(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
98
  };
99
99
  exports.se_DescribeDRTAccessCommand = se_DescribeDRTAccessCommand;
100
100
  const se_DescribeEmergencyContactSettingsCommand = async (input, context) => {
101
101
  const headers = sharedHeaders("DescribeEmergencyContactSettings");
102
102
  let body;
103
- body = JSON.stringify(se_DescribeEmergencyContactSettingsRequest(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
105
  };
106
106
  exports.se_DescribeEmergencyContactSettingsCommand = se_DescribeEmergencyContactSettingsCommand;
107
107
  const se_DescribeProtectionCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("DescribeProtection");
109
109
  let body;
110
- body = JSON.stringify(se_DescribeProtectionRequest(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  exports.se_DescribeProtectionCommand = se_DescribeProtectionCommand;
114
114
  const se_DescribeProtectionGroupCommand = async (input, context) => {
115
115
  const headers = sharedHeaders("DescribeProtectionGroup");
116
116
  let body;
117
- body = JSON.stringify(se_DescribeProtectionGroupRequest(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
118
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
119
  };
120
120
  exports.se_DescribeProtectionGroupCommand = se_DescribeProtectionGroupCommand;
121
121
  const se_DescribeSubscriptionCommand = async (input, context) => {
122
122
  const headers = sharedHeaders("DescribeSubscription");
123
123
  let body;
124
- body = JSON.stringify(se_DescribeSubscriptionRequest(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
125
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
126
  };
127
127
  exports.se_DescribeSubscriptionCommand = se_DescribeSubscriptionCommand;
128
128
  const se_DisableApplicationLayerAutomaticResponseCommand = async (input, context) => {
129
129
  const headers = sharedHeaders("DisableApplicationLayerAutomaticResponse");
130
130
  let body;
131
- body = JSON.stringify(se_DisableApplicationLayerAutomaticResponseRequest(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
132
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
133
  };
134
134
  exports.se_DisableApplicationLayerAutomaticResponseCommand = se_DisableApplicationLayerAutomaticResponseCommand;
135
135
  const se_DisableProactiveEngagementCommand = async (input, context) => {
136
136
  const headers = sharedHeaders("DisableProactiveEngagement");
137
137
  let body;
138
- body = JSON.stringify(se_DisableProactiveEngagementRequest(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
139
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
140
  };
141
141
  exports.se_DisableProactiveEngagementCommand = se_DisableProactiveEngagementCommand;
142
142
  const se_DisassociateDRTLogBucketCommand = async (input, context) => {
143
143
  const headers = sharedHeaders("DisassociateDRTLogBucket");
144
144
  let body;
145
- body = JSON.stringify(se_DisassociateDRTLogBucketRequest(input, context));
145
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
147
  };
148
148
  exports.se_DisassociateDRTLogBucketCommand = se_DisassociateDRTLogBucketCommand;
149
149
  const se_DisassociateDRTRoleCommand = async (input, context) => {
150
150
  const headers = sharedHeaders("DisassociateDRTRole");
151
151
  let body;
152
- body = JSON.stringify(se_DisassociateDRTRoleRequest(input, context));
152
+ body = JSON.stringify((0, smithy_client_1._json)(input));
153
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
154
  };
155
155
  exports.se_DisassociateDRTRoleCommand = se_DisassociateDRTRoleCommand;
156
156
  const se_DisassociateHealthCheckCommand = async (input, context) => {
157
157
  const headers = sharedHeaders("DisassociateHealthCheck");
158
158
  let body;
159
- body = JSON.stringify(se_DisassociateHealthCheckRequest(input, context));
159
+ body = JSON.stringify((0, smithy_client_1._json)(input));
160
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
161
  };
162
162
  exports.se_DisassociateHealthCheckCommand = se_DisassociateHealthCheckCommand;
163
163
  const se_EnableApplicationLayerAutomaticResponseCommand = async (input, context) => {
164
164
  const headers = sharedHeaders("EnableApplicationLayerAutomaticResponse");
165
165
  let body;
166
- body = JSON.stringify(se_EnableApplicationLayerAutomaticResponseRequest(input, context));
166
+ body = JSON.stringify((0, smithy_client_1._json)(input));
167
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
168
  };
169
169
  exports.se_EnableApplicationLayerAutomaticResponseCommand = se_EnableApplicationLayerAutomaticResponseCommand;
170
170
  const se_EnableProactiveEngagementCommand = async (input, context) => {
171
171
  const headers = sharedHeaders("EnableProactiveEngagement");
172
172
  let body;
173
- body = JSON.stringify(se_EnableProactiveEngagementRequest(input, context));
173
+ body = JSON.stringify((0, smithy_client_1._json)(input));
174
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
175
  };
176
176
  exports.se_EnableProactiveEngagementCommand = se_EnableProactiveEngagementCommand;
177
177
  const se_GetSubscriptionStateCommand = async (input, context) => {
178
178
  const headers = sharedHeaders("GetSubscriptionState");
179
179
  let body;
180
- body = JSON.stringify(se_GetSubscriptionStateRequest(input, context));
180
+ body = JSON.stringify((0, smithy_client_1._json)(input));
181
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
182
  };
183
183
  exports.se_GetSubscriptionStateCommand = se_GetSubscriptionStateCommand;
@@ -191,70 +191,70 @@ exports.se_ListAttacksCommand = se_ListAttacksCommand;
191
191
  const se_ListProtectionGroupsCommand = async (input, context) => {
192
192
  const headers = sharedHeaders("ListProtectionGroups");
193
193
  let body;
194
- body = JSON.stringify(se_ListProtectionGroupsRequest(input, context));
194
+ body = JSON.stringify((0, smithy_client_1._json)(input));
195
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
196
  };
197
197
  exports.se_ListProtectionGroupsCommand = se_ListProtectionGroupsCommand;
198
198
  const se_ListProtectionsCommand = async (input, context) => {
199
199
  const headers = sharedHeaders("ListProtections");
200
200
  let body;
201
- body = JSON.stringify(se_ListProtectionsRequest(input, context));
201
+ body = JSON.stringify((0, smithy_client_1._json)(input));
202
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
203
  };
204
204
  exports.se_ListProtectionsCommand = se_ListProtectionsCommand;
205
205
  const se_ListResourcesInProtectionGroupCommand = async (input, context) => {
206
206
  const headers = sharedHeaders("ListResourcesInProtectionGroup");
207
207
  let body;
208
- body = JSON.stringify(se_ListResourcesInProtectionGroupRequest(input, context));
208
+ body = JSON.stringify((0, smithy_client_1._json)(input));
209
209
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
210
  };
211
211
  exports.se_ListResourcesInProtectionGroupCommand = se_ListResourcesInProtectionGroupCommand;
212
212
  const se_ListTagsForResourceCommand = async (input, context) => {
213
213
  const headers = sharedHeaders("ListTagsForResource");
214
214
  let body;
215
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
215
+ body = JSON.stringify((0, smithy_client_1._json)(input));
216
216
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
217
  };
218
218
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
219
219
  const se_TagResourceCommand = async (input, context) => {
220
220
  const headers = sharedHeaders("TagResource");
221
221
  let body;
222
- body = JSON.stringify(se_TagResourceRequest(input, context));
222
+ body = JSON.stringify((0, smithy_client_1._json)(input));
223
223
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
224
  };
225
225
  exports.se_TagResourceCommand = se_TagResourceCommand;
226
226
  const se_UntagResourceCommand = async (input, context) => {
227
227
  const headers = sharedHeaders("UntagResource");
228
228
  let body;
229
- body = JSON.stringify(se_UntagResourceRequest(input, context));
229
+ body = JSON.stringify((0, smithy_client_1._json)(input));
230
230
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
231
  };
232
232
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
233
233
  const se_UpdateApplicationLayerAutomaticResponseCommand = async (input, context) => {
234
234
  const headers = sharedHeaders("UpdateApplicationLayerAutomaticResponse");
235
235
  let body;
236
- body = JSON.stringify(se_UpdateApplicationLayerAutomaticResponseRequest(input, context));
236
+ body = JSON.stringify((0, smithy_client_1._json)(input));
237
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
238
  };
239
239
  exports.se_UpdateApplicationLayerAutomaticResponseCommand = se_UpdateApplicationLayerAutomaticResponseCommand;
240
240
  const se_UpdateEmergencyContactSettingsCommand = async (input, context) => {
241
241
  const headers = sharedHeaders("UpdateEmergencyContactSettings");
242
242
  let body;
243
- body = JSON.stringify(se_UpdateEmergencyContactSettingsRequest(input, context));
243
+ body = JSON.stringify((0, smithy_client_1._json)(input));
244
244
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
245
  };
246
246
  exports.se_UpdateEmergencyContactSettingsCommand = se_UpdateEmergencyContactSettingsCommand;
247
247
  const se_UpdateProtectionGroupCommand = async (input, context) => {
248
248
  const headers = sharedHeaders("UpdateProtectionGroup");
249
249
  let body;
250
- body = JSON.stringify(se_UpdateProtectionGroupRequest(input, context));
250
+ body = JSON.stringify((0, smithy_client_1._json)(input));
251
251
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
252
  };
253
253
  exports.se_UpdateProtectionGroupCommand = se_UpdateProtectionGroupCommand;
254
254
  const se_UpdateSubscriptionCommand = async (input, context) => {
255
255
  const headers = sharedHeaders("UpdateSubscription");
256
256
  let body;
257
- body = JSON.stringify(se_UpdateSubscriptionRequest(input, context));
257
+ body = JSON.stringify((0, smithy_client_1._json)(input));
258
258
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
259
  };
260
260
  exports.se_UpdateSubscriptionCommand = se_UpdateSubscriptionCommand;
@@ -264,12 +264,12 @@ const de_AssociateDRTLogBucketCommand = async (output, context) => {
264
264
  }
265
265
  const data = await parseBody(output.body, context);
266
266
  let contents = {};
267
- contents = de_AssociateDRTLogBucketResponse(data, context);
267
+ contents = (0, smithy_client_1._json)(data);
268
268
  const response = {
269
269
  $metadata: deserializeMetadata(output),
270
270
  ...contents,
271
271
  };
272
- return Promise.resolve(response);
272
+ return response;
273
273
  };
274
274
  exports.de_AssociateDRTLogBucketCommand = de_AssociateDRTLogBucketCommand;
275
275
  const de_AssociateDRTLogBucketCommandError = async (output, context) => {
@@ -305,10 +305,9 @@ const de_AssociateDRTLogBucketCommandError = async (output, context) => {
305
305
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
306
306
  default:
307
307
  const parsedBody = parsedOutput.body;
308
- (0, smithy_client_1.throwDefaultError)({
308
+ return throwDefaultError({
309
309
  output,
310
310
  parsedBody,
311
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
312
311
  errorCode,
313
312
  });
314
313
  }
@@ -319,12 +318,12 @@ const de_AssociateDRTRoleCommand = async (output, context) => {
319
318
  }
320
319
  const data = await parseBody(output.body, context);
321
320
  let contents = {};
322
- contents = de_AssociateDRTRoleResponse(data, context);
321
+ contents = (0, smithy_client_1._json)(data);
323
322
  const response = {
324
323
  $metadata: deserializeMetadata(output),
325
324
  ...contents,
326
325
  };
327
- return Promise.resolve(response);
326
+ return response;
328
327
  };
329
328
  exports.de_AssociateDRTRoleCommand = de_AssociateDRTRoleCommand;
330
329
  const de_AssociateDRTRoleCommandError = async (output, context) => {
@@ -354,10 +353,9 @@ const de_AssociateDRTRoleCommandError = async (output, context) => {
354
353
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
355
354
  default:
356
355
  const parsedBody = parsedOutput.body;
357
- (0, smithy_client_1.throwDefaultError)({
356
+ return throwDefaultError({
358
357
  output,
359
358
  parsedBody,
360
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
361
359
  errorCode,
362
360
  });
363
361
  }
@@ -368,12 +366,12 @@ const de_AssociateHealthCheckCommand = async (output, context) => {
368
366
  }
369
367
  const data = await parseBody(output.body, context);
370
368
  let contents = {};
371
- contents = de_AssociateHealthCheckResponse(data, context);
369
+ contents = (0, smithy_client_1._json)(data);
372
370
  const response = {
373
371
  $metadata: deserializeMetadata(output),
374
372
  ...contents,
375
373
  };
376
- return Promise.resolve(response);
374
+ return response;
377
375
  };
378
376
  exports.de_AssociateHealthCheckCommand = de_AssociateHealthCheckCommand;
379
377
  const de_AssociateHealthCheckCommandError = async (output, context) => {
@@ -403,10 +401,9 @@ const de_AssociateHealthCheckCommandError = async (output, context) => {
403
401
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
404
402
  default:
405
403
  const parsedBody = parsedOutput.body;
406
- (0, smithy_client_1.throwDefaultError)({
404
+ return throwDefaultError({
407
405
  output,
408
406
  parsedBody,
409
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
410
407
  errorCode,
411
408
  });
412
409
  }
@@ -417,12 +414,12 @@ const de_AssociateProactiveEngagementDetailsCommand = async (output, context) =>
417
414
  }
418
415
  const data = await parseBody(output.body, context);
419
416
  let contents = {};
420
- contents = de_AssociateProactiveEngagementDetailsResponse(data, context);
417
+ contents = (0, smithy_client_1._json)(data);
421
418
  const response = {
422
419
  $metadata: deserializeMetadata(output),
423
420
  ...contents,
424
421
  };
425
- return Promise.resolve(response);
422
+ return response;
426
423
  };
427
424
  exports.de_AssociateProactiveEngagementDetailsCommand = de_AssociateProactiveEngagementDetailsCommand;
428
425
  const de_AssociateProactiveEngagementDetailsCommandError = async (output, context) => {
@@ -449,10 +446,9 @@ const de_AssociateProactiveEngagementDetailsCommandError = async (output, contex
449
446
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
450
447
  default:
451
448
  const parsedBody = parsedOutput.body;
452
- (0, smithy_client_1.throwDefaultError)({
449
+ return throwDefaultError({
453
450
  output,
454
451
  parsedBody,
455
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
456
452
  errorCode,
457
453
  });
458
454
  }
@@ -463,12 +459,12 @@ const de_CreateProtectionCommand = async (output, context) => {
463
459
  }
464
460
  const data = await parseBody(output.body, context);
465
461
  let contents = {};
466
- contents = de_CreateProtectionResponse(data, context);
462
+ contents = (0, smithy_client_1._json)(data);
467
463
  const response = {
468
464
  $metadata: deserializeMetadata(output),
469
465
  ...contents,
470
466
  };
471
- return Promise.resolve(response);
467
+ return response;
472
468
  };
473
469
  exports.de_CreateProtectionCommand = de_CreateProtectionCommand;
474
470
  const de_CreateProtectionCommandError = async (output, context) => {
@@ -504,10 +500,9 @@ const de_CreateProtectionCommandError = async (output, context) => {
504
500
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
505
501
  default:
506
502
  const parsedBody = parsedOutput.body;
507
- (0, smithy_client_1.throwDefaultError)({
503
+ return throwDefaultError({
508
504
  output,
509
505
  parsedBody,
510
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
511
506
  errorCode,
512
507
  });
513
508
  }
@@ -518,12 +513,12 @@ const de_CreateProtectionGroupCommand = async (output, context) => {
518
513
  }
519
514
  const data = await parseBody(output.body, context);
520
515
  let contents = {};
521
- contents = de_CreateProtectionGroupResponse(data, context);
516
+ contents = (0, smithy_client_1._json)(data);
522
517
  const response = {
523
518
  $metadata: deserializeMetadata(output),
524
519
  ...contents,
525
520
  };
526
- return Promise.resolve(response);
521
+ return response;
527
522
  };
528
523
  exports.de_CreateProtectionGroupCommand = de_CreateProtectionGroupCommand;
529
524
  const de_CreateProtectionGroupCommandError = async (output, context) => {
@@ -553,10 +548,9 @@ const de_CreateProtectionGroupCommandError = async (output, context) => {
553
548
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
554
549
  default:
555
550
  const parsedBody = parsedOutput.body;
556
- (0, smithy_client_1.throwDefaultError)({
551
+ return throwDefaultError({
557
552
  output,
558
553
  parsedBody,
559
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
560
554
  errorCode,
561
555
  });
562
556
  }
@@ -567,12 +561,12 @@ const de_CreateSubscriptionCommand = async (output, context) => {
567
561
  }
568
562
  const data = await parseBody(output.body, context);
569
563
  let contents = {};
570
- contents = de_CreateSubscriptionResponse(data, context);
564
+ contents = (0, smithy_client_1._json)(data);
571
565
  const response = {
572
566
  $metadata: deserializeMetadata(output),
573
567
  ...contents,
574
568
  };
575
- return Promise.resolve(response);
569
+ return response;
576
570
  };
577
571
  exports.de_CreateSubscriptionCommand = de_CreateSubscriptionCommand;
578
572
  const de_CreateSubscriptionCommandError = async (output, context) => {
@@ -590,10 +584,9 @@ const de_CreateSubscriptionCommandError = async (output, context) => {
590
584
  throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
591
585
  default:
592
586
  const parsedBody = parsedOutput.body;
593
- (0, smithy_client_1.throwDefaultError)({
587
+ return throwDefaultError({
594
588
  output,
595
589
  parsedBody,
596
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
597
590
  errorCode,
598
591
  });
599
592
  }
@@ -604,12 +597,12 @@ const de_DeleteProtectionCommand = async (output, context) => {
604
597
  }
605
598
  const data = await parseBody(output.body, context);
606
599
  let contents = {};
607
- contents = de_DeleteProtectionResponse(data, context);
600
+ contents = (0, smithy_client_1._json)(data);
608
601
  const response = {
609
602
  $metadata: deserializeMetadata(output),
610
603
  ...contents,
611
604
  };
612
- return Promise.resolve(response);
605
+ return response;
613
606
  };
614
607
  exports.de_DeleteProtectionCommand = de_DeleteProtectionCommand;
615
608
  const de_DeleteProtectionCommandError = async (output, context) => {
@@ -630,10 +623,9 @@ const de_DeleteProtectionCommandError = async (output, context) => {
630
623
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
631
624
  default:
632
625
  const parsedBody = parsedOutput.body;
633
- (0, smithy_client_1.throwDefaultError)({
626
+ return throwDefaultError({
634
627
  output,
635
628
  parsedBody,
636
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
637
629
  errorCode,
638
630
  });
639
631
  }
@@ -644,12 +636,12 @@ const de_DeleteProtectionGroupCommand = async (output, context) => {
644
636
  }
645
637
  const data = await parseBody(output.body, context);
646
638
  let contents = {};
647
- contents = de_DeleteProtectionGroupResponse(data, context);
639
+ contents = (0, smithy_client_1._json)(data);
648
640
  const response = {
649
641
  $metadata: deserializeMetadata(output),
650
642
  ...contents,
651
643
  };
652
- return Promise.resolve(response);
644
+ return response;
653
645
  };
654
646
  exports.de_DeleteProtectionGroupCommand = de_DeleteProtectionGroupCommand;
655
647
  const de_DeleteProtectionGroupCommandError = async (output, context) => {
@@ -670,10 +662,9 @@ const de_DeleteProtectionGroupCommandError = async (output, context) => {
670
662
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
671
663
  default:
672
664
  const parsedBody = parsedOutput.body;
673
- (0, smithy_client_1.throwDefaultError)({
665
+ return throwDefaultError({
674
666
  output,
675
667
  parsedBody,
676
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
677
668
  errorCode,
678
669
  });
679
670
  }
@@ -684,12 +675,12 @@ const de_DeleteSubscriptionCommand = async (output, context) => {
684
675
  }
685
676
  const data = await parseBody(output.body, context);
686
677
  let contents = {};
687
- contents = de_DeleteSubscriptionResponse(data, context);
678
+ contents = (0, smithy_client_1._json)(data);
688
679
  const response = {
689
680
  $metadata: deserializeMetadata(output),
690
681
  ...contents,
691
682
  };
692
- return Promise.resolve(response);
683
+ return response;
693
684
  };
694
685
  exports.de_DeleteSubscriptionCommand = de_DeleteSubscriptionCommand;
695
686
  const de_DeleteSubscriptionCommandError = async (output, context) => {
@@ -710,10 +701,9 @@ const de_DeleteSubscriptionCommandError = async (output, context) => {
710
701
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
711
702
  default:
712
703
  const parsedBody = parsedOutput.body;
713
- (0, smithy_client_1.throwDefaultError)({
704
+ return throwDefaultError({
714
705
  output,
715
706
  parsedBody,
716
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
717
707
  errorCode,
718
708
  });
719
709
  }
@@ -729,7 +719,7 @@ const de_DescribeAttackCommand = async (output, context) => {
729
719
  $metadata: deserializeMetadata(output),
730
720
  ...contents,
731
721
  };
732
- return Promise.resolve(response);
722
+ return response;
733
723
  };
734
724
  exports.de_DescribeAttackCommand = de_DescribeAttackCommand;
735
725
  const de_DescribeAttackCommandError = async (output, context) => {
@@ -747,10 +737,9 @@ const de_DescribeAttackCommandError = async (output, context) => {
747
737
  throw await de_InternalErrorExceptionRes(parsedOutput, context);
748
738
  default:
749
739
  const parsedBody = parsedOutput.body;
750
- (0, smithy_client_1.throwDefaultError)({
740
+ return throwDefaultError({
751
741
  output,
752
742
  parsedBody,
753
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
754
743
  errorCode,
755
744
  });
756
745
  }
@@ -766,7 +755,7 @@ const de_DescribeAttackStatisticsCommand = async (output, context) => {
766
755
  $metadata: deserializeMetadata(output),
767
756
  ...contents,
768
757
  };
769
- return Promise.resolve(response);
758
+ return response;
770
759
  };
771
760
  exports.de_DescribeAttackStatisticsCommand = de_DescribeAttackStatisticsCommand;
772
761
  const de_DescribeAttackStatisticsCommandError = async (output, context) => {
@@ -781,10 +770,9 @@ const de_DescribeAttackStatisticsCommandError = async (output, context) => {
781
770
  throw await de_InternalErrorExceptionRes(parsedOutput, context);
782
771
  default:
783
772
  const parsedBody = parsedOutput.body;
784
- (0, smithy_client_1.throwDefaultError)({
773
+ return throwDefaultError({
785
774
  output,
786
775
  parsedBody,
787
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
788
776
  errorCode,
789
777
  });
790
778
  }
@@ -795,12 +783,12 @@ const de_DescribeDRTAccessCommand = async (output, context) => {
795
783
  }
796
784
  const data = await parseBody(output.body, context);
797
785
  let contents = {};
798
- contents = de_DescribeDRTAccessResponse(data, context);
786
+ contents = (0, smithy_client_1._json)(data);
799
787
  const response = {
800
788
  $metadata: deserializeMetadata(output),
801
789
  ...contents,
802
790
  };
803
- return Promise.resolve(response);
791
+ return response;
804
792
  };
805
793
  exports.de_DescribeDRTAccessCommand = de_DescribeDRTAccessCommand;
806
794
  const de_DescribeDRTAccessCommandError = async (output, context) => {
@@ -818,10 +806,9 @@ const de_DescribeDRTAccessCommandError = async (output, context) => {
818
806
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
819
807
  default:
820
808
  const parsedBody = parsedOutput.body;
821
- (0, smithy_client_1.throwDefaultError)({
809
+ return throwDefaultError({
822
810
  output,
823
811
  parsedBody,
824
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
825
812
  errorCode,
826
813
  });
827
814
  }
@@ -832,12 +819,12 @@ const de_DescribeEmergencyContactSettingsCommand = async (output, context) => {
832
819
  }
833
820
  const data = await parseBody(output.body, context);
834
821
  let contents = {};
835
- contents = de_DescribeEmergencyContactSettingsResponse(data, context);
822
+ contents = (0, smithy_client_1._json)(data);
836
823
  const response = {
837
824
  $metadata: deserializeMetadata(output),
838
825
  ...contents,
839
826
  };
840
- return Promise.resolve(response);
827
+ return response;
841
828
  };
842
829
  exports.de_DescribeEmergencyContactSettingsCommand = de_DescribeEmergencyContactSettingsCommand;
843
830
  const de_DescribeEmergencyContactSettingsCommandError = async (output, context) => {
@@ -855,10 +842,9 @@ const de_DescribeEmergencyContactSettingsCommandError = async (output, context)
855
842
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
856
843
  default:
857
844
  const parsedBody = parsedOutput.body;
858
- (0, smithy_client_1.throwDefaultError)({
845
+ return throwDefaultError({
859
846
  output,
860
847
  parsedBody,
861
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
862
848
  errorCode,
863
849
  });
864
850
  }
@@ -869,12 +855,12 @@ const de_DescribeProtectionCommand = async (output, context) => {
869
855
  }
870
856
  const data = await parseBody(output.body, context);
871
857
  let contents = {};
872
- contents = de_DescribeProtectionResponse(data, context);
858
+ contents = (0, smithy_client_1._json)(data);
873
859
  const response = {
874
860
  $metadata: deserializeMetadata(output),
875
861
  ...contents,
876
862
  };
877
- return Promise.resolve(response);
863
+ return response;
878
864
  };
879
865
  exports.de_DescribeProtectionCommand = de_DescribeProtectionCommand;
880
866
  const de_DescribeProtectionCommandError = async (output, context) => {
@@ -895,10 +881,9 @@ const de_DescribeProtectionCommandError = async (output, context) => {
895
881
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
896
882
  default:
897
883
  const parsedBody = parsedOutput.body;
898
- (0, smithy_client_1.throwDefaultError)({
884
+ return throwDefaultError({
899
885
  output,
900
886
  parsedBody,
901
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
902
887
  errorCode,
903
888
  });
904
889
  }
@@ -909,12 +894,12 @@ const de_DescribeProtectionGroupCommand = async (output, context) => {
909
894
  }
910
895
  const data = await parseBody(output.body, context);
911
896
  let contents = {};
912
- contents = de_DescribeProtectionGroupResponse(data, context);
897
+ contents = (0, smithy_client_1._json)(data);
913
898
  const response = {
914
899
  $metadata: deserializeMetadata(output),
915
900
  ...contents,
916
901
  };
917
- return Promise.resolve(response);
902
+ return response;
918
903
  };
919
904
  exports.de_DescribeProtectionGroupCommand = de_DescribeProtectionGroupCommand;
920
905
  const de_DescribeProtectionGroupCommandError = async (output, context) => {
@@ -932,10 +917,9 @@ const de_DescribeProtectionGroupCommandError = async (output, context) => {
932
917
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
933
918
  default:
934
919
  const parsedBody = parsedOutput.body;
935
- (0, smithy_client_1.throwDefaultError)({
920
+ return throwDefaultError({
936
921
  output,
937
922
  parsedBody,
938
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
939
923
  errorCode,
940
924
  });
941
925
  }
@@ -951,7 +935,7 @@ const de_DescribeSubscriptionCommand = async (output, context) => {
951
935
  $metadata: deserializeMetadata(output),
952
936
  ...contents,
953
937
  };
954
- return Promise.resolve(response);
938
+ return response;
955
939
  };
956
940
  exports.de_DescribeSubscriptionCommand = de_DescribeSubscriptionCommand;
957
941
  const de_DescribeSubscriptionCommandError = async (output, context) => {
@@ -969,10 +953,9 @@ const de_DescribeSubscriptionCommandError = async (output, context) => {
969
953
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
970
954
  default:
971
955
  const parsedBody = parsedOutput.body;
972
- (0, smithy_client_1.throwDefaultError)({
956
+ return throwDefaultError({
973
957
  output,
974
958
  parsedBody,
975
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
976
959
  errorCode,
977
960
  });
978
961
  }
@@ -983,12 +966,12 @@ const de_DisableApplicationLayerAutomaticResponseCommand = async (output, contex
983
966
  }
984
967
  const data = await parseBody(output.body, context);
985
968
  let contents = {};
986
- contents = de_DisableApplicationLayerAutomaticResponseResponse(data, context);
969
+ contents = (0, smithy_client_1._json)(data);
987
970
  const response = {
988
971
  $metadata: deserializeMetadata(output),
989
972
  ...contents,
990
973
  };
991
- return Promise.resolve(response);
974
+ return response;
992
975
  };
993
976
  exports.de_DisableApplicationLayerAutomaticResponseCommand = de_DisableApplicationLayerAutomaticResponseCommand;
994
977
  const de_DisableApplicationLayerAutomaticResponseCommandError = async (output, context) => {
@@ -1015,10 +998,9 @@ const de_DisableApplicationLayerAutomaticResponseCommandError = async (output, c
1015
998
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1016
999
  default:
1017
1000
  const parsedBody = parsedOutput.body;
1018
- (0, smithy_client_1.throwDefaultError)({
1001
+ return throwDefaultError({
1019
1002
  output,
1020
1003
  parsedBody,
1021
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1022
1004
  errorCode,
1023
1005
  });
1024
1006
  }
@@ -1029,12 +1011,12 @@ const de_DisableProactiveEngagementCommand = async (output, context) => {
1029
1011
  }
1030
1012
  const data = await parseBody(output.body, context);
1031
1013
  let contents = {};
1032
- contents = de_DisableProactiveEngagementResponse(data, context);
1014
+ contents = (0, smithy_client_1._json)(data);
1033
1015
  const response = {
1034
1016
  $metadata: deserializeMetadata(output),
1035
1017
  ...contents,
1036
1018
  };
1037
- return Promise.resolve(response);
1019
+ return response;
1038
1020
  };
1039
1021
  exports.de_DisableProactiveEngagementCommand = de_DisableProactiveEngagementCommand;
1040
1022
  const de_DisableProactiveEngagementCommandError = async (output, context) => {
@@ -1061,10 +1043,9 @@ const de_DisableProactiveEngagementCommandError = async (output, context) => {
1061
1043
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1062
1044
  default:
1063
1045
  const parsedBody = parsedOutput.body;
1064
- (0, smithy_client_1.throwDefaultError)({
1046
+ return throwDefaultError({
1065
1047
  output,
1066
1048
  parsedBody,
1067
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1068
1049
  errorCode,
1069
1050
  });
1070
1051
  }
@@ -1075,12 +1056,12 @@ const de_DisassociateDRTLogBucketCommand = async (output, context) => {
1075
1056
  }
1076
1057
  const data = await parseBody(output.body, context);
1077
1058
  let contents = {};
1078
- contents = de_DisassociateDRTLogBucketResponse(data, context);
1059
+ contents = (0, smithy_client_1._json)(data);
1079
1060
  const response = {
1080
1061
  $metadata: deserializeMetadata(output),
1081
1062
  ...contents,
1082
1063
  };
1083
- return Promise.resolve(response);
1064
+ return response;
1084
1065
  };
1085
1066
  exports.de_DisassociateDRTLogBucketCommand = de_DisassociateDRTLogBucketCommand;
1086
1067
  const de_DisassociateDRTLogBucketCommandError = async (output, context) => {
@@ -1110,10 +1091,9 @@ const de_DisassociateDRTLogBucketCommandError = async (output, context) => {
1110
1091
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1111
1092
  default:
1112
1093
  const parsedBody = parsedOutput.body;
1113
- (0, smithy_client_1.throwDefaultError)({
1094
+ return throwDefaultError({
1114
1095
  output,
1115
1096
  parsedBody,
1116
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1117
1097
  errorCode,
1118
1098
  });
1119
1099
  }
@@ -1124,12 +1104,12 @@ const de_DisassociateDRTRoleCommand = async (output, context) => {
1124
1104
  }
1125
1105
  const data = await parseBody(output.body, context);
1126
1106
  let contents = {};
1127
- contents = de_DisassociateDRTRoleResponse(data, context);
1107
+ contents = (0, smithy_client_1._json)(data);
1128
1108
  const response = {
1129
1109
  $metadata: deserializeMetadata(output),
1130
1110
  ...contents,
1131
1111
  };
1132
- return Promise.resolve(response);
1112
+ return response;
1133
1113
  };
1134
1114
  exports.de_DisassociateDRTRoleCommand = de_DisassociateDRTRoleCommand;
1135
1115
  const de_DisassociateDRTRoleCommandError = async (output, context) => {
@@ -1153,10 +1133,9 @@ const de_DisassociateDRTRoleCommandError = async (output, context) => {
1153
1133
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1154
1134
  default:
1155
1135
  const parsedBody = parsedOutput.body;
1156
- (0, smithy_client_1.throwDefaultError)({
1136
+ return throwDefaultError({
1157
1137
  output,
1158
1138
  parsedBody,
1159
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1160
1139
  errorCode,
1161
1140
  });
1162
1141
  }
@@ -1167,12 +1146,12 @@ const de_DisassociateHealthCheckCommand = async (output, context) => {
1167
1146
  }
1168
1147
  const data = await parseBody(output.body, context);
1169
1148
  let contents = {};
1170
- contents = de_DisassociateHealthCheckResponse(data, context);
1149
+ contents = (0, smithy_client_1._json)(data);
1171
1150
  const response = {
1172
1151
  $metadata: deserializeMetadata(output),
1173
1152
  ...contents,
1174
1153
  };
1175
- return Promise.resolve(response);
1154
+ return response;
1176
1155
  };
1177
1156
  exports.de_DisassociateHealthCheckCommand = de_DisassociateHealthCheckCommand;
1178
1157
  const de_DisassociateHealthCheckCommandError = async (output, context) => {
@@ -1199,10 +1178,9 @@ const de_DisassociateHealthCheckCommandError = async (output, context) => {
1199
1178
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1200
1179
  default:
1201
1180
  const parsedBody = parsedOutput.body;
1202
- (0, smithy_client_1.throwDefaultError)({
1181
+ return throwDefaultError({
1203
1182
  output,
1204
1183
  parsedBody,
1205
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1206
1184
  errorCode,
1207
1185
  });
1208
1186
  }
@@ -1213,12 +1191,12 @@ const de_EnableApplicationLayerAutomaticResponseCommand = async (output, context
1213
1191
  }
1214
1192
  const data = await parseBody(output.body, context);
1215
1193
  let contents = {};
1216
- contents = de_EnableApplicationLayerAutomaticResponseResponse(data, context);
1194
+ contents = (0, smithy_client_1._json)(data);
1217
1195
  const response = {
1218
1196
  $metadata: deserializeMetadata(output),
1219
1197
  ...contents,
1220
1198
  };
1221
- return Promise.resolve(response);
1199
+ return response;
1222
1200
  };
1223
1201
  exports.de_EnableApplicationLayerAutomaticResponseCommand = de_EnableApplicationLayerAutomaticResponseCommand;
1224
1202
  const de_EnableApplicationLayerAutomaticResponseCommandError = async (output, context) => {
@@ -1248,10 +1226,9 @@ const de_EnableApplicationLayerAutomaticResponseCommandError = async (output, co
1248
1226
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1249
1227
  default:
1250
1228
  const parsedBody = parsedOutput.body;
1251
- (0, smithy_client_1.throwDefaultError)({
1229
+ return throwDefaultError({
1252
1230
  output,
1253
1231
  parsedBody,
1254
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1255
1232
  errorCode,
1256
1233
  });
1257
1234
  }
@@ -1262,12 +1239,12 @@ const de_EnableProactiveEngagementCommand = async (output, context) => {
1262
1239
  }
1263
1240
  const data = await parseBody(output.body, context);
1264
1241
  let contents = {};
1265
- contents = de_EnableProactiveEngagementResponse(data, context);
1242
+ contents = (0, smithy_client_1._json)(data);
1266
1243
  const response = {
1267
1244
  $metadata: deserializeMetadata(output),
1268
1245
  ...contents,
1269
1246
  };
1270
- return Promise.resolve(response);
1247
+ return response;
1271
1248
  };
1272
1249
  exports.de_EnableProactiveEngagementCommand = de_EnableProactiveEngagementCommand;
1273
1250
  const de_EnableProactiveEngagementCommandError = async (output, context) => {
@@ -1294,10 +1271,9 @@ const de_EnableProactiveEngagementCommandError = async (output, context) => {
1294
1271
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1295
1272
  default:
1296
1273
  const parsedBody = parsedOutput.body;
1297
- (0, smithy_client_1.throwDefaultError)({
1274
+ return throwDefaultError({
1298
1275
  output,
1299
1276
  parsedBody,
1300
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1301
1277
  errorCode,
1302
1278
  });
1303
1279
  }
@@ -1308,12 +1284,12 @@ const de_GetSubscriptionStateCommand = async (output, context) => {
1308
1284
  }
1309
1285
  const data = await parseBody(output.body, context);
1310
1286
  let contents = {};
1311
- contents = de_GetSubscriptionStateResponse(data, context);
1287
+ contents = (0, smithy_client_1._json)(data);
1312
1288
  const response = {
1313
1289
  $metadata: deserializeMetadata(output),
1314
1290
  ...contents,
1315
1291
  };
1316
- return Promise.resolve(response);
1292
+ return response;
1317
1293
  };
1318
1294
  exports.de_GetSubscriptionStateCommand = de_GetSubscriptionStateCommand;
1319
1295
  const de_GetSubscriptionStateCommandError = async (output, context) => {
@@ -1328,10 +1304,9 @@ const de_GetSubscriptionStateCommandError = async (output, context) => {
1328
1304
  throw await de_InternalErrorExceptionRes(parsedOutput, context);
1329
1305
  default:
1330
1306
  const parsedBody = parsedOutput.body;
1331
- (0, smithy_client_1.throwDefaultError)({
1307
+ return throwDefaultError({
1332
1308
  output,
1333
1309
  parsedBody,
1334
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1335
1310
  errorCode,
1336
1311
  });
1337
1312
  }
@@ -1347,7 +1322,7 @@ const de_ListAttacksCommand = async (output, context) => {
1347
1322
  $metadata: deserializeMetadata(output),
1348
1323
  ...contents,
1349
1324
  };
1350
- return Promise.resolve(response);
1325
+ return response;
1351
1326
  };
1352
1327
  exports.de_ListAttacksCommand = de_ListAttacksCommand;
1353
1328
  const de_ListAttacksCommandError = async (output, context) => {
@@ -1368,10 +1343,9 @@ const de_ListAttacksCommandError = async (output, context) => {
1368
1343
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1369
1344
  default:
1370
1345
  const parsedBody = parsedOutput.body;
1371
- (0, smithy_client_1.throwDefaultError)({
1346
+ return throwDefaultError({
1372
1347
  output,
1373
1348
  parsedBody,
1374
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1375
1349
  errorCode,
1376
1350
  });
1377
1351
  }
@@ -1382,12 +1356,12 @@ const de_ListProtectionGroupsCommand = async (output, context) => {
1382
1356
  }
1383
1357
  const data = await parseBody(output.body, context);
1384
1358
  let contents = {};
1385
- contents = de_ListProtectionGroupsResponse(data, context);
1359
+ contents = (0, smithy_client_1._json)(data);
1386
1360
  const response = {
1387
1361
  $metadata: deserializeMetadata(output),
1388
1362
  ...contents,
1389
1363
  };
1390
- return Promise.resolve(response);
1364
+ return response;
1391
1365
  };
1392
1366
  exports.de_ListProtectionGroupsCommand = de_ListProtectionGroupsCommand;
1393
1367
  const de_ListProtectionGroupsCommandError = async (output, context) => {
@@ -1408,10 +1382,9 @@ const de_ListProtectionGroupsCommandError = async (output, context) => {
1408
1382
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1409
1383
  default:
1410
1384
  const parsedBody = parsedOutput.body;
1411
- (0, smithy_client_1.throwDefaultError)({
1385
+ return throwDefaultError({
1412
1386
  output,
1413
1387
  parsedBody,
1414
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1415
1388
  errorCode,
1416
1389
  });
1417
1390
  }
@@ -1422,12 +1395,12 @@ const de_ListProtectionsCommand = async (output, context) => {
1422
1395
  }
1423
1396
  const data = await parseBody(output.body, context);
1424
1397
  let contents = {};
1425
- contents = de_ListProtectionsResponse(data, context);
1398
+ contents = (0, smithy_client_1._json)(data);
1426
1399
  const response = {
1427
1400
  $metadata: deserializeMetadata(output),
1428
1401
  ...contents,
1429
1402
  };
1430
- return Promise.resolve(response);
1403
+ return response;
1431
1404
  };
1432
1405
  exports.de_ListProtectionsCommand = de_ListProtectionsCommand;
1433
1406
  const de_ListProtectionsCommandError = async (output, context) => {
@@ -1448,10 +1421,9 @@ const de_ListProtectionsCommandError = async (output, context) => {
1448
1421
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1449
1422
  default:
1450
1423
  const parsedBody = parsedOutput.body;
1451
- (0, smithy_client_1.throwDefaultError)({
1424
+ return throwDefaultError({
1452
1425
  output,
1453
1426
  parsedBody,
1454
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1455
1427
  errorCode,
1456
1428
  });
1457
1429
  }
@@ -1462,12 +1434,12 @@ const de_ListResourcesInProtectionGroupCommand = async (output, context) => {
1462
1434
  }
1463
1435
  const data = await parseBody(output.body, context);
1464
1436
  let contents = {};
1465
- contents = de_ListResourcesInProtectionGroupResponse(data, context);
1437
+ contents = (0, smithy_client_1._json)(data);
1466
1438
  const response = {
1467
1439
  $metadata: deserializeMetadata(output),
1468
1440
  ...contents,
1469
1441
  };
1470
- return Promise.resolve(response);
1442
+ return response;
1471
1443
  };
1472
1444
  exports.de_ListResourcesInProtectionGroupCommand = de_ListResourcesInProtectionGroupCommand;
1473
1445
  const de_ListResourcesInProtectionGroupCommandError = async (output, context) => {
@@ -1488,10 +1460,9 @@ const de_ListResourcesInProtectionGroupCommandError = async (output, context) =>
1488
1460
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1489
1461
  default:
1490
1462
  const parsedBody = parsedOutput.body;
1491
- (0, smithy_client_1.throwDefaultError)({
1463
+ return throwDefaultError({
1492
1464
  output,
1493
1465
  parsedBody,
1494
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1495
1466
  errorCode,
1496
1467
  });
1497
1468
  }
@@ -1502,12 +1473,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1502
1473
  }
1503
1474
  const data = await parseBody(output.body, context);
1504
1475
  let contents = {};
1505
- contents = de_ListTagsForResourceResponse(data, context);
1476
+ contents = (0, smithy_client_1._json)(data);
1506
1477
  const response = {
1507
1478
  $metadata: deserializeMetadata(output),
1508
1479
  ...contents,
1509
1480
  };
1510
- return Promise.resolve(response);
1481
+ return response;
1511
1482
  };
1512
1483
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1513
1484
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1528,10 +1499,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1528
1499
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1529
1500
  default:
1530
1501
  const parsedBody = parsedOutput.body;
1531
- (0, smithy_client_1.throwDefaultError)({
1502
+ return throwDefaultError({
1532
1503
  output,
1533
1504
  parsedBody,
1534
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1535
1505
  errorCode,
1536
1506
  });
1537
1507
  }
@@ -1542,12 +1512,12 @@ const de_TagResourceCommand = async (output, context) => {
1542
1512
  }
1543
1513
  const data = await parseBody(output.body, context);
1544
1514
  let contents = {};
1545
- contents = de_TagResourceResponse(data, context);
1515
+ contents = (0, smithy_client_1._json)(data);
1546
1516
  const response = {
1547
1517
  $metadata: deserializeMetadata(output),
1548
1518
  ...contents,
1549
1519
  };
1550
- return Promise.resolve(response);
1520
+ return response;
1551
1521
  };
1552
1522
  exports.de_TagResourceCommand = de_TagResourceCommand;
1553
1523
  const de_TagResourceCommandError = async (output, context) => {
@@ -1571,10 +1541,9 @@ const de_TagResourceCommandError = async (output, context) => {
1571
1541
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1572
1542
  default:
1573
1543
  const parsedBody = parsedOutput.body;
1574
- (0, smithy_client_1.throwDefaultError)({
1544
+ return throwDefaultError({
1575
1545
  output,
1576
1546
  parsedBody,
1577
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1578
1547
  errorCode,
1579
1548
  });
1580
1549
  }
@@ -1585,12 +1554,12 @@ const de_UntagResourceCommand = async (output, context) => {
1585
1554
  }
1586
1555
  const data = await parseBody(output.body, context);
1587
1556
  let contents = {};
1588
- contents = de_UntagResourceResponse(data, context);
1557
+ contents = (0, smithy_client_1._json)(data);
1589
1558
  const response = {
1590
1559
  $metadata: deserializeMetadata(output),
1591
1560
  ...contents,
1592
1561
  };
1593
- return Promise.resolve(response);
1562
+ return response;
1594
1563
  };
1595
1564
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
1596
1565
  const de_UntagResourceCommandError = async (output, context) => {
@@ -1614,10 +1583,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1614
1583
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1615
1584
  default:
1616
1585
  const parsedBody = parsedOutput.body;
1617
- (0, smithy_client_1.throwDefaultError)({
1586
+ return throwDefaultError({
1618
1587
  output,
1619
1588
  parsedBody,
1620
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1621
1589
  errorCode,
1622
1590
  });
1623
1591
  }
@@ -1628,12 +1596,12 @@ const de_UpdateApplicationLayerAutomaticResponseCommand = async (output, context
1628
1596
  }
1629
1597
  const data = await parseBody(output.body, context);
1630
1598
  let contents = {};
1631
- contents = de_UpdateApplicationLayerAutomaticResponseResponse(data, context);
1599
+ contents = (0, smithy_client_1._json)(data);
1632
1600
  const response = {
1633
1601
  $metadata: deserializeMetadata(output),
1634
1602
  ...contents,
1635
1603
  };
1636
- return Promise.resolve(response);
1604
+ return response;
1637
1605
  };
1638
1606
  exports.de_UpdateApplicationLayerAutomaticResponseCommand = de_UpdateApplicationLayerAutomaticResponseCommand;
1639
1607
  const de_UpdateApplicationLayerAutomaticResponseCommandError = async (output, context) => {
@@ -1660,10 +1628,9 @@ const de_UpdateApplicationLayerAutomaticResponseCommandError = async (output, co
1660
1628
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1661
1629
  default:
1662
1630
  const parsedBody = parsedOutput.body;
1663
- (0, smithy_client_1.throwDefaultError)({
1631
+ return throwDefaultError({
1664
1632
  output,
1665
1633
  parsedBody,
1666
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1667
1634
  errorCode,
1668
1635
  });
1669
1636
  }
@@ -1674,12 +1641,12 @@ const de_UpdateEmergencyContactSettingsCommand = async (output, context) => {
1674
1641
  }
1675
1642
  const data = await parseBody(output.body, context);
1676
1643
  let contents = {};
1677
- contents = de_UpdateEmergencyContactSettingsResponse(data, context);
1644
+ contents = (0, smithy_client_1._json)(data);
1678
1645
  const response = {
1679
1646
  $metadata: deserializeMetadata(output),
1680
1647
  ...contents,
1681
1648
  };
1682
- return Promise.resolve(response);
1649
+ return response;
1683
1650
  };
1684
1651
  exports.de_UpdateEmergencyContactSettingsCommand = de_UpdateEmergencyContactSettingsCommand;
1685
1652
  const de_UpdateEmergencyContactSettingsCommandError = async (output, context) => {
@@ -1703,10 +1670,9 @@ const de_UpdateEmergencyContactSettingsCommandError = async (output, context) =>
1703
1670
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1704
1671
  default:
1705
1672
  const parsedBody = parsedOutput.body;
1706
- (0, smithy_client_1.throwDefaultError)({
1673
+ return throwDefaultError({
1707
1674
  output,
1708
1675
  parsedBody,
1709
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1710
1676
  errorCode,
1711
1677
  });
1712
1678
  }
@@ -1717,12 +1683,12 @@ const de_UpdateProtectionGroupCommand = async (output, context) => {
1717
1683
  }
1718
1684
  const data = await parseBody(output.body, context);
1719
1685
  let contents = {};
1720
- contents = de_UpdateProtectionGroupResponse(data, context);
1686
+ contents = (0, smithy_client_1._json)(data);
1721
1687
  const response = {
1722
1688
  $metadata: deserializeMetadata(output),
1723
1689
  ...contents,
1724
1690
  };
1725
- return Promise.resolve(response);
1691
+ return response;
1726
1692
  };
1727
1693
  exports.de_UpdateProtectionGroupCommand = de_UpdateProtectionGroupCommand;
1728
1694
  const de_UpdateProtectionGroupCommandError = async (output, context) => {
@@ -1746,10 +1712,9 @@ const de_UpdateProtectionGroupCommandError = async (output, context) => {
1746
1712
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1747
1713
  default:
1748
1714
  const parsedBody = parsedOutput.body;
1749
- (0, smithy_client_1.throwDefaultError)({
1715
+ return throwDefaultError({
1750
1716
  output,
1751
1717
  parsedBody,
1752
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1753
1718
  errorCode,
1754
1719
  });
1755
1720
  }
@@ -1760,12 +1725,12 @@ const de_UpdateSubscriptionCommand = async (output, context) => {
1760
1725
  }
1761
1726
  const data = await parseBody(output.body, context);
1762
1727
  let contents = {};
1763
- contents = de_UpdateSubscriptionResponse(data, context);
1728
+ contents = (0, smithy_client_1._json)(data);
1764
1729
  const response = {
1765
1730
  $metadata: deserializeMetadata(output),
1766
1731
  ...contents,
1767
1732
  };
1768
- return Promise.resolve(response);
1733
+ return response;
1769
1734
  };
1770
1735
  exports.de_UpdateSubscriptionCommand = de_UpdateSubscriptionCommand;
1771
1736
  const de_UpdateSubscriptionCommandError = async (output, context) => {
@@ -1792,17 +1757,16 @@ const de_UpdateSubscriptionCommandError = async (output, context) => {
1792
1757
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1793
1758
  default:
1794
1759
  const parsedBody = parsedOutput.body;
1795
- (0, smithy_client_1.throwDefaultError)({
1760
+ return throwDefaultError({
1796
1761
  output,
1797
1762
  parsedBody,
1798
- exceptionCtor: ShieldServiceException_1.ShieldServiceException,
1799
1763
  errorCode,
1800
1764
  });
1801
1765
  }
1802
1766
  };
1803
1767
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1804
1768
  const body = parsedOutput.body;
1805
- const deserialized = de_AccessDeniedException(body, context);
1769
+ const deserialized = (0, smithy_client_1._json)(body);
1806
1770
  const exception = new models_0_1.AccessDeniedException({
1807
1771
  $metadata: deserializeMetadata(parsedOutput),
1808
1772
  ...deserialized,
@@ -1811,7 +1775,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1811
1775
  };
1812
1776
  const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) => {
1813
1777
  const body = parsedOutput.body;
1814
- const deserialized = de_AccessDeniedForDependencyException(body, context);
1778
+ const deserialized = (0, smithy_client_1._json)(body);
1815
1779
  const exception = new models_0_1.AccessDeniedForDependencyException({
1816
1780
  $metadata: deserializeMetadata(parsedOutput),
1817
1781
  ...deserialized,
@@ -1820,7 +1784,7 @@ const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) =
1820
1784
  };
1821
1785
  const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1822
1786
  const body = parsedOutput.body;
1823
- const deserialized = de_InternalErrorException(body, context);
1787
+ const deserialized = (0, smithy_client_1._json)(body);
1824
1788
  const exception = new models_0_1.InternalErrorException({
1825
1789
  $metadata: deserializeMetadata(parsedOutput),
1826
1790
  ...deserialized,
@@ -1829,7 +1793,7 @@ const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
1829
1793
  };
1830
1794
  const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
1831
1795
  const body = parsedOutput.body;
1832
- const deserialized = de_InvalidOperationException(body, context);
1796
+ const deserialized = (0, smithy_client_1._json)(body);
1833
1797
  const exception = new models_0_1.InvalidOperationException({
1834
1798
  $metadata: deserializeMetadata(parsedOutput),
1835
1799
  ...deserialized,
@@ -1838,7 +1802,7 @@ const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
1838
1802
  };
1839
1803
  const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
1840
1804
  const body = parsedOutput.body;
1841
- const deserialized = de_InvalidPaginationTokenException(body, context);
1805
+ const deserialized = (0, smithy_client_1._json)(body);
1842
1806
  const exception = new models_0_1.InvalidPaginationTokenException({
1843
1807
  $metadata: deserializeMetadata(parsedOutput),
1844
1808
  ...deserialized,
@@ -1847,7 +1811,7 @@ const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
1847
1811
  };
1848
1812
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1849
1813
  const body = parsedOutput.body;
1850
- const deserialized = de_InvalidParameterException(body, context);
1814
+ const deserialized = (0, smithy_client_1._json)(body);
1851
1815
  const exception = new models_0_1.InvalidParameterException({
1852
1816
  $metadata: deserializeMetadata(parsedOutput),
1853
1817
  ...deserialized,
@@ -1856,7 +1820,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1856
1820
  };
1857
1821
  const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
1858
1822
  const body = parsedOutput.body;
1859
- const deserialized = de_InvalidResourceException(body, context);
1823
+ const deserialized = (0, smithy_client_1._json)(body);
1860
1824
  const exception = new models_0_1.InvalidResourceException({
1861
1825
  $metadata: deserializeMetadata(parsedOutput),
1862
1826
  ...deserialized,
@@ -1865,7 +1829,7 @@ const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
1865
1829
  };
1866
1830
  const de_LimitsExceededExceptionRes = async (parsedOutput, context) => {
1867
1831
  const body = parsedOutput.body;
1868
- const deserialized = de_LimitsExceededException(body, context);
1832
+ const deserialized = (0, smithy_client_1._json)(body);
1869
1833
  const exception = new models_0_1.LimitsExceededException({
1870
1834
  $metadata: deserializeMetadata(parsedOutput),
1871
1835
  ...deserialized,
@@ -1874,7 +1838,7 @@ const de_LimitsExceededExceptionRes = async (parsedOutput, context) => {
1874
1838
  };
1875
1839
  const de_LockedSubscriptionExceptionRes = async (parsedOutput, context) => {
1876
1840
  const body = parsedOutput.body;
1877
- const deserialized = de_LockedSubscriptionException(body, context);
1841
+ const deserialized = (0, smithy_client_1._json)(body);
1878
1842
  const exception = new models_0_1.LockedSubscriptionException({
1879
1843
  $metadata: deserializeMetadata(parsedOutput),
1880
1844
  ...deserialized,
@@ -1883,7 +1847,7 @@ const de_LockedSubscriptionExceptionRes = async (parsedOutput, context) => {
1883
1847
  };
1884
1848
  const de_NoAssociatedRoleExceptionRes = async (parsedOutput, context) => {
1885
1849
  const body = parsedOutput.body;
1886
- const deserialized = de_NoAssociatedRoleException(body, context);
1850
+ const deserialized = (0, smithy_client_1._json)(body);
1887
1851
  const exception = new models_0_1.NoAssociatedRoleException({
1888
1852
  $metadata: deserializeMetadata(parsedOutput),
1889
1853
  ...deserialized,
@@ -1892,7 +1856,7 @@ const de_NoAssociatedRoleExceptionRes = async (parsedOutput, context) => {
1892
1856
  };
1893
1857
  const de_OptimisticLockExceptionRes = async (parsedOutput, context) => {
1894
1858
  const body = parsedOutput.body;
1895
- const deserialized = de_OptimisticLockException(body, context);
1859
+ const deserialized = (0, smithy_client_1._json)(body);
1896
1860
  const exception = new models_0_1.OptimisticLockException({
1897
1861
  $metadata: deserializeMetadata(parsedOutput),
1898
1862
  ...deserialized,
@@ -1901,7 +1865,7 @@ const de_OptimisticLockExceptionRes = async (parsedOutput, context) => {
1901
1865
  };
1902
1866
  const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1903
1867
  const body = parsedOutput.body;
1904
- const deserialized = de_ResourceAlreadyExistsException(body, context);
1868
+ const deserialized = (0, smithy_client_1._json)(body);
1905
1869
  const exception = new models_0_1.ResourceAlreadyExistsException({
1906
1870
  $metadata: deserializeMetadata(parsedOutput),
1907
1871
  ...deserialized,
@@ -1910,413 +1874,50 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
1910
1874
  };
1911
1875
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1912
1876
  const body = parsedOutput.body;
1913
- const deserialized = de_ResourceNotFoundException(body, context);
1877
+ const deserialized = (0, smithy_client_1._json)(body);
1914
1878
  const exception = new models_0_1.ResourceNotFoundException({
1915
1879
  $metadata: deserializeMetadata(parsedOutput),
1916
1880
  ...deserialized,
1917
1881
  });
1918
1882
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1919
1883
  };
1920
- const se_AssociateDRTLogBucketRequest = (input, context) => {
1921
- return {
1922
- ...(input.LogBucket != null && { LogBucket: input.LogBucket }),
1923
- };
1924
- };
1925
- const se_AssociateDRTRoleRequest = (input, context) => {
1926
- return {
1927
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
1928
- };
1929
- };
1930
- const se_AssociateHealthCheckRequest = (input, context) => {
1931
- return {
1932
- ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }),
1933
- ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
1934
- };
1935
- };
1936
- const se_AssociateProactiveEngagementDetailsRequest = (input, context) => {
1937
- return {
1938
- ...(input.EmergencyContactList != null && {
1939
- EmergencyContactList: se_EmergencyContactList(input.EmergencyContactList, context),
1940
- }),
1941
- };
1942
- };
1943
- const se_BlockAction = (input, context) => {
1944
- return {};
1945
- };
1946
- const se_CountAction = (input, context) => {
1947
- return {};
1948
- };
1949
- const se_CreateProtectionGroupRequest = (input, context) => {
1950
- return {
1951
- ...(input.Aggregation != null && { Aggregation: input.Aggregation }),
1952
- ...(input.Members != null && { Members: se_ProtectionGroupMembers(input.Members, context) }),
1953
- ...(input.Pattern != null && { Pattern: input.Pattern }),
1954
- ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
1955
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
1956
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1957
- };
1958
- };
1959
- const se_CreateProtectionRequest = (input, context) => {
1960
- return {
1961
- ...(input.Name != null && { Name: input.Name }),
1962
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1963
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1964
- };
1965
- };
1966
- const se_CreateSubscriptionRequest = (input, context) => {
1967
- return {};
1968
- };
1969
- const se_DeleteProtectionGroupRequest = (input, context) => {
1970
- return {
1971
- ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
1972
- };
1973
- };
1974
- const se_DeleteProtectionRequest = (input, context) => {
1975
- return {
1976
- ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
1977
- };
1978
- };
1979
- const se_DeleteSubscriptionRequest = (input, context) => {
1980
- return {};
1981
- };
1982
- const se_DescribeAttackRequest = (input, context) => {
1983
- return {
1984
- ...(input.AttackId != null && { AttackId: input.AttackId }),
1985
- };
1986
- };
1987
- const se_DescribeAttackStatisticsRequest = (input, context) => {
1988
- return {};
1989
- };
1990
- const se_DescribeDRTAccessRequest = (input, context) => {
1991
- return {};
1992
- };
1993
- const se_DescribeEmergencyContactSettingsRequest = (input, context) => {
1994
- return {};
1995
- };
1996
- const se_DescribeProtectionGroupRequest = (input, context) => {
1997
- return {
1998
- ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
1999
- };
2000
- };
2001
- const se_DescribeProtectionRequest = (input, context) => {
2002
- return {
2003
- ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2004
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2005
- };
2006
- };
2007
- const se_DescribeSubscriptionRequest = (input, context) => {
2008
- return {};
2009
- };
2010
- const se_DisableApplicationLayerAutomaticResponseRequest = (input, context) => {
2011
- return {
2012
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2013
- };
2014
- };
2015
- const se_DisableProactiveEngagementRequest = (input, context) => {
2016
- return {};
2017
- };
2018
- const se_DisassociateDRTLogBucketRequest = (input, context) => {
2019
- return {
2020
- ...(input.LogBucket != null && { LogBucket: input.LogBucket }),
2021
- };
2022
- };
2023
- const se_DisassociateDRTRoleRequest = (input, context) => {
2024
- return {};
2025
- };
2026
- const se_DisassociateHealthCheckRequest = (input, context) => {
2027
- return {
2028
- ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }),
2029
- ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }),
2030
- };
2031
- };
2032
- const se_EmergencyContact = (input, context) => {
2033
- return {
2034
- ...(input.ContactNotes != null && { ContactNotes: input.ContactNotes }),
2035
- ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
2036
- ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
2037
- };
2038
- };
2039
- const se_EmergencyContactList = (input, context) => {
2040
- return input
2041
- .filter((e) => e != null)
2042
- .map((entry) => {
2043
- return se_EmergencyContact(entry, context);
2044
- });
2045
- };
2046
- const se_EnableApplicationLayerAutomaticResponseRequest = (input, context) => {
2047
- return {
2048
- ...(input.Action != null && { Action: se_ResponseAction(input.Action, context) }),
2049
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2050
- };
2051
- };
2052
- const se_EnableProactiveEngagementRequest = (input, context) => {
2053
- return {};
2054
- };
2055
- const se_GetSubscriptionStateRequest = (input, context) => {
2056
- return {};
2057
- };
2058
- const se_InclusionProtectionFilters = (input, context) => {
2059
- return {
2060
- ...(input.ProtectionNames != null && { ProtectionNames: se_ProtectionNameFilters(input.ProtectionNames, context) }),
2061
- ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnFilters(input.ResourceArns, context) }),
2062
- ...(input.ResourceTypes != null && {
2063
- ResourceTypes: se_ProtectedResourceTypeFilters(input.ResourceTypes, context),
2064
- }),
2065
- };
2066
- };
2067
- const se_InclusionProtectionGroupFilters = (input, context) => {
2068
- return {
2069
- ...(input.Aggregations != null && {
2070
- Aggregations: se_ProtectionGroupAggregationFilters(input.Aggregations, context),
2071
- }),
2072
- ...(input.Patterns != null && { Patterns: se_ProtectionGroupPatternFilters(input.Patterns, context) }),
2073
- ...(input.ProtectionGroupIds != null && {
2074
- ProtectionGroupIds: se_ProtectionGroupIdFilters(input.ProtectionGroupIds, context),
2075
- }),
2076
- ...(input.ResourceTypes != null && {
2077
- ResourceTypes: se_ProtectedResourceTypeFilters(input.ResourceTypes, context),
2078
- }),
2079
- };
2080
- };
2081
1884
  const se_ListAttacksRequest = (input, context) => {
2082
- return {
2083
- ...(input.EndTime != null && { EndTime: se_TimeRange(input.EndTime, context) }),
2084
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2085
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2086
- ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnFilterList(input.ResourceArns, context) }),
2087
- ...(input.StartTime != null && { StartTime: se_TimeRange(input.StartTime, context) }),
2088
- };
2089
- };
2090
- const se_ListProtectionGroupsRequest = (input, context) => {
2091
- return {
2092
- ...(input.InclusionFilters != null && {
2093
- InclusionFilters: se_InclusionProtectionGroupFilters(input.InclusionFilters, context),
2094
- }),
2095
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2096
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2097
- };
2098
- };
2099
- const se_ListProtectionsRequest = (input, context) => {
2100
- return {
2101
- ...(input.InclusionFilters != null && {
2102
- InclusionFilters: se_InclusionProtectionFilters(input.InclusionFilters, context),
2103
- }),
2104
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2105
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2106
- };
2107
- };
2108
- const se_ListResourcesInProtectionGroupRequest = (input, context) => {
2109
- return {
2110
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
2111
- ...(input.NextToken != null && { NextToken: input.NextToken }),
2112
- ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2113
- };
2114
- };
2115
- const se_ListTagsForResourceRequest = (input, context) => {
2116
- return {
2117
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2118
- };
2119
- };
2120
- const se_ProtectedResourceTypeFilters = (input, context) => {
2121
- return input
2122
- .filter((e) => e != null)
2123
- .map((entry) => {
2124
- return entry;
2125
- });
2126
- };
2127
- const se_ProtectionGroupAggregationFilters = (input, context) => {
2128
- return input
2129
- .filter((e) => e != null)
2130
- .map((entry) => {
2131
- return entry;
1885
+ return (0, smithy_client_1.take)(input, {
1886
+ EndTime: (_) => se_TimeRange(_, context),
1887
+ MaxResults: [],
1888
+ NextToken: [],
1889
+ ResourceArns: smithy_client_1._json,
1890
+ StartTime: (_) => se_TimeRange(_, context),
2132
1891
  });
2133
1892
  };
2134
- const se_ProtectionGroupIdFilters = (input, context) => {
2135
- return input
2136
- .filter((e) => e != null)
2137
- .map((entry) => {
2138
- return entry;
2139
- });
2140
- };
2141
- const se_ProtectionGroupMembers = (input, context) => {
2142
- return input
2143
- .filter((e) => e != null)
2144
- .map((entry) => {
2145
- return entry;
2146
- });
2147
- };
2148
- const se_ProtectionGroupPatternFilters = (input, context) => {
2149
- return input
2150
- .filter((e) => e != null)
2151
- .map((entry) => {
2152
- return entry;
2153
- });
2154
- };
2155
- const se_ProtectionNameFilters = (input, context) => {
2156
- return input
2157
- .filter((e) => e != null)
2158
- .map((entry) => {
2159
- return entry;
2160
- });
2161
- };
2162
- const se_ResourceArnFilterList = (input, context) => {
2163
- return input
2164
- .filter((e) => e != null)
2165
- .map((entry) => {
2166
- return entry;
2167
- });
2168
- };
2169
- const se_ResourceArnFilters = (input, context) => {
2170
- return input
2171
- .filter((e) => e != null)
2172
- .map((entry) => {
2173
- return entry;
2174
- });
2175
- };
2176
- const se_ResponseAction = (input, context) => {
2177
- return {
2178
- ...(input.Block != null && { Block: se_BlockAction(input.Block, context) }),
2179
- ...(input.Count != null && { Count: se_CountAction(input.Count, context) }),
2180
- };
2181
- };
2182
- const se_Tag = (input, context) => {
2183
- return {
2184
- ...(input.Key != null && { Key: input.Key }),
2185
- ...(input.Value != null && { Value: input.Value }),
2186
- };
2187
- };
2188
- const se_TagKeyList = (input, context) => {
2189
- return input
2190
- .filter((e) => e != null)
2191
- .map((entry) => {
2192
- return entry;
2193
- });
2194
- };
2195
- const se_TagList = (input, context) => {
2196
- return input
2197
- .filter((e) => e != null)
2198
- .map((entry) => {
2199
- return se_Tag(entry, context);
2200
- });
2201
- };
2202
- const se_TagResourceRequest = (input, context) => {
2203
- return {
2204
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2205
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
2206
- };
2207
- };
2208
1893
  const se_TimeRange = (input, context) => {
2209
- return {
2210
- ...(input.FromInclusive != null && { FromInclusive: Math.round(input.FromInclusive.getTime() / 1000) }),
2211
- ...(input.ToExclusive != null && { ToExclusive: Math.round(input.ToExclusive.getTime() / 1000) }),
2212
- };
2213
- };
2214
- const se_UntagResourceRequest = (input, context) => {
2215
- return {
2216
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2217
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
2218
- };
2219
- };
2220
- const se_UpdateApplicationLayerAutomaticResponseRequest = (input, context) => {
2221
- return {
2222
- ...(input.Action != null && { Action: se_ResponseAction(input.Action, context) }),
2223
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2224
- };
2225
- };
2226
- const se_UpdateEmergencyContactSettingsRequest = (input, context) => {
2227
- return {
2228
- ...(input.EmergencyContactList != null && {
2229
- EmergencyContactList: se_EmergencyContactList(input.EmergencyContactList, context),
2230
- }),
2231
- };
2232
- };
2233
- const se_UpdateProtectionGroupRequest = (input, context) => {
2234
- return {
2235
- ...(input.Aggregation != null && { Aggregation: input.Aggregation }),
2236
- ...(input.Members != null && { Members: se_ProtectionGroupMembers(input.Members, context) }),
2237
- ...(input.Pattern != null && { Pattern: input.Pattern }),
2238
- ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }),
2239
- ...(input.ResourceType != null && { ResourceType: input.ResourceType }),
2240
- };
2241
- };
2242
- const se_UpdateSubscriptionRequest = (input, context) => {
2243
- return {
2244
- ...(input.AutoRenew != null && { AutoRenew: input.AutoRenew }),
2245
- };
2246
- };
2247
- const de_AccessDeniedException = (output, context) => {
2248
- return {
2249
- message: (0, smithy_client_1.expectString)(output.message),
2250
- };
2251
- };
2252
- const de_AccessDeniedForDependencyException = (output, context) => {
2253
- return {
2254
- message: (0, smithy_client_1.expectString)(output.message),
2255
- };
2256
- };
2257
- const de_ApplicationLayerAutomaticResponseConfiguration = (output, context) => {
2258
- return {
2259
- Action: output.Action != null ? de_ResponseAction(output.Action, context) : undefined,
2260
- Status: (0, smithy_client_1.expectString)(output.Status),
2261
- };
2262
- };
2263
- const de_AssociateDRTLogBucketResponse = (output, context) => {
2264
- return {};
2265
- };
2266
- const de_AssociateDRTRoleResponse = (output, context) => {
2267
- return {};
2268
- };
2269
- const de_AssociateHealthCheckResponse = (output, context) => {
2270
- return {};
2271
- };
2272
- const de_AssociateProactiveEngagementDetailsResponse = (output, context) => {
2273
- return {};
1894
+ return (0, smithy_client_1.take)(input, {
1895
+ FromInclusive: (_) => Math.round(_.getTime() / 1000),
1896
+ ToExclusive: (_) => Math.round(_.getTime() / 1000),
1897
+ });
2274
1898
  };
2275
1899
  const de_AttackDetail = (output, context) => {
2276
- return {
2277
- AttackCounters: output.AttackCounters != null ? de_SummarizedCounterList(output.AttackCounters, context) : undefined,
2278
- AttackId: (0, smithy_client_1.expectString)(output.AttackId),
2279
- AttackProperties: output.AttackProperties != null ? de_AttackProperties(output.AttackProperties, context) : undefined,
2280
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2281
- Mitigations: output.Mitigations != null ? de_MitigationList(output.Mitigations, context) : undefined,
2282
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
2283
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2284
- SubResources: output.SubResources != null ? de_SubResourceSummaryList(output.SubResources, context) : undefined,
2285
- };
2286
- };
2287
- const de_AttackProperties = (output, context) => {
2288
- const retVal = (output || [])
2289
- .filter((e) => e != null)
2290
- .map((entry) => {
2291
- if (entry === null) {
2292
- return null;
2293
- }
2294
- return de_AttackProperty(entry, context);
1900
+ return (0, smithy_client_1.take)(output, {
1901
+ AttackCounters: (_) => de_SummarizedCounterList(_, context),
1902
+ AttackId: smithy_client_1.expectString,
1903
+ AttackProperties: smithy_client_1._json,
1904
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1905
+ Mitigations: smithy_client_1._json,
1906
+ ResourceArn: smithy_client_1.expectString,
1907
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1908
+ SubResources: (_) => de_SubResourceSummaryList(_, context),
2295
1909
  });
2296
- return retVal;
2297
- };
2298
- const de_AttackProperty = (output, context) => {
2299
- return {
2300
- AttackLayer: (0, smithy_client_1.expectString)(output.AttackLayer),
2301
- AttackPropertyIdentifier: (0, smithy_client_1.expectString)(output.AttackPropertyIdentifier),
2302
- TopContributors: output.TopContributors != null ? de_TopContributors(output.TopContributors, context) : undefined,
2303
- Total: (0, smithy_client_1.expectLong)(output.Total),
2304
- Unit: (0, smithy_client_1.expectString)(output.Unit),
2305
- };
2306
1910
  };
2307
1911
  const de_AttackStatisticsDataItem = (output, context) => {
2308
- return {
2309
- AttackCount: (0, smithy_client_1.expectLong)(output.AttackCount),
2310
- AttackVolume: output.AttackVolume != null ? de_AttackVolume(output.AttackVolume, context) : undefined,
2311
- };
1912
+ return (0, smithy_client_1.take)(output, {
1913
+ AttackCount: smithy_client_1.expectLong,
1914
+ AttackVolume: (_) => de_AttackVolume(_, context),
1915
+ });
2312
1916
  };
2313
1917
  const de_AttackStatisticsDataList = (output, context) => {
2314
1918
  const retVal = (output || [])
2315
1919
  .filter((e) => e != null)
2316
1920
  .map((entry) => {
2317
- if (entry === null) {
2318
- return null;
2319
- }
2320
1921
  return de_AttackStatisticsDataItem(entry, context);
2321
1922
  });
2322
1923
  return retVal;
@@ -2325,554 +1926,118 @@ const de_AttackSummaries = (output, context) => {
2325
1926
  const retVal = (output || [])
2326
1927
  .filter((e) => e != null)
2327
1928
  .map((entry) => {
2328
- if (entry === null) {
2329
- return null;
2330
- }
2331
1929
  return de_AttackSummary(entry, context);
2332
1930
  });
2333
1931
  return retVal;
2334
1932
  };
2335
1933
  const de_AttackSummary = (output, context) => {
2336
- return {
2337
- AttackId: (0, smithy_client_1.expectString)(output.AttackId),
2338
- AttackVectors: output.AttackVectors != null ? de_AttackVectorDescriptionList(output.AttackVectors, context) : undefined,
2339
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2340
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
2341
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2342
- };
2343
- };
2344
- const de_AttackVectorDescription = (output, context) => {
2345
- return {
2346
- VectorType: (0, smithy_client_1.expectString)(output.VectorType),
2347
- };
2348
- };
2349
- const de_AttackVectorDescriptionList = (output, context) => {
2350
- const retVal = (output || [])
2351
- .filter((e) => e != null)
2352
- .map((entry) => {
2353
- if (entry === null) {
2354
- return null;
2355
- }
2356
- return de_AttackVectorDescription(entry, context);
1934
+ return (0, smithy_client_1.take)(output, {
1935
+ AttackId: smithy_client_1.expectString,
1936
+ AttackVectors: smithy_client_1._json,
1937
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1938
+ ResourceArn: smithy_client_1.expectString,
1939
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2357
1940
  });
2358
- return retVal;
2359
1941
  };
2360
1942
  const de_AttackVolume = (output, context) => {
2361
- return {
2362
- BitsPerSecond: output.BitsPerSecond != null ? de_AttackVolumeStatistics(output.BitsPerSecond, context) : undefined,
2363
- PacketsPerSecond: output.PacketsPerSecond != null ? de_AttackVolumeStatistics(output.PacketsPerSecond, context) : undefined,
2364
- RequestsPerSecond: output.RequestsPerSecond != null ? de_AttackVolumeStatistics(output.RequestsPerSecond, context) : undefined,
2365
- };
1943
+ return (0, smithy_client_1.take)(output, {
1944
+ BitsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
1945
+ PacketsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
1946
+ RequestsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
1947
+ });
2366
1948
  };
2367
1949
  const de_AttackVolumeStatistics = (output, context) => {
2368
- return {
2369
- Max: (0, smithy_client_1.limitedParseDouble)(output.Max),
2370
- };
2371
- };
2372
- const de_BlockAction = (output, context) => {
2373
- return {};
2374
- };
2375
- const de_Contributor = (output, context) => {
2376
- return {
2377
- Name: (0, smithy_client_1.expectString)(output.Name),
2378
- Value: (0, smithy_client_1.expectLong)(output.Value),
2379
- };
2380
- };
2381
- const de_CountAction = (output, context) => {
2382
- return {};
2383
- };
2384
- const de_CreateProtectionGroupResponse = (output, context) => {
2385
- return {};
2386
- };
2387
- const de_CreateProtectionResponse = (output, context) => {
2388
- return {
2389
- ProtectionId: (0, smithy_client_1.expectString)(output.ProtectionId),
2390
- };
2391
- };
2392
- const de_CreateSubscriptionResponse = (output, context) => {
2393
- return {};
2394
- };
2395
- const de_DeleteProtectionGroupResponse = (output, context) => {
2396
- return {};
2397
- };
2398
- const de_DeleteProtectionResponse = (output, context) => {
2399
- return {};
2400
- };
2401
- const de_DeleteSubscriptionResponse = (output, context) => {
2402
- return {};
1950
+ return (0, smithy_client_1.take)(output, {
1951
+ Max: smithy_client_1.limitedParseDouble,
1952
+ });
2403
1953
  };
2404
1954
  const de_DescribeAttackResponse = (output, context) => {
2405
- return {
2406
- Attack: output.Attack != null ? de_AttackDetail(output.Attack, context) : undefined,
2407
- };
2408
- };
2409
- const de_DescribeAttackStatisticsResponse = (output, context) => {
2410
- return {
2411
- DataItems: output.DataItems != null ? de_AttackStatisticsDataList(output.DataItems, context) : undefined,
2412
- TimeRange: output.TimeRange != null ? de_TimeRange(output.TimeRange, context) : undefined,
2413
- };
2414
- };
2415
- const de_DescribeDRTAccessResponse = (output, context) => {
2416
- return {
2417
- LogBucketList: output.LogBucketList != null ? de_LogBucketList(output.LogBucketList, context) : undefined,
2418
- RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
2419
- };
2420
- };
2421
- const de_DescribeEmergencyContactSettingsResponse = (output, context) => {
2422
- return {
2423
- EmergencyContactList: output.EmergencyContactList != null ? de_EmergencyContactList(output.EmergencyContactList, context) : undefined,
2424
- };
2425
- };
2426
- const de_DescribeProtectionGroupResponse = (output, context) => {
2427
- return {
2428
- ProtectionGroup: output.ProtectionGroup != null ? de_ProtectionGroup(output.ProtectionGroup, context) : undefined,
2429
- };
2430
- };
2431
- const de_DescribeProtectionResponse = (output, context) => {
2432
- return {
2433
- Protection: output.Protection != null ? de_Protection(output.Protection, context) : undefined,
2434
- };
2435
- };
2436
- const de_DescribeSubscriptionResponse = (output, context) => {
2437
- return {
2438
- Subscription: output.Subscription != null ? de_Subscription(output.Subscription, context) : undefined,
2439
- };
2440
- };
2441
- const de_DisableApplicationLayerAutomaticResponseResponse = (output, context) => {
2442
- return {};
2443
- };
2444
- const de_DisableProactiveEngagementResponse = (output, context) => {
2445
- return {};
2446
- };
2447
- const de_DisassociateDRTLogBucketResponse = (output, context) => {
2448
- return {};
2449
- };
2450
- const de_DisassociateDRTRoleResponse = (output, context) => {
2451
- return {};
2452
- };
2453
- const de_DisassociateHealthCheckResponse = (output, context) => {
2454
- return {};
2455
- };
2456
- const de_EmergencyContact = (output, context) => {
2457
- return {
2458
- ContactNotes: (0, smithy_client_1.expectString)(output.ContactNotes),
2459
- EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
2460
- PhoneNumber: (0, smithy_client_1.expectString)(output.PhoneNumber),
2461
- };
2462
- };
2463
- const de_EmergencyContactList = (output, context) => {
2464
- const retVal = (output || [])
2465
- .filter((e) => e != null)
2466
- .map((entry) => {
2467
- if (entry === null) {
2468
- return null;
2469
- }
2470
- return de_EmergencyContact(entry, context);
1955
+ return (0, smithy_client_1.take)(output, {
1956
+ Attack: (_) => de_AttackDetail(_, context),
2471
1957
  });
2472
- return retVal;
2473
- };
2474
- const de_EnableApplicationLayerAutomaticResponseResponse = (output, context) => {
2475
- return {};
2476
- };
2477
- const de_EnableProactiveEngagementResponse = (output, context) => {
2478
- return {};
2479
1958
  };
2480
- const de_GetSubscriptionStateResponse = (output, context) => {
2481
- return {
2482
- SubscriptionState: (0, smithy_client_1.expectString)(output.SubscriptionState),
2483
- };
2484
- };
2485
- const de_HealthCheckIds = (output, context) => {
2486
- const retVal = (output || [])
2487
- .filter((e) => e != null)
2488
- .map((entry) => {
2489
- if (entry === null) {
2490
- return null;
2491
- }
2492
- return (0, smithy_client_1.expectString)(entry);
1959
+ const de_DescribeAttackStatisticsResponse = (output, context) => {
1960
+ return (0, smithy_client_1.take)(output, {
1961
+ DataItems: (_) => de_AttackStatisticsDataList(_, context),
1962
+ TimeRange: (_) => de_TimeRange(_, context),
2493
1963
  });
2494
- return retVal;
2495
- };
2496
- const de_InternalErrorException = (output, context) => {
2497
- return {
2498
- message: (0, smithy_client_1.expectString)(output.message),
2499
- };
2500
- };
2501
- const de_InvalidOperationException = (output, context) => {
2502
- return {
2503
- message: (0, smithy_client_1.expectString)(output.message),
2504
- };
2505
- };
2506
- const de_InvalidPaginationTokenException = (output, context) => {
2507
- return {
2508
- message: (0, smithy_client_1.expectString)(output.message),
2509
- };
2510
1964
  };
2511
- const de_InvalidParameterException = (output, context) => {
2512
- return {
2513
- fields: output.fields != null ? de_ValidationExceptionFieldList(output.fields, context) : undefined,
2514
- message: (0, smithy_client_1.expectString)(output.message),
2515
- reason: (0, smithy_client_1.expectString)(output.reason),
2516
- };
2517
- };
2518
- const de_InvalidResourceException = (output, context) => {
2519
- return {
2520
- message: (0, smithy_client_1.expectString)(output.message),
2521
- };
2522
- };
2523
- const de_Limit = (output, context) => {
2524
- return {
2525
- Max: (0, smithy_client_1.expectLong)(output.Max),
2526
- Type: (0, smithy_client_1.expectString)(output.Type),
2527
- };
2528
- };
2529
- const de_Limits = (output, context) => {
2530
- const retVal = (output || [])
2531
- .filter((e) => e != null)
2532
- .map((entry) => {
2533
- if (entry === null) {
2534
- return null;
2535
- }
2536
- return de_Limit(entry, context);
1965
+ const de_DescribeSubscriptionResponse = (output, context) => {
1966
+ return (0, smithy_client_1.take)(output, {
1967
+ Subscription: (_) => de_Subscription(_, context),
2537
1968
  });
2538
- return retVal;
2539
- };
2540
- const de_LimitsExceededException = (output, context) => {
2541
- return {
2542
- Limit: (0, smithy_client_1.expectLong)(output.Limit),
2543
- Type: (0, smithy_client_1.expectString)(output.Type),
2544
- message: (0, smithy_client_1.expectString)(output.message),
2545
- };
2546
1969
  };
2547
1970
  const de_ListAttacksResponse = (output, context) => {
2548
- return {
2549
- AttackSummaries: output.AttackSummaries != null ? de_AttackSummaries(output.AttackSummaries, context) : undefined,
2550
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2551
- };
2552
- };
2553
- const de_ListProtectionGroupsResponse = (output, context) => {
2554
- return {
2555
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2556
- ProtectionGroups: output.ProtectionGroups != null ? de_ProtectionGroups(output.ProtectionGroups, context) : undefined,
2557
- };
2558
- };
2559
- const de_ListProtectionsResponse = (output, context) => {
2560
- return {
2561
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2562
- Protections: output.Protections != null ? de_Protections(output.Protections, context) : undefined,
2563
- };
2564
- };
2565
- const de_ListResourcesInProtectionGroupResponse = (output, context) => {
2566
- return {
2567
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
2568
- ResourceArns: output.ResourceArns != null ? de_ResourceArnList(output.ResourceArns, context) : undefined,
2569
- };
2570
- };
2571
- const de_ListTagsForResourceResponse = (output, context) => {
2572
- return {
2573
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
2574
- };
2575
- };
2576
- const de_LockedSubscriptionException = (output, context) => {
2577
- return {
2578
- message: (0, smithy_client_1.expectString)(output.message),
2579
- };
2580
- };
2581
- const de_LogBucketList = (output, context) => {
2582
- const retVal = (output || [])
2583
- .filter((e) => e != null)
2584
- .map((entry) => {
2585
- if (entry === null) {
2586
- return null;
2587
- }
2588
- return (0, smithy_client_1.expectString)(entry);
2589
- });
2590
- return retVal;
2591
- };
2592
- const de_Mitigation = (output, context) => {
2593
- return {
2594
- MitigationName: (0, smithy_client_1.expectString)(output.MitigationName),
2595
- };
2596
- };
2597
- const de_MitigationList = (output, context) => {
2598
- const retVal = (output || [])
2599
- .filter((e) => e != null)
2600
- .map((entry) => {
2601
- if (entry === null) {
2602
- return null;
2603
- }
2604
- return de_Mitigation(entry, context);
2605
- });
2606
- return retVal;
2607
- };
2608
- const de_NoAssociatedRoleException = (output, context) => {
2609
- return {
2610
- message: (0, smithy_client_1.expectString)(output.message),
2611
- };
2612
- };
2613
- const de_OptimisticLockException = (output, context) => {
2614
- return {
2615
- message: (0, smithy_client_1.expectString)(output.message),
2616
- };
2617
- };
2618
- const de_Protection = (output, context) => {
2619
- return {
2620
- ApplicationLayerAutomaticResponseConfiguration: output.ApplicationLayerAutomaticResponseConfiguration != null
2621
- ? de_ApplicationLayerAutomaticResponseConfiguration(output.ApplicationLayerAutomaticResponseConfiguration, context)
2622
- : undefined,
2623
- HealthCheckIds: output.HealthCheckIds != null ? de_HealthCheckIds(output.HealthCheckIds, context) : undefined,
2624
- Id: (0, smithy_client_1.expectString)(output.Id),
2625
- Name: (0, smithy_client_1.expectString)(output.Name),
2626
- ProtectionArn: (0, smithy_client_1.expectString)(output.ProtectionArn),
2627
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
2628
- };
2629
- };
2630
- const de_ProtectionGroup = (output, context) => {
2631
- return {
2632
- Aggregation: (0, smithy_client_1.expectString)(output.Aggregation),
2633
- Members: output.Members != null ? de_ProtectionGroupMembers(output.Members, context) : undefined,
2634
- Pattern: (0, smithy_client_1.expectString)(output.Pattern),
2635
- ProtectionGroupArn: (0, smithy_client_1.expectString)(output.ProtectionGroupArn),
2636
- ProtectionGroupId: (0, smithy_client_1.expectString)(output.ProtectionGroupId),
2637
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
2638
- };
2639
- };
2640
- const de_ProtectionGroupArbitraryPatternLimits = (output, context) => {
2641
- return {
2642
- MaxMembers: (0, smithy_client_1.expectLong)(output.MaxMembers),
2643
- };
2644
- };
2645
- const de_ProtectionGroupLimits = (output, context) => {
2646
- return {
2647
- MaxProtectionGroups: (0, smithy_client_1.expectLong)(output.MaxProtectionGroups),
2648
- PatternTypeLimits: output.PatternTypeLimits != null
2649
- ? de_ProtectionGroupPatternTypeLimits(output.PatternTypeLimits, context)
2650
- : undefined,
2651
- };
2652
- };
2653
- const de_ProtectionGroupMembers = (output, context) => {
2654
- const retVal = (output || [])
2655
- .filter((e) => e != null)
2656
- .map((entry) => {
2657
- if (entry === null) {
2658
- return null;
2659
- }
2660
- return (0, smithy_client_1.expectString)(entry);
2661
- });
2662
- return retVal;
2663
- };
2664
- const de_ProtectionGroupPatternTypeLimits = (output, context) => {
2665
- return {
2666
- ArbitraryPatternLimits: output.ArbitraryPatternLimits != null
2667
- ? de_ProtectionGroupArbitraryPatternLimits(output.ArbitraryPatternLimits, context)
2668
- : undefined,
2669
- };
2670
- };
2671
- const de_ProtectionGroups = (output, context) => {
2672
- const retVal = (output || [])
2673
- .filter((e) => e != null)
2674
- .map((entry) => {
2675
- if (entry === null) {
2676
- return null;
2677
- }
2678
- return de_ProtectionGroup(entry, context);
1971
+ return (0, smithy_client_1.take)(output, {
1972
+ AttackSummaries: (_) => de_AttackSummaries(_, context),
1973
+ NextToken: smithy_client_1.expectString,
2679
1974
  });
2680
- return retVal;
2681
- };
2682
- const de_ProtectionLimits = (output, context) => {
2683
- return {
2684
- ProtectedResourceTypeLimits: output.ProtectedResourceTypeLimits != null ? de_Limits(output.ProtectedResourceTypeLimits, context) : undefined,
2685
- };
2686
- };
2687
- const de_Protections = (output, context) => {
2688
- const retVal = (output || [])
2689
- .filter((e) => e != null)
2690
- .map((entry) => {
2691
- if (entry === null) {
2692
- return null;
2693
- }
2694
- return de_Protection(entry, context);
2695
- });
2696
- return retVal;
2697
- };
2698
- const de_ResourceAlreadyExistsException = (output, context) => {
2699
- return {
2700
- message: (0, smithy_client_1.expectString)(output.message),
2701
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2702
- };
2703
- };
2704
- const de_ResourceArnList = (output, context) => {
2705
- const retVal = (output || [])
2706
- .filter((e) => e != null)
2707
- .map((entry) => {
2708
- if (entry === null) {
2709
- return null;
2710
- }
2711
- return (0, smithy_client_1.expectString)(entry);
2712
- });
2713
- return retVal;
2714
- };
2715
- const de_ResourceNotFoundException = (output, context) => {
2716
- return {
2717
- message: (0, smithy_client_1.expectString)(output.message),
2718
- resourceType: (0, smithy_client_1.expectString)(output.resourceType),
2719
- };
2720
- };
2721
- const de_ResponseAction = (output, context) => {
2722
- return {
2723
- Block: output.Block != null ? de_BlockAction(output.Block, context) : undefined,
2724
- Count: output.Count != null ? de_CountAction(output.Count, context) : undefined,
2725
- };
2726
1975
  };
2727
1976
  const de_SubResourceSummary = (output, context) => {
2728
- return {
2729
- AttackVectors: output.AttackVectors != null ? de_SummarizedAttackVectorList(output.AttackVectors, context) : undefined,
2730
- Counters: output.Counters != null ? de_SummarizedCounterList(output.Counters, context) : undefined,
2731
- Id: (0, smithy_client_1.expectString)(output.Id),
2732
- Type: (0, smithy_client_1.expectString)(output.Type),
2733
- };
1977
+ return (0, smithy_client_1.take)(output, {
1978
+ AttackVectors: (_) => de_SummarizedAttackVectorList(_, context),
1979
+ Counters: (_) => de_SummarizedCounterList(_, context),
1980
+ Id: smithy_client_1.expectString,
1981
+ Type: smithy_client_1.expectString,
1982
+ });
2734
1983
  };
2735
1984
  const de_SubResourceSummaryList = (output, context) => {
2736
1985
  const retVal = (output || [])
2737
1986
  .filter((e) => e != null)
2738
1987
  .map((entry) => {
2739
- if (entry === null) {
2740
- return null;
2741
- }
2742
1988
  return de_SubResourceSummary(entry, context);
2743
1989
  });
2744
1990
  return retVal;
2745
1991
  };
2746
1992
  const de_Subscription = (output, context) => {
2747
- return {
2748
- AutoRenew: (0, smithy_client_1.expectString)(output.AutoRenew),
2749
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2750
- Limits: output.Limits != null ? de_Limits(output.Limits, context) : undefined,
2751
- ProactiveEngagementStatus: (0, smithy_client_1.expectString)(output.ProactiveEngagementStatus),
2752
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2753
- SubscriptionArn: (0, smithy_client_1.expectString)(output.SubscriptionArn),
2754
- SubscriptionLimits: output.SubscriptionLimits != null ? de_SubscriptionLimits(output.SubscriptionLimits, context) : undefined,
2755
- TimeCommitmentInSeconds: (0, smithy_client_1.expectLong)(output.TimeCommitmentInSeconds),
2756
- };
2757
- };
2758
- const de_SubscriptionLimits = (output, context) => {
2759
- return {
2760
- ProtectionGroupLimits: output.ProtectionGroupLimits != null
2761
- ? de_ProtectionGroupLimits(output.ProtectionGroupLimits, context)
2762
- : undefined,
2763
- ProtectionLimits: output.ProtectionLimits != null ? de_ProtectionLimits(output.ProtectionLimits, context) : undefined,
2764
- };
1993
+ return (0, smithy_client_1.take)(output, {
1994
+ AutoRenew: smithy_client_1.expectString,
1995
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1996
+ Limits: smithy_client_1._json,
1997
+ ProactiveEngagementStatus: smithy_client_1.expectString,
1998
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1999
+ SubscriptionArn: smithy_client_1.expectString,
2000
+ SubscriptionLimits: smithy_client_1._json,
2001
+ TimeCommitmentInSeconds: smithy_client_1.expectLong,
2002
+ });
2765
2003
  };
2766
2004
  const de_SummarizedAttackVector = (output, context) => {
2767
- return {
2768
- VectorCounters: output.VectorCounters != null ? de_SummarizedCounterList(output.VectorCounters, context) : undefined,
2769
- VectorType: (0, smithy_client_1.expectString)(output.VectorType),
2770
- };
2005
+ return (0, smithy_client_1.take)(output, {
2006
+ VectorCounters: (_) => de_SummarizedCounterList(_, context),
2007
+ VectorType: smithy_client_1.expectString,
2008
+ });
2771
2009
  };
2772
2010
  const de_SummarizedAttackVectorList = (output, context) => {
2773
2011
  const retVal = (output || [])
2774
2012
  .filter((e) => e != null)
2775
2013
  .map((entry) => {
2776
- if (entry === null) {
2777
- return null;
2778
- }
2779
2014
  return de_SummarizedAttackVector(entry, context);
2780
2015
  });
2781
2016
  return retVal;
2782
2017
  };
2783
2018
  const de_SummarizedCounter = (output, context) => {
2784
- return {
2785
- Average: (0, smithy_client_1.limitedParseDouble)(output.Average),
2786
- Max: (0, smithy_client_1.limitedParseDouble)(output.Max),
2787
- N: (0, smithy_client_1.expectInt32)(output.N),
2788
- Name: (0, smithy_client_1.expectString)(output.Name),
2789
- Sum: (0, smithy_client_1.limitedParseDouble)(output.Sum),
2790
- Unit: (0, smithy_client_1.expectString)(output.Unit),
2791
- };
2019
+ return (0, smithy_client_1.take)(output, {
2020
+ Average: smithy_client_1.limitedParseDouble,
2021
+ Max: smithy_client_1.limitedParseDouble,
2022
+ N: smithy_client_1.expectInt32,
2023
+ Name: smithy_client_1.expectString,
2024
+ Sum: smithy_client_1.limitedParseDouble,
2025
+ Unit: smithy_client_1.expectString,
2026
+ });
2792
2027
  };
2793
2028
  const de_SummarizedCounterList = (output, context) => {
2794
2029
  const retVal = (output || [])
2795
2030
  .filter((e) => e != null)
2796
2031
  .map((entry) => {
2797
- if (entry === null) {
2798
- return null;
2799
- }
2800
2032
  return de_SummarizedCounter(entry, context);
2801
2033
  });
2802
2034
  return retVal;
2803
2035
  };
2804
- const de_Tag = (output, context) => {
2805
- return {
2806
- Key: (0, smithy_client_1.expectString)(output.Key),
2807
- Value: (0, smithy_client_1.expectString)(output.Value),
2808
- };
2809
- };
2810
- const de_TagList = (output, context) => {
2811
- const retVal = (output || [])
2812
- .filter((e) => e != null)
2813
- .map((entry) => {
2814
- if (entry === null) {
2815
- return null;
2816
- }
2817
- return de_Tag(entry, context);
2818
- });
2819
- return retVal;
2820
- };
2821
- const de_TagResourceResponse = (output, context) => {
2822
- return {};
2823
- };
2824
2036
  const de_TimeRange = (output, context) => {
2825
- return {
2826
- FromInclusive: output.FromInclusive != null
2827
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FromInclusive)))
2828
- : undefined,
2829
- ToExclusive: output.ToExclusive != null
2830
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ToExclusive)))
2831
- : undefined,
2832
- };
2833
- };
2834
- const de_TopContributors = (output, context) => {
2835
- const retVal = (output || [])
2836
- .filter((e) => e != null)
2837
- .map((entry) => {
2838
- if (entry === null) {
2839
- return null;
2840
- }
2841
- return de_Contributor(entry, context);
2037
+ return (0, smithy_client_1.take)(output, {
2038
+ FromInclusive: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2039
+ ToExclusive: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2842
2040
  });
2843
- return retVal;
2844
- };
2845
- const de_UntagResourceResponse = (output, context) => {
2846
- return {};
2847
- };
2848
- const de_UpdateApplicationLayerAutomaticResponseResponse = (output, context) => {
2849
- return {};
2850
- };
2851
- const de_UpdateEmergencyContactSettingsResponse = (output, context) => {
2852
- return {};
2853
- };
2854
- const de_UpdateProtectionGroupResponse = (output, context) => {
2855
- return {};
2856
- };
2857
- const de_UpdateSubscriptionResponse = (output, context) => {
2858
- return {};
2859
- };
2860
- const de_ValidationExceptionField = (output, context) => {
2861
- return {
2862
- message: (0, smithy_client_1.expectString)(output.message),
2863
- name: (0, smithy_client_1.expectString)(output.name),
2864
- };
2865
- };
2866
- const de_ValidationExceptionFieldList = (output, context) => {
2867
- const retVal = (output || [])
2868
- .filter((e) => e != null)
2869
- .map((entry) => {
2870
- if (entry === null) {
2871
- return null;
2872
- }
2873
- return de_ValidationExceptionField(entry, context);
2874
- });
2875
- return retVal;
2876
2041
  };
2877
2042
  const deserializeMetadata = (output) => ({
2878
2043
  httpStatusCode: output.statusCode,
@@ -2887,6 +2052,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2887
2052
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2888
2053
  };
2889
2054
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2055
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ShieldServiceException_1.ShieldServiceException);
2890
2056
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2891
2057
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2892
2058
  const contents = {