@aws-sdk/client-network-firewall 3.489.0 → 3.495.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.
Files changed (55) hide show
  1. package/dist-cjs/NetworkFirewall.js +1 -83
  2. package/dist-cjs/NetworkFirewallClient.js +1 -43
  3. package/dist-cjs/commands/AssociateFirewallPolicyCommand.js +1 -28
  4. package/dist-cjs/commands/AssociateSubnetsCommand.js +1 -28
  5. package/dist-cjs/commands/CreateFirewallCommand.js +1 -28
  6. package/dist-cjs/commands/CreateFirewallPolicyCommand.js +1 -28
  7. package/dist-cjs/commands/CreateRuleGroupCommand.js +1 -28
  8. package/dist-cjs/commands/CreateTLSInspectionConfigurationCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteFirewallCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteFirewallPolicyCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteRuleGroupCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteTLSInspectionConfigurationCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeFirewallCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeFirewallPolicyCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeLoggingConfigurationCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeResourcePolicyCommand.js +1 -28
  18. package/dist-cjs/commands/DescribeRuleGroupCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeRuleGroupMetadataCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeTLSInspectionConfigurationCommand.js +1 -28
  21. package/dist-cjs/commands/DisassociateSubnetsCommand.js +1 -28
  22. package/dist-cjs/commands/ListFirewallPoliciesCommand.js +1 -28
  23. package/dist-cjs/commands/ListFirewallsCommand.js +1 -28
  24. package/dist-cjs/commands/ListRuleGroupsCommand.js +1 -28
  25. package/dist-cjs/commands/ListTLSInspectionConfigurationsCommand.js +1 -28
  26. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  27. package/dist-cjs/commands/PutResourcePolicyCommand.js +1 -28
  28. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  29. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateFirewallDeleteProtectionCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateFirewallDescriptionCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateFirewallEncryptionConfigurationCommand.js +1 -28
  33. package/dist-cjs/commands/UpdateFirewallPolicyChangeProtectionCommand.js +1 -28
  34. package/dist-cjs/commands/UpdateFirewallPolicyCommand.js +1 -28
  35. package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +1 -28
  36. package/dist-cjs/commands/UpdateRuleGroupCommand.js +1 -28
  37. package/dist-cjs/commands/UpdateSubnetChangeProtectionCommand.js +1 -28
  38. package/dist-cjs/commands/UpdateTLSInspectionConfigurationCommand.js +1 -28
  39. package/dist-cjs/commands/index.js +1 -39
  40. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  41. package/dist-cjs/extensionConfiguration.js +1 -2
  42. package/dist-cjs/index.js +3451 -11
  43. package/dist-cjs/models/NetworkFirewallServiceException.js +1 -12
  44. package/dist-cjs/models/index.js +1 -4
  45. package/dist-cjs/models/models_0.js +1 -300
  46. package/dist-cjs/pagination/Interfaces.js +1 -2
  47. package/dist-cjs/pagination/ListFirewallPoliciesPaginator.js +1 -7
  48. package/dist-cjs/pagination/ListFirewallsPaginator.js +1 -7
  49. package/dist-cjs/pagination/ListRuleGroupsPaginator.js +1 -7
  50. package/dist-cjs/pagination/ListTLSInspectionConfigurationsPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +1 -7
  52. package/dist-cjs/pagination/index.js +1 -9
  53. package/dist-cjs/protocols/Aws_json1_0.js +1 -2207
  54. package/dist-cjs/runtimeExtensions.js +1 -22
  55. package/package.json +40 -40
@@ -1,2207 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_DescribeLoggingConfigurationCommand = exports.de_DescribeFirewallPolicyCommand = exports.de_DescribeFirewallCommand = exports.de_DeleteTLSInspectionConfigurationCommand = exports.de_DeleteRuleGroupCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteFirewallPolicyCommand = exports.de_DeleteFirewallCommand = exports.de_CreateTLSInspectionConfigurationCommand = exports.de_CreateRuleGroupCommand = exports.de_CreateFirewallPolicyCommand = exports.de_CreateFirewallCommand = exports.de_AssociateSubnetsCommand = exports.de_AssociateFirewallPolicyCommand = exports.se_UpdateTLSInspectionConfigurationCommand = exports.se_UpdateSubnetChangeProtectionCommand = exports.se_UpdateRuleGroupCommand = exports.se_UpdateLoggingConfigurationCommand = exports.se_UpdateFirewallPolicyChangeProtectionCommand = exports.se_UpdateFirewallPolicyCommand = exports.se_UpdateFirewallEncryptionConfigurationCommand = exports.se_UpdateFirewallDescriptionCommand = exports.se_UpdateFirewallDeleteProtectionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutResourcePolicyCommand = exports.se_ListTLSInspectionConfigurationsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRuleGroupsCommand = exports.se_ListFirewallsCommand = exports.se_ListFirewallPoliciesCommand = exports.se_DisassociateSubnetsCommand = exports.se_DescribeTLSInspectionConfigurationCommand = exports.se_DescribeRuleGroupMetadataCommand = exports.se_DescribeRuleGroupCommand = exports.se_DescribeResourcePolicyCommand = exports.se_DescribeLoggingConfigurationCommand = exports.se_DescribeFirewallPolicyCommand = exports.se_DescribeFirewallCommand = exports.se_DeleteTLSInspectionConfigurationCommand = exports.se_DeleteRuleGroupCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteFirewallPolicyCommand = exports.se_DeleteFirewallCommand = exports.se_CreateTLSInspectionConfigurationCommand = exports.se_CreateRuleGroupCommand = exports.se_CreateFirewallPolicyCommand = exports.se_CreateFirewallCommand = exports.se_AssociateSubnetsCommand = exports.se_AssociateFirewallPolicyCommand = void 0;
4
- exports.de_UpdateTLSInspectionConfigurationCommand = exports.de_UpdateSubnetChangeProtectionCommand = exports.de_UpdateRuleGroupCommand = exports.de_UpdateLoggingConfigurationCommand = exports.de_UpdateFirewallPolicyChangeProtectionCommand = exports.de_UpdateFirewallPolicyCommand = exports.de_UpdateFirewallEncryptionConfigurationCommand = exports.de_UpdateFirewallDescriptionCommand = exports.de_UpdateFirewallDeleteProtectionCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutResourcePolicyCommand = exports.de_ListTLSInspectionConfigurationsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRuleGroupsCommand = exports.de_ListFirewallsCommand = exports.de_ListFirewallPoliciesCommand = exports.de_DisassociateSubnetsCommand = exports.de_DescribeTLSInspectionConfigurationCommand = exports.de_DescribeRuleGroupMetadataCommand = exports.de_DescribeRuleGroupCommand = exports.de_DescribeResourcePolicyCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const models_0_1 = require("../models/models_0");
8
- const NetworkFirewallServiceException_1 = require("../models/NetworkFirewallServiceException");
9
- const se_AssociateFirewallPolicyCommand = async (input, context) => {
10
- const headers = sharedHeaders("AssociateFirewallPolicy");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_AssociateFirewallPolicyCommand = se_AssociateFirewallPolicyCommand;
16
- const se_AssociateSubnetsCommand = async (input, context) => {
17
- const headers = sharedHeaders("AssociateSubnets");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_AssociateSubnetsCommand = se_AssociateSubnetsCommand;
23
- const se_CreateFirewallCommand = async (input, context) => {
24
- const headers = sharedHeaders("CreateFirewall");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_CreateFirewallCommand = se_CreateFirewallCommand;
30
- const se_CreateFirewallPolicyCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateFirewallPolicy");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_CreateFirewallPolicyCommand = se_CreateFirewallPolicyCommand;
37
- const se_CreateRuleGroupCommand = async (input, context) => {
38
- const headers = sharedHeaders("CreateRuleGroup");
39
- let body;
40
- body = JSON.stringify(se_CreateRuleGroupRequest(input, context));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_CreateRuleGroupCommand = se_CreateRuleGroupCommand;
44
- const se_CreateTLSInspectionConfigurationCommand = async (input, context) => {
45
- const headers = sharedHeaders("CreateTLSInspectionConfiguration");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_CreateTLSInspectionConfigurationCommand = se_CreateTLSInspectionConfigurationCommand;
51
- const se_DeleteFirewallCommand = async (input, context) => {
52
- const headers = sharedHeaders("DeleteFirewall");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_DeleteFirewallCommand = se_DeleteFirewallCommand;
58
- const se_DeleteFirewallPolicyCommand = async (input, context) => {
59
- const headers = sharedHeaders("DeleteFirewallPolicy");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_DeleteFirewallPolicyCommand = se_DeleteFirewallPolicyCommand;
65
- const se_DeleteResourcePolicyCommand = async (input, context) => {
66
- const headers = sharedHeaders("DeleteResourcePolicy");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
72
- const se_DeleteRuleGroupCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeleteRuleGroup");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_DeleteRuleGroupCommand = se_DeleteRuleGroupCommand;
79
- const se_DeleteTLSInspectionConfigurationCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeleteTLSInspectionConfiguration");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_DeleteTLSInspectionConfigurationCommand = se_DeleteTLSInspectionConfigurationCommand;
86
- const se_DescribeFirewallCommand = async (input, context) => {
87
- const headers = sharedHeaders("DescribeFirewall");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_DescribeFirewallCommand = se_DescribeFirewallCommand;
93
- const se_DescribeFirewallPolicyCommand = async (input, context) => {
94
- const headers = sharedHeaders("DescribeFirewallPolicy");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_DescribeFirewallPolicyCommand = se_DescribeFirewallPolicyCommand;
100
- const se_DescribeLoggingConfigurationCommand = async (input, context) => {
101
- const headers = sharedHeaders("DescribeLoggingConfiguration");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_DescribeLoggingConfigurationCommand = se_DescribeLoggingConfigurationCommand;
107
- const se_DescribeResourcePolicyCommand = async (input, context) => {
108
- const headers = sharedHeaders("DescribeResourcePolicy");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_DescribeResourcePolicyCommand = se_DescribeResourcePolicyCommand;
114
- const se_DescribeRuleGroupCommand = async (input, context) => {
115
- const headers = sharedHeaders("DescribeRuleGroup");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_DescribeRuleGroupCommand = se_DescribeRuleGroupCommand;
121
- const se_DescribeRuleGroupMetadataCommand = async (input, context) => {
122
- const headers = sharedHeaders("DescribeRuleGroupMetadata");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_DescribeRuleGroupMetadataCommand = se_DescribeRuleGroupMetadataCommand;
128
- const se_DescribeTLSInspectionConfigurationCommand = async (input, context) => {
129
- const headers = sharedHeaders("DescribeTLSInspectionConfiguration");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_DescribeTLSInspectionConfigurationCommand = se_DescribeTLSInspectionConfigurationCommand;
135
- const se_DisassociateSubnetsCommand = async (input, context) => {
136
- const headers = sharedHeaders("DisassociateSubnets");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_DisassociateSubnetsCommand = se_DisassociateSubnetsCommand;
142
- const se_ListFirewallPoliciesCommand = async (input, context) => {
143
- const headers = sharedHeaders("ListFirewallPolicies");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_ListFirewallPoliciesCommand = se_ListFirewallPoliciesCommand;
149
- const se_ListFirewallsCommand = async (input, context) => {
150
- const headers = sharedHeaders("ListFirewalls");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_ListFirewallsCommand = se_ListFirewallsCommand;
156
- const se_ListRuleGroupsCommand = async (input, context) => {
157
- const headers = sharedHeaders("ListRuleGroups");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_ListRuleGroupsCommand = se_ListRuleGroupsCommand;
163
- const se_ListTagsForResourceCommand = async (input, context) => {
164
- const headers = sharedHeaders("ListTagsForResource");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
170
- const se_ListTLSInspectionConfigurationsCommand = async (input, context) => {
171
- const headers = sharedHeaders("ListTLSInspectionConfigurations");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_ListTLSInspectionConfigurationsCommand = se_ListTLSInspectionConfigurationsCommand;
177
- const se_PutResourcePolicyCommand = async (input, context) => {
178
- const headers = sharedHeaders("PutResourcePolicy");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1._json)(input));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
184
- const se_TagResourceCommand = async (input, context) => {
185
- const headers = sharedHeaders("TagResource");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_TagResourceCommand = se_TagResourceCommand;
191
- const se_UntagResourceCommand = async (input, context) => {
192
- const headers = sharedHeaders("UntagResource");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
198
- const se_UpdateFirewallDeleteProtectionCommand = async (input, context) => {
199
- const headers = sharedHeaders("UpdateFirewallDeleteProtection");
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1._json)(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_UpdateFirewallDeleteProtectionCommand = se_UpdateFirewallDeleteProtectionCommand;
205
- const se_UpdateFirewallDescriptionCommand = async (input, context) => {
206
- const headers = sharedHeaders("UpdateFirewallDescription");
207
- let body;
208
- body = JSON.stringify((0, smithy_client_1._json)(input));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- exports.se_UpdateFirewallDescriptionCommand = se_UpdateFirewallDescriptionCommand;
212
- const se_UpdateFirewallEncryptionConfigurationCommand = async (input, context) => {
213
- const headers = sharedHeaders("UpdateFirewallEncryptionConfiguration");
214
- let body;
215
- body = JSON.stringify((0, smithy_client_1._json)(input));
216
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
- };
218
- exports.se_UpdateFirewallEncryptionConfigurationCommand = se_UpdateFirewallEncryptionConfigurationCommand;
219
- const se_UpdateFirewallPolicyCommand = async (input, context) => {
220
- const headers = sharedHeaders("UpdateFirewallPolicy");
221
- let body;
222
- body = JSON.stringify((0, smithy_client_1._json)(input));
223
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
- };
225
- exports.se_UpdateFirewallPolicyCommand = se_UpdateFirewallPolicyCommand;
226
- const se_UpdateFirewallPolicyChangeProtectionCommand = async (input, context) => {
227
- const headers = sharedHeaders("UpdateFirewallPolicyChangeProtection");
228
- let body;
229
- body = JSON.stringify((0, smithy_client_1._json)(input));
230
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
- };
232
- exports.se_UpdateFirewallPolicyChangeProtectionCommand = se_UpdateFirewallPolicyChangeProtectionCommand;
233
- const se_UpdateLoggingConfigurationCommand = async (input, context) => {
234
- const headers = sharedHeaders("UpdateLoggingConfiguration");
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1._json)(input));
237
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
- };
239
- exports.se_UpdateLoggingConfigurationCommand = se_UpdateLoggingConfigurationCommand;
240
- const se_UpdateRuleGroupCommand = async (input, context) => {
241
- const headers = sharedHeaders("UpdateRuleGroup");
242
- let body;
243
- body = JSON.stringify(se_UpdateRuleGroupRequest(input, context));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- exports.se_UpdateRuleGroupCommand = se_UpdateRuleGroupCommand;
247
- const se_UpdateSubnetChangeProtectionCommand = async (input, context) => {
248
- const headers = sharedHeaders("UpdateSubnetChangeProtection");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1._json)(input));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- exports.se_UpdateSubnetChangeProtectionCommand = se_UpdateSubnetChangeProtectionCommand;
254
- const se_UpdateTLSInspectionConfigurationCommand = async (input, context) => {
255
- const headers = sharedHeaders("UpdateTLSInspectionConfiguration");
256
- let body;
257
- body = JSON.stringify((0, smithy_client_1._json)(input));
258
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
- };
260
- exports.se_UpdateTLSInspectionConfigurationCommand = se_UpdateTLSInspectionConfigurationCommand;
261
- const de_AssociateFirewallPolicyCommand = async (output, context) => {
262
- if (output.statusCode >= 300) {
263
- return de_AssociateFirewallPolicyCommandError(output, context);
264
- }
265
- const data = await parseBody(output.body, context);
266
- let contents = {};
267
- contents = (0, smithy_client_1._json)(data);
268
- const response = {
269
- $metadata: deserializeMetadata(output),
270
- ...contents,
271
- };
272
- return response;
273
- };
274
- exports.de_AssociateFirewallPolicyCommand = de_AssociateFirewallPolicyCommand;
275
- const de_AssociateFirewallPolicyCommandError = async (output, context) => {
276
- const parsedOutput = {
277
- ...output,
278
- body: await parseErrorBody(output.body, context),
279
- };
280
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
281
- switch (errorCode) {
282
- case "InternalServerError":
283
- case "com.amazonaws.networkfirewall#InternalServerError":
284
- throw await de_InternalServerErrorRes(parsedOutput, context);
285
- case "InvalidOperationException":
286
- case "com.amazonaws.networkfirewall#InvalidOperationException":
287
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
288
- case "InvalidRequestException":
289
- case "com.amazonaws.networkfirewall#InvalidRequestException":
290
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
291
- case "InvalidTokenException":
292
- case "com.amazonaws.networkfirewall#InvalidTokenException":
293
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
294
- case "ResourceNotFoundException":
295
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
296
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
297
- case "ThrottlingException":
298
- case "com.amazonaws.networkfirewall#ThrottlingException":
299
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
300
- default:
301
- const parsedBody = parsedOutput.body;
302
- return throwDefaultError({
303
- output,
304
- parsedBody,
305
- errorCode,
306
- });
307
- }
308
- };
309
- const de_AssociateSubnetsCommand = async (output, context) => {
310
- if (output.statusCode >= 300) {
311
- return de_AssociateSubnetsCommandError(output, context);
312
- }
313
- const data = await parseBody(output.body, context);
314
- let contents = {};
315
- contents = (0, smithy_client_1._json)(data);
316
- const response = {
317
- $metadata: deserializeMetadata(output),
318
- ...contents,
319
- };
320
- return response;
321
- };
322
- exports.de_AssociateSubnetsCommand = de_AssociateSubnetsCommand;
323
- const de_AssociateSubnetsCommandError = async (output, context) => {
324
- const parsedOutput = {
325
- ...output,
326
- body: await parseErrorBody(output.body, context),
327
- };
328
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
329
- switch (errorCode) {
330
- case "InsufficientCapacityException":
331
- case "com.amazonaws.networkfirewall#InsufficientCapacityException":
332
- throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
333
- case "InternalServerError":
334
- case "com.amazonaws.networkfirewall#InternalServerError":
335
- throw await de_InternalServerErrorRes(parsedOutput, context);
336
- case "InvalidOperationException":
337
- case "com.amazonaws.networkfirewall#InvalidOperationException":
338
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
339
- case "InvalidRequestException":
340
- case "com.amazonaws.networkfirewall#InvalidRequestException":
341
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
342
- case "InvalidTokenException":
343
- case "com.amazonaws.networkfirewall#InvalidTokenException":
344
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
345
- case "ResourceNotFoundException":
346
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
347
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
348
- case "ThrottlingException":
349
- case "com.amazonaws.networkfirewall#ThrottlingException":
350
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
351
- default:
352
- const parsedBody = parsedOutput.body;
353
- return throwDefaultError({
354
- output,
355
- parsedBody,
356
- errorCode,
357
- });
358
- }
359
- };
360
- const de_CreateFirewallCommand = async (output, context) => {
361
- if (output.statusCode >= 300) {
362
- return de_CreateFirewallCommandError(output, context);
363
- }
364
- const data = await parseBody(output.body, context);
365
- let contents = {};
366
- contents = (0, smithy_client_1._json)(data);
367
- const response = {
368
- $metadata: deserializeMetadata(output),
369
- ...contents,
370
- };
371
- return response;
372
- };
373
- exports.de_CreateFirewallCommand = de_CreateFirewallCommand;
374
- const de_CreateFirewallCommandError = async (output, context) => {
375
- const parsedOutput = {
376
- ...output,
377
- body: await parseErrorBody(output.body, context),
378
- };
379
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
380
- switch (errorCode) {
381
- case "InsufficientCapacityException":
382
- case "com.amazonaws.networkfirewall#InsufficientCapacityException":
383
- throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
384
- case "InternalServerError":
385
- case "com.amazonaws.networkfirewall#InternalServerError":
386
- throw await de_InternalServerErrorRes(parsedOutput, context);
387
- case "InvalidOperationException":
388
- case "com.amazonaws.networkfirewall#InvalidOperationException":
389
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
390
- case "InvalidRequestException":
391
- case "com.amazonaws.networkfirewall#InvalidRequestException":
392
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
393
- case "LimitExceededException":
394
- case "com.amazonaws.networkfirewall#LimitExceededException":
395
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
396
- case "ThrottlingException":
397
- case "com.amazonaws.networkfirewall#ThrottlingException":
398
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
399
- default:
400
- const parsedBody = parsedOutput.body;
401
- return throwDefaultError({
402
- output,
403
- parsedBody,
404
- errorCode,
405
- });
406
- }
407
- };
408
- const de_CreateFirewallPolicyCommand = async (output, context) => {
409
- if (output.statusCode >= 300) {
410
- return de_CreateFirewallPolicyCommandError(output, context);
411
- }
412
- const data = await parseBody(output.body, context);
413
- let contents = {};
414
- contents = de_CreateFirewallPolicyResponse(data, context);
415
- const response = {
416
- $metadata: deserializeMetadata(output),
417
- ...contents,
418
- };
419
- return response;
420
- };
421
- exports.de_CreateFirewallPolicyCommand = de_CreateFirewallPolicyCommand;
422
- const de_CreateFirewallPolicyCommandError = async (output, context) => {
423
- const parsedOutput = {
424
- ...output,
425
- body: await parseErrorBody(output.body, context),
426
- };
427
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
428
- switch (errorCode) {
429
- case "InsufficientCapacityException":
430
- case "com.amazonaws.networkfirewall#InsufficientCapacityException":
431
- throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
432
- case "InternalServerError":
433
- case "com.amazonaws.networkfirewall#InternalServerError":
434
- throw await de_InternalServerErrorRes(parsedOutput, context);
435
- case "InvalidRequestException":
436
- case "com.amazonaws.networkfirewall#InvalidRequestException":
437
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
438
- case "LimitExceededException":
439
- case "com.amazonaws.networkfirewall#LimitExceededException":
440
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
441
- case "ThrottlingException":
442
- case "com.amazonaws.networkfirewall#ThrottlingException":
443
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
444
- default:
445
- const parsedBody = parsedOutput.body;
446
- return throwDefaultError({
447
- output,
448
- parsedBody,
449
- errorCode,
450
- });
451
- }
452
- };
453
- const de_CreateRuleGroupCommand = async (output, context) => {
454
- if (output.statusCode >= 300) {
455
- return de_CreateRuleGroupCommandError(output, context);
456
- }
457
- const data = await parseBody(output.body, context);
458
- let contents = {};
459
- contents = de_CreateRuleGroupResponse(data, context);
460
- const response = {
461
- $metadata: deserializeMetadata(output),
462
- ...contents,
463
- };
464
- return response;
465
- };
466
- exports.de_CreateRuleGroupCommand = de_CreateRuleGroupCommand;
467
- const de_CreateRuleGroupCommandError = async (output, context) => {
468
- const parsedOutput = {
469
- ...output,
470
- body: await parseErrorBody(output.body, context),
471
- };
472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
473
- switch (errorCode) {
474
- case "InsufficientCapacityException":
475
- case "com.amazonaws.networkfirewall#InsufficientCapacityException":
476
- throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
477
- case "InternalServerError":
478
- case "com.amazonaws.networkfirewall#InternalServerError":
479
- throw await de_InternalServerErrorRes(parsedOutput, context);
480
- case "InvalidRequestException":
481
- case "com.amazonaws.networkfirewall#InvalidRequestException":
482
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
483
- case "LimitExceededException":
484
- case "com.amazonaws.networkfirewall#LimitExceededException":
485
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
486
- case "ThrottlingException":
487
- case "com.amazonaws.networkfirewall#ThrottlingException":
488
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
489
- default:
490
- const parsedBody = parsedOutput.body;
491
- return throwDefaultError({
492
- output,
493
- parsedBody,
494
- errorCode,
495
- });
496
- }
497
- };
498
- const de_CreateTLSInspectionConfigurationCommand = async (output, context) => {
499
- if (output.statusCode >= 300) {
500
- return de_CreateTLSInspectionConfigurationCommandError(output, context);
501
- }
502
- const data = await parseBody(output.body, context);
503
- let contents = {};
504
- contents = de_CreateTLSInspectionConfigurationResponse(data, context);
505
- const response = {
506
- $metadata: deserializeMetadata(output),
507
- ...contents,
508
- };
509
- return response;
510
- };
511
- exports.de_CreateTLSInspectionConfigurationCommand = de_CreateTLSInspectionConfigurationCommand;
512
- const de_CreateTLSInspectionConfigurationCommandError = async (output, context) => {
513
- const parsedOutput = {
514
- ...output,
515
- body: await parseErrorBody(output.body, context),
516
- };
517
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
518
- switch (errorCode) {
519
- case "InsufficientCapacityException":
520
- case "com.amazonaws.networkfirewall#InsufficientCapacityException":
521
- throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
522
- case "InternalServerError":
523
- case "com.amazonaws.networkfirewall#InternalServerError":
524
- throw await de_InternalServerErrorRes(parsedOutput, context);
525
- case "InvalidRequestException":
526
- case "com.amazonaws.networkfirewall#InvalidRequestException":
527
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
528
- case "LimitExceededException":
529
- case "com.amazonaws.networkfirewall#LimitExceededException":
530
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
531
- case "ThrottlingException":
532
- case "com.amazonaws.networkfirewall#ThrottlingException":
533
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
534
- default:
535
- const parsedBody = parsedOutput.body;
536
- return throwDefaultError({
537
- output,
538
- parsedBody,
539
- errorCode,
540
- });
541
- }
542
- };
543
- const de_DeleteFirewallCommand = async (output, context) => {
544
- if (output.statusCode >= 300) {
545
- return de_DeleteFirewallCommandError(output, context);
546
- }
547
- const data = await parseBody(output.body, context);
548
- let contents = {};
549
- contents = (0, smithy_client_1._json)(data);
550
- const response = {
551
- $metadata: deserializeMetadata(output),
552
- ...contents,
553
- };
554
- return response;
555
- };
556
- exports.de_DeleteFirewallCommand = de_DeleteFirewallCommand;
557
- const de_DeleteFirewallCommandError = async (output, context) => {
558
- const parsedOutput = {
559
- ...output,
560
- body: await parseErrorBody(output.body, context),
561
- };
562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
563
- switch (errorCode) {
564
- case "InternalServerError":
565
- case "com.amazonaws.networkfirewall#InternalServerError":
566
- throw await de_InternalServerErrorRes(parsedOutput, context);
567
- case "InvalidOperationException":
568
- case "com.amazonaws.networkfirewall#InvalidOperationException":
569
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
570
- case "InvalidRequestException":
571
- case "com.amazonaws.networkfirewall#InvalidRequestException":
572
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
573
- case "ResourceNotFoundException":
574
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
575
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
576
- case "ThrottlingException":
577
- case "com.amazonaws.networkfirewall#ThrottlingException":
578
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
579
- case "UnsupportedOperationException":
580
- case "com.amazonaws.networkfirewall#UnsupportedOperationException":
581
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
582
- default:
583
- const parsedBody = parsedOutput.body;
584
- return throwDefaultError({
585
- output,
586
- parsedBody,
587
- errorCode,
588
- });
589
- }
590
- };
591
- const de_DeleteFirewallPolicyCommand = async (output, context) => {
592
- if (output.statusCode >= 300) {
593
- return de_DeleteFirewallPolicyCommandError(output, context);
594
- }
595
- const data = await parseBody(output.body, context);
596
- let contents = {};
597
- contents = de_DeleteFirewallPolicyResponse(data, context);
598
- const response = {
599
- $metadata: deserializeMetadata(output),
600
- ...contents,
601
- };
602
- return response;
603
- };
604
- exports.de_DeleteFirewallPolicyCommand = de_DeleteFirewallPolicyCommand;
605
- const de_DeleteFirewallPolicyCommandError = async (output, context) => {
606
- const parsedOutput = {
607
- ...output,
608
- body: await parseErrorBody(output.body, context),
609
- };
610
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
611
- switch (errorCode) {
612
- case "InternalServerError":
613
- case "com.amazonaws.networkfirewall#InternalServerError":
614
- throw await de_InternalServerErrorRes(parsedOutput, context);
615
- case "InvalidOperationException":
616
- case "com.amazonaws.networkfirewall#InvalidOperationException":
617
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
618
- case "InvalidRequestException":
619
- case "com.amazonaws.networkfirewall#InvalidRequestException":
620
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
621
- case "ResourceNotFoundException":
622
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
623
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
624
- case "ThrottlingException":
625
- case "com.amazonaws.networkfirewall#ThrottlingException":
626
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
627
- case "UnsupportedOperationException":
628
- case "com.amazonaws.networkfirewall#UnsupportedOperationException":
629
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
630
- default:
631
- const parsedBody = parsedOutput.body;
632
- return throwDefaultError({
633
- output,
634
- parsedBody,
635
- errorCode,
636
- });
637
- }
638
- };
639
- const de_DeleteResourcePolicyCommand = async (output, context) => {
640
- if (output.statusCode >= 300) {
641
- return de_DeleteResourcePolicyCommandError(output, context);
642
- }
643
- const data = await parseBody(output.body, context);
644
- let contents = {};
645
- contents = (0, smithy_client_1._json)(data);
646
- const response = {
647
- $metadata: deserializeMetadata(output),
648
- ...contents,
649
- };
650
- return response;
651
- };
652
- exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
653
- const de_DeleteResourcePolicyCommandError = async (output, context) => {
654
- const parsedOutput = {
655
- ...output,
656
- body: await parseErrorBody(output.body, context),
657
- };
658
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
659
- switch (errorCode) {
660
- case "InternalServerError":
661
- case "com.amazonaws.networkfirewall#InternalServerError":
662
- throw await de_InternalServerErrorRes(parsedOutput, context);
663
- case "InvalidRequestException":
664
- case "com.amazonaws.networkfirewall#InvalidRequestException":
665
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
666
- case "InvalidResourcePolicyException":
667
- case "com.amazonaws.networkfirewall#InvalidResourcePolicyException":
668
- throw await de_InvalidResourcePolicyExceptionRes(parsedOutput, context);
669
- case "ResourceNotFoundException":
670
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
671
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
672
- case "ThrottlingException":
673
- case "com.amazonaws.networkfirewall#ThrottlingException":
674
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
675
- default:
676
- const parsedBody = parsedOutput.body;
677
- return throwDefaultError({
678
- output,
679
- parsedBody,
680
- errorCode,
681
- });
682
- }
683
- };
684
- const de_DeleteRuleGroupCommand = async (output, context) => {
685
- if (output.statusCode >= 300) {
686
- return de_DeleteRuleGroupCommandError(output, context);
687
- }
688
- const data = await parseBody(output.body, context);
689
- let contents = {};
690
- contents = de_DeleteRuleGroupResponse(data, context);
691
- const response = {
692
- $metadata: deserializeMetadata(output),
693
- ...contents,
694
- };
695
- return response;
696
- };
697
- exports.de_DeleteRuleGroupCommand = de_DeleteRuleGroupCommand;
698
- const de_DeleteRuleGroupCommandError = async (output, context) => {
699
- const parsedOutput = {
700
- ...output,
701
- body: await parseErrorBody(output.body, context),
702
- };
703
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
704
- switch (errorCode) {
705
- case "InternalServerError":
706
- case "com.amazonaws.networkfirewall#InternalServerError":
707
- throw await de_InternalServerErrorRes(parsedOutput, context);
708
- case "InvalidOperationException":
709
- case "com.amazonaws.networkfirewall#InvalidOperationException":
710
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
711
- case "InvalidRequestException":
712
- case "com.amazonaws.networkfirewall#InvalidRequestException":
713
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
714
- case "ResourceNotFoundException":
715
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
716
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
717
- case "ThrottlingException":
718
- case "com.amazonaws.networkfirewall#ThrottlingException":
719
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
720
- case "UnsupportedOperationException":
721
- case "com.amazonaws.networkfirewall#UnsupportedOperationException":
722
- throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
723
- default:
724
- const parsedBody = parsedOutput.body;
725
- return throwDefaultError({
726
- output,
727
- parsedBody,
728
- errorCode,
729
- });
730
- }
731
- };
732
- const de_DeleteTLSInspectionConfigurationCommand = async (output, context) => {
733
- if (output.statusCode >= 300) {
734
- return de_DeleteTLSInspectionConfigurationCommandError(output, context);
735
- }
736
- const data = await parseBody(output.body, context);
737
- let contents = {};
738
- contents = de_DeleteTLSInspectionConfigurationResponse(data, context);
739
- const response = {
740
- $metadata: deserializeMetadata(output),
741
- ...contents,
742
- };
743
- return response;
744
- };
745
- exports.de_DeleteTLSInspectionConfigurationCommand = de_DeleteTLSInspectionConfigurationCommand;
746
- const de_DeleteTLSInspectionConfigurationCommandError = async (output, context) => {
747
- const parsedOutput = {
748
- ...output,
749
- body: await parseErrorBody(output.body, context),
750
- };
751
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
752
- switch (errorCode) {
753
- case "InternalServerError":
754
- case "com.amazonaws.networkfirewall#InternalServerError":
755
- throw await de_InternalServerErrorRes(parsedOutput, context);
756
- case "InvalidOperationException":
757
- case "com.amazonaws.networkfirewall#InvalidOperationException":
758
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
759
- case "InvalidRequestException":
760
- case "com.amazonaws.networkfirewall#InvalidRequestException":
761
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
762
- case "ResourceNotFoundException":
763
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
764
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
765
- case "ThrottlingException":
766
- case "com.amazonaws.networkfirewall#ThrottlingException":
767
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
768
- default:
769
- const parsedBody = parsedOutput.body;
770
- return throwDefaultError({
771
- output,
772
- parsedBody,
773
- errorCode,
774
- });
775
- }
776
- };
777
- const de_DescribeFirewallCommand = async (output, context) => {
778
- if (output.statusCode >= 300) {
779
- return de_DescribeFirewallCommandError(output, context);
780
- }
781
- const data = await parseBody(output.body, context);
782
- let contents = {};
783
- contents = (0, smithy_client_1._json)(data);
784
- const response = {
785
- $metadata: deserializeMetadata(output),
786
- ...contents,
787
- };
788
- return response;
789
- };
790
- exports.de_DescribeFirewallCommand = de_DescribeFirewallCommand;
791
- const de_DescribeFirewallCommandError = async (output, context) => {
792
- const parsedOutput = {
793
- ...output,
794
- body: await parseErrorBody(output.body, context),
795
- };
796
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
797
- switch (errorCode) {
798
- case "InternalServerError":
799
- case "com.amazonaws.networkfirewall#InternalServerError":
800
- throw await de_InternalServerErrorRes(parsedOutput, context);
801
- case "InvalidRequestException":
802
- case "com.amazonaws.networkfirewall#InvalidRequestException":
803
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
804
- case "ResourceNotFoundException":
805
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
806
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
807
- case "ThrottlingException":
808
- case "com.amazonaws.networkfirewall#ThrottlingException":
809
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
810
- default:
811
- const parsedBody = parsedOutput.body;
812
- return throwDefaultError({
813
- output,
814
- parsedBody,
815
- errorCode,
816
- });
817
- }
818
- };
819
- const de_DescribeFirewallPolicyCommand = async (output, context) => {
820
- if (output.statusCode >= 300) {
821
- return de_DescribeFirewallPolicyCommandError(output, context);
822
- }
823
- const data = await parseBody(output.body, context);
824
- let contents = {};
825
- contents = de_DescribeFirewallPolicyResponse(data, context);
826
- const response = {
827
- $metadata: deserializeMetadata(output),
828
- ...contents,
829
- };
830
- return response;
831
- };
832
- exports.de_DescribeFirewallPolicyCommand = de_DescribeFirewallPolicyCommand;
833
- const de_DescribeFirewallPolicyCommandError = async (output, context) => {
834
- const parsedOutput = {
835
- ...output,
836
- body: await parseErrorBody(output.body, context),
837
- };
838
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
839
- switch (errorCode) {
840
- case "InternalServerError":
841
- case "com.amazonaws.networkfirewall#InternalServerError":
842
- throw await de_InternalServerErrorRes(parsedOutput, context);
843
- case "InvalidRequestException":
844
- case "com.amazonaws.networkfirewall#InvalidRequestException":
845
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
846
- case "ResourceNotFoundException":
847
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
848
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
849
- case "ThrottlingException":
850
- case "com.amazonaws.networkfirewall#ThrottlingException":
851
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
852
- default:
853
- const parsedBody = parsedOutput.body;
854
- return throwDefaultError({
855
- output,
856
- parsedBody,
857
- errorCode,
858
- });
859
- }
860
- };
861
- const de_DescribeLoggingConfigurationCommand = async (output, context) => {
862
- if (output.statusCode >= 300) {
863
- return de_DescribeLoggingConfigurationCommandError(output, context);
864
- }
865
- const data = await parseBody(output.body, context);
866
- let contents = {};
867
- contents = (0, smithy_client_1._json)(data);
868
- const response = {
869
- $metadata: deserializeMetadata(output),
870
- ...contents,
871
- };
872
- return response;
873
- };
874
- exports.de_DescribeLoggingConfigurationCommand = de_DescribeLoggingConfigurationCommand;
875
- const de_DescribeLoggingConfigurationCommandError = async (output, context) => {
876
- const parsedOutput = {
877
- ...output,
878
- body: await parseErrorBody(output.body, context),
879
- };
880
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
881
- switch (errorCode) {
882
- case "InternalServerError":
883
- case "com.amazonaws.networkfirewall#InternalServerError":
884
- throw await de_InternalServerErrorRes(parsedOutput, context);
885
- case "InvalidRequestException":
886
- case "com.amazonaws.networkfirewall#InvalidRequestException":
887
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
888
- case "ResourceNotFoundException":
889
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
890
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
891
- case "ThrottlingException":
892
- case "com.amazonaws.networkfirewall#ThrottlingException":
893
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
894
- default:
895
- const parsedBody = parsedOutput.body;
896
- return throwDefaultError({
897
- output,
898
- parsedBody,
899
- errorCode,
900
- });
901
- }
902
- };
903
- const de_DescribeResourcePolicyCommand = async (output, context) => {
904
- if (output.statusCode >= 300) {
905
- return de_DescribeResourcePolicyCommandError(output, context);
906
- }
907
- const data = await parseBody(output.body, context);
908
- let contents = {};
909
- contents = (0, smithy_client_1._json)(data);
910
- const response = {
911
- $metadata: deserializeMetadata(output),
912
- ...contents,
913
- };
914
- return response;
915
- };
916
- exports.de_DescribeResourcePolicyCommand = de_DescribeResourcePolicyCommand;
917
- const de_DescribeResourcePolicyCommandError = async (output, context) => {
918
- const parsedOutput = {
919
- ...output,
920
- body: await parseErrorBody(output.body, context),
921
- };
922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
923
- switch (errorCode) {
924
- case "InternalServerError":
925
- case "com.amazonaws.networkfirewall#InternalServerError":
926
- throw await de_InternalServerErrorRes(parsedOutput, context);
927
- case "InvalidRequestException":
928
- case "com.amazonaws.networkfirewall#InvalidRequestException":
929
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
930
- case "ResourceNotFoundException":
931
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
932
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
933
- case "ThrottlingException":
934
- case "com.amazonaws.networkfirewall#ThrottlingException":
935
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
936
- default:
937
- const parsedBody = parsedOutput.body;
938
- return throwDefaultError({
939
- output,
940
- parsedBody,
941
- errorCode,
942
- });
943
- }
944
- };
945
- const de_DescribeRuleGroupCommand = async (output, context) => {
946
- if (output.statusCode >= 300) {
947
- return de_DescribeRuleGroupCommandError(output, context);
948
- }
949
- const data = await parseBody(output.body, context);
950
- let contents = {};
951
- contents = de_DescribeRuleGroupResponse(data, context);
952
- const response = {
953
- $metadata: deserializeMetadata(output),
954
- ...contents,
955
- };
956
- return response;
957
- };
958
- exports.de_DescribeRuleGroupCommand = de_DescribeRuleGroupCommand;
959
- const de_DescribeRuleGroupCommandError = async (output, context) => {
960
- const parsedOutput = {
961
- ...output,
962
- body: await parseErrorBody(output.body, context),
963
- };
964
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
965
- switch (errorCode) {
966
- case "InternalServerError":
967
- case "com.amazonaws.networkfirewall#InternalServerError":
968
- throw await de_InternalServerErrorRes(parsedOutput, context);
969
- case "InvalidRequestException":
970
- case "com.amazonaws.networkfirewall#InvalidRequestException":
971
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
972
- case "ResourceNotFoundException":
973
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
974
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
975
- case "ThrottlingException":
976
- case "com.amazonaws.networkfirewall#ThrottlingException":
977
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
978
- default:
979
- const parsedBody = parsedOutput.body;
980
- return throwDefaultError({
981
- output,
982
- parsedBody,
983
- errorCode,
984
- });
985
- }
986
- };
987
- const de_DescribeRuleGroupMetadataCommand = async (output, context) => {
988
- if (output.statusCode >= 300) {
989
- return de_DescribeRuleGroupMetadataCommandError(output, context);
990
- }
991
- const data = await parseBody(output.body, context);
992
- let contents = {};
993
- contents = de_DescribeRuleGroupMetadataResponse(data, context);
994
- const response = {
995
- $metadata: deserializeMetadata(output),
996
- ...contents,
997
- };
998
- return response;
999
- };
1000
- exports.de_DescribeRuleGroupMetadataCommand = de_DescribeRuleGroupMetadataCommand;
1001
- const de_DescribeRuleGroupMetadataCommandError = async (output, context) => {
1002
- const parsedOutput = {
1003
- ...output,
1004
- body: await parseErrorBody(output.body, context),
1005
- };
1006
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1007
- switch (errorCode) {
1008
- case "InternalServerError":
1009
- case "com.amazonaws.networkfirewall#InternalServerError":
1010
- throw await de_InternalServerErrorRes(parsedOutput, context);
1011
- case "InvalidRequestException":
1012
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1013
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1014
- case "ResourceNotFoundException":
1015
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1016
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1017
- case "ThrottlingException":
1018
- case "com.amazonaws.networkfirewall#ThrottlingException":
1019
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1020
- default:
1021
- const parsedBody = parsedOutput.body;
1022
- return throwDefaultError({
1023
- output,
1024
- parsedBody,
1025
- errorCode,
1026
- });
1027
- }
1028
- };
1029
- const de_DescribeTLSInspectionConfigurationCommand = async (output, context) => {
1030
- if (output.statusCode >= 300) {
1031
- return de_DescribeTLSInspectionConfigurationCommandError(output, context);
1032
- }
1033
- const data = await parseBody(output.body, context);
1034
- let contents = {};
1035
- contents = de_DescribeTLSInspectionConfigurationResponse(data, context);
1036
- const response = {
1037
- $metadata: deserializeMetadata(output),
1038
- ...contents,
1039
- };
1040
- return response;
1041
- };
1042
- exports.de_DescribeTLSInspectionConfigurationCommand = de_DescribeTLSInspectionConfigurationCommand;
1043
- const de_DescribeTLSInspectionConfigurationCommandError = async (output, context) => {
1044
- const parsedOutput = {
1045
- ...output,
1046
- body: await parseErrorBody(output.body, context),
1047
- };
1048
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1049
- switch (errorCode) {
1050
- case "InternalServerError":
1051
- case "com.amazonaws.networkfirewall#InternalServerError":
1052
- throw await de_InternalServerErrorRes(parsedOutput, context);
1053
- case "InvalidRequestException":
1054
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1055
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1056
- case "ResourceNotFoundException":
1057
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1058
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1059
- case "ThrottlingException":
1060
- case "com.amazonaws.networkfirewall#ThrottlingException":
1061
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1062
- default:
1063
- const parsedBody = parsedOutput.body;
1064
- return throwDefaultError({
1065
- output,
1066
- parsedBody,
1067
- errorCode,
1068
- });
1069
- }
1070
- };
1071
- const de_DisassociateSubnetsCommand = async (output, context) => {
1072
- if (output.statusCode >= 300) {
1073
- return de_DisassociateSubnetsCommandError(output, context);
1074
- }
1075
- const data = await parseBody(output.body, context);
1076
- let contents = {};
1077
- contents = (0, smithy_client_1._json)(data);
1078
- const response = {
1079
- $metadata: deserializeMetadata(output),
1080
- ...contents,
1081
- };
1082
- return response;
1083
- };
1084
- exports.de_DisassociateSubnetsCommand = de_DisassociateSubnetsCommand;
1085
- const de_DisassociateSubnetsCommandError = async (output, context) => {
1086
- const parsedOutput = {
1087
- ...output,
1088
- body: await parseErrorBody(output.body, context),
1089
- };
1090
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1091
- switch (errorCode) {
1092
- case "InternalServerError":
1093
- case "com.amazonaws.networkfirewall#InternalServerError":
1094
- throw await de_InternalServerErrorRes(parsedOutput, context);
1095
- case "InvalidOperationException":
1096
- case "com.amazonaws.networkfirewall#InvalidOperationException":
1097
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
1098
- case "InvalidRequestException":
1099
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1100
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1101
- case "InvalidTokenException":
1102
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1103
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1104
- case "ResourceNotFoundException":
1105
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1106
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1107
- case "ThrottlingException":
1108
- case "com.amazonaws.networkfirewall#ThrottlingException":
1109
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1110
- default:
1111
- const parsedBody = parsedOutput.body;
1112
- return throwDefaultError({
1113
- output,
1114
- parsedBody,
1115
- errorCode,
1116
- });
1117
- }
1118
- };
1119
- const de_ListFirewallPoliciesCommand = async (output, context) => {
1120
- if (output.statusCode >= 300) {
1121
- return de_ListFirewallPoliciesCommandError(output, context);
1122
- }
1123
- const data = await parseBody(output.body, context);
1124
- let contents = {};
1125
- contents = (0, smithy_client_1._json)(data);
1126
- const response = {
1127
- $metadata: deserializeMetadata(output),
1128
- ...contents,
1129
- };
1130
- return response;
1131
- };
1132
- exports.de_ListFirewallPoliciesCommand = de_ListFirewallPoliciesCommand;
1133
- const de_ListFirewallPoliciesCommandError = async (output, context) => {
1134
- const parsedOutput = {
1135
- ...output,
1136
- body: await parseErrorBody(output.body, context),
1137
- };
1138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
- switch (errorCode) {
1140
- case "InternalServerError":
1141
- case "com.amazonaws.networkfirewall#InternalServerError":
1142
- throw await de_InternalServerErrorRes(parsedOutput, context);
1143
- case "InvalidRequestException":
1144
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1145
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1146
- case "ThrottlingException":
1147
- case "com.amazonaws.networkfirewall#ThrottlingException":
1148
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1149
- default:
1150
- const parsedBody = parsedOutput.body;
1151
- return throwDefaultError({
1152
- output,
1153
- parsedBody,
1154
- errorCode,
1155
- });
1156
- }
1157
- };
1158
- const de_ListFirewallsCommand = async (output, context) => {
1159
- if (output.statusCode >= 300) {
1160
- return de_ListFirewallsCommandError(output, context);
1161
- }
1162
- const data = await parseBody(output.body, context);
1163
- let contents = {};
1164
- contents = (0, smithy_client_1._json)(data);
1165
- const response = {
1166
- $metadata: deserializeMetadata(output),
1167
- ...contents,
1168
- };
1169
- return response;
1170
- };
1171
- exports.de_ListFirewallsCommand = de_ListFirewallsCommand;
1172
- const de_ListFirewallsCommandError = async (output, context) => {
1173
- const parsedOutput = {
1174
- ...output,
1175
- body: await parseErrorBody(output.body, context),
1176
- };
1177
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1178
- switch (errorCode) {
1179
- case "InternalServerError":
1180
- case "com.amazonaws.networkfirewall#InternalServerError":
1181
- throw await de_InternalServerErrorRes(parsedOutput, context);
1182
- case "InvalidRequestException":
1183
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1184
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1185
- case "ThrottlingException":
1186
- case "com.amazonaws.networkfirewall#ThrottlingException":
1187
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1188
- default:
1189
- const parsedBody = parsedOutput.body;
1190
- return throwDefaultError({
1191
- output,
1192
- parsedBody,
1193
- errorCode,
1194
- });
1195
- }
1196
- };
1197
- const de_ListRuleGroupsCommand = async (output, context) => {
1198
- if (output.statusCode >= 300) {
1199
- return de_ListRuleGroupsCommandError(output, context);
1200
- }
1201
- const data = await parseBody(output.body, context);
1202
- let contents = {};
1203
- contents = (0, smithy_client_1._json)(data);
1204
- const response = {
1205
- $metadata: deserializeMetadata(output),
1206
- ...contents,
1207
- };
1208
- return response;
1209
- };
1210
- exports.de_ListRuleGroupsCommand = de_ListRuleGroupsCommand;
1211
- const de_ListRuleGroupsCommandError = async (output, context) => {
1212
- const parsedOutput = {
1213
- ...output,
1214
- body: await parseErrorBody(output.body, context),
1215
- };
1216
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1217
- switch (errorCode) {
1218
- case "InternalServerError":
1219
- case "com.amazonaws.networkfirewall#InternalServerError":
1220
- throw await de_InternalServerErrorRes(parsedOutput, context);
1221
- case "InvalidRequestException":
1222
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1223
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1224
- case "ThrottlingException":
1225
- case "com.amazonaws.networkfirewall#ThrottlingException":
1226
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1227
- default:
1228
- const parsedBody = parsedOutput.body;
1229
- return throwDefaultError({
1230
- output,
1231
- parsedBody,
1232
- errorCode,
1233
- });
1234
- }
1235
- };
1236
- const de_ListTagsForResourceCommand = async (output, context) => {
1237
- if (output.statusCode >= 300) {
1238
- return de_ListTagsForResourceCommandError(output, context);
1239
- }
1240
- const data = await parseBody(output.body, context);
1241
- let contents = {};
1242
- contents = (0, smithy_client_1._json)(data);
1243
- const response = {
1244
- $metadata: deserializeMetadata(output),
1245
- ...contents,
1246
- };
1247
- return response;
1248
- };
1249
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1250
- const de_ListTagsForResourceCommandError = async (output, context) => {
1251
- const parsedOutput = {
1252
- ...output,
1253
- body: await parseErrorBody(output.body, context),
1254
- };
1255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1256
- switch (errorCode) {
1257
- case "InternalServerError":
1258
- case "com.amazonaws.networkfirewall#InternalServerError":
1259
- throw await de_InternalServerErrorRes(parsedOutput, context);
1260
- case "InvalidRequestException":
1261
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1262
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1263
- case "ResourceNotFoundException":
1264
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1265
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1266
- case "ThrottlingException":
1267
- case "com.amazonaws.networkfirewall#ThrottlingException":
1268
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1269
- default:
1270
- const parsedBody = parsedOutput.body;
1271
- return throwDefaultError({
1272
- output,
1273
- parsedBody,
1274
- errorCode,
1275
- });
1276
- }
1277
- };
1278
- const de_ListTLSInspectionConfigurationsCommand = async (output, context) => {
1279
- if (output.statusCode >= 300) {
1280
- return de_ListTLSInspectionConfigurationsCommandError(output, context);
1281
- }
1282
- const data = await parseBody(output.body, context);
1283
- let contents = {};
1284
- contents = (0, smithy_client_1._json)(data);
1285
- const response = {
1286
- $metadata: deserializeMetadata(output),
1287
- ...contents,
1288
- };
1289
- return response;
1290
- };
1291
- exports.de_ListTLSInspectionConfigurationsCommand = de_ListTLSInspectionConfigurationsCommand;
1292
- const de_ListTLSInspectionConfigurationsCommandError = async (output, context) => {
1293
- const parsedOutput = {
1294
- ...output,
1295
- body: await parseErrorBody(output.body, context),
1296
- };
1297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1298
- switch (errorCode) {
1299
- case "InternalServerError":
1300
- case "com.amazonaws.networkfirewall#InternalServerError":
1301
- throw await de_InternalServerErrorRes(parsedOutput, context);
1302
- case "InvalidRequestException":
1303
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1304
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1305
- case "ThrottlingException":
1306
- case "com.amazonaws.networkfirewall#ThrottlingException":
1307
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1308
- default:
1309
- const parsedBody = parsedOutput.body;
1310
- return throwDefaultError({
1311
- output,
1312
- parsedBody,
1313
- errorCode,
1314
- });
1315
- }
1316
- };
1317
- const de_PutResourcePolicyCommand = async (output, context) => {
1318
- if (output.statusCode >= 300) {
1319
- return de_PutResourcePolicyCommandError(output, context);
1320
- }
1321
- const data = await parseBody(output.body, context);
1322
- let contents = {};
1323
- contents = (0, smithy_client_1._json)(data);
1324
- const response = {
1325
- $metadata: deserializeMetadata(output),
1326
- ...contents,
1327
- };
1328
- return response;
1329
- };
1330
- exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
1331
- const de_PutResourcePolicyCommandError = async (output, context) => {
1332
- const parsedOutput = {
1333
- ...output,
1334
- body: await parseErrorBody(output.body, context),
1335
- };
1336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1337
- switch (errorCode) {
1338
- case "InternalServerError":
1339
- case "com.amazonaws.networkfirewall#InternalServerError":
1340
- throw await de_InternalServerErrorRes(parsedOutput, context);
1341
- case "InvalidRequestException":
1342
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1343
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1344
- case "InvalidResourcePolicyException":
1345
- case "com.amazonaws.networkfirewall#InvalidResourcePolicyException":
1346
- throw await de_InvalidResourcePolicyExceptionRes(parsedOutput, context);
1347
- case "ResourceNotFoundException":
1348
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1349
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1350
- case "ThrottlingException":
1351
- case "com.amazonaws.networkfirewall#ThrottlingException":
1352
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1353
- default:
1354
- const parsedBody = parsedOutput.body;
1355
- return throwDefaultError({
1356
- output,
1357
- parsedBody,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
- const de_TagResourceCommand = async (output, context) => {
1363
- if (output.statusCode >= 300) {
1364
- return de_TagResourceCommandError(output, context);
1365
- }
1366
- const data = await parseBody(output.body, context);
1367
- let contents = {};
1368
- contents = (0, smithy_client_1._json)(data);
1369
- const response = {
1370
- $metadata: deserializeMetadata(output),
1371
- ...contents,
1372
- };
1373
- return response;
1374
- };
1375
- exports.de_TagResourceCommand = de_TagResourceCommand;
1376
- const de_TagResourceCommandError = async (output, context) => {
1377
- const parsedOutput = {
1378
- ...output,
1379
- body: await parseErrorBody(output.body, context),
1380
- };
1381
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1382
- switch (errorCode) {
1383
- case "InternalServerError":
1384
- case "com.amazonaws.networkfirewall#InternalServerError":
1385
- throw await de_InternalServerErrorRes(parsedOutput, context);
1386
- case "InvalidRequestException":
1387
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1388
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1389
- case "ResourceNotFoundException":
1390
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1391
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1392
- case "ThrottlingException":
1393
- case "com.amazonaws.networkfirewall#ThrottlingException":
1394
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1395
- default:
1396
- const parsedBody = parsedOutput.body;
1397
- return throwDefaultError({
1398
- output,
1399
- parsedBody,
1400
- errorCode,
1401
- });
1402
- }
1403
- };
1404
- const de_UntagResourceCommand = async (output, context) => {
1405
- if (output.statusCode >= 300) {
1406
- return de_UntagResourceCommandError(output, context);
1407
- }
1408
- const data = await parseBody(output.body, context);
1409
- let contents = {};
1410
- contents = (0, smithy_client_1._json)(data);
1411
- const response = {
1412
- $metadata: deserializeMetadata(output),
1413
- ...contents,
1414
- };
1415
- return response;
1416
- };
1417
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1418
- const de_UntagResourceCommandError = async (output, context) => {
1419
- const parsedOutput = {
1420
- ...output,
1421
- body: await parseErrorBody(output.body, context),
1422
- };
1423
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1424
- switch (errorCode) {
1425
- case "InternalServerError":
1426
- case "com.amazonaws.networkfirewall#InternalServerError":
1427
- throw await de_InternalServerErrorRes(parsedOutput, context);
1428
- case "InvalidRequestException":
1429
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1430
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1431
- case "ResourceNotFoundException":
1432
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1433
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1434
- case "ThrottlingException":
1435
- case "com.amazonaws.networkfirewall#ThrottlingException":
1436
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1437
- default:
1438
- const parsedBody = parsedOutput.body;
1439
- return throwDefaultError({
1440
- output,
1441
- parsedBody,
1442
- errorCode,
1443
- });
1444
- }
1445
- };
1446
- const de_UpdateFirewallDeleteProtectionCommand = async (output, context) => {
1447
- if (output.statusCode >= 300) {
1448
- return de_UpdateFirewallDeleteProtectionCommandError(output, context);
1449
- }
1450
- const data = await parseBody(output.body, context);
1451
- let contents = {};
1452
- contents = (0, smithy_client_1._json)(data);
1453
- const response = {
1454
- $metadata: deserializeMetadata(output),
1455
- ...contents,
1456
- };
1457
- return response;
1458
- };
1459
- exports.de_UpdateFirewallDeleteProtectionCommand = de_UpdateFirewallDeleteProtectionCommand;
1460
- const de_UpdateFirewallDeleteProtectionCommandError = async (output, context) => {
1461
- const parsedOutput = {
1462
- ...output,
1463
- body: await parseErrorBody(output.body, context),
1464
- };
1465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1466
- switch (errorCode) {
1467
- case "InternalServerError":
1468
- case "com.amazonaws.networkfirewall#InternalServerError":
1469
- throw await de_InternalServerErrorRes(parsedOutput, context);
1470
- case "InvalidRequestException":
1471
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1472
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1473
- case "InvalidTokenException":
1474
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1475
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1476
- case "ResourceNotFoundException":
1477
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1478
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1479
- case "ResourceOwnerCheckException":
1480
- case "com.amazonaws.networkfirewall#ResourceOwnerCheckException":
1481
- throw await de_ResourceOwnerCheckExceptionRes(parsedOutput, context);
1482
- case "ThrottlingException":
1483
- case "com.amazonaws.networkfirewall#ThrottlingException":
1484
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1485
- default:
1486
- const parsedBody = parsedOutput.body;
1487
- return throwDefaultError({
1488
- output,
1489
- parsedBody,
1490
- errorCode,
1491
- });
1492
- }
1493
- };
1494
- const de_UpdateFirewallDescriptionCommand = async (output, context) => {
1495
- if (output.statusCode >= 300) {
1496
- return de_UpdateFirewallDescriptionCommandError(output, context);
1497
- }
1498
- const data = await parseBody(output.body, context);
1499
- let contents = {};
1500
- contents = (0, smithy_client_1._json)(data);
1501
- const response = {
1502
- $metadata: deserializeMetadata(output),
1503
- ...contents,
1504
- };
1505
- return response;
1506
- };
1507
- exports.de_UpdateFirewallDescriptionCommand = de_UpdateFirewallDescriptionCommand;
1508
- const de_UpdateFirewallDescriptionCommandError = async (output, context) => {
1509
- const parsedOutput = {
1510
- ...output,
1511
- body: await parseErrorBody(output.body, context),
1512
- };
1513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1514
- switch (errorCode) {
1515
- case "InternalServerError":
1516
- case "com.amazonaws.networkfirewall#InternalServerError":
1517
- throw await de_InternalServerErrorRes(parsedOutput, context);
1518
- case "InvalidRequestException":
1519
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1520
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1521
- case "InvalidTokenException":
1522
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1523
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1524
- case "ResourceNotFoundException":
1525
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1526
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1527
- case "ThrottlingException":
1528
- case "com.amazonaws.networkfirewall#ThrottlingException":
1529
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1530
- default:
1531
- const parsedBody = parsedOutput.body;
1532
- return throwDefaultError({
1533
- output,
1534
- parsedBody,
1535
- errorCode,
1536
- });
1537
- }
1538
- };
1539
- const de_UpdateFirewallEncryptionConfigurationCommand = async (output, context) => {
1540
- if (output.statusCode >= 300) {
1541
- return de_UpdateFirewallEncryptionConfigurationCommandError(output, context);
1542
- }
1543
- const data = await parseBody(output.body, context);
1544
- let contents = {};
1545
- contents = (0, smithy_client_1._json)(data);
1546
- const response = {
1547
- $metadata: deserializeMetadata(output),
1548
- ...contents,
1549
- };
1550
- return response;
1551
- };
1552
- exports.de_UpdateFirewallEncryptionConfigurationCommand = de_UpdateFirewallEncryptionConfigurationCommand;
1553
- const de_UpdateFirewallEncryptionConfigurationCommandError = async (output, context) => {
1554
- const parsedOutput = {
1555
- ...output,
1556
- body: await parseErrorBody(output.body, context),
1557
- };
1558
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1559
- switch (errorCode) {
1560
- case "InternalServerError":
1561
- case "com.amazonaws.networkfirewall#InternalServerError":
1562
- throw await de_InternalServerErrorRes(parsedOutput, context);
1563
- case "InvalidRequestException":
1564
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1565
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1566
- case "InvalidTokenException":
1567
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1568
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1569
- case "ResourceNotFoundException":
1570
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1571
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1572
- case "ResourceOwnerCheckException":
1573
- case "com.amazonaws.networkfirewall#ResourceOwnerCheckException":
1574
- throw await de_ResourceOwnerCheckExceptionRes(parsedOutput, context);
1575
- case "ThrottlingException":
1576
- case "com.amazonaws.networkfirewall#ThrottlingException":
1577
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1578
- default:
1579
- const parsedBody = parsedOutput.body;
1580
- return throwDefaultError({
1581
- output,
1582
- parsedBody,
1583
- errorCode,
1584
- });
1585
- }
1586
- };
1587
- const de_UpdateFirewallPolicyCommand = async (output, context) => {
1588
- if (output.statusCode >= 300) {
1589
- return de_UpdateFirewallPolicyCommandError(output, context);
1590
- }
1591
- const data = await parseBody(output.body, context);
1592
- let contents = {};
1593
- contents = de_UpdateFirewallPolicyResponse(data, context);
1594
- const response = {
1595
- $metadata: deserializeMetadata(output),
1596
- ...contents,
1597
- };
1598
- return response;
1599
- };
1600
- exports.de_UpdateFirewallPolicyCommand = de_UpdateFirewallPolicyCommand;
1601
- const de_UpdateFirewallPolicyCommandError = async (output, context) => {
1602
- const parsedOutput = {
1603
- ...output,
1604
- body: await parseErrorBody(output.body, context),
1605
- };
1606
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1607
- switch (errorCode) {
1608
- case "InternalServerError":
1609
- case "com.amazonaws.networkfirewall#InternalServerError":
1610
- throw await de_InternalServerErrorRes(parsedOutput, context);
1611
- case "InvalidRequestException":
1612
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1613
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1614
- case "InvalidTokenException":
1615
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1616
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1617
- case "ResourceNotFoundException":
1618
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1619
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1620
- case "ThrottlingException":
1621
- case "com.amazonaws.networkfirewall#ThrottlingException":
1622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1623
- default:
1624
- const parsedBody = parsedOutput.body;
1625
- return throwDefaultError({
1626
- output,
1627
- parsedBody,
1628
- errorCode,
1629
- });
1630
- }
1631
- };
1632
- const de_UpdateFirewallPolicyChangeProtectionCommand = async (output, context) => {
1633
- if (output.statusCode >= 300) {
1634
- return de_UpdateFirewallPolicyChangeProtectionCommandError(output, context);
1635
- }
1636
- const data = await parseBody(output.body, context);
1637
- let contents = {};
1638
- contents = (0, smithy_client_1._json)(data);
1639
- const response = {
1640
- $metadata: deserializeMetadata(output),
1641
- ...contents,
1642
- };
1643
- return response;
1644
- };
1645
- exports.de_UpdateFirewallPolicyChangeProtectionCommand = de_UpdateFirewallPolicyChangeProtectionCommand;
1646
- const de_UpdateFirewallPolicyChangeProtectionCommandError = async (output, context) => {
1647
- const parsedOutput = {
1648
- ...output,
1649
- body: await parseErrorBody(output.body, context),
1650
- };
1651
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1652
- switch (errorCode) {
1653
- case "InternalServerError":
1654
- case "com.amazonaws.networkfirewall#InternalServerError":
1655
- throw await de_InternalServerErrorRes(parsedOutput, context);
1656
- case "InvalidRequestException":
1657
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1658
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1659
- case "InvalidTokenException":
1660
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1661
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1662
- case "ResourceNotFoundException":
1663
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1664
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1665
- case "ResourceOwnerCheckException":
1666
- case "com.amazonaws.networkfirewall#ResourceOwnerCheckException":
1667
- throw await de_ResourceOwnerCheckExceptionRes(parsedOutput, context);
1668
- case "ThrottlingException":
1669
- case "com.amazonaws.networkfirewall#ThrottlingException":
1670
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1671
- default:
1672
- const parsedBody = parsedOutput.body;
1673
- return throwDefaultError({
1674
- output,
1675
- parsedBody,
1676
- errorCode,
1677
- });
1678
- }
1679
- };
1680
- const de_UpdateLoggingConfigurationCommand = async (output, context) => {
1681
- if (output.statusCode >= 300) {
1682
- return de_UpdateLoggingConfigurationCommandError(output, context);
1683
- }
1684
- const data = await parseBody(output.body, context);
1685
- let contents = {};
1686
- contents = (0, smithy_client_1._json)(data);
1687
- const response = {
1688
- $metadata: deserializeMetadata(output),
1689
- ...contents,
1690
- };
1691
- return response;
1692
- };
1693
- exports.de_UpdateLoggingConfigurationCommand = de_UpdateLoggingConfigurationCommand;
1694
- const de_UpdateLoggingConfigurationCommandError = async (output, context) => {
1695
- const parsedOutput = {
1696
- ...output,
1697
- body: await parseErrorBody(output.body, context),
1698
- };
1699
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1700
- switch (errorCode) {
1701
- case "InternalServerError":
1702
- case "com.amazonaws.networkfirewall#InternalServerError":
1703
- throw await de_InternalServerErrorRes(parsedOutput, context);
1704
- case "InvalidRequestException":
1705
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1706
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1707
- case "InvalidTokenException":
1708
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1709
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1710
- case "LogDestinationPermissionException":
1711
- case "com.amazonaws.networkfirewall#LogDestinationPermissionException":
1712
- throw await de_LogDestinationPermissionExceptionRes(parsedOutput, context);
1713
- case "ResourceNotFoundException":
1714
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1716
- case "ThrottlingException":
1717
- case "com.amazonaws.networkfirewall#ThrottlingException":
1718
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1719
- default:
1720
- const parsedBody = parsedOutput.body;
1721
- return throwDefaultError({
1722
- output,
1723
- parsedBody,
1724
- errorCode,
1725
- });
1726
- }
1727
- };
1728
- const de_UpdateRuleGroupCommand = async (output, context) => {
1729
- if (output.statusCode >= 300) {
1730
- return de_UpdateRuleGroupCommandError(output, context);
1731
- }
1732
- const data = await parseBody(output.body, context);
1733
- let contents = {};
1734
- contents = de_UpdateRuleGroupResponse(data, context);
1735
- const response = {
1736
- $metadata: deserializeMetadata(output),
1737
- ...contents,
1738
- };
1739
- return response;
1740
- };
1741
- exports.de_UpdateRuleGroupCommand = de_UpdateRuleGroupCommand;
1742
- const de_UpdateRuleGroupCommandError = async (output, context) => {
1743
- const parsedOutput = {
1744
- ...output,
1745
- body: await parseErrorBody(output.body, context),
1746
- };
1747
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1748
- switch (errorCode) {
1749
- case "InternalServerError":
1750
- case "com.amazonaws.networkfirewall#InternalServerError":
1751
- throw await de_InternalServerErrorRes(parsedOutput, context);
1752
- case "InvalidRequestException":
1753
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1754
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1755
- case "InvalidTokenException":
1756
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1757
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1758
- case "ResourceNotFoundException":
1759
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1760
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1761
- case "ThrottlingException":
1762
- case "com.amazonaws.networkfirewall#ThrottlingException":
1763
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1764
- default:
1765
- const parsedBody = parsedOutput.body;
1766
- return throwDefaultError({
1767
- output,
1768
- parsedBody,
1769
- errorCode,
1770
- });
1771
- }
1772
- };
1773
- const de_UpdateSubnetChangeProtectionCommand = async (output, context) => {
1774
- if (output.statusCode >= 300) {
1775
- return de_UpdateSubnetChangeProtectionCommandError(output, context);
1776
- }
1777
- const data = await parseBody(output.body, context);
1778
- let contents = {};
1779
- contents = (0, smithy_client_1._json)(data);
1780
- const response = {
1781
- $metadata: deserializeMetadata(output),
1782
- ...contents,
1783
- };
1784
- return response;
1785
- };
1786
- exports.de_UpdateSubnetChangeProtectionCommand = de_UpdateSubnetChangeProtectionCommand;
1787
- const de_UpdateSubnetChangeProtectionCommandError = async (output, context) => {
1788
- const parsedOutput = {
1789
- ...output,
1790
- body: await parseErrorBody(output.body, context),
1791
- };
1792
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1793
- switch (errorCode) {
1794
- case "InternalServerError":
1795
- case "com.amazonaws.networkfirewall#InternalServerError":
1796
- throw await de_InternalServerErrorRes(parsedOutput, context);
1797
- case "InvalidRequestException":
1798
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1799
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1800
- case "InvalidTokenException":
1801
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1802
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1803
- case "ResourceNotFoundException":
1804
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1805
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1806
- case "ResourceOwnerCheckException":
1807
- case "com.amazonaws.networkfirewall#ResourceOwnerCheckException":
1808
- throw await de_ResourceOwnerCheckExceptionRes(parsedOutput, context);
1809
- case "ThrottlingException":
1810
- case "com.amazonaws.networkfirewall#ThrottlingException":
1811
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1812
- default:
1813
- const parsedBody = parsedOutput.body;
1814
- return throwDefaultError({
1815
- output,
1816
- parsedBody,
1817
- errorCode,
1818
- });
1819
- }
1820
- };
1821
- const de_UpdateTLSInspectionConfigurationCommand = async (output, context) => {
1822
- if (output.statusCode >= 300) {
1823
- return de_UpdateTLSInspectionConfigurationCommandError(output, context);
1824
- }
1825
- const data = await parseBody(output.body, context);
1826
- let contents = {};
1827
- contents = de_UpdateTLSInspectionConfigurationResponse(data, context);
1828
- const response = {
1829
- $metadata: deserializeMetadata(output),
1830
- ...contents,
1831
- };
1832
- return response;
1833
- };
1834
- exports.de_UpdateTLSInspectionConfigurationCommand = de_UpdateTLSInspectionConfigurationCommand;
1835
- const de_UpdateTLSInspectionConfigurationCommandError = async (output, context) => {
1836
- const parsedOutput = {
1837
- ...output,
1838
- body: await parseErrorBody(output.body, context),
1839
- };
1840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1841
- switch (errorCode) {
1842
- case "InternalServerError":
1843
- case "com.amazonaws.networkfirewall#InternalServerError":
1844
- throw await de_InternalServerErrorRes(parsedOutput, context);
1845
- case "InvalidRequestException":
1846
- case "com.amazonaws.networkfirewall#InvalidRequestException":
1847
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1848
- case "InvalidTokenException":
1849
- case "com.amazonaws.networkfirewall#InvalidTokenException":
1850
- throw await de_InvalidTokenExceptionRes(parsedOutput, context);
1851
- case "ResourceNotFoundException":
1852
- case "com.amazonaws.networkfirewall#ResourceNotFoundException":
1853
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1854
- case "ThrottlingException":
1855
- case "com.amazonaws.networkfirewall#ThrottlingException":
1856
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1857
- default:
1858
- const parsedBody = parsedOutput.body;
1859
- return throwDefaultError({
1860
- output,
1861
- parsedBody,
1862
- errorCode,
1863
- });
1864
- }
1865
- };
1866
- const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
1867
- const body = parsedOutput.body;
1868
- const deserialized = (0, smithy_client_1._json)(body);
1869
- const exception = new models_0_1.InsufficientCapacityException({
1870
- $metadata: deserializeMetadata(parsedOutput),
1871
- ...deserialized,
1872
- });
1873
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1874
- };
1875
- const de_InternalServerErrorRes = async (parsedOutput, context) => {
1876
- const body = parsedOutput.body;
1877
- const deserialized = (0, smithy_client_1._json)(body);
1878
- const exception = new models_0_1.InternalServerError({
1879
- $metadata: deserializeMetadata(parsedOutput),
1880
- ...deserialized,
1881
- });
1882
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1883
- };
1884
- const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
1885
- const body = parsedOutput.body;
1886
- const deserialized = (0, smithy_client_1._json)(body);
1887
- const exception = new models_0_1.InvalidOperationException({
1888
- $metadata: deserializeMetadata(parsedOutput),
1889
- ...deserialized,
1890
- });
1891
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1892
- };
1893
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1894
- const body = parsedOutput.body;
1895
- const deserialized = (0, smithy_client_1._json)(body);
1896
- const exception = new models_0_1.InvalidRequestException({
1897
- $metadata: deserializeMetadata(parsedOutput),
1898
- ...deserialized,
1899
- });
1900
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1901
- };
1902
- const de_InvalidResourcePolicyExceptionRes = async (parsedOutput, context) => {
1903
- const body = parsedOutput.body;
1904
- const deserialized = (0, smithy_client_1._json)(body);
1905
- const exception = new models_0_1.InvalidResourcePolicyException({
1906
- $metadata: deserializeMetadata(parsedOutput),
1907
- ...deserialized,
1908
- });
1909
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1910
- };
1911
- const de_InvalidTokenExceptionRes = async (parsedOutput, context) => {
1912
- const body = parsedOutput.body;
1913
- const deserialized = (0, smithy_client_1._json)(body);
1914
- const exception = new models_0_1.InvalidTokenException({
1915
- $metadata: deserializeMetadata(parsedOutput),
1916
- ...deserialized,
1917
- });
1918
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1919
- };
1920
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1921
- const body = parsedOutput.body;
1922
- const deserialized = (0, smithy_client_1._json)(body);
1923
- const exception = new models_0_1.LimitExceededException({
1924
- $metadata: deserializeMetadata(parsedOutput),
1925
- ...deserialized,
1926
- });
1927
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1928
- };
1929
- const de_LogDestinationPermissionExceptionRes = async (parsedOutput, context) => {
1930
- const body = parsedOutput.body;
1931
- const deserialized = (0, smithy_client_1._json)(body);
1932
- const exception = new models_0_1.LogDestinationPermissionException({
1933
- $metadata: deserializeMetadata(parsedOutput),
1934
- ...deserialized,
1935
- });
1936
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1937
- };
1938
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1939
- const body = parsedOutput.body;
1940
- const deserialized = (0, smithy_client_1._json)(body);
1941
- const exception = new models_0_1.ResourceNotFoundException({
1942
- $metadata: deserializeMetadata(parsedOutput),
1943
- ...deserialized,
1944
- });
1945
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1946
- };
1947
- const de_ResourceOwnerCheckExceptionRes = async (parsedOutput, context) => {
1948
- const body = parsedOutput.body;
1949
- const deserialized = (0, smithy_client_1._json)(body);
1950
- const exception = new models_0_1.ResourceOwnerCheckException({
1951
- $metadata: deserializeMetadata(parsedOutput),
1952
- ...deserialized,
1953
- });
1954
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1955
- };
1956
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1957
- const body = parsedOutput.body;
1958
- const deserialized = (0, smithy_client_1._json)(body);
1959
- const exception = new models_0_1.ThrottlingException({
1960
- $metadata: deserializeMetadata(parsedOutput),
1961
- ...deserialized,
1962
- });
1963
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1964
- };
1965
- const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
1966
- const body = parsedOutput.body;
1967
- const deserialized = (0, smithy_client_1._json)(body);
1968
- const exception = new models_0_1.UnsupportedOperationException({
1969
- $metadata: deserializeMetadata(parsedOutput),
1970
- ...deserialized,
1971
- });
1972
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1973
- };
1974
- const se_CreateRuleGroupRequest = (input, context) => {
1975
- return (0, smithy_client_1.take)(input, {
1976
- AnalyzeRuleGroup: [],
1977
- Capacity: [],
1978
- Description: [],
1979
- DryRun: [],
1980
- EncryptionConfiguration: smithy_client_1._json,
1981
- RuleGroup: smithy_client_1._json,
1982
- RuleGroupName: [],
1983
- Rules: [],
1984
- SourceMetadata: smithy_client_1._json,
1985
- Tags: smithy_client_1._json,
1986
- Type: [],
1987
- });
1988
- };
1989
- const se_UpdateRuleGroupRequest = (input, context) => {
1990
- return (0, smithy_client_1.take)(input, {
1991
- AnalyzeRuleGroup: [],
1992
- Description: [],
1993
- DryRun: [],
1994
- EncryptionConfiguration: smithy_client_1._json,
1995
- RuleGroup: smithy_client_1._json,
1996
- RuleGroupArn: [],
1997
- RuleGroupName: [],
1998
- Rules: [],
1999
- SourceMetadata: smithy_client_1._json,
2000
- Type: [],
2001
- UpdateToken: [],
2002
- });
2003
- };
2004
- const de_CreateFirewallPolicyResponse = (output, context) => {
2005
- return (0, smithy_client_1.take)(output, {
2006
- FirewallPolicyResponse: (_) => de_FirewallPolicyResponse(_, context),
2007
- UpdateToken: smithy_client_1.expectString,
2008
- });
2009
- };
2010
- const de_CreateRuleGroupResponse = (output, context) => {
2011
- return (0, smithy_client_1.take)(output, {
2012
- RuleGroupResponse: (_) => de_RuleGroupResponse(_, context),
2013
- UpdateToken: smithy_client_1.expectString,
2014
- });
2015
- };
2016
- const de_CreateTLSInspectionConfigurationResponse = (output, context) => {
2017
- return (0, smithy_client_1.take)(output, {
2018
- TLSInspectionConfigurationResponse: (_) => de_TLSInspectionConfigurationResponse(_, context),
2019
- UpdateToken: smithy_client_1.expectString,
2020
- });
2021
- };
2022
- const de_DeleteFirewallPolicyResponse = (output, context) => {
2023
- return (0, smithy_client_1.take)(output, {
2024
- FirewallPolicyResponse: (_) => de_FirewallPolicyResponse(_, context),
2025
- });
2026
- };
2027
- const de_DeleteRuleGroupResponse = (output, context) => {
2028
- return (0, smithy_client_1.take)(output, {
2029
- RuleGroupResponse: (_) => de_RuleGroupResponse(_, context),
2030
- });
2031
- };
2032
- const de_DeleteTLSInspectionConfigurationResponse = (output, context) => {
2033
- return (0, smithy_client_1.take)(output, {
2034
- TLSInspectionConfigurationResponse: (_) => de_TLSInspectionConfigurationResponse(_, context),
2035
- });
2036
- };
2037
- const de_DescribeFirewallPolicyResponse = (output, context) => {
2038
- return (0, smithy_client_1.take)(output, {
2039
- FirewallPolicy: smithy_client_1._json,
2040
- FirewallPolicyResponse: (_) => de_FirewallPolicyResponse(_, context),
2041
- UpdateToken: smithy_client_1.expectString,
2042
- });
2043
- };
2044
- const de_DescribeRuleGroupMetadataResponse = (output, context) => {
2045
- return (0, smithy_client_1.take)(output, {
2046
- Capacity: smithy_client_1.expectInt32,
2047
- Description: smithy_client_1.expectString,
2048
- LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2049
- RuleGroupArn: smithy_client_1.expectString,
2050
- RuleGroupName: smithy_client_1.expectString,
2051
- StatefulRuleOptions: smithy_client_1._json,
2052
- Type: smithy_client_1.expectString,
2053
- });
2054
- };
2055
- const de_DescribeRuleGroupResponse = (output, context) => {
2056
- return (0, smithy_client_1.take)(output, {
2057
- RuleGroup: smithy_client_1._json,
2058
- RuleGroupResponse: (_) => de_RuleGroupResponse(_, context),
2059
- UpdateToken: smithy_client_1.expectString,
2060
- });
2061
- };
2062
- const de_DescribeTLSInspectionConfigurationResponse = (output, context) => {
2063
- return (0, smithy_client_1.take)(output, {
2064
- TLSInspectionConfiguration: smithy_client_1._json,
2065
- TLSInspectionConfigurationResponse: (_) => de_TLSInspectionConfigurationResponse(_, context),
2066
- UpdateToken: smithy_client_1.expectString,
2067
- });
2068
- };
2069
- const de_FirewallPolicyResponse = (output, context) => {
2070
- return (0, smithy_client_1.take)(output, {
2071
- ConsumedStatefulRuleCapacity: smithy_client_1.expectInt32,
2072
- ConsumedStatelessRuleCapacity: smithy_client_1.expectInt32,
2073
- Description: smithy_client_1.expectString,
2074
- EncryptionConfiguration: smithy_client_1._json,
2075
- FirewallPolicyArn: smithy_client_1.expectString,
2076
- FirewallPolicyId: smithy_client_1.expectString,
2077
- FirewallPolicyName: smithy_client_1.expectString,
2078
- FirewallPolicyStatus: smithy_client_1.expectString,
2079
- LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2080
- NumberOfAssociations: smithy_client_1.expectInt32,
2081
- Tags: smithy_client_1._json,
2082
- });
2083
- };
2084
- const de_RuleGroupResponse = (output, context) => {
2085
- return (0, smithy_client_1.take)(output, {
2086
- AnalysisResults: smithy_client_1._json,
2087
- Capacity: smithy_client_1.expectInt32,
2088
- ConsumedCapacity: smithy_client_1.expectInt32,
2089
- Description: smithy_client_1.expectString,
2090
- EncryptionConfiguration: smithy_client_1._json,
2091
- LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2092
- NumberOfAssociations: smithy_client_1.expectInt32,
2093
- RuleGroupArn: smithy_client_1.expectString,
2094
- RuleGroupId: smithy_client_1.expectString,
2095
- RuleGroupName: smithy_client_1.expectString,
2096
- RuleGroupStatus: smithy_client_1.expectString,
2097
- SnsTopic: smithy_client_1.expectString,
2098
- SourceMetadata: smithy_client_1._json,
2099
- Tags: smithy_client_1._json,
2100
- Type: smithy_client_1.expectString,
2101
- });
2102
- };
2103
- const de_TLSInspectionConfigurationResponse = (output, context) => {
2104
- return (0, smithy_client_1.take)(output, {
2105
- CertificateAuthority: smithy_client_1._json,
2106
- Certificates: smithy_client_1._json,
2107
- Description: smithy_client_1.expectString,
2108
- EncryptionConfiguration: smithy_client_1._json,
2109
- LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2110
- NumberOfAssociations: smithy_client_1.expectInt32,
2111
- TLSInspectionConfigurationArn: smithy_client_1.expectString,
2112
- TLSInspectionConfigurationId: smithy_client_1.expectString,
2113
- TLSInspectionConfigurationName: smithy_client_1.expectString,
2114
- TLSInspectionConfigurationStatus: smithy_client_1.expectString,
2115
- Tags: smithy_client_1._json,
2116
- });
2117
- };
2118
- const de_UpdateFirewallPolicyResponse = (output, context) => {
2119
- return (0, smithy_client_1.take)(output, {
2120
- FirewallPolicyResponse: (_) => de_FirewallPolicyResponse(_, context),
2121
- UpdateToken: smithy_client_1.expectString,
2122
- });
2123
- };
2124
- const de_UpdateRuleGroupResponse = (output, context) => {
2125
- return (0, smithy_client_1.take)(output, {
2126
- RuleGroupResponse: (_) => de_RuleGroupResponse(_, context),
2127
- UpdateToken: smithy_client_1.expectString,
2128
- });
2129
- };
2130
- const de_UpdateTLSInspectionConfigurationResponse = (output, context) => {
2131
- return (0, smithy_client_1.take)(output, {
2132
- TLSInspectionConfigurationResponse: (_) => de_TLSInspectionConfigurationResponse(_, context),
2133
- UpdateToken: smithy_client_1.expectString,
2134
- });
2135
- };
2136
- const deserializeMetadata = (output) => ({
2137
- httpStatusCode: output.statusCode,
2138
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2139
- extendedRequestId: output.headers["x-amz-id-2"],
2140
- cfId: output.headers["x-amz-cf-id"],
2141
- });
2142
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2143
- const throwDefaultError = (0, smithy_client_1.withBaseException)(NetworkFirewallServiceException_1.NetworkFirewallServiceException);
2144
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2146
- const contents = {
2147
- protocol,
2148
- hostname,
2149
- port,
2150
- method: "POST",
2151
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2152
- headers,
2153
- };
2154
- if (resolvedHostname !== undefined) {
2155
- contents.hostname = resolvedHostname;
2156
- }
2157
- if (body !== undefined) {
2158
- contents.body = body;
2159
- }
2160
- return new protocol_http_1.HttpRequest(contents);
2161
- };
2162
- function sharedHeaders(operation) {
2163
- return {
2164
- "content-type": "application/x-amz-json-1.0",
2165
- "x-amz-target": `NetworkFirewall_20201112.${operation}`,
2166
- };
2167
- }
2168
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2169
- if (encoded.length) {
2170
- return JSON.parse(encoded);
2171
- }
2172
- return {};
2173
- });
2174
- const parseErrorBody = async (errorBody, context) => {
2175
- const value = await parseBody(errorBody, context);
2176
- value.message = value.message ?? value.Message;
2177
- return value;
2178
- };
2179
- const loadRestJsonErrorCode = (output, data) => {
2180
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2181
- const sanitizeErrorCode = (rawValue) => {
2182
- let cleanValue = rawValue;
2183
- if (typeof cleanValue === "number") {
2184
- cleanValue = cleanValue.toString();
2185
- }
2186
- if (cleanValue.indexOf(",") >= 0) {
2187
- cleanValue = cleanValue.split(",")[0];
2188
- }
2189
- if (cleanValue.indexOf(":") >= 0) {
2190
- cleanValue = cleanValue.split(":")[0];
2191
- }
2192
- if (cleanValue.indexOf("#") >= 0) {
2193
- cleanValue = cleanValue.split("#")[1];
2194
- }
2195
- return cleanValue;
2196
- };
2197
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2198
- if (headerKey !== undefined) {
2199
- return sanitizeErrorCode(output.headers[headerKey]);
2200
- }
2201
- if (data.code !== undefined) {
2202
- return sanitizeErrorCode(data.code);
2203
- }
2204
- if (data["__type"] !== undefined) {
2205
- return sanitizeErrorCode(data["__type"]);
2206
- }
2207
- };
1
+ module.exports = require("../index.js");