@aws-sdk/client-shield 3.312.0 → 3.315.0

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