@aws-sdk/client-shield 3.310.0 → 3.315.0

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