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