@aws-sdk/client-direct-connect 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,629 +8,440 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const DirectConnectServiceException_1 = require("../models/DirectConnectServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_AcceptDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-amz-json-1.1",
13
- "x-amz-target": "OvertureService.AcceptDirectConnectGatewayAssociationProposal",
14
- };
11
+ const headers = sharedHeaders("AcceptDirectConnectGatewayAssociationProposal");
15
12
  let body;
16
- body = JSON.stringify(se_AcceptDirectConnectGatewayAssociationProposalRequest(input, context));
13
+ body = JSON.stringify((0, smithy_client_1._json)(input));
17
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
15
  };
19
16
  exports.se_AcceptDirectConnectGatewayAssociationProposalCommand = se_AcceptDirectConnectGatewayAssociationProposalCommand;
20
17
  const se_AllocateConnectionOnInterconnectCommand = async (input, context) => {
21
- const headers = {
22
- "content-type": "application/x-amz-json-1.1",
23
- "x-amz-target": "OvertureService.AllocateConnectionOnInterconnect",
24
- };
18
+ const headers = sharedHeaders("AllocateConnectionOnInterconnect");
25
19
  let body;
26
- body = JSON.stringify(se_AllocateConnectionOnInterconnectRequest(input, context));
20
+ body = JSON.stringify((0, smithy_client_1._json)(input));
27
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
22
  };
29
23
  exports.se_AllocateConnectionOnInterconnectCommand = se_AllocateConnectionOnInterconnectCommand;
30
24
  const se_AllocateHostedConnectionCommand = async (input, context) => {
31
- const headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "OvertureService.AllocateHostedConnection",
34
- };
25
+ const headers = sharedHeaders("AllocateHostedConnection");
35
26
  let body;
36
- body = JSON.stringify(se_AllocateHostedConnectionRequest(input, context));
27
+ body = JSON.stringify((0, smithy_client_1._json)(input));
37
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
38
29
  };
39
30
  exports.se_AllocateHostedConnectionCommand = se_AllocateHostedConnectionCommand;
40
31
  const se_AllocatePrivateVirtualInterfaceCommand = async (input, context) => {
41
- const headers = {
42
- "content-type": "application/x-amz-json-1.1",
43
- "x-amz-target": "OvertureService.AllocatePrivateVirtualInterface",
44
- };
32
+ const headers = sharedHeaders("AllocatePrivateVirtualInterface");
45
33
  let body;
46
- body = JSON.stringify(se_AllocatePrivateVirtualInterfaceRequest(input, context));
34
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
36
  };
49
37
  exports.se_AllocatePrivateVirtualInterfaceCommand = se_AllocatePrivateVirtualInterfaceCommand;
50
38
  const se_AllocatePublicVirtualInterfaceCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "OvertureService.AllocatePublicVirtualInterface",
54
- };
39
+ const headers = sharedHeaders("AllocatePublicVirtualInterface");
55
40
  let body;
56
- body = JSON.stringify(se_AllocatePublicVirtualInterfaceRequest(input, context));
41
+ body = JSON.stringify((0, smithy_client_1._json)(input));
57
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
43
  };
59
44
  exports.se_AllocatePublicVirtualInterfaceCommand = se_AllocatePublicVirtualInterfaceCommand;
60
45
  const se_AllocateTransitVirtualInterfaceCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "OvertureService.AllocateTransitVirtualInterface",
64
- };
46
+ const headers = sharedHeaders("AllocateTransitVirtualInterface");
65
47
  let body;
66
- body = JSON.stringify(se_AllocateTransitVirtualInterfaceRequest(input, context));
48
+ body = JSON.stringify((0, smithy_client_1._json)(input));
67
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
50
  };
69
51
  exports.se_AllocateTransitVirtualInterfaceCommand = se_AllocateTransitVirtualInterfaceCommand;
70
52
  const se_AssociateConnectionWithLagCommand = async (input, context) => {
71
- const headers = {
72
- "content-type": "application/x-amz-json-1.1",
73
- "x-amz-target": "OvertureService.AssociateConnectionWithLag",
74
- };
53
+ const headers = sharedHeaders("AssociateConnectionWithLag");
75
54
  let body;
76
- body = JSON.stringify(se_AssociateConnectionWithLagRequest(input, context));
55
+ body = JSON.stringify((0, smithy_client_1._json)(input));
77
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
57
  };
79
58
  exports.se_AssociateConnectionWithLagCommand = se_AssociateConnectionWithLagCommand;
80
59
  const se_AssociateHostedConnectionCommand = async (input, context) => {
81
- const headers = {
82
- "content-type": "application/x-amz-json-1.1",
83
- "x-amz-target": "OvertureService.AssociateHostedConnection",
84
- };
60
+ const headers = sharedHeaders("AssociateHostedConnection");
85
61
  let body;
86
- body = JSON.stringify(se_AssociateHostedConnectionRequest(input, context));
62
+ body = JSON.stringify((0, smithy_client_1._json)(input));
87
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
64
  };
89
65
  exports.se_AssociateHostedConnectionCommand = se_AssociateHostedConnectionCommand;
90
66
  const se_AssociateMacSecKeyCommand = async (input, context) => {
91
- const headers = {
92
- "content-type": "application/x-amz-json-1.1",
93
- "x-amz-target": "OvertureService.AssociateMacSecKey",
94
- };
67
+ const headers = sharedHeaders("AssociateMacSecKey");
95
68
  let body;
96
- body = JSON.stringify(se_AssociateMacSecKeyRequest(input, context));
69
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
71
  };
99
72
  exports.se_AssociateMacSecKeyCommand = se_AssociateMacSecKeyCommand;
100
73
  const se_AssociateVirtualInterfaceCommand = async (input, context) => {
101
- const headers = {
102
- "content-type": "application/x-amz-json-1.1",
103
- "x-amz-target": "OvertureService.AssociateVirtualInterface",
104
- };
74
+ const headers = sharedHeaders("AssociateVirtualInterface");
105
75
  let body;
106
- body = JSON.stringify(se_AssociateVirtualInterfaceRequest(input, context));
76
+ body = JSON.stringify((0, smithy_client_1._json)(input));
107
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
78
  };
109
79
  exports.se_AssociateVirtualInterfaceCommand = se_AssociateVirtualInterfaceCommand;
110
80
  const se_ConfirmConnectionCommand = async (input, context) => {
111
- const headers = {
112
- "content-type": "application/x-amz-json-1.1",
113
- "x-amz-target": "OvertureService.ConfirmConnection",
114
- };
81
+ const headers = sharedHeaders("ConfirmConnection");
115
82
  let body;
116
- body = JSON.stringify(se_ConfirmConnectionRequest(input, context));
83
+ body = JSON.stringify((0, smithy_client_1._json)(input));
117
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
85
  };
119
86
  exports.se_ConfirmConnectionCommand = se_ConfirmConnectionCommand;
120
87
  const se_ConfirmCustomerAgreementCommand = async (input, context) => {
121
- const headers = {
122
- "content-type": "application/x-amz-json-1.1",
123
- "x-amz-target": "OvertureService.ConfirmCustomerAgreement",
124
- };
88
+ const headers = sharedHeaders("ConfirmCustomerAgreement");
125
89
  let body;
126
- body = JSON.stringify(se_ConfirmCustomerAgreementRequest(input, context));
90
+ body = JSON.stringify((0, smithy_client_1._json)(input));
127
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
92
  };
129
93
  exports.se_ConfirmCustomerAgreementCommand = se_ConfirmCustomerAgreementCommand;
130
94
  const se_ConfirmPrivateVirtualInterfaceCommand = async (input, context) => {
131
- const headers = {
132
- "content-type": "application/x-amz-json-1.1",
133
- "x-amz-target": "OvertureService.ConfirmPrivateVirtualInterface",
134
- };
95
+ const headers = sharedHeaders("ConfirmPrivateVirtualInterface");
135
96
  let body;
136
- body = JSON.stringify(se_ConfirmPrivateVirtualInterfaceRequest(input, context));
97
+ body = JSON.stringify((0, smithy_client_1._json)(input));
137
98
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
99
  };
139
100
  exports.se_ConfirmPrivateVirtualInterfaceCommand = se_ConfirmPrivateVirtualInterfaceCommand;
140
101
  const se_ConfirmPublicVirtualInterfaceCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "OvertureService.ConfirmPublicVirtualInterface",
144
- };
102
+ const headers = sharedHeaders("ConfirmPublicVirtualInterface");
145
103
  let body;
146
- body = JSON.stringify(se_ConfirmPublicVirtualInterfaceRequest(input, context));
104
+ body = JSON.stringify((0, smithy_client_1._json)(input));
147
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
106
  };
149
107
  exports.se_ConfirmPublicVirtualInterfaceCommand = se_ConfirmPublicVirtualInterfaceCommand;
150
108
  const se_ConfirmTransitVirtualInterfaceCommand = async (input, context) => {
151
- const headers = {
152
- "content-type": "application/x-amz-json-1.1",
153
- "x-amz-target": "OvertureService.ConfirmTransitVirtualInterface",
154
- };
109
+ const headers = sharedHeaders("ConfirmTransitVirtualInterface");
155
110
  let body;
156
- body = JSON.stringify(se_ConfirmTransitVirtualInterfaceRequest(input, context));
111
+ body = JSON.stringify((0, smithy_client_1._json)(input));
157
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
158
113
  };
159
114
  exports.se_ConfirmTransitVirtualInterfaceCommand = se_ConfirmTransitVirtualInterfaceCommand;
160
115
  const se_CreateBGPPeerCommand = async (input, context) => {
161
- const headers = {
162
- "content-type": "application/x-amz-json-1.1",
163
- "x-amz-target": "OvertureService.CreateBGPPeer",
164
- };
116
+ const headers = sharedHeaders("CreateBGPPeer");
165
117
  let body;
166
- body = JSON.stringify(se_CreateBGPPeerRequest(input, context));
118
+ body = JSON.stringify((0, smithy_client_1._json)(input));
167
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
120
  };
169
121
  exports.se_CreateBGPPeerCommand = se_CreateBGPPeerCommand;
170
122
  const se_CreateConnectionCommand = async (input, context) => {
171
- const headers = {
172
- "content-type": "application/x-amz-json-1.1",
173
- "x-amz-target": "OvertureService.CreateConnection",
174
- };
123
+ const headers = sharedHeaders("CreateConnection");
175
124
  let body;
176
- body = JSON.stringify(se_CreateConnectionRequest(input, context));
125
+ body = JSON.stringify((0, smithy_client_1._json)(input));
177
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
178
127
  };
179
128
  exports.se_CreateConnectionCommand = se_CreateConnectionCommand;
180
129
  const se_CreateDirectConnectGatewayCommand = async (input, context) => {
181
- const headers = {
182
- "content-type": "application/x-amz-json-1.1",
183
- "x-amz-target": "OvertureService.CreateDirectConnectGateway",
184
- };
130
+ const headers = sharedHeaders("CreateDirectConnectGateway");
185
131
  let body;
186
- body = JSON.stringify(se_CreateDirectConnectGatewayRequest(input, context));
132
+ body = JSON.stringify((0, smithy_client_1._json)(input));
187
133
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
188
134
  };
189
135
  exports.se_CreateDirectConnectGatewayCommand = se_CreateDirectConnectGatewayCommand;
190
136
  const se_CreateDirectConnectGatewayAssociationCommand = async (input, context) => {
191
- const headers = {
192
- "content-type": "application/x-amz-json-1.1",
193
- "x-amz-target": "OvertureService.CreateDirectConnectGatewayAssociation",
194
- };
137
+ const headers = sharedHeaders("CreateDirectConnectGatewayAssociation");
195
138
  let body;
196
- body = JSON.stringify(se_CreateDirectConnectGatewayAssociationRequest(input, context));
139
+ body = JSON.stringify((0, smithy_client_1._json)(input));
197
140
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
141
  };
199
142
  exports.se_CreateDirectConnectGatewayAssociationCommand = se_CreateDirectConnectGatewayAssociationCommand;
200
143
  const se_CreateDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
201
- const headers = {
202
- "content-type": "application/x-amz-json-1.1",
203
- "x-amz-target": "OvertureService.CreateDirectConnectGatewayAssociationProposal",
204
- };
144
+ const headers = sharedHeaders("CreateDirectConnectGatewayAssociationProposal");
205
145
  let body;
206
- body = JSON.stringify(se_CreateDirectConnectGatewayAssociationProposalRequest(input, context));
146
+ body = JSON.stringify((0, smithy_client_1._json)(input));
207
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
208
148
  };
209
149
  exports.se_CreateDirectConnectGatewayAssociationProposalCommand = se_CreateDirectConnectGatewayAssociationProposalCommand;
210
150
  const se_CreateInterconnectCommand = async (input, context) => {
211
- const headers = {
212
- "content-type": "application/x-amz-json-1.1",
213
- "x-amz-target": "OvertureService.CreateInterconnect",
214
- };
151
+ const headers = sharedHeaders("CreateInterconnect");
215
152
  let body;
216
- body = JSON.stringify(se_CreateInterconnectRequest(input, context));
153
+ body = JSON.stringify((0, smithy_client_1._json)(input));
217
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
155
  };
219
156
  exports.se_CreateInterconnectCommand = se_CreateInterconnectCommand;
220
157
  const se_CreateLagCommand = async (input, context) => {
221
- const headers = {
222
- "content-type": "application/x-amz-json-1.1",
223
- "x-amz-target": "OvertureService.CreateLag",
224
- };
158
+ const headers = sharedHeaders("CreateLag");
225
159
  let body;
226
- body = JSON.stringify(se_CreateLagRequest(input, context));
160
+ body = JSON.stringify((0, smithy_client_1._json)(input));
227
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
162
  };
229
163
  exports.se_CreateLagCommand = se_CreateLagCommand;
230
164
  const se_CreatePrivateVirtualInterfaceCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "OvertureService.CreatePrivateVirtualInterface",
234
- };
165
+ const headers = sharedHeaders("CreatePrivateVirtualInterface");
235
166
  let body;
236
- body = JSON.stringify(se_CreatePrivateVirtualInterfaceRequest(input, context));
167
+ body = JSON.stringify((0, smithy_client_1._json)(input));
237
168
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
169
  };
239
170
  exports.se_CreatePrivateVirtualInterfaceCommand = se_CreatePrivateVirtualInterfaceCommand;
240
171
  const se_CreatePublicVirtualInterfaceCommand = async (input, context) => {
241
- const headers = {
242
- "content-type": "application/x-amz-json-1.1",
243
- "x-amz-target": "OvertureService.CreatePublicVirtualInterface",
244
- };
172
+ const headers = sharedHeaders("CreatePublicVirtualInterface");
245
173
  let body;
246
- body = JSON.stringify(se_CreatePublicVirtualInterfaceRequest(input, context));
174
+ body = JSON.stringify((0, smithy_client_1._json)(input));
247
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
176
  };
249
177
  exports.se_CreatePublicVirtualInterfaceCommand = se_CreatePublicVirtualInterfaceCommand;
250
178
  const se_CreateTransitVirtualInterfaceCommand = async (input, context) => {
251
- const headers = {
252
- "content-type": "application/x-amz-json-1.1",
253
- "x-amz-target": "OvertureService.CreateTransitVirtualInterface",
254
- };
179
+ const headers = sharedHeaders("CreateTransitVirtualInterface");
255
180
  let body;
256
- body = JSON.stringify(se_CreateTransitVirtualInterfaceRequest(input, context));
181
+ body = JSON.stringify((0, smithy_client_1._json)(input));
257
182
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
258
183
  };
259
184
  exports.se_CreateTransitVirtualInterfaceCommand = se_CreateTransitVirtualInterfaceCommand;
260
185
  const se_DeleteBGPPeerCommand = async (input, context) => {
261
- const headers = {
262
- "content-type": "application/x-amz-json-1.1",
263
- "x-amz-target": "OvertureService.DeleteBGPPeer",
264
- };
186
+ const headers = sharedHeaders("DeleteBGPPeer");
265
187
  let body;
266
- body = JSON.stringify(se_DeleteBGPPeerRequest(input, context));
188
+ body = JSON.stringify((0, smithy_client_1._json)(input));
267
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
268
190
  };
269
191
  exports.se_DeleteBGPPeerCommand = se_DeleteBGPPeerCommand;
270
192
  const se_DeleteConnectionCommand = async (input, context) => {
271
- const headers = {
272
- "content-type": "application/x-amz-json-1.1",
273
- "x-amz-target": "OvertureService.DeleteConnection",
274
- };
193
+ const headers = sharedHeaders("DeleteConnection");
275
194
  let body;
276
- body = JSON.stringify(se_DeleteConnectionRequest(input, context));
195
+ body = JSON.stringify((0, smithy_client_1._json)(input));
277
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
278
197
  };
279
198
  exports.se_DeleteConnectionCommand = se_DeleteConnectionCommand;
280
199
  const se_DeleteDirectConnectGatewayCommand = async (input, context) => {
281
- const headers = {
282
- "content-type": "application/x-amz-json-1.1",
283
- "x-amz-target": "OvertureService.DeleteDirectConnectGateway",
284
- };
200
+ const headers = sharedHeaders("DeleteDirectConnectGateway");
285
201
  let body;
286
- body = JSON.stringify(se_DeleteDirectConnectGatewayRequest(input, context));
202
+ body = JSON.stringify((0, smithy_client_1._json)(input));
287
203
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
288
204
  };
289
205
  exports.se_DeleteDirectConnectGatewayCommand = se_DeleteDirectConnectGatewayCommand;
290
206
  const se_DeleteDirectConnectGatewayAssociationCommand = async (input, context) => {
291
- const headers = {
292
- "content-type": "application/x-amz-json-1.1",
293
- "x-amz-target": "OvertureService.DeleteDirectConnectGatewayAssociation",
294
- };
207
+ const headers = sharedHeaders("DeleteDirectConnectGatewayAssociation");
295
208
  let body;
296
- body = JSON.stringify(se_DeleteDirectConnectGatewayAssociationRequest(input, context));
209
+ body = JSON.stringify((0, smithy_client_1._json)(input));
297
210
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
298
211
  };
299
212
  exports.se_DeleteDirectConnectGatewayAssociationCommand = se_DeleteDirectConnectGatewayAssociationCommand;
300
213
  const se_DeleteDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
301
- const headers = {
302
- "content-type": "application/x-amz-json-1.1",
303
- "x-amz-target": "OvertureService.DeleteDirectConnectGatewayAssociationProposal",
304
- };
214
+ const headers = sharedHeaders("DeleteDirectConnectGatewayAssociationProposal");
305
215
  let body;
306
- body = JSON.stringify(se_DeleteDirectConnectGatewayAssociationProposalRequest(input, context));
216
+ body = JSON.stringify((0, smithy_client_1._json)(input));
307
217
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
218
  };
309
219
  exports.se_DeleteDirectConnectGatewayAssociationProposalCommand = se_DeleteDirectConnectGatewayAssociationProposalCommand;
310
220
  const se_DeleteInterconnectCommand = async (input, context) => {
311
- const headers = {
312
- "content-type": "application/x-amz-json-1.1",
313
- "x-amz-target": "OvertureService.DeleteInterconnect",
314
- };
221
+ const headers = sharedHeaders("DeleteInterconnect");
315
222
  let body;
316
- body = JSON.stringify(se_DeleteInterconnectRequest(input, context));
223
+ body = JSON.stringify((0, smithy_client_1._json)(input));
317
224
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
318
225
  };
319
226
  exports.se_DeleteInterconnectCommand = se_DeleteInterconnectCommand;
320
227
  const se_DeleteLagCommand = async (input, context) => {
321
- const headers = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "OvertureService.DeleteLag",
324
- };
228
+ const headers = sharedHeaders("DeleteLag");
325
229
  let body;
326
- body = JSON.stringify(se_DeleteLagRequest(input, context));
230
+ body = JSON.stringify((0, smithy_client_1._json)(input));
327
231
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
232
  };
329
233
  exports.se_DeleteLagCommand = se_DeleteLagCommand;
330
234
  const se_DeleteVirtualInterfaceCommand = async (input, context) => {
331
- const headers = {
332
- "content-type": "application/x-amz-json-1.1",
333
- "x-amz-target": "OvertureService.DeleteVirtualInterface",
334
- };
235
+ const headers = sharedHeaders("DeleteVirtualInterface");
335
236
  let body;
336
- body = JSON.stringify(se_DeleteVirtualInterfaceRequest(input, context));
237
+ body = JSON.stringify((0, smithy_client_1._json)(input));
337
238
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
338
239
  };
339
240
  exports.se_DeleteVirtualInterfaceCommand = se_DeleteVirtualInterfaceCommand;
340
241
  const se_DescribeConnectionLoaCommand = async (input, context) => {
341
- const headers = {
342
- "content-type": "application/x-amz-json-1.1",
343
- "x-amz-target": "OvertureService.DescribeConnectionLoa",
344
- };
242
+ const headers = sharedHeaders("DescribeConnectionLoa");
345
243
  let body;
346
- body = JSON.stringify(se_DescribeConnectionLoaRequest(input, context));
244
+ body = JSON.stringify((0, smithy_client_1._json)(input));
347
245
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
348
246
  };
349
247
  exports.se_DescribeConnectionLoaCommand = se_DescribeConnectionLoaCommand;
350
248
  const se_DescribeConnectionsCommand = async (input, context) => {
351
- const headers = {
352
- "content-type": "application/x-amz-json-1.1",
353
- "x-amz-target": "OvertureService.DescribeConnections",
354
- };
249
+ const headers = sharedHeaders("DescribeConnections");
355
250
  let body;
356
- body = JSON.stringify(se_DescribeConnectionsRequest(input, context));
251
+ body = JSON.stringify((0, smithy_client_1._json)(input));
357
252
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
358
253
  };
359
254
  exports.se_DescribeConnectionsCommand = se_DescribeConnectionsCommand;
360
255
  const se_DescribeConnectionsOnInterconnectCommand = async (input, context) => {
361
- const headers = {
362
- "content-type": "application/x-amz-json-1.1",
363
- "x-amz-target": "OvertureService.DescribeConnectionsOnInterconnect",
364
- };
256
+ const headers = sharedHeaders("DescribeConnectionsOnInterconnect");
365
257
  let body;
366
- body = JSON.stringify(se_DescribeConnectionsOnInterconnectRequest(input, context));
258
+ body = JSON.stringify((0, smithy_client_1._json)(input));
367
259
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
368
260
  };
369
261
  exports.se_DescribeConnectionsOnInterconnectCommand = se_DescribeConnectionsOnInterconnectCommand;
370
262
  const se_DescribeCustomerMetadataCommand = async (input, context) => {
371
- const headers = {
372
- "content-type": "application/x-amz-json-1.1",
373
- "x-amz-target": "OvertureService.DescribeCustomerMetadata",
374
- };
263
+ const headers = sharedHeaders("DescribeCustomerMetadata");
375
264
  const body = "{}";
376
265
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
377
266
  };
378
267
  exports.se_DescribeCustomerMetadataCommand = se_DescribeCustomerMetadataCommand;
379
268
  const se_DescribeDirectConnectGatewayAssociationProposalsCommand = async (input, context) => {
380
- const headers = {
381
- "content-type": "application/x-amz-json-1.1",
382
- "x-amz-target": "OvertureService.DescribeDirectConnectGatewayAssociationProposals",
383
- };
269
+ const headers = sharedHeaders("DescribeDirectConnectGatewayAssociationProposals");
384
270
  let body;
385
- body = JSON.stringify(se_DescribeDirectConnectGatewayAssociationProposalsRequest(input, context));
271
+ body = JSON.stringify((0, smithy_client_1._json)(input));
386
272
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
387
273
  };
388
274
  exports.se_DescribeDirectConnectGatewayAssociationProposalsCommand = se_DescribeDirectConnectGatewayAssociationProposalsCommand;
389
275
  const se_DescribeDirectConnectGatewayAssociationsCommand = async (input, context) => {
390
- const headers = {
391
- "content-type": "application/x-amz-json-1.1",
392
- "x-amz-target": "OvertureService.DescribeDirectConnectGatewayAssociations",
393
- };
276
+ const headers = sharedHeaders("DescribeDirectConnectGatewayAssociations");
394
277
  let body;
395
- body = JSON.stringify(se_DescribeDirectConnectGatewayAssociationsRequest(input, context));
278
+ body = JSON.stringify((0, smithy_client_1._json)(input));
396
279
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
397
280
  };
398
281
  exports.se_DescribeDirectConnectGatewayAssociationsCommand = se_DescribeDirectConnectGatewayAssociationsCommand;
399
282
  const se_DescribeDirectConnectGatewayAttachmentsCommand = async (input, context) => {
400
- const headers = {
401
- "content-type": "application/x-amz-json-1.1",
402
- "x-amz-target": "OvertureService.DescribeDirectConnectGatewayAttachments",
403
- };
283
+ const headers = sharedHeaders("DescribeDirectConnectGatewayAttachments");
404
284
  let body;
405
- body = JSON.stringify(se_DescribeDirectConnectGatewayAttachmentsRequest(input, context));
285
+ body = JSON.stringify((0, smithy_client_1._json)(input));
406
286
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
407
287
  };
408
288
  exports.se_DescribeDirectConnectGatewayAttachmentsCommand = se_DescribeDirectConnectGatewayAttachmentsCommand;
409
289
  const se_DescribeDirectConnectGatewaysCommand = async (input, context) => {
410
- const headers = {
411
- "content-type": "application/x-amz-json-1.1",
412
- "x-amz-target": "OvertureService.DescribeDirectConnectGateways",
413
- };
290
+ const headers = sharedHeaders("DescribeDirectConnectGateways");
414
291
  let body;
415
- body = JSON.stringify(se_DescribeDirectConnectGatewaysRequest(input, context));
292
+ body = JSON.stringify((0, smithy_client_1._json)(input));
416
293
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
417
294
  };
418
295
  exports.se_DescribeDirectConnectGatewaysCommand = se_DescribeDirectConnectGatewaysCommand;
419
296
  const se_DescribeHostedConnectionsCommand = async (input, context) => {
420
- const headers = {
421
- "content-type": "application/x-amz-json-1.1",
422
- "x-amz-target": "OvertureService.DescribeHostedConnections",
423
- };
297
+ const headers = sharedHeaders("DescribeHostedConnections");
424
298
  let body;
425
- body = JSON.stringify(se_DescribeHostedConnectionsRequest(input, context));
299
+ body = JSON.stringify((0, smithy_client_1._json)(input));
426
300
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
301
  };
428
302
  exports.se_DescribeHostedConnectionsCommand = se_DescribeHostedConnectionsCommand;
429
303
  const se_DescribeInterconnectLoaCommand = async (input, context) => {
430
- const headers = {
431
- "content-type": "application/x-amz-json-1.1",
432
- "x-amz-target": "OvertureService.DescribeInterconnectLoa",
433
- };
304
+ const headers = sharedHeaders("DescribeInterconnectLoa");
434
305
  let body;
435
- body = JSON.stringify(se_DescribeInterconnectLoaRequest(input, context));
306
+ body = JSON.stringify((0, smithy_client_1._json)(input));
436
307
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
437
308
  };
438
309
  exports.se_DescribeInterconnectLoaCommand = se_DescribeInterconnectLoaCommand;
439
310
  const se_DescribeInterconnectsCommand = async (input, context) => {
440
- const headers = {
441
- "content-type": "application/x-amz-json-1.1",
442
- "x-amz-target": "OvertureService.DescribeInterconnects",
443
- };
311
+ const headers = sharedHeaders("DescribeInterconnects");
444
312
  let body;
445
- body = JSON.stringify(se_DescribeInterconnectsRequest(input, context));
313
+ body = JSON.stringify((0, smithy_client_1._json)(input));
446
314
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
447
315
  };
448
316
  exports.se_DescribeInterconnectsCommand = se_DescribeInterconnectsCommand;
449
317
  const se_DescribeLagsCommand = async (input, context) => {
450
- const headers = {
451
- "content-type": "application/x-amz-json-1.1",
452
- "x-amz-target": "OvertureService.DescribeLags",
453
- };
318
+ const headers = sharedHeaders("DescribeLags");
454
319
  let body;
455
- body = JSON.stringify(se_DescribeLagsRequest(input, context));
320
+ body = JSON.stringify((0, smithy_client_1._json)(input));
456
321
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
457
322
  };
458
323
  exports.se_DescribeLagsCommand = se_DescribeLagsCommand;
459
324
  const se_DescribeLoaCommand = async (input, context) => {
460
- const headers = {
461
- "content-type": "application/x-amz-json-1.1",
462
- "x-amz-target": "OvertureService.DescribeLoa",
463
- };
325
+ const headers = sharedHeaders("DescribeLoa");
464
326
  let body;
465
- body = JSON.stringify(se_DescribeLoaRequest(input, context));
327
+ body = JSON.stringify((0, smithy_client_1._json)(input));
466
328
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
467
329
  };
468
330
  exports.se_DescribeLoaCommand = se_DescribeLoaCommand;
469
331
  const se_DescribeLocationsCommand = async (input, context) => {
470
- const headers = {
471
- "content-type": "application/x-amz-json-1.1",
472
- "x-amz-target": "OvertureService.DescribeLocations",
473
- };
332
+ const headers = sharedHeaders("DescribeLocations");
474
333
  const body = "{}";
475
334
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
476
335
  };
477
336
  exports.se_DescribeLocationsCommand = se_DescribeLocationsCommand;
478
337
  const se_DescribeRouterConfigurationCommand = async (input, context) => {
479
- const headers = {
480
- "content-type": "application/x-amz-json-1.1",
481
- "x-amz-target": "OvertureService.DescribeRouterConfiguration",
482
- };
338
+ const headers = sharedHeaders("DescribeRouterConfiguration");
483
339
  let body;
484
- body = JSON.stringify(se_DescribeRouterConfigurationRequest(input, context));
340
+ body = JSON.stringify((0, smithy_client_1._json)(input));
485
341
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
486
342
  };
487
343
  exports.se_DescribeRouterConfigurationCommand = se_DescribeRouterConfigurationCommand;
488
344
  const se_DescribeTagsCommand = async (input, context) => {
489
- const headers = {
490
- "content-type": "application/x-amz-json-1.1",
491
- "x-amz-target": "OvertureService.DescribeTags",
492
- };
345
+ const headers = sharedHeaders("DescribeTags");
493
346
  let body;
494
- body = JSON.stringify(se_DescribeTagsRequest(input, context));
347
+ body = JSON.stringify((0, smithy_client_1._json)(input));
495
348
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
496
349
  };
497
350
  exports.se_DescribeTagsCommand = se_DescribeTagsCommand;
498
351
  const se_DescribeVirtualGatewaysCommand = async (input, context) => {
499
- const headers = {
500
- "content-type": "application/x-amz-json-1.1",
501
- "x-amz-target": "OvertureService.DescribeVirtualGateways",
502
- };
352
+ const headers = sharedHeaders("DescribeVirtualGateways");
503
353
  const body = "{}";
504
354
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
505
355
  };
506
356
  exports.se_DescribeVirtualGatewaysCommand = se_DescribeVirtualGatewaysCommand;
507
357
  const se_DescribeVirtualInterfacesCommand = async (input, context) => {
508
- const headers = {
509
- "content-type": "application/x-amz-json-1.1",
510
- "x-amz-target": "OvertureService.DescribeVirtualInterfaces",
511
- };
358
+ const headers = sharedHeaders("DescribeVirtualInterfaces");
512
359
  let body;
513
- body = JSON.stringify(se_DescribeVirtualInterfacesRequest(input, context));
360
+ body = JSON.stringify((0, smithy_client_1._json)(input));
514
361
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
515
362
  };
516
363
  exports.se_DescribeVirtualInterfacesCommand = se_DescribeVirtualInterfacesCommand;
517
364
  const se_DisassociateConnectionFromLagCommand = async (input, context) => {
518
- const headers = {
519
- "content-type": "application/x-amz-json-1.1",
520
- "x-amz-target": "OvertureService.DisassociateConnectionFromLag",
521
- };
365
+ const headers = sharedHeaders("DisassociateConnectionFromLag");
522
366
  let body;
523
- body = JSON.stringify(se_DisassociateConnectionFromLagRequest(input, context));
367
+ body = JSON.stringify((0, smithy_client_1._json)(input));
524
368
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
525
369
  };
526
370
  exports.se_DisassociateConnectionFromLagCommand = se_DisassociateConnectionFromLagCommand;
527
371
  const se_DisassociateMacSecKeyCommand = async (input, context) => {
528
- const headers = {
529
- "content-type": "application/x-amz-json-1.1",
530
- "x-amz-target": "OvertureService.DisassociateMacSecKey",
531
- };
372
+ const headers = sharedHeaders("DisassociateMacSecKey");
532
373
  let body;
533
- body = JSON.stringify(se_DisassociateMacSecKeyRequest(input, context));
374
+ body = JSON.stringify((0, smithy_client_1._json)(input));
534
375
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
535
376
  };
536
377
  exports.se_DisassociateMacSecKeyCommand = se_DisassociateMacSecKeyCommand;
537
378
  const se_ListVirtualInterfaceTestHistoryCommand = async (input, context) => {
538
- const headers = {
539
- "content-type": "application/x-amz-json-1.1",
540
- "x-amz-target": "OvertureService.ListVirtualInterfaceTestHistory",
541
- };
379
+ const headers = sharedHeaders("ListVirtualInterfaceTestHistory");
542
380
  let body;
543
- body = JSON.stringify(se_ListVirtualInterfaceTestHistoryRequest(input, context));
381
+ body = JSON.stringify((0, smithy_client_1._json)(input));
544
382
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
545
383
  };
546
384
  exports.se_ListVirtualInterfaceTestHistoryCommand = se_ListVirtualInterfaceTestHistoryCommand;
547
385
  const se_StartBgpFailoverTestCommand = async (input, context) => {
548
- const headers = {
549
- "content-type": "application/x-amz-json-1.1",
550
- "x-amz-target": "OvertureService.StartBgpFailoverTest",
551
- };
386
+ const headers = sharedHeaders("StartBgpFailoverTest");
552
387
  let body;
553
- body = JSON.stringify(se_StartBgpFailoverTestRequest(input, context));
388
+ body = JSON.stringify((0, smithy_client_1._json)(input));
554
389
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
555
390
  };
556
391
  exports.se_StartBgpFailoverTestCommand = se_StartBgpFailoverTestCommand;
557
392
  const se_StopBgpFailoverTestCommand = async (input, context) => {
558
- const headers = {
559
- "content-type": "application/x-amz-json-1.1",
560
- "x-amz-target": "OvertureService.StopBgpFailoverTest",
561
- };
393
+ const headers = sharedHeaders("StopBgpFailoverTest");
562
394
  let body;
563
- body = JSON.stringify(se_StopBgpFailoverTestRequest(input, context));
395
+ body = JSON.stringify((0, smithy_client_1._json)(input));
564
396
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
565
397
  };
566
398
  exports.se_StopBgpFailoverTestCommand = se_StopBgpFailoverTestCommand;
567
399
  const se_TagResourceCommand = async (input, context) => {
568
- const headers = {
569
- "content-type": "application/x-amz-json-1.1",
570
- "x-amz-target": "OvertureService.TagResource",
571
- };
400
+ const headers = sharedHeaders("TagResource");
572
401
  let body;
573
- body = JSON.stringify(se_TagResourceRequest(input, context));
402
+ body = JSON.stringify((0, smithy_client_1._json)(input));
574
403
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
575
404
  };
576
405
  exports.se_TagResourceCommand = se_TagResourceCommand;
577
406
  const se_UntagResourceCommand = async (input, context) => {
578
- const headers = {
579
- "content-type": "application/x-amz-json-1.1",
580
- "x-amz-target": "OvertureService.UntagResource",
581
- };
407
+ const headers = sharedHeaders("UntagResource");
582
408
  let body;
583
- body = JSON.stringify(se_UntagResourceRequest(input, context));
409
+ body = JSON.stringify((0, smithy_client_1._json)(input));
584
410
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
585
411
  };
586
412
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
587
413
  const se_UpdateConnectionCommand = async (input, context) => {
588
- const headers = {
589
- "content-type": "application/x-amz-json-1.1",
590
- "x-amz-target": "OvertureService.UpdateConnection",
591
- };
414
+ const headers = sharedHeaders("UpdateConnection");
592
415
  let body;
593
- body = JSON.stringify(se_UpdateConnectionRequest(input, context));
416
+ body = JSON.stringify((0, smithy_client_1._json)(input));
594
417
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
595
418
  };
596
419
  exports.se_UpdateConnectionCommand = se_UpdateConnectionCommand;
597
420
  const se_UpdateDirectConnectGatewayCommand = async (input, context) => {
598
- const headers = {
599
- "content-type": "application/x-amz-json-1.1",
600
- "x-amz-target": "OvertureService.UpdateDirectConnectGateway",
601
- };
421
+ const headers = sharedHeaders("UpdateDirectConnectGateway");
602
422
  let body;
603
- body = JSON.stringify(se_UpdateDirectConnectGatewayRequest(input, context));
423
+ body = JSON.stringify((0, smithy_client_1._json)(input));
604
424
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
605
425
  };
606
426
  exports.se_UpdateDirectConnectGatewayCommand = se_UpdateDirectConnectGatewayCommand;
607
427
  const se_UpdateDirectConnectGatewayAssociationCommand = async (input, context) => {
608
- const headers = {
609
- "content-type": "application/x-amz-json-1.1",
610
- "x-amz-target": "OvertureService.UpdateDirectConnectGatewayAssociation",
611
- };
428
+ const headers = sharedHeaders("UpdateDirectConnectGatewayAssociation");
612
429
  let body;
613
- body = JSON.stringify(se_UpdateDirectConnectGatewayAssociationRequest(input, context));
430
+ body = JSON.stringify((0, smithy_client_1._json)(input));
614
431
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
615
432
  };
616
433
  exports.se_UpdateDirectConnectGatewayAssociationCommand = se_UpdateDirectConnectGatewayAssociationCommand;
617
434
  const se_UpdateLagCommand = async (input, context) => {
618
- const headers = {
619
- "content-type": "application/x-amz-json-1.1",
620
- "x-amz-target": "OvertureService.UpdateLag",
621
- };
435
+ const headers = sharedHeaders("UpdateLag");
622
436
  let body;
623
- body = JSON.stringify(se_UpdateLagRequest(input, context));
437
+ body = JSON.stringify((0, smithy_client_1._json)(input));
624
438
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
625
439
  };
626
440
  exports.se_UpdateLagCommand = se_UpdateLagCommand;
627
441
  const se_UpdateVirtualInterfaceAttributesCommand = async (input, context) => {
628
- const headers = {
629
- "content-type": "application/x-amz-json-1.1",
630
- "x-amz-target": "OvertureService.UpdateVirtualInterfaceAttributes",
631
- };
442
+ const headers = sharedHeaders("UpdateVirtualInterfaceAttributes");
632
443
  let body;
633
- body = JSON.stringify(se_UpdateVirtualInterfaceAttributesRequest(input, context));
444
+ body = JSON.stringify((0, smithy_client_1._json)(input));
634
445
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
635
446
  };
636
447
  exports.se_UpdateVirtualInterfaceAttributesCommand = se_UpdateVirtualInterfaceAttributesCommand;
@@ -640,12 +451,12 @@ const de_AcceptDirectConnectGatewayAssociationProposalCommand = async (output, c
640
451
  }
641
452
  const data = await parseBody(output.body, context);
642
453
  let contents = {};
643
- contents = de_AcceptDirectConnectGatewayAssociationProposalResult(data, context);
454
+ contents = (0, smithy_client_1._json)(data);
644
455
  const response = {
645
456
  $metadata: deserializeMetadata(output),
646
457
  ...contents,
647
458
  };
648
- return Promise.resolve(response);
459
+ return response;
649
460
  };
650
461
  exports.de_AcceptDirectConnectGatewayAssociationProposalCommand = de_AcceptDirectConnectGatewayAssociationProposalCommand;
651
462
  const de_AcceptDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
@@ -663,10 +474,9 @@ const de_AcceptDirectConnectGatewayAssociationProposalCommandError = async (outp
663
474
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
664
475
  default:
665
476
  const parsedBody = parsedOutput.body;
666
- (0, smithy_client_1.throwDefaultError)({
477
+ return throwDefaultError({
667
478
  output,
668
479
  parsedBody,
669
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
670
480
  errorCode,
671
481
  });
672
482
  }
@@ -682,7 +492,7 @@ const de_AllocateConnectionOnInterconnectCommand = async (output, context) => {
682
492
  $metadata: deserializeMetadata(output),
683
493
  ...contents,
684
494
  };
685
- return Promise.resolve(response);
495
+ return response;
686
496
  };
687
497
  exports.de_AllocateConnectionOnInterconnectCommand = de_AllocateConnectionOnInterconnectCommand;
688
498
  const de_AllocateConnectionOnInterconnectCommandError = async (output, context) => {
@@ -700,10 +510,9 @@ const de_AllocateConnectionOnInterconnectCommandError = async (output, context)
700
510
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
701
511
  default:
702
512
  const parsedBody = parsedOutput.body;
703
- (0, smithy_client_1.throwDefaultError)({
513
+ return throwDefaultError({
704
514
  output,
705
515
  parsedBody,
706
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
707
516
  errorCode,
708
517
  });
709
518
  }
@@ -719,7 +528,7 @@ const de_AllocateHostedConnectionCommand = async (output, context) => {
719
528
  $metadata: deserializeMetadata(output),
720
529
  ...contents,
721
530
  };
722
- return Promise.resolve(response);
531
+ return response;
723
532
  };
724
533
  exports.de_AllocateHostedConnectionCommand = de_AllocateHostedConnectionCommand;
725
534
  const de_AllocateHostedConnectionCommandError = async (output, context) => {
@@ -743,10 +552,9 @@ const de_AllocateHostedConnectionCommandError = async (output, context) => {
743
552
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
744
553
  default:
745
554
  const parsedBody = parsedOutput.body;
746
- (0, smithy_client_1.throwDefaultError)({
555
+ return throwDefaultError({
747
556
  output,
748
557
  parsedBody,
749
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
750
558
  errorCode,
751
559
  });
752
560
  }
@@ -757,12 +565,12 @@ const de_AllocatePrivateVirtualInterfaceCommand = async (output, context) => {
757
565
  }
758
566
  const data = await parseBody(output.body, context);
759
567
  let contents = {};
760
- contents = de_VirtualInterface(data, context);
568
+ contents = (0, smithy_client_1._json)(data);
761
569
  const response = {
762
570
  $metadata: deserializeMetadata(output),
763
571
  ...contents,
764
572
  };
765
- return Promise.resolve(response);
573
+ return response;
766
574
  };
767
575
  exports.de_AllocatePrivateVirtualInterfaceCommand = de_AllocatePrivateVirtualInterfaceCommand;
768
576
  const de_AllocatePrivateVirtualInterfaceCommandError = async (output, context) => {
@@ -786,10 +594,9 @@ const de_AllocatePrivateVirtualInterfaceCommandError = async (output, context) =
786
594
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
787
595
  default:
788
596
  const parsedBody = parsedOutput.body;
789
- (0, smithy_client_1.throwDefaultError)({
597
+ return throwDefaultError({
790
598
  output,
791
599
  parsedBody,
792
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
793
600
  errorCode,
794
601
  });
795
602
  }
@@ -800,12 +607,12 @@ const de_AllocatePublicVirtualInterfaceCommand = async (output, context) => {
800
607
  }
801
608
  const data = await parseBody(output.body, context);
802
609
  let contents = {};
803
- contents = de_VirtualInterface(data, context);
610
+ contents = (0, smithy_client_1._json)(data);
804
611
  const response = {
805
612
  $metadata: deserializeMetadata(output),
806
613
  ...contents,
807
614
  };
808
- return Promise.resolve(response);
615
+ return response;
809
616
  };
810
617
  exports.de_AllocatePublicVirtualInterfaceCommand = de_AllocatePublicVirtualInterfaceCommand;
811
618
  const de_AllocatePublicVirtualInterfaceCommandError = async (output, context) => {
@@ -829,10 +636,9 @@ const de_AllocatePublicVirtualInterfaceCommandError = async (output, context) =>
829
636
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
830
637
  default:
831
638
  const parsedBody = parsedOutput.body;
832
- (0, smithy_client_1.throwDefaultError)({
639
+ return throwDefaultError({
833
640
  output,
834
641
  parsedBody,
835
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
836
642
  errorCode,
837
643
  });
838
644
  }
@@ -843,12 +649,12 @@ const de_AllocateTransitVirtualInterfaceCommand = async (output, context) => {
843
649
  }
844
650
  const data = await parseBody(output.body, context);
845
651
  let contents = {};
846
- contents = de_AllocateTransitVirtualInterfaceResult(data, context);
652
+ contents = (0, smithy_client_1._json)(data);
847
653
  const response = {
848
654
  $metadata: deserializeMetadata(output),
849
655
  ...contents,
850
656
  };
851
- return Promise.resolve(response);
657
+ return response;
852
658
  };
853
659
  exports.de_AllocateTransitVirtualInterfaceCommand = de_AllocateTransitVirtualInterfaceCommand;
854
660
  const de_AllocateTransitVirtualInterfaceCommandError = async (output, context) => {
@@ -872,10 +678,9 @@ const de_AllocateTransitVirtualInterfaceCommandError = async (output, context) =
872
678
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
873
679
  default:
874
680
  const parsedBody = parsedOutput.body;
875
- (0, smithy_client_1.throwDefaultError)({
681
+ return throwDefaultError({
876
682
  output,
877
683
  parsedBody,
878
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
879
684
  errorCode,
880
685
  });
881
686
  }
@@ -891,7 +696,7 @@ const de_AssociateConnectionWithLagCommand = async (output, context) => {
891
696
  $metadata: deserializeMetadata(output),
892
697
  ...contents,
893
698
  };
894
- return Promise.resolve(response);
699
+ return response;
895
700
  };
896
701
  exports.de_AssociateConnectionWithLagCommand = de_AssociateConnectionWithLagCommand;
897
702
  const de_AssociateConnectionWithLagCommandError = async (output, context) => {
@@ -909,10 +714,9 @@ const de_AssociateConnectionWithLagCommandError = async (output, context) => {
909
714
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
910
715
  default:
911
716
  const parsedBody = parsedOutput.body;
912
- (0, smithy_client_1.throwDefaultError)({
717
+ return throwDefaultError({
913
718
  output,
914
719
  parsedBody,
915
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
916
720
  errorCode,
917
721
  });
918
722
  }
@@ -928,7 +732,7 @@ const de_AssociateHostedConnectionCommand = async (output, context) => {
928
732
  $metadata: deserializeMetadata(output),
929
733
  ...contents,
930
734
  };
931
- return Promise.resolve(response);
735
+ return response;
932
736
  };
933
737
  exports.de_AssociateHostedConnectionCommand = de_AssociateHostedConnectionCommand;
934
738
  const de_AssociateHostedConnectionCommandError = async (output, context) => {
@@ -946,10 +750,9 @@ const de_AssociateHostedConnectionCommandError = async (output, context) => {
946
750
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
947
751
  default:
948
752
  const parsedBody = parsedOutput.body;
949
- (0, smithy_client_1.throwDefaultError)({
753
+ return throwDefaultError({
950
754
  output,
951
755
  parsedBody,
952
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
953
756
  errorCode,
954
757
  });
955
758
  }
@@ -960,12 +763,12 @@ const de_AssociateMacSecKeyCommand = async (output, context) => {
960
763
  }
961
764
  const data = await parseBody(output.body, context);
962
765
  let contents = {};
963
- contents = de_AssociateMacSecKeyResponse(data, context);
766
+ contents = (0, smithy_client_1._json)(data);
964
767
  const response = {
965
768
  $metadata: deserializeMetadata(output),
966
769
  ...contents,
967
770
  };
968
- return Promise.resolve(response);
771
+ return response;
969
772
  };
970
773
  exports.de_AssociateMacSecKeyCommand = de_AssociateMacSecKeyCommand;
971
774
  const de_AssociateMacSecKeyCommandError = async (output, context) => {
@@ -983,10 +786,9 @@ const de_AssociateMacSecKeyCommandError = async (output, context) => {
983
786
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
984
787
  default:
985
788
  const parsedBody = parsedOutput.body;
986
- (0, smithy_client_1.throwDefaultError)({
789
+ return throwDefaultError({
987
790
  output,
988
791
  parsedBody,
989
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
990
792
  errorCode,
991
793
  });
992
794
  }
@@ -997,12 +799,12 @@ const de_AssociateVirtualInterfaceCommand = async (output, context) => {
997
799
  }
998
800
  const data = await parseBody(output.body, context);
999
801
  let contents = {};
1000
- contents = de_VirtualInterface(data, context);
802
+ contents = (0, smithy_client_1._json)(data);
1001
803
  const response = {
1002
804
  $metadata: deserializeMetadata(output),
1003
805
  ...contents,
1004
806
  };
1005
- return Promise.resolve(response);
807
+ return response;
1006
808
  };
1007
809
  exports.de_AssociateVirtualInterfaceCommand = de_AssociateVirtualInterfaceCommand;
1008
810
  const de_AssociateVirtualInterfaceCommandError = async (output, context) => {
@@ -1020,10 +822,9 @@ const de_AssociateVirtualInterfaceCommandError = async (output, context) => {
1020
822
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1021
823
  default:
1022
824
  const parsedBody = parsedOutput.body;
1023
- (0, smithy_client_1.throwDefaultError)({
825
+ return throwDefaultError({
1024
826
  output,
1025
827
  parsedBody,
1026
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1027
828
  errorCode,
1028
829
  });
1029
830
  }
@@ -1034,12 +835,12 @@ const de_ConfirmConnectionCommand = async (output, context) => {
1034
835
  }
1035
836
  const data = await parseBody(output.body, context);
1036
837
  let contents = {};
1037
- contents = de_ConfirmConnectionResponse(data, context);
838
+ contents = (0, smithy_client_1._json)(data);
1038
839
  const response = {
1039
840
  $metadata: deserializeMetadata(output),
1040
841
  ...contents,
1041
842
  };
1042
- return Promise.resolve(response);
843
+ return response;
1043
844
  };
1044
845
  exports.de_ConfirmConnectionCommand = de_ConfirmConnectionCommand;
1045
846
  const de_ConfirmConnectionCommandError = async (output, context) => {
@@ -1057,10 +858,9 @@ const de_ConfirmConnectionCommandError = async (output, context) => {
1057
858
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1058
859
  default:
1059
860
  const parsedBody = parsedOutput.body;
1060
- (0, smithy_client_1.throwDefaultError)({
861
+ return throwDefaultError({
1061
862
  output,
1062
863
  parsedBody,
1063
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1064
864
  errorCode,
1065
865
  });
1066
866
  }
@@ -1071,12 +871,12 @@ const de_ConfirmCustomerAgreementCommand = async (output, context) => {
1071
871
  }
1072
872
  const data = await parseBody(output.body, context);
1073
873
  let contents = {};
1074
- contents = de_ConfirmCustomerAgreementResponse(data, context);
874
+ contents = (0, smithy_client_1._json)(data);
1075
875
  const response = {
1076
876
  $metadata: deserializeMetadata(output),
1077
877
  ...contents,
1078
878
  };
1079
- return Promise.resolve(response);
879
+ return response;
1080
880
  };
1081
881
  exports.de_ConfirmCustomerAgreementCommand = de_ConfirmCustomerAgreementCommand;
1082
882
  const de_ConfirmCustomerAgreementCommandError = async (output, context) => {
@@ -1094,10 +894,9 @@ const de_ConfirmCustomerAgreementCommandError = async (output, context) => {
1094
894
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1095
895
  default:
1096
896
  const parsedBody = parsedOutput.body;
1097
- (0, smithy_client_1.throwDefaultError)({
897
+ return throwDefaultError({
1098
898
  output,
1099
899
  parsedBody,
1100
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1101
900
  errorCode,
1102
901
  });
1103
902
  }
@@ -1108,12 +907,12 @@ const de_ConfirmPrivateVirtualInterfaceCommand = async (output, context) => {
1108
907
  }
1109
908
  const data = await parseBody(output.body, context);
1110
909
  let contents = {};
1111
- contents = de_ConfirmPrivateVirtualInterfaceResponse(data, context);
910
+ contents = (0, smithy_client_1._json)(data);
1112
911
  const response = {
1113
912
  $metadata: deserializeMetadata(output),
1114
913
  ...contents,
1115
914
  };
1116
- return Promise.resolve(response);
915
+ return response;
1117
916
  };
1118
917
  exports.de_ConfirmPrivateVirtualInterfaceCommand = de_ConfirmPrivateVirtualInterfaceCommand;
1119
918
  const de_ConfirmPrivateVirtualInterfaceCommandError = async (output, context) => {
@@ -1131,10 +930,9 @@ const de_ConfirmPrivateVirtualInterfaceCommandError = async (output, context) =>
1131
930
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1132
931
  default:
1133
932
  const parsedBody = parsedOutput.body;
1134
- (0, smithy_client_1.throwDefaultError)({
933
+ return throwDefaultError({
1135
934
  output,
1136
935
  parsedBody,
1137
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1138
936
  errorCode,
1139
937
  });
1140
938
  }
@@ -1145,12 +943,12 @@ const de_ConfirmPublicVirtualInterfaceCommand = async (output, context) => {
1145
943
  }
1146
944
  const data = await parseBody(output.body, context);
1147
945
  let contents = {};
1148
- contents = de_ConfirmPublicVirtualInterfaceResponse(data, context);
946
+ contents = (0, smithy_client_1._json)(data);
1149
947
  const response = {
1150
948
  $metadata: deserializeMetadata(output),
1151
949
  ...contents,
1152
950
  };
1153
- return Promise.resolve(response);
951
+ return response;
1154
952
  };
1155
953
  exports.de_ConfirmPublicVirtualInterfaceCommand = de_ConfirmPublicVirtualInterfaceCommand;
1156
954
  const de_ConfirmPublicVirtualInterfaceCommandError = async (output, context) => {
@@ -1168,10 +966,9 @@ const de_ConfirmPublicVirtualInterfaceCommandError = async (output, context) =>
1168
966
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1169
967
  default:
1170
968
  const parsedBody = parsedOutput.body;
1171
- (0, smithy_client_1.throwDefaultError)({
969
+ return throwDefaultError({
1172
970
  output,
1173
971
  parsedBody,
1174
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1175
972
  errorCode,
1176
973
  });
1177
974
  }
@@ -1182,12 +979,12 @@ const de_ConfirmTransitVirtualInterfaceCommand = async (output, context) => {
1182
979
  }
1183
980
  const data = await parseBody(output.body, context);
1184
981
  let contents = {};
1185
- contents = de_ConfirmTransitVirtualInterfaceResponse(data, context);
982
+ contents = (0, smithy_client_1._json)(data);
1186
983
  const response = {
1187
984
  $metadata: deserializeMetadata(output),
1188
985
  ...contents,
1189
986
  };
1190
- return Promise.resolve(response);
987
+ return response;
1191
988
  };
1192
989
  exports.de_ConfirmTransitVirtualInterfaceCommand = de_ConfirmTransitVirtualInterfaceCommand;
1193
990
  const de_ConfirmTransitVirtualInterfaceCommandError = async (output, context) => {
@@ -1205,10 +1002,9 @@ const de_ConfirmTransitVirtualInterfaceCommandError = async (output, context) =>
1205
1002
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1206
1003
  default:
1207
1004
  const parsedBody = parsedOutput.body;
1208
- (0, smithy_client_1.throwDefaultError)({
1005
+ return throwDefaultError({
1209
1006
  output,
1210
1007
  parsedBody,
1211
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1212
1008
  errorCode,
1213
1009
  });
1214
1010
  }
@@ -1219,12 +1015,12 @@ const de_CreateBGPPeerCommand = async (output, context) => {
1219
1015
  }
1220
1016
  const data = await parseBody(output.body, context);
1221
1017
  let contents = {};
1222
- contents = de_CreateBGPPeerResponse(data, context);
1018
+ contents = (0, smithy_client_1._json)(data);
1223
1019
  const response = {
1224
1020
  $metadata: deserializeMetadata(output),
1225
1021
  ...contents,
1226
1022
  };
1227
- return Promise.resolve(response);
1023
+ return response;
1228
1024
  };
1229
1025
  exports.de_CreateBGPPeerCommand = de_CreateBGPPeerCommand;
1230
1026
  const de_CreateBGPPeerCommandError = async (output, context) => {
@@ -1242,10 +1038,9 @@ const de_CreateBGPPeerCommandError = async (output, context) => {
1242
1038
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1243
1039
  default:
1244
1040
  const parsedBody = parsedOutput.body;
1245
- (0, smithy_client_1.throwDefaultError)({
1041
+ return throwDefaultError({
1246
1042
  output,
1247
1043
  parsedBody,
1248
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1249
1044
  errorCode,
1250
1045
  });
1251
1046
  }
@@ -1261,7 +1056,7 @@ const de_CreateConnectionCommand = async (output, context) => {
1261
1056
  $metadata: deserializeMetadata(output),
1262
1057
  ...contents,
1263
1058
  };
1264
- return Promise.resolve(response);
1059
+ return response;
1265
1060
  };
1266
1061
  exports.de_CreateConnectionCommand = de_CreateConnectionCommand;
1267
1062
  const de_CreateConnectionCommandError = async (output, context) => {
@@ -1285,10 +1080,9 @@ const de_CreateConnectionCommandError = async (output, context) => {
1285
1080
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1286
1081
  default:
1287
1082
  const parsedBody = parsedOutput.body;
1288
- (0, smithy_client_1.throwDefaultError)({
1083
+ return throwDefaultError({
1289
1084
  output,
1290
1085
  parsedBody,
1291
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1292
1086
  errorCode,
1293
1087
  });
1294
1088
  }
@@ -1299,12 +1093,12 @@ const de_CreateDirectConnectGatewayCommand = async (output, context) => {
1299
1093
  }
1300
1094
  const data = await parseBody(output.body, context);
1301
1095
  let contents = {};
1302
- contents = de_CreateDirectConnectGatewayResult(data, context);
1096
+ contents = (0, smithy_client_1._json)(data);
1303
1097
  const response = {
1304
1098
  $metadata: deserializeMetadata(output),
1305
1099
  ...contents,
1306
1100
  };
1307
- return Promise.resolve(response);
1101
+ return response;
1308
1102
  };
1309
1103
  exports.de_CreateDirectConnectGatewayCommand = de_CreateDirectConnectGatewayCommand;
1310
1104
  const de_CreateDirectConnectGatewayCommandError = async (output, context) => {
@@ -1322,10 +1116,9 @@ const de_CreateDirectConnectGatewayCommandError = async (output, context) => {
1322
1116
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1323
1117
  default:
1324
1118
  const parsedBody = parsedOutput.body;
1325
- (0, smithy_client_1.throwDefaultError)({
1119
+ return throwDefaultError({
1326
1120
  output,
1327
1121
  parsedBody,
1328
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1329
1122
  errorCode,
1330
1123
  });
1331
1124
  }
@@ -1336,12 +1129,12 @@ const de_CreateDirectConnectGatewayAssociationCommand = async (output, context)
1336
1129
  }
1337
1130
  const data = await parseBody(output.body, context);
1338
1131
  let contents = {};
1339
- contents = de_CreateDirectConnectGatewayAssociationResult(data, context);
1132
+ contents = (0, smithy_client_1._json)(data);
1340
1133
  const response = {
1341
1134
  $metadata: deserializeMetadata(output),
1342
1135
  ...contents,
1343
1136
  };
1344
- return Promise.resolve(response);
1137
+ return response;
1345
1138
  };
1346
1139
  exports.de_CreateDirectConnectGatewayAssociationCommand = de_CreateDirectConnectGatewayAssociationCommand;
1347
1140
  const de_CreateDirectConnectGatewayAssociationCommandError = async (output, context) => {
@@ -1359,10 +1152,9 @@ const de_CreateDirectConnectGatewayAssociationCommandError = async (output, cont
1359
1152
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1360
1153
  default:
1361
1154
  const parsedBody = parsedOutput.body;
1362
- (0, smithy_client_1.throwDefaultError)({
1155
+ return throwDefaultError({
1363
1156
  output,
1364
1157
  parsedBody,
1365
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1366
1158
  errorCode,
1367
1159
  });
1368
1160
  }
@@ -1373,12 +1165,12 @@ const de_CreateDirectConnectGatewayAssociationProposalCommand = async (output, c
1373
1165
  }
1374
1166
  const data = await parseBody(output.body, context);
1375
1167
  let contents = {};
1376
- contents = de_CreateDirectConnectGatewayAssociationProposalResult(data, context);
1168
+ contents = (0, smithy_client_1._json)(data);
1377
1169
  const response = {
1378
1170
  $metadata: deserializeMetadata(output),
1379
1171
  ...contents,
1380
1172
  };
1381
- return Promise.resolve(response);
1173
+ return response;
1382
1174
  };
1383
1175
  exports.de_CreateDirectConnectGatewayAssociationProposalCommand = de_CreateDirectConnectGatewayAssociationProposalCommand;
1384
1176
  const de_CreateDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
@@ -1396,10 +1188,9 @@ const de_CreateDirectConnectGatewayAssociationProposalCommandError = async (outp
1396
1188
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1397
1189
  default:
1398
1190
  const parsedBody = parsedOutput.body;
1399
- (0, smithy_client_1.throwDefaultError)({
1191
+ return throwDefaultError({
1400
1192
  output,
1401
1193
  parsedBody,
1402
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1403
1194
  errorCode,
1404
1195
  });
1405
1196
  }
@@ -1415,7 +1206,7 @@ const de_CreateInterconnectCommand = async (output, context) => {
1415
1206
  $metadata: deserializeMetadata(output),
1416
1207
  ...contents,
1417
1208
  };
1418
- return Promise.resolve(response);
1209
+ return response;
1419
1210
  };
1420
1211
  exports.de_CreateInterconnectCommand = de_CreateInterconnectCommand;
1421
1212
  const de_CreateInterconnectCommandError = async (output, context) => {
@@ -1439,10 +1230,9 @@ const de_CreateInterconnectCommandError = async (output, context) => {
1439
1230
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1440
1231
  default:
1441
1232
  const parsedBody = parsedOutput.body;
1442
- (0, smithy_client_1.throwDefaultError)({
1233
+ return throwDefaultError({
1443
1234
  output,
1444
1235
  parsedBody,
1445
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1446
1236
  errorCode,
1447
1237
  });
1448
1238
  }
@@ -1458,7 +1248,7 @@ const de_CreateLagCommand = async (output, context) => {
1458
1248
  $metadata: deserializeMetadata(output),
1459
1249
  ...contents,
1460
1250
  };
1461
- return Promise.resolve(response);
1251
+ return response;
1462
1252
  };
1463
1253
  exports.de_CreateLagCommand = de_CreateLagCommand;
1464
1254
  const de_CreateLagCommandError = async (output, context) => {
@@ -1482,10 +1272,9 @@ const de_CreateLagCommandError = async (output, context) => {
1482
1272
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1483
1273
  default:
1484
1274
  const parsedBody = parsedOutput.body;
1485
- (0, smithy_client_1.throwDefaultError)({
1275
+ return throwDefaultError({
1486
1276
  output,
1487
1277
  parsedBody,
1488
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1489
1278
  errorCode,
1490
1279
  });
1491
1280
  }
@@ -1496,12 +1285,12 @@ const de_CreatePrivateVirtualInterfaceCommand = async (output, context) => {
1496
1285
  }
1497
1286
  const data = await parseBody(output.body, context);
1498
1287
  let contents = {};
1499
- contents = de_VirtualInterface(data, context);
1288
+ contents = (0, smithy_client_1._json)(data);
1500
1289
  const response = {
1501
1290
  $metadata: deserializeMetadata(output),
1502
1291
  ...contents,
1503
1292
  };
1504
- return Promise.resolve(response);
1293
+ return response;
1505
1294
  };
1506
1295
  exports.de_CreatePrivateVirtualInterfaceCommand = de_CreatePrivateVirtualInterfaceCommand;
1507
1296
  const de_CreatePrivateVirtualInterfaceCommandError = async (output, context) => {
@@ -1525,10 +1314,9 @@ const de_CreatePrivateVirtualInterfaceCommandError = async (output, context) =>
1525
1314
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1526
1315
  default:
1527
1316
  const parsedBody = parsedOutput.body;
1528
- (0, smithy_client_1.throwDefaultError)({
1317
+ return throwDefaultError({
1529
1318
  output,
1530
1319
  parsedBody,
1531
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1532
1320
  errorCode,
1533
1321
  });
1534
1322
  }
@@ -1539,12 +1327,12 @@ const de_CreatePublicVirtualInterfaceCommand = async (output, context) => {
1539
1327
  }
1540
1328
  const data = await parseBody(output.body, context);
1541
1329
  let contents = {};
1542
- contents = de_VirtualInterface(data, context);
1330
+ contents = (0, smithy_client_1._json)(data);
1543
1331
  const response = {
1544
1332
  $metadata: deserializeMetadata(output),
1545
1333
  ...contents,
1546
1334
  };
1547
- return Promise.resolve(response);
1335
+ return response;
1548
1336
  };
1549
1337
  exports.de_CreatePublicVirtualInterfaceCommand = de_CreatePublicVirtualInterfaceCommand;
1550
1338
  const de_CreatePublicVirtualInterfaceCommandError = async (output, context) => {
@@ -1568,10 +1356,9 @@ const de_CreatePublicVirtualInterfaceCommandError = async (output, context) => {
1568
1356
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1569
1357
  default:
1570
1358
  const parsedBody = parsedOutput.body;
1571
- (0, smithy_client_1.throwDefaultError)({
1359
+ return throwDefaultError({
1572
1360
  output,
1573
1361
  parsedBody,
1574
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1575
1362
  errorCode,
1576
1363
  });
1577
1364
  }
@@ -1582,12 +1369,12 @@ const de_CreateTransitVirtualInterfaceCommand = async (output, context) => {
1582
1369
  }
1583
1370
  const data = await parseBody(output.body, context);
1584
1371
  let contents = {};
1585
- contents = de_CreateTransitVirtualInterfaceResult(data, context);
1372
+ contents = (0, smithy_client_1._json)(data);
1586
1373
  const response = {
1587
1374
  $metadata: deserializeMetadata(output),
1588
1375
  ...contents,
1589
1376
  };
1590
- return Promise.resolve(response);
1377
+ return response;
1591
1378
  };
1592
1379
  exports.de_CreateTransitVirtualInterfaceCommand = de_CreateTransitVirtualInterfaceCommand;
1593
1380
  const de_CreateTransitVirtualInterfaceCommandError = async (output, context) => {
@@ -1611,10 +1398,9 @@ const de_CreateTransitVirtualInterfaceCommandError = async (output, context) =>
1611
1398
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1612
1399
  default:
1613
1400
  const parsedBody = parsedOutput.body;
1614
- (0, smithy_client_1.throwDefaultError)({
1401
+ return throwDefaultError({
1615
1402
  output,
1616
1403
  parsedBody,
1617
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1618
1404
  errorCode,
1619
1405
  });
1620
1406
  }
@@ -1625,12 +1411,12 @@ const de_DeleteBGPPeerCommand = async (output, context) => {
1625
1411
  }
1626
1412
  const data = await parseBody(output.body, context);
1627
1413
  let contents = {};
1628
- contents = de_DeleteBGPPeerResponse(data, context);
1414
+ contents = (0, smithy_client_1._json)(data);
1629
1415
  const response = {
1630
1416
  $metadata: deserializeMetadata(output),
1631
1417
  ...contents,
1632
1418
  };
1633
- return Promise.resolve(response);
1419
+ return response;
1634
1420
  };
1635
1421
  exports.de_DeleteBGPPeerCommand = de_DeleteBGPPeerCommand;
1636
1422
  const de_DeleteBGPPeerCommandError = async (output, context) => {
@@ -1648,10 +1434,9 @@ const de_DeleteBGPPeerCommandError = async (output, context) => {
1648
1434
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1649
1435
  default:
1650
1436
  const parsedBody = parsedOutput.body;
1651
- (0, smithy_client_1.throwDefaultError)({
1437
+ return throwDefaultError({
1652
1438
  output,
1653
1439
  parsedBody,
1654
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1655
1440
  errorCode,
1656
1441
  });
1657
1442
  }
@@ -1667,7 +1452,7 @@ const de_DeleteConnectionCommand = async (output, context) => {
1667
1452
  $metadata: deserializeMetadata(output),
1668
1453
  ...contents,
1669
1454
  };
1670
- return Promise.resolve(response);
1455
+ return response;
1671
1456
  };
1672
1457
  exports.de_DeleteConnectionCommand = de_DeleteConnectionCommand;
1673
1458
  const de_DeleteConnectionCommandError = async (output, context) => {
@@ -1685,10 +1470,9 @@ const de_DeleteConnectionCommandError = async (output, context) => {
1685
1470
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1686
1471
  default:
1687
1472
  const parsedBody = parsedOutput.body;
1688
- (0, smithy_client_1.throwDefaultError)({
1473
+ return throwDefaultError({
1689
1474
  output,
1690
1475
  parsedBody,
1691
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1692
1476
  errorCode,
1693
1477
  });
1694
1478
  }
@@ -1699,12 +1483,12 @@ const de_DeleteDirectConnectGatewayCommand = async (output, context) => {
1699
1483
  }
1700
1484
  const data = await parseBody(output.body, context);
1701
1485
  let contents = {};
1702
- contents = de_DeleteDirectConnectGatewayResult(data, context);
1486
+ contents = (0, smithy_client_1._json)(data);
1703
1487
  const response = {
1704
1488
  $metadata: deserializeMetadata(output),
1705
1489
  ...contents,
1706
1490
  };
1707
- return Promise.resolve(response);
1491
+ return response;
1708
1492
  };
1709
1493
  exports.de_DeleteDirectConnectGatewayCommand = de_DeleteDirectConnectGatewayCommand;
1710
1494
  const de_DeleteDirectConnectGatewayCommandError = async (output, context) => {
@@ -1722,10 +1506,9 @@ const de_DeleteDirectConnectGatewayCommandError = async (output, context) => {
1722
1506
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1723
1507
  default:
1724
1508
  const parsedBody = parsedOutput.body;
1725
- (0, smithy_client_1.throwDefaultError)({
1509
+ return throwDefaultError({
1726
1510
  output,
1727
1511
  parsedBody,
1728
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1729
1512
  errorCode,
1730
1513
  });
1731
1514
  }
@@ -1736,12 +1519,12 @@ const de_DeleteDirectConnectGatewayAssociationCommand = async (output, context)
1736
1519
  }
1737
1520
  const data = await parseBody(output.body, context);
1738
1521
  let contents = {};
1739
- contents = de_DeleteDirectConnectGatewayAssociationResult(data, context);
1522
+ contents = (0, smithy_client_1._json)(data);
1740
1523
  const response = {
1741
1524
  $metadata: deserializeMetadata(output),
1742
1525
  ...contents,
1743
1526
  };
1744
- return Promise.resolve(response);
1527
+ return response;
1745
1528
  };
1746
1529
  exports.de_DeleteDirectConnectGatewayAssociationCommand = de_DeleteDirectConnectGatewayAssociationCommand;
1747
1530
  const de_DeleteDirectConnectGatewayAssociationCommandError = async (output, context) => {
@@ -1759,10 +1542,9 @@ const de_DeleteDirectConnectGatewayAssociationCommandError = async (output, cont
1759
1542
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1760
1543
  default:
1761
1544
  const parsedBody = parsedOutput.body;
1762
- (0, smithy_client_1.throwDefaultError)({
1545
+ return throwDefaultError({
1763
1546
  output,
1764
1547
  parsedBody,
1765
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1766
1548
  errorCode,
1767
1549
  });
1768
1550
  }
@@ -1773,12 +1555,12 @@ const de_DeleteDirectConnectGatewayAssociationProposalCommand = async (output, c
1773
1555
  }
1774
1556
  const data = await parseBody(output.body, context);
1775
1557
  let contents = {};
1776
- contents = de_DeleteDirectConnectGatewayAssociationProposalResult(data, context);
1558
+ contents = (0, smithy_client_1._json)(data);
1777
1559
  const response = {
1778
1560
  $metadata: deserializeMetadata(output),
1779
1561
  ...contents,
1780
1562
  };
1781
- return Promise.resolve(response);
1563
+ return response;
1782
1564
  };
1783
1565
  exports.de_DeleteDirectConnectGatewayAssociationProposalCommand = de_DeleteDirectConnectGatewayAssociationProposalCommand;
1784
1566
  const de_DeleteDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
@@ -1796,10 +1578,9 @@ const de_DeleteDirectConnectGatewayAssociationProposalCommandError = async (outp
1796
1578
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1797
1579
  default:
1798
1580
  const parsedBody = parsedOutput.body;
1799
- (0, smithy_client_1.throwDefaultError)({
1581
+ return throwDefaultError({
1800
1582
  output,
1801
1583
  parsedBody,
1802
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1803
1584
  errorCode,
1804
1585
  });
1805
1586
  }
@@ -1810,12 +1591,12 @@ const de_DeleteInterconnectCommand = async (output, context) => {
1810
1591
  }
1811
1592
  const data = await parseBody(output.body, context);
1812
1593
  let contents = {};
1813
- contents = de_DeleteInterconnectResponse(data, context);
1594
+ contents = (0, smithy_client_1._json)(data);
1814
1595
  const response = {
1815
1596
  $metadata: deserializeMetadata(output),
1816
1597
  ...contents,
1817
1598
  };
1818
- return Promise.resolve(response);
1599
+ return response;
1819
1600
  };
1820
1601
  exports.de_DeleteInterconnectCommand = de_DeleteInterconnectCommand;
1821
1602
  const de_DeleteInterconnectCommandError = async (output, context) => {
@@ -1833,10 +1614,9 @@ const de_DeleteInterconnectCommandError = async (output, context) => {
1833
1614
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1834
1615
  default:
1835
1616
  const parsedBody = parsedOutput.body;
1836
- (0, smithy_client_1.throwDefaultError)({
1617
+ return throwDefaultError({
1837
1618
  output,
1838
1619
  parsedBody,
1839
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1840
1620
  errorCode,
1841
1621
  });
1842
1622
  }
@@ -1852,7 +1632,7 @@ const de_DeleteLagCommand = async (output, context) => {
1852
1632
  $metadata: deserializeMetadata(output),
1853
1633
  ...contents,
1854
1634
  };
1855
- return Promise.resolve(response);
1635
+ return response;
1856
1636
  };
1857
1637
  exports.de_DeleteLagCommand = de_DeleteLagCommand;
1858
1638
  const de_DeleteLagCommandError = async (output, context) => {
@@ -1870,10 +1650,9 @@ const de_DeleteLagCommandError = async (output, context) => {
1870
1650
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1871
1651
  default:
1872
1652
  const parsedBody = parsedOutput.body;
1873
- (0, smithy_client_1.throwDefaultError)({
1653
+ return throwDefaultError({
1874
1654
  output,
1875
1655
  parsedBody,
1876
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1877
1656
  errorCode,
1878
1657
  });
1879
1658
  }
@@ -1884,12 +1663,12 @@ const de_DeleteVirtualInterfaceCommand = async (output, context) => {
1884
1663
  }
1885
1664
  const data = await parseBody(output.body, context);
1886
1665
  let contents = {};
1887
- contents = de_DeleteVirtualInterfaceResponse(data, context);
1666
+ contents = (0, smithy_client_1._json)(data);
1888
1667
  const response = {
1889
1668
  $metadata: deserializeMetadata(output),
1890
1669
  ...contents,
1891
1670
  };
1892
- return Promise.resolve(response);
1671
+ return response;
1893
1672
  };
1894
1673
  exports.de_DeleteVirtualInterfaceCommand = de_DeleteVirtualInterfaceCommand;
1895
1674
  const de_DeleteVirtualInterfaceCommandError = async (output, context) => {
@@ -1907,10 +1686,9 @@ const de_DeleteVirtualInterfaceCommandError = async (output, context) => {
1907
1686
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1908
1687
  default:
1909
1688
  const parsedBody = parsedOutput.body;
1910
- (0, smithy_client_1.throwDefaultError)({
1689
+ return throwDefaultError({
1911
1690
  output,
1912
1691
  parsedBody,
1913
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1914
1692
  errorCode,
1915
1693
  });
1916
1694
  }
@@ -1926,7 +1704,7 @@ const de_DescribeConnectionLoaCommand = async (output, context) => {
1926
1704
  $metadata: deserializeMetadata(output),
1927
1705
  ...contents,
1928
1706
  };
1929
- return Promise.resolve(response);
1707
+ return response;
1930
1708
  };
1931
1709
  exports.de_DescribeConnectionLoaCommand = de_DescribeConnectionLoaCommand;
1932
1710
  const de_DescribeConnectionLoaCommandError = async (output, context) => {
@@ -1944,10 +1722,9 @@ const de_DescribeConnectionLoaCommandError = async (output, context) => {
1944
1722
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1945
1723
  default:
1946
1724
  const parsedBody = parsedOutput.body;
1947
- (0, smithy_client_1.throwDefaultError)({
1725
+ return throwDefaultError({
1948
1726
  output,
1949
1727
  parsedBody,
1950
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1951
1728
  errorCode,
1952
1729
  });
1953
1730
  }
@@ -1963,7 +1740,7 @@ const de_DescribeConnectionsCommand = async (output, context) => {
1963
1740
  $metadata: deserializeMetadata(output),
1964
1741
  ...contents,
1965
1742
  };
1966
- return Promise.resolve(response);
1743
+ return response;
1967
1744
  };
1968
1745
  exports.de_DescribeConnectionsCommand = de_DescribeConnectionsCommand;
1969
1746
  const de_DescribeConnectionsCommandError = async (output, context) => {
@@ -1981,10 +1758,9 @@ const de_DescribeConnectionsCommandError = async (output, context) => {
1981
1758
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1982
1759
  default:
1983
1760
  const parsedBody = parsedOutput.body;
1984
- (0, smithy_client_1.throwDefaultError)({
1761
+ return throwDefaultError({
1985
1762
  output,
1986
1763
  parsedBody,
1987
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
1988
1764
  errorCode,
1989
1765
  });
1990
1766
  }
@@ -2000,7 +1776,7 @@ const de_DescribeConnectionsOnInterconnectCommand = async (output, context) => {
2000
1776
  $metadata: deserializeMetadata(output),
2001
1777
  ...contents,
2002
1778
  };
2003
- return Promise.resolve(response);
1779
+ return response;
2004
1780
  };
2005
1781
  exports.de_DescribeConnectionsOnInterconnectCommand = de_DescribeConnectionsOnInterconnectCommand;
2006
1782
  const de_DescribeConnectionsOnInterconnectCommandError = async (output, context) => {
@@ -2018,10 +1794,9 @@ const de_DescribeConnectionsOnInterconnectCommandError = async (output, context)
2018
1794
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2019
1795
  default:
2020
1796
  const parsedBody = parsedOutput.body;
2021
- (0, smithy_client_1.throwDefaultError)({
1797
+ return throwDefaultError({
2022
1798
  output,
2023
1799
  parsedBody,
2024
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2025
1800
  errorCode,
2026
1801
  });
2027
1802
  }
@@ -2032,12 +1807,12 @@ const de_DescribeCustomerMetadataCommand = async (output, context) => {
2032
1807
  }
2033
1808
  const data = await parseBody(output.body, context);
2034
1809
  let contents = {};
2035
- contents = de_DescribeCustomerMetadataResponse(data, context);
1810
+ contents = (0, smithy_client_1._json)(data);
2036
1811
  const response = {
2037
1812
  $metadata: deserializeMetadata(output),
2038
1813
  ...contents,
2039
1814
  };
2040
- return Promise.resolve(response);
1815
+ return response;
2041
1816
  };
2042
1817
  exports.de_DescribeCustomerMetadataCommand = de_DescribeCustomerMetadataCommand;
2043
1818
  const de_DescribeCustomerMetadataCommandError = async (output, context) => {
@@ -2055,10 +1830,9 @@ const de_DescribeCustomerMetadataCommandError = async (output, context) => {
2055
1830
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2056
1831
  default:
2057
1832
  const parsedBody = parsedOutput.body;
2058
- (0, smithy_client_1.throwDefaultError)({
1833
+ return throwDefaultError({
2059
1834
  output,
2060
1835
  parsedBody,
2061
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2062
1836
  errorCode,
2063
1837
  });
2064
1838
  }
@@ -2069,12 +1843,12 @@ const de_DescribeDirectConnectGatewayAssociationProposalsCommand = async (output
2069
1843
  }
2070
1844
  const data = await parseBody(output.body, context);
2071
1845
  let contents = {};
2072
- contents = de_DescribeDirectConnectGatewayAssociationProposalsResult(data, context);
1846
+ contents = (0, smithy_client_1._json)(data);
2073
1847
  const response = {
2074
1848
  $metadata: deserializeMetadata(output),
2075
1849
  ...contents,
2076
1850
  };
2077
- return Promise.resolve(response);
1851
+ return response;
2078
1852
  };
2079
1853
  exports.de_DescribeDirectConnectGatewayAssociationProposalsCommand = de_DescribeDirectConnectGatewayAssociationProposalsCommand;
2080
1854
  const de_DescribeDirectConnectGatewayAssociationProposalsCommandError = async (output, context) => {
@@ -2092,10 +1866,9 @@ const de_DescribeDirectConnectGatewayAssociationProposalsCommandError = async (o
2092
1866
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2093
1867
  default:
2094
1868
  const parsedBody = parsedOutput.body;
2095
- (0, smithy_client_1.throwDefaultError)({
1869
+ return throwDefaultError({
2096
1870
  output,
2097
1871
  parsedBody,
2098
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2099
1872
  errorCode,
2100
1873
  });
2101
1874
  }
@@ -2106,12 +1879,12 @@ const de_DescribeDirectConnectGatewayAssociationsCommand = async (output, contex
2106
1879
  }
2107
1880
  const data = await parseBody(output.body, context);
2108
1881
  let contents = {};
2109
- contents = de_DescribeDirectConnectGatewayAssociationsResult(data, context);
1882
+ contents = (0, smithy_client_1._json)(data);
2110
1883
  const response = {
2111
1884
  $metadata: deserializeMetadata(output),
2112
1885
  ...contents,
2113
1886
  };
2114
- return Promise.resolve(response);
1887
+ return response;
2115
1888
  };
2116
1889
  exports.de_DescribeDirectConnectGatewayAssociationsCommand = de_DescribeDirectConnectGatewayAssociationsCommand;
2117
1890
  const de_DescribeDirectConnectGatewayAssociationsCommandError = async (output, context) => {
@@ -2129,10 +1902,9 @@ const de_DescribeDirectConnectGatewayAssociationsCommandError = async (output, c
2129
1902
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2130
1903
  default:
2131
1904
  const parsedBody = parsedOutput.body;
2132
- (0, smithy_client_1.throwDefaultError)({
1905
+ return throwDefaultError({
2133
1906
  output,
2134
1907
  parsedBody,
2135
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2136
1908
  errorCode,
2137
1909
  });
2138
1910
  }
@@ -2143,12 +1915,12 @@ const de_DescribeDirectConnectGatewayAttachmentsCommand = async (output, context
2143
1915
  }
2144
1916
  const data = await parseBody(output.body, context);
2145
1917
  let contents = {};
2146
- contents = de_DescribeDirectConnectGatewayAttachmentsResult(data, context);
1918
+ contents = (0, smithy_client_1._json)(data);
2147
1919
  const response = {
2148
1920
  $metadata: deserializeMetadata(output),
2149
1921
  ...contents,
2150
1922
  };
2151
- return Promise.resolve(response);
1923
+ return response;
2152
1924
  };
2153
1925
  exports.de_DescribeDirectConnectGatewayAttachmentsCommand = de_DescribeDirectConnectGatewayAttachmentsCommand;
2154
1926
  const de_DescribeDirectConnectGatewayAttachmentsCommandError = async (output, context) => {
@@ -2166,10 +1938,9 @@ const de_DescribeDirectConnectGatewayAttachmentsCommandError = async (output, co
2166
1938
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2167
1939
  default:
2168
1940
  const parsedBody = parsedOutput.body;
2169
- (0, smithy_client_1.throwDefaultError)({
1941
+ return throwDefaultError({
2170
1942
  output,
2171
1943
  parsedBody,
2172
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2173
1944
  errorCode,
2174
1945
  });
2175
1946
  }
@@ -2180,12 +1951,12 @@ const de_DescribeDirectConnectGatewaysCommand = async (output, context) => {
2180
1951
  }
2181
1952
  const data = await parseBody(output.body, context);
2182
1953
  let contents = {};
2183
- contents = de_DescribeDirectConnectGatewaysResult(data, context);
1954
+ contents = (0, smithy_client_1._json)(data);
2184
1955
  const response = {
2185
1956
  $metadata: deserializeMetadata(output),
2186
1957
  ...contents,
2187
1958
  };
2188
- return Promise.resolve(response);
1959
+ return response;
2189
1960
  };
2190
1961
  exports.de_DescribeDirectConnectGatewaysCommand = de_DescribeDirectConnectGatewaysCommand;
2191
1962
  const de_DescribeDirectConnectGatewaysCommandError = async (output, context) => {
@@ -2203,10 +1974,9 @@ const de_DescribeDirectConnectGatewaysCommandError = async (output, context) =>
2203
1974
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2204
1975
  default:
2205
1976
  const parsedBody = parsedOutput.body;
2206
- (0, smithy_client_1.throwDefaultError)({
1977
+ return throwDefaultError({
2207
1978
  output,
2208
1979
  parsedBody,
2209
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2210
1980
  errorCode,
2211
1981
  });
2212
1982
  }
@@ -2222,7 +1992,7 @@ const de_DescribeHostedConnectionsCommand = async (output, context) => {
2222
1992
  $metadata: deserializeMetadata(output),
2223
1993
  ...contents,
2224
1994
  };
2225
- return Promise.resolve(response);
1995
+ return response;
2226
1996
  };
2227
1997
  exports.de_DescribeHostedConnectionsCommand = de_DescribeHostedConnectionsCommand;
2228
1998
  const de_DescribeHostedConnectionsCommandError = async (output, context) => {
@@ -2240,10 +2010,9 @@ const de_DescribeHostedConnectionsCommandError = async (output, context) => {
2240
2010
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2241
2011
  default:
2242
2012
  const parsedBody = parsedOutput.body;
2243
- (0, smithy_client_1.throwDefaultError)({
2013
+ return throwDefaultError({
2244
2014
  output,
2245
2015
  parsedBody,
2246
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2247
2016
  errorCode,
2248
2017
  });
2249
2018
  }
@@ -2259,7 +2028,7 @@ const de_DescribeInterconnectLoaCommand = async (output, context) => {
2259
2028
  $metadata: deserializeMetadata(output),
2260
2029
  ...contents,
2261
2030
  };
2262
- return Promise.resolve(response);
2031
+ return response;
2263
2032
  };
2264
2033
  exports.de_DescribeInterconnectLoaCommand = de_DescribeInterconnectLoaCommand;
2265
2034
  const de_DescribeInterconnectLoaCommandError = async (output, context) => {
@@ -2277,10 +2046,9 @@ const de_DescribeInterconnectLoaCommandError = async (output, context) => {
2277
2046
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2278
2047
  default:
2279
2048
  const parsedBody = parsedOutput.body;
2280
- (0, smithy_client_1.throwDefaultError)({
2049
+ return throwDefaultError({
2281
2050
  output,
2282
2051
  parsedBody,
2283
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2284
2052
  errorCode,
2285
2053
  });
2286
2054
  }
@@ -2296,7 +2064,7 @@ const de_DescribeInterconnectsCommand = async (output, context) => {
2296
2064
  $metadata: deserializeMetadata(output),
2297
2065
  ...contents,
2298
2066
  };
2299
- return Promise.resolve(response);
2067
+ return response;
2300
2068
  };
2301
2069
  exports.de_DescribeInterconnectsCommand = de_DescribeInterconnectsCommand;
2302
2070
  const de_DescribeInterconnectsCommandError = async (output, context) => {
@@ -2314,10 +2082,9 @@ const de_DescribeInterconnectsCommandError = async (output, context) => {
2314
2082
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2315
2083
  default:
2316
2084
  const parsedBody = parsedOutput.body;
2317
- (0, smithy_client_1.throwDefaultError)({
2085
+ return throwDefaultError({
2318
2086
  output,
2319
2087
  parsedBody,
2320
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2321
2088
  errorCode,
2322
2089
  });
2323
2090
  }
@@ -2333,7 +2100,7 @@ const de_DescribeLagsCommand = async (output, context) => {
2333
2100
  $metadata: deserializeMetadata(output),
2334
2101
  ...contents,
2335
2102
  };
2336
- return Promise.resolve(response);
2103
+ return response;
2337
2104
  };
2338
2105
  exports.de_DescribeLagsCommand = de_DescribeLagsCommand;
2339
2106
  const de_DescribeLagsCommandError = async (output, context) => {
@@ -2351,10 +2118,9 @@ const de_DescribeLagsCommandError = async (output, context) => {
2351
2118
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2352
2119
  default:
2353
2120
  const parsedBody = parsedOutput.body;
2354
- (0, smithy_client_1.throwDefaultError)({
2121
+ return throwDefaultError({
2355
2122
  output,
2356
2123
  parsedBody,
2357
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2358
2124
  errorCode,
2359
2125
  });
2360
2126
  }
@@ -2370,7 +2136,7 @@ const de_DescribeLoaCommand = async (output, context) => {
2370
2136
  $metadata: deserializeMetadata(output),
2371
2137
  ...contents,
2372
2138
  };
2373
- return Promise.resolve(response);
2139
+ return response;
2374
2140
  };
2375
2141
  exports.de_DescribeLoaCommand = de_DescribeLoaCommand;
2376
2142
  const de_DescribeLoaCommandError = async (output, context) => {
@@ -2388,10 +2154,9 @@ const de_DescribeLoaCommandError = async (output, context) => {
2388
2154
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2389
2155
  default:
2390
2156
  const parsedBody = parsedOutput.body;
2391
- (0, smithy_client_1.throwDefaultError)({
2157
+ return throwDefaultError({
2392
2158
  output,
2393
2159
  parsedBody,
2394
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2395
2160
  errorCode,
2396
2161
  });
2397
2162
  }
@@ -2402,12 +2167,12 @@ const de_DescribeLocationsCommand = async (output, context) => {
2402
2167
  }
2403
2168
  const data = await parseBody(output.body, context);
2404
2169
  let contents = {};
2405
- contents = de_Locations(data, context);
2170
+ contents = (0, smithy_client_1._json)(data);
2406
2171
  const response = {
2407
2172
  $metadata: deserializeMetadata(output),
2408
2173
  ...contents,
2409
2174
  };
2410
- return Promise.resolve(response);
2175
+ return response;
2411
2176
  };
2412
2177
  exports.de_DescribeLocationsCommand = de_DescribeLocationsCommand;
2413
2178
  const de_DescribeLocationsCommandError = async (output, context) => {
@@ -2425,10 +2190,9 @@ const de_DescribeLocationsCommandError = async (output, context) => {
2425
2190
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2426
2191
  default:
2427
2192
  const parsedBody = parsedOutput.body;
2428
- (0, smithy_client_1.throwDefaultError)({
2193
+ return throwDefaultError({
2429
2194
  output,
2430
2195
  parsedBody,
2431
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2432
2196
  errorCode,
2433
2197
  });
2434
2198
  }
@@ -2439,12 +2203,12 @@ const de_DescribeRouterConfigurationCommand = async (output, context) => {
2439
2203
  }
2440
2204
  const data = await parseBody(output.body, context);
2441
2205
  let contents = {};
2442
- contents = de_DescribeRouterConfigurationResponse(data, context);
2206
+ contents = (0, smithy_client_1._json)(data);
2443
2207
  const response = {
2444
2208
  $metadata: deserializeMetadata(output),
2445
2209
  ...contents,
2446
2210
  };
2447
- return Promise.resolve(response);
2211
+ return response;
2448
2212
  };
2449
2213
  exports.de_DescribeRouterConfigurationCommand = de_DescribeRouterConfigurationCommand;
2450
2214
  const de_DescribeRouterConfigurationCommandError = async (output, context) => {
@@ -2462,10 +2226,9 @@ const de_DescribeRouterConfigurationCommandError = async (output, context) => {
2462
2226
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2463
2227
  default:
2464
2228
  const parsedBody = parsedOutput.body;
2465
- (0, smithy_client_1.throwDefaultError)({
2229
+ return throwDefaultError({
2466
2230
  output,
2467
2231
  parsedBody,
2468
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2469
2232
  errorCode,
2470
2233
  });
2471
2234
  }
@@ -2476,12 +2239,12 @@ const de_DescribeTagsCommand = async (output, context) => {
2476
2239
  }
2477
2240
  const data = await parseBody(output.body, context);
2478
2241
  let contents = {};
2479
- contents = de_DescribeTagsResponse(data, context);
2242
+ contents = (0, smithy_client_1._json)(data);
2480
2243
  const response = {
2481
2244
  $metadata: deserializeMetadata(output),
2482
2245
  ...contents,
2483
2246
  };
2484
- return Promise.resolve(response);
2247
+ return response;
2485
2248
  };
2486
2249
  exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
2487
2250
  const de_DescribeTagsCommandError = async (output, context) => {
@@ -2499,10 +2262,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
2499
2262
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2500
2263
  default:
2501
2264
  const parsedBody = parsedOutput.body;
2502
- (0, smithy_client_1.throwDefaultError)({
2265
+ return throwDefaultError({
2503
2266
  output,
2504
2267
  parsedBody,
2505
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2506
2268
  errorCode,
2507
2269
  });
2508
2270
  }
@@ -2513,12 +2275,12 @@ const de_DescribeVirtualGatewaysCommand = async (output, context) => {
2513
2275
  }
2514
2276
  const data = await parseBody(output.body, context);
2515
2277
  let contents = {};
2516
- contents = de_VirtualGateways(data, context);
2278
+ contents = (0, smithy_client_1._json)(data);
2517
2279
  const response = {
2518
2280
  $metadata: deserializeMetadata(output),
2519
2281
  ...contents,
2520
2282
  };
2521
- return Promise.resolve(response);
2283
+ return response;
2522
2284
  };
2523
2285
  exports.de_DescribeVirtualGatewaysCommand = de_DescribeVirtualGatewaysCommand;
2524
2286
  const de_DescribeVirtualGatewaysCommandError = async (output, context) => {
@@ -2536,10 +2298,9 @@ const de_DescribeVirtualGatewaysCommandError = async (output, context) => {
2536
2298
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2537
2299
  default:
2538
2300
  const parsedBody = parsedOutput.body;
2539
- (0, smithy_client_1.throwDefaultError)({
2301
+ return throwDefaultError({
2540
2302
  output,
2541
2303
  parsedBody,
2542
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2543
2304
  errorCode,
2544
2305
  });
2545
2306
  }
@@ -2550,12 +2311,12 @@ const de_DescribeVirtualInterfacesCommand = async (output, context) => {
2550
2311
  }
2551
2312
  const data = await parseBody(output.body, context);
2552
2313
  let contents = {};
2553
- contents = de_VirtualInterfaces(data, context);
2314
+ contents = (0, smithy_client_1._json)(data);
2554
2315
  const response = {
2555
2316
  $metadata: deserializeMetadata(output),
2556
2317
  ...contents,
2557
2318
  };
2558
- return Promise.resolve(response);
2319
+ return response;
2559
2320
  };
2560
2321
  exports.de_DescribeVirtualInterfacesCommand = de_DescribeVirtualInterfacesCommand;
2561
2322
  const de_DescribeVirtualInterfacesCommandError = async (output, context) => {
@@ -2573,10 +2334,9 @@ const de_DescribeVirtualInterfacesCommandError = async (output, context) => {
2573
2334
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2574
2335
  default:
2575
2336
  const parsedBody = parsedOutput.body;
2576
- (0, smithy_client_1.throwDefaultError)({
2337
+ return throwDefaultError({
2577
2338
  output,
2578
2339
  parsedBody,
2579
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2580
2340
  errorCode,
2581
2341
  });
2582
2342
  }
@@ -2592,7 +2352,7 @@ const de_DisassociateConnectionFromLagCommand = async (output, context) => {
2592
2352
  $metadata: deserializeMetadata(output),
2593
2353
  ...contents,
2594
2354
  };
2595
- return Promise.resolve(response);
2355
+ return response;
2596
2356
  };
2597
2357
  exports.de_DisassociateConnectionFromLagCommand = de_DisassociateConnectionFromLagCommand;
2598
2358
  const de_DisassociateConnectionFromLagCommandError = async (output, context) => {
@@ -2610,10 +2370,9 @@ const de_DisassociateConnectionFromLagCommandError = async (output, context) =>
2610
2370
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2611
2371
  default:
2612
2372
  const parsedBody = parsedOutput.body;
2613
- (0, smithy_client_1.throwDefaultError)({
2373
+ return throwDefaultError({
2614
2374
  output,
2615
2375
  parsedBody,
2616
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2617
2376
  errorCode,
2618
2377
  });
2619
2378
  }
@@ -2624,12 +2383,12 @@ const de_DisassociateMacSecKeyCommand = async (output, context) => {
2624
2383
  }
2625
2384
  const data = await parseBody(output.body, context);
2626
2385
  let contents = {};
2627
- contents = de_DisassociateMacSecKeyResponse(data, context);
2386
+ contents = (0, smithy_client_1._json)(data);
2628
2387
  const response = {
2629
2388
  $metadata: deserializeMetadata(output),
2630
2389
  ...contents,
2631
2390
  };
2632
- return Promise.resolve(response);
2391
+ return response;
2633
2392
  };
2634
2393
  exports.de_DisassociateMacSecKeyCommand = de_DisassociateMacSecKeyCommand;
2635
2394
  const de_DisassociateMacSecKeyCommandError = async (output, context) => {
@@ -2647,10 +2406,9 @@ const de_DisassociateMacSecKeyCommandError = async (output, context) => {
2647
2406
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2648
2407
  default:
2649
2408
  const parsedBody = parsedOutput.body;
2650
- (0, smithy_client_1.throwDefaultError)({
2409
+ return throwDefaultError({
2651
2410
  output,
2652
2411
  parsedBody,
2653
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2654
2412
  errorCode,
2655
2413
  });
2656
2414
  }
@@ -2666,7 +2424,7 @@ const de_ListVirtualInterfaceTestHistoryCommand = async (output, context) => {
2666
2424
  $metadata: deserializeMetadata(output),
2667
2425
  ...contents,
2668
2426
  };
2669
- return Promise.resolve(response);
2427
+ return response;
2670
2428
  };
2671
2429
  exports.de_ListVirtualInterfaceTestHistoryCommand = de_ListVirtualInterfaceTestHistoryCommand;
2672
2430
  const de_ListVirtualInterfaceTestHistoryCommandError = async (output, context) => {
@@ -2684,10 +2442,9 @@ const de_ListVirtualInterfaceTestHistoryCommandError = async (output, context) =
2684
2442
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2685
2443
  default:
2686
2444
  const parsedBody = parsedOutput.body;
2687
- (0, smithy_client_1.throwDefaultError)({
2445
+ return throwDefaultError({
2688
2446
  output,
2689
2447
  parsedBody,
2690
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2691
2448
  errorCode,
2692
2449
  });
2693
2450
  }
@@ -2703,7 +2460,7 @@ const de_StartBgpFailoverTestCommand = async (output, context) => {
2703
2460
  $metadata: deserializeMetadata(output),
2704
2461
  ...contents,
2705
2462
  };
2706
- return Promise.resolve(response);
2463
+ return response;
2707
2464
  };
2708
2465
  exports.de_StartBgpFailoverTestCommand = de_StartBgpFailoverTestCommand;
2709
2466
  const de_StartBgpFailoverTestCommandError = async (output, context) => {
@@ -2721,10 +2478,9 @@ const de_StartBgpFailoverTestCommandError = async (output, context) => {
2721
2478
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2722
2479
  default:
2723
2480
  const parsedBody = parsedOutput.body;
2724
- (0, smithy_client_1.throwDefaultError)({
2481
+ return throwDefaultError({
2725
2482
  output,
2726
2483
  parsedBody,
2727
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2728
2484
  errorCode,
2729
2485
  });
2730
2486
  }
@@ -2740,7 +2496,7 @@ const de_StopBgpFailoverTestCommand = async (output, context) => {
2740
2496
  $metadata: deserializeMetadata(output),
2741
2497
  ...contents,
2742
2498
  };
2743
- return Promise.resolve(response);
2499
+ return response;
2744
2500
  };
2745
2501
  exports.de_StopBgpFailoverTestCommand = de_StopBgpFailoverTestCommand;
2746
2502
  const de_StopBgpFailoverTestCommandError = async (output, context) => {
@@ -2758,10 +2514,9 @@ const de_StopBgpFailoverTestCommandError = async (output, context) => {
2758
2514
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2759
2515
  default:
2760
2516
  const parsedBody = parsedOutput.body;
2761
- (0, smithy_client_1.throwDefaultError)({
2517
+ return throwDefaultError({
2762
2518
  output,
2763
2519
  parsedBody,
2764
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2765
2520
  errorCode,
2766
2521
  });
2767
2522
  }
@@ -2772,12 +2527,12 @@ const de_TagResourceCommand = async (output, context) => {
2772
2527
  }
2773
2528
  const data = await parseBody(output.body, context);
2774
2529
  let contents = {};
2775
- contents = de_TagResourceResponse(data, context);
2530
+ contents = (0, smithy_client_1._json)(data);
2776
2531
  const response = {
2777
2532
  $metadata: deserializeMetadata(output),
2778
2533
  ...contents,
2779
2534
  };
2780
- return Promise.resolve(response);
2535
+ return response;
2781
2536
  };
2782
2537
  exports.de_TagResourceCommand = de_TagResourceCommand;
2783
2538
  const de_TagResourceCommandError = async (output, context) => {
@@ -2801,10 +2556,9 @@ const de_TagResourceCommandError = async (output, context) => {
2801
2556
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2802
2557
  default:
2803
2558
  const parsedBody = parsedOutput.body;
2804
- (0, smithy_client_1.throwDefaultError)({
2559
+ return throwDefaultError({
2805
2560
  output,
2806
2561
  parsedBody,
2807
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2808
2562
  errorCode,
2809
2563
  });
2810
2564
  }
@@ -2815,12 +2569,12 @@ const de_UntagResourceCommand = async (output, context) => {
2815
2569
  }
2816
2570
  const data = await parseBody(output.body, context);
2817
2571
  let contents = {};
2818
- contents = de_UntagResourceResponse(data, context);
2572
+ contents = (0, smithy_client_1._json)(data);
2819
2573
  const response = {
2820
2574
  $metadata: deserializeMetadata(output),
2821
2575
  ...contents,
2822
2576
  };
2823
- return Promise.resolve(response);
2577
+ return response;
2824
2578
  };
2825
2579
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
2826
2580
  const de_UntagResourceCommandError = async (output, context) => {
@@ -2838,10 +2592,9 @@ const de_UntagResourceCommandError = async (output, context) => {
2838
2592
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2839
2593
  default:
2840
2594
  const parsedBody = parsedOutput.body;
2841
- (0, smithy_client_1.throwDefaultError)({
2595
+ return throwDefaultError({
2842
2596
  output,
2843
2597
  parsedBody,
2844
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2845
2598
  errorCode,
2846
2599
  });
2847
2600
  }
@@ -2857,7 +2610,7 @@ const de_UpdateConnectionCommand = async (output, context) => {
2857
2610
  $metadata: deserializeMetadata(output),
2858
2611
  ...contents,
2859
2612
  };
2860
- return Promise.resolve(response);
2613
+ return response;
2861
2614
  };
2862
2615
  exports.de_UpdateConnectionCommand = de_UpdateConnectionCommand;
2863
2616
  const de_UpdateConnectionCommandError = async (output, context) => {
@@ -2875,10 +2628,9 @@ const de_UpdateConnectionCommandError = async (output, context) => {
2875
2628
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2876
2629
  default:
2877
2630
  const parsedBody = parsedOutput.body;
2878
- (0, smithy_client_1.throwDefaultError)({
2631
+ return throwDefaultError({
2879
2632
  output,
2880
2633
  parsedBody,
2881
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2882
2634
  errorCode,
2883
2635
  });
2884
2636
  }
@@ -2889,12 +2641,12 @@ const de_UpdateDirectConnectGatewayCommand = async (output, context) => {
2889
2641
  }
2890
2642
  const data = await parseBody(output.body, context);
2891
2643
  let contents = {};
2892
- contents = de_UpdateDirectConnectGatewayResponse(data, context);
2644
+ contents = (0, smithy_client_1._json)(data);
2893
2645
  const response = {
2894
2646
  $metadata: deserializeMetadata(output),
2895
2647
  ...contents,
2896
2648
  };
2897
- return Promise.resolve(response);
2649
+ return response;
2898
2650
  };
2899
2651
  exports.de_UpdateDirectConnectGatewayCommand = de_UpdateDirectConnectGatewayCommand;
2900
2652
  const de_UpdateDirectConnectGatewayCommandError = async (output, context) => {
@@ -2912,10 +2664,9 @@ const de_UpdateDirectConnectGatewayCommandError = async (output, context) => {
2912
2664
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2913
2665
  default:
2914
2666
  const parsedBody = parsedOutput.body;
2915
- (0, smithy_client_1.throwDefaultError)({
2667
+ return throwDefaultError({
2916
2668
  output,
2917
2669
  parsedBody,
2918
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2919
2670
  errorCode,
2920
2671
  });
2921
2672
  }
@@ -2926,12 +2677,12 @@ const de_UpdateDirectConnectGatewayAssociationCommand = async (output, context)
2926
2677
  }
2927
2678
  const data = await parseBody(output.body, context);
2928
2679
  let contents = {};
2929
- contents = de_UpdateDirectConnectGatewayAssociationResult(data, context);
2680
+ contents = (0, smithy_client_1._json)(data);
2930
2681
  const response = {
2931
2682
  $metadata: deserializeMetadata(output),
2932
2683
  ...contents,
2933
2684
  };
2934
- return Promise.resolve(response);
2685
+ return response;
2935
2686
  };
2936
2687
  exports.de_UpdateDirectConnectGatewayAssociationCommand = de_UpdateDirectConnectGatewayAssociationCommand;
2937
2688
  const de_UpdateDirectConnectGatewayAssociationCommandError = async (output, context) => {
@@ -2949,10 +2700,9 @@ const de_UpdateDirectConnectGatewayAssociationCommandError = async (output, cont
2949
2700
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2950
2701
  default:
2951
2702
  const parsedBody = parsedOutput.body;
2952
- (0, smithy_client_1.throwDefaultError)({
2703
+ return throwDefaultError({
2953
2704
  output,
2954
2705
  parsedBody,
2955
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2956
2706
  errorCode,
2957
2707
  });
2958
2708
  }
@@ -2968,7 +2718,7 @@ const de_UpdateLagCommand = async (output, context) => {
2968
2718
  $metadata: deserializeMetadata(output),
2969
2719
  ...contents,
2970
2720
  };
2971
- return Promise.resolve(response);
2721
+ return response;
2972
2722
  };
2973
2723
  exports.de_UpdateLagCommand = de_UpdateLagCommand;
2974
2724
  const de_UpdateLagCommandError = async (output, context) => {
@@ -2986,10 +2736,9 @@ const de_UpdateLagCommandError = async (output, context) => {
2986
2736
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2987
2737
  default:
2988
2738
  const parsedBody = parsedOutput.body;
2989
- (0, smithy_client_1.throwDefaultError)({
2739
+ return throwDefaultError({
2990
2740
  output,
2991
2741
  parsedBody,
2992
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
2993
2742
  errorCode,
2994
2743
  });
2995
2744
  }
@@ -3000,12 +2749,12 @@ const de_UpdateVirtualInterfaceAttributesCommand = async (output, context) => {
3000
2749
  }
3001
2750
  const data = await parseBody(output.body, context);
3002
2751
  let contents = {};
3003
- contents = de_VirtualInterface(data, context);
2752
+ contents = (0, smithy_client_1._json)(data);
3004
2753
  const response = {
3005
2754
  $metadata: deserializeMetadata(output),
3006
2755
  ...contents,
3007
2756
  };
3008
- return Promise.resolve(response);
2757
+ return response;
3009
2758
  };
3010
2759
  exports.de_UpdateVirtualInterfaceAttributesCommand = de_UpdateVirtualInterfaceAttributesCommand;
3011
2760
  const de_UpdateVirtualInterfaceAttributesCommandError = async (output, context) => {
@@ -3023,17 +2772,16 @@ const de_UpdateVirtualInterfaceAttributesCommandError = async (output, context)
3023
2772
  throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
3024
2773
  default:
3025
2774
  const parsedBody = parsedOutput.body;
3026
- (0, smithy_client_1.throwDefaultError)({
2775
+ return throwDefaultError({
3027
2776
  output,
3028
2777
  parsedBody,
3029
- exceptionCtor: DirectConnectServiceException_1.DirectConnectServiceException,
3030
2778
  errorCode,
3031
2779
  });
3032
2780
  }
3033
2781
  };
3034
2782
  const de_DirectConnectClientExceptionRes = async (parsedOutput, context) => {
3035
2783
  const body = parsedOutput.body;
3036
- const deserialized = de_DirectConnectClientException(body, context);
2784
+ const deserialized = (0, smithy_client_1._json)(body);
3037
2785
  const exception = new models_0_1.DirectConnectClientException({
3038
2786
  $metadata: deserializeMetadata(parsedOutput),
3039
2787
  ...deserialized,
@@ -3042,7 +2790,7 @@ const de_DirectConnectClientExceptionRes = async (parsedOutput, context) => {
3042
2790
  };
3043
2791
  const de_DirectConnectServerExceptionRes = async (parsedOutput, context) => {
3044
2792
  const body = parsedOutput.body;
3045
- const deserialized = de_DirectConnectServerException(body, context);
2793
+ const deserialized = (0, smithy_client_1._json)(body);
3046
2794
  const exception = new models_0_1.DirectConnectServerException({
3047
2795
  $metadata: deserializeMetadata(parsedOutput),
3048
2796
  ...deserialized,
@@ -3051,7 +2799,7 @@ const de_DirectConnectServerExceptionRes = async (parsedOutput, context) => {
3051
2799
  };
3052
2800
  const de_DuplicateTagKeysExceptionRes = async (parsedOutput, context) => {
3053
2801
  const body = parsedOutput.body;
3054
- const deserialized = de_DuplicateTagKeysException(body, context);
2802
+ const deserialized = (0, smithy_client_1._json)(body);
3055
2803
  const exception = new models_0_1.DuplicateTagKeysException({
3056
2804
  $metadata: deserializeMetadata(parsedOutput),
3057
2805
  ...deserialized,
@@ -3060,1372 +2808,212 @@ const de_DuplicateTagKeysExceptionRes = async (parsedOutput, context) => {
3060
2808
  };
3061
2809
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
3062
2810
  const body = parsedOutput.body;
3063
- const deserialized = de_TooManyTagsException(body, context);
2811
+ const deserialized = (0, smithy_client_1._json)(body);
3064
2812
  const exception = new models_0_1.TooManyTagsException({
3065
2813
  $metadata: deserializeMetadata(parsedOutput),
3066
2814
  ...deserialized,
3067
2815
  });
3068
2816
  return (0, smithy_client_1.decorateServiceException)(exception, body);
3069
2817
  };
3070
- const se_AcceptDirectConnectGatewayAssociationProposalRequest = (input, context) => {
3071
- return {
3072
- ...(input.associatedGatewayOwnerAccount != null && {
3073
- associatedGatewayOwnerAccount: input.associatedGatewayOwnerAccount,
3074
- }),
3075
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3076
- ...(input.overrideAllowedPrefixesToDirectConnectGateway != null && {
3077
- overrideAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.overrideAllowedPrefixesToDirectConnectGateway, context),
3078
- }),
3079
- ...(input.proposalId != null && { proposalId: input.proposalId }),
3080
- };
3081
- };
3082
- const se_AllocateConnectionOnInterconnectRequest = (input, context) => {
3083
- return {
3084
- ...(input.bandwidth != null && { bandwidth: input.bandwidth }),
3085
- ...(input.connectionName != null && { connectionName: input.connectionName }),
3086
- ...(input.interconnectId != null && { interconnectId: input.interconnectId }),
3087
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
3088
- ...(input.vlan != null && { vlan: input.vlan }),
3089
- };
3090
- };
3091
- const se_AllocateHostedConnectionRequest = (input, context) => {
3092
- return {
3093
- ...(input.bandwidth != null && { bandwidth: input.bandwidth }),
3094
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3095
- ...(input.connectionName != null && { connectionName: input.connectionName }),
3096
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
3097
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3098
- ...(input.vlan != null && { vlan: input.vlan }),
3099
- };
3100
- };
3101
- const se_AllocatePrivateVirtualInterfaceRequest = (input, context) => {
3102
- return {
3103
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3104
- ...(input.newPrivateVirtualInterfaceAllocation != null && {
3105
- newPrivateVirtualInterfaceAllocation: se_NewPrivateVirtualInterfaceAllocation(input.newPrivateVirtualInterfaceAllocation, context),
3106
- }),
3107
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
3108
- };
3109
- };
3110
- const se_AllocatePublicVirtualInterfaceRequest = (input, context) => {
3111
- return {
3112
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3113
- ...(input.newPublicVirtualInterfaceAllocation != null && {
3114
- newPublicVirtualInterfaceAllocation: se_NewPublicVirtualInterfaceAllocation(input.newPublicVirtualInterfaceAllocation, context),
3115
- }),
3116
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
3117
- };
2818
+ const de_Connection = (output, context) => {
2819
+ return (0, smithy_client_1.take)(output, {
2820
+ awsDevice: smithy_client_1.expectString,
2821
+ awsDeviceV2: smithy_client_1.expectString,
2822
+ awsLogicalDeviceId: smithy_client_1.expectString,
2823
+ bandwidth: smithy_client_1.expectString,
2824
+ connectionId: smithy_client_1.expectString,
2825
+ connectionName: smithy_client_1.expectString,
2826
+ connectionState: smithy_client_1.expectString,
2827
+ encryptionMode: smithy_client_1.expectString,
2828
+ hasLogicalRedundancy: smithy_client_1.expectString,
2829
+ jumboFrameCapable: smithy_client_1.expectBoolean,
2830
+ lagId: smithy_client_1.expectString,
2831
+ loaIssueTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2832
+ location: smithy_client_1.expectString,
2833
+ macSecCapable: smithy_client_1.expectBoolean,
2834
+ macSecKeys: smithy_client_1._json,
2835
+ ownerAccount: smithy_client_1.expectString,
2836
+ partnerName: smithy_client_1.expectString,
2837
+ portEncryptionStatus: smithy_client_1.expectString,
2838
+ providerName: smithy_client_1.expectString,
2839
+ region: smithy_client_1.expectString,
2840
+ tags: smithy_client_1._json,
2841
+ vlan: smithy_client_1.expectInt32,
2842
+ });
3118
2843
  };
3119
- const se_AllocateTransitVirtualInterfaceRequest = (input, context) => {
3120
- return {
3121
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3122
- ...(input.newTransitVirtualInterfaceAllocation != null && {
3123
- newTransitVirtualInterfaceAllocation: se_NewTransitVirtualInterfaceAllocation(input.newTransitVirtualInterfaceAllocation, context),
3124
- }),
3125
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
3126
- };
2844
+ const de_ConnectionList = (output, context) => {
2845
+ const retVal = (output || [])
2846
+ .filter((e) => e != null)
2847
+ .map((entry) => {
2848
+ return de_Connection(entry, context);
2849
+ });
2850
+ return retVal;
3127
2851
  };
3128
- const se_AssociateConnectionWithLagRequest = (input, context) => {
3129
- return {
3130
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3131
- ...(input.lagId != null && { lagId: input.lagId }),
3132
- };
2852
+ const de_Connections = (output, context) => {
2853
+ return (0, smithy_client_1.take)(output, {
2854
+ connections: (_) => de_ConnectionList(_, context),
2855
+ });
3133
2856
  };
3134
- const se_AssociateHostedConnectionRequest = (input, context) => {
3135
- return {
3136
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3137
- ...(input.parentConnectionId != null && { parentConnectionId: input.parentConnectionId }),
3138
- };
2857
+ const de_DescribeConnectionLoaResponse = (output, context) => {
2858
+ return (0, smithy_client_1.take)(output, {
2859
+ loa: (_) => de_Loa(_, context),
2860
+ });
3139
2861
  };
3140
- const se_AssociateMacSecKeyRequest = (input, context) => {
3141
- return {
3142
- ...(input.cak != null && { cak: input.cak }),
3143
- ...(input.ckn != null && { ckn: input.ckn }),
3144
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3145
- ...(input.secretARN != null && { secretARN: input.secretARN }),
3146
- };
2862
+ const de_DescribeInterconnectLoaResponse = (output, context) => {
2863
+ return (0, smithy_client_1.take)(output, {
2864
+ loa: (_) => de_Loa(_, context),
2865
+ });
3147
2866
  };
3148
- const se_AssociateVirtualInterfaceRequest = (input, context) => {
3149
- return {
3150
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3151
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3152
- };
2867
+ const de_Interconnect = (output, context) => {
2868
+ return (0, smithy_client_1.take)(output, {
2869
+ awsDevice: smithy_client_1.expectString,
2870
+ awsDeviceV2: smithy_client_1.expectString,
2871
+ awsLogicalDeviceId: smithy_client_1.expectString,
2872
+ bandwidth: smithy_client_1.expectString,
2873
+ hasLogicalRedundancy: smithy_client_1.expectString,
2874
+ interconnectId: smithy_client_1.expectString,
2875
+ interconnectName: smithy_client_1.expectString,
2876
+ interconnectState: smithy_client_1.expectString,
2877
+ jumboFrameCapable: smithy_client_1.expectBoolean,
2878
+ lagId: smithy_client_1.expectString,
2879
+ loaIssueTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2880
+ location: smithy_client_1.expectString,
2881
+ providerName: smithy_client_1.expectString,
2882
+ region: smithy_client_1.expectString,
2883
+ tags: smithy_client_1._json,
2884
+ });
3153
2885
  };
3154
- const se_BGPPeerIdList = (input, context) => {
3155
- return input
2886
+ const de_InterconnectList = (output, context) => {
2887
+ const retVal = (output || [])
3156
2888
  .filter((e) => e != null)
3157
2889
  .map((entry) => {
3158
- return entry;
2890
+ return de_Interconnect(entry, context);
3159
2891
  });
2892
+ return retVal;
3160
2893
  };
3161
- const se_ConfirmConnectionRequest = (input, context) => {
3162
- return {
3163
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3164
- };
2894
+ const de_Interconnects = (output, context) => {
2895
+ return (0, smithy_client_1.take)(output, {
2896
+ interconnects: (_) => de_InterconnectList(_, context),
2897
+ });
3165
2898
  };
3166
- const se_ConfirmCustomerAgreementRequest = (input, context) => {
3167
- return {
3168
- ...(input.agreementName != null && { agreementName: input.agreementName }),
3169
- };
2899
+ const de_Lag = (output, context) => {
2900
+ return (0, smithy_client_1.take)(output, {
2901
+ allowsHostedConnections: smithy_client_1.expectBoolean,
2902
+ awsDevice: smithy_client_1.expectString,
2903
+ awsDeviceV2: smithy_client_1.expectString,
2904
+ awsLogicalDeviceId: smithy_client_1.expectString,
2905
+ connections: (_) => de_ConnectionList(_, context),
2906
+ connectionsBandwidth: smithy_client_1.expectString,
2907
+ encryptionMode: smithy_client_1.expectString,
2908
+ hasLogicalRedundancy: smithy_client_1.expectString,
2909
+ jumboFrameCapable: smithy_client_1.expectBoolean,
2910
+ lagId: smithy_client_1.expectString,
2911
+ lagName: smithy_client_1.expectString,
2912
+ lagState: smithy_client_1.expectString,
2913
+ location: smithy_client_1.expectString,
2914
+ macSecCapable: smithy_client_1.expectBoolean,
2915
+ macSecKeys: smithy_client_1._json,
2916
+ minimumLinks: smithy_client_1.expectInt32,
2917
+ numberOfConnections: smithy_client_1.expectInt32,
2918
+ ownerAccount: smithy_client_1.expectString,
2919
+ providerName: smithy_client_1.expectString,
2920
+ region: smithy_client_1.expectString,
2921
+ tags: smithy_client_1._json,
2922
+ });
3170
2923
  };
3171
- const se_ConfirmPrivateVirtualInterfaceRequest = (input, context) => {
3172
- return {
3173
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3174
- ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }),
3175
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3176
- };
2924
+ const de_LagList = (output, context) => {
2925
+ const retVal = (output || [])
2926
+ .filter((e) => e != null)
2927
+ .map((entry) => {
2928
+ return de_Lag(entry, context);
2929
+ });
2930
+ return retVal;
3177
2931
  };
3178
- const se_ConfirmPublicVirtualInterfaceRequest = (input, context) => {
3179
- return {
3180
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3181
- };
2932
+ const de_Lags = (output, context) => {
2933
+ return (0, smithy_client_1.take)(output, {
2934
+ lags: (_) => de_LagList(_, context),
2935
+ });
3182
2936
  };
3183
- const se_ConfirmTransitVirtualInterfaceRequest = (input, context) => {
3184
- return {
3185
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3186
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3187
- };
2937
+ const de_ListVirtualInterfaceTestHistoryResponse = (output, context) => {
2938
+ return (0, smithy_client_1.take)(output, {
2939
+ nextToken: smithy_client_1.expectString,
2940
+ virtualInterfaceTestHistory: (_) => de_VirtualInterfaceTestHistoryList(_, context),
2941
+ });
3188
2942
  };
3189
- const se_CreateBGPPeerRequest = (input, context) => {
3190
- return {
3191
- ...(input.newBGPPeer != null && { newBGPPeer: se_NewBGPPeer(input.newBGPPeer, context) }),
3192
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3193
- };
2943
+ const de_Loa = (output, context) => {
2944
+ return (0, smithy_client_1.take)(output, {
2945
+ loaContent: context.base64Decoder,
2946
+ loaContentType: smithy_client_1.expectString,
2947
+ });
3194
2948
  };
3195
- const se_CreateConnectionRequest = (input, context) => {
3196
- return {
3197
- ...(input.bandwidth != null && { bandwidth: input.bandwidth }),
3198
- ...(input.connectionName != null && { connectionName: input.connectionName }),
3199
- ...(input.lagId != null && { lagId: input.lagId }),
3200
- ...(input.location != null && { location: input.location }),
3201
- ...(input.providerName != null && { providerName: input.providerName }),
3202
- ...(input.requestMACSec != null && { requestMACSec: input.requestMACSec }),
3203
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3204
- };
2949
+ const de_StartBgpFailoverTestResponse = (output, context) => {
2950
+ return (0, smithy_client_1.take)(output, {
2951
+ virtualInterfaceTest: (_) => de_VirtualInterfaceTestHistory(_, context),
2952
+ });
3205
2953
  };
3206
- const se_CreateDirectConnectGatewayAssociationProposalRequest = (input, context) => {
3207
- return {
3208
- ...(input.addAllowedPrefixesToDirectConnectGateway != null && {
3209
- addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.addAllowedPrefixesToDirectConnectGateway, context),
3210
- }),
3211
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3212
- ...(input.directConnectGatewayOwnerAccount != null && {
3213
- directConnectGatewayOwnerAccount: input.directConnectGatewayOwnerAccount,
3214
- }),
3215
- ...(input.gatewayId != null && { gatewayId: input.gatewayId }),
3216
- ...(input.removeAllowedPrefixesToDirectConnectGateway != null && {
3217
- removeAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.removeAllowedPrefixesToDirectConnectGateway, context),
3218
- }),
3219
- };
3220
- };
3221
- const se_CreateDirectConnectGatewayAssociationRequest = (input, context) => {
3222
- return {
3223
- ...(input.addAllowedPrefixesToDirectConnectGateway != null && {
3224
- addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.addAllowedPrefixesToDirectConnectGateway, context),
3225
- }),
3226
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3227
- ...(input.gatewayId != null && { gatewayId: input.gatewayId }),
3228
- ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }),
3229
- };
2954
+ const de_StopBgpFailoverTestResponse = (output, context) => {
2955
+ return (0, smithy_client_1.take)(output, {
2956
+ virtualInterfaceTest: (_) => de_VirtualInterfaceTestHistory(_, context),
2957
+ });
3230
2958
  };
3231
- const se_CreateDirectConnectGatewayRequest = (input, context) => {
3232
- return {
3233
- ...(input.amazonSideAsn != null && { amazonSideAsn: input.amazonSideAsn }),
3234
- ...(input.directConnectGatewayName != null && { directConnectGatewayName: input.directConnectGatewayName }),
3235
- };
2959
+ const de_VirtualInterfaceTestHistory = (output, context) => {
2960
+ return (0, smithy_client_1.take)(output, {
2961
+ bgpPeers: smithy_client_1._json,
2962
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2963
+ ownerAccount: smithy_client_1.expectString,
2964
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2965
+ status: smithy_client_1.expectString,
2966
+ testDurationInMinutes: smithy_client_1.expectInt32,
2967
+ testId: smithy_client_1.expectString,
2968
+ virtualInterfaceId: smithy_client_1.expectString,
2969
+ });
3236
2970
  };
3237
- const se_CreateInterconnectRequest = (input, context) => {
3238
- return {
3239
- ...(input.bandwidth != null && { bandwidth: input.bandwidth }),
3240
- ...(input.interconnectName != null && { interconnectName: input.interconnectName }),
3241
- ...(input.lagId != null && { lagId: input.lagId }),
3242
- ...(input.location != null && { location: input.location }),
3243
- ...(input.providerName != null && { providerName: input.providerName }),
3244
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3245
- };
2971
+ const de_VirtualInterfaceTestHistoryList = (output, context) => {
2972
+ const retVal = (output || [])
2973
+ .filter((e) => e != null)
2974
+ .map((entry) => {
2975
+ return de_VirtualInterfaceTestHistory(entry, context);
2976
+ });
2977
+ return retVal;
3246
2978
  };
3247
- const se_CreateLagRequest = (input, context) => {
3248
- return {
3249
- ...(input.childConnectionTags != null && { childConnectionTags: se_TagList(input.childConnectionTags, context) }),
3250
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3251
- ...(input.connectionsBandwidth != null && { connectionsBandwidth: input.connectionsBandwidth }),
3252
- ...(input.lagName != null && { lagName: input.lagName }),
3253
- ...(input.location != null && { location: input.location }),
3254
- ...(input.numberOfConnections != null && { numberOfConnections: input.numberOfConnections }),
3255
- ...(input.providerName != null && { providerName: input.providerName }),
3256
- ...(input.requestMACSec != null && { requestMACSec: input.requestMACSec }),
3257
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3258
- };
3259
- };
3260
- const se_CreatePrivateVirtualInterfaceRequest = (input, context) => {
3261
- return {
3262
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3263
- ...(input.newPrivateVirtualInterface != null && {
3264
- newPrivateVirtualInterface: se_NewPrivateVirtualInterface(input.newPrivateVirtualInterface, context),
3265
- }),
3266
- };
2979
+ const deserializeMetadata = (output) => ({
2980
+ httpStatusCode: output.statusCode,
2981
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2982
+ extendedRequestId: output.headers["x-amz-id-2"],
2983
+ cfId: output.headers["x-amz-cf-id"],
2984
+ });
2985
+ const collectBody = (streamBody = new Uint8Array(), context) => {
2986
+ if (streamBody instanceof Uint8Array) {
2987
+ return Promise.resolve(streamBody);
2988
+ }
2989
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3267
2990
  };
3268
- const se_CreatePublicVirtualInterfaceRequest = (input, context) => {
3269
- return {
3270
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3271
- ...(input.newPublicVirtualInterface != null && {
3272
- newPublicVirtualInterface: se_NewPublicVirtualInterface(input.newPublicVirtualInterface, context),
3273
- }),
2991
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2992
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(DirectConnectServiceException_1.DirectConnectServiceException);
2993
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2994
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2995
+ const contents = {
2996
+ protocol,
2997
+ hostname,
2998
+ port,
2999
+ method: "POST",
3000
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3001
+ headers,
3274
3002
  };
3003
+ if (resolvedHostname !== undefined) {
3004
+ contents.hostname = resolvedHostname;
3005
+ }
3006
+ if (body !== undefined) {
3007
+ contents.body = body;
3008
+ }
3009
+ return new protocol_http_1.HttpRequest(contents);
3275
3010
  };
3276
- const se_CreateTransitVirtualInterfaceRequest = (input, context) => {
3011
+ function sharedHeaders(operation) {
3277
3012
  return {
3278
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3279
- ...(input.newTransitVirtualInterface != null && {
3280
- newTransitVirtualInterface: se_NewTransitVirtualInterface(input.newTransitVirtualInterface, context),
3281
- }),
3013
+ "content-type": "application/x-amz-json-1.1",
3014
+ "x-amz-target": `OvertureService.${operation}`,
3282
3015
  };
3283
- };
3284
- const se_DeleteBGPPeerRequest = (input, context) => {
3285
- return {
3286
- ...(input.asn != null && { asn: input.asn }),
3287
- ...(input.bgpPeerId != null && { bgpPeerId: input.bgpPeerId }),
3288
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3289
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3290
- };
3291
- };
3292
- const se_DeleteConnectionRequest = (input, context) => {
3293
- return {
3294
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3295
- };
3296
- };
3297
- const se_DeleteDirectConnectGatewayAssociationProposalRequest = (input, context) => {
3298
- return {
3299
- ...(input.proposalId != null && { proposalId: input.proposalId }),
3300
- };
3301
- };
3302
- const se_DeleteDirectConnectGatewayAssociationRequest = (input, context) => {
3303
- return {
3304
- ...(input.associationId != null && { associationId: input.associationId }),
3305
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3306
- ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }),
3307
- };
3308
- };
3309
- const se_DeleteDirectConnectGatewayRequest = (input, context) => {
3310
- return {
3311
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3312
- };
3313
- };
3314
- const se_DeleteInterconnectRequest = (input, context) => {
3315
- return {
3316
- ...(input.interconnectId != null && { interconnectId: input.interconnectId }),
3317
- };
3318
- };
3319
- const se_DeleteLagRequest = (input, context) => {
3320
- return {
3321
- ...(input.lagId != null && { lagId: input.lagId }),
3322
- };
3323
- };
3324
- const se_DeleteVirtualInterfaceRequest = (input, context) => {
3325
- return {
3326
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3327
- };
3328
- };
3329
- const se_DescribeConnectionLoaRequest = (input, context) => {
3330
- return {
3331
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3332
- ...(input.loaContentType != null && { loaContentType: input.loaContentType }),
3333
- ...(input.providerName != null && { providerName: input.providerName }),
3334
- };
3335
- };
3336
- const se_DescribeConnectionsOnInterconnectRequest = (input, context) => {
3337
- return {
3338
- ...(input.interconnectId != null && { interconnectId: input.interconnectId }),
3339
- };
3340
- };
3341
- const se_DescribeConnectionsRequest = (input, context) => {
3342
- return {
3343
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3344
- };
3345
- };
3346
- const se_DescribeDirectConnectGatewayAssociationProposalsRequest = (input, context) => {
3347
- return {
3348
- ...(input.associatedGatewayId != null && { associatedGatewayId: input.associatedGatewayId }),
3349
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3350
- ...(input.maxResults != null && { maxResults: input.maxResults }),
3351
- ...(input.nextToken != null && { nextToken: input.nextToken }),
3352
- ...(input.proposalId != null && { proposalId: input.proposalId }),
3353
- };
3354
- };
3355
- const se_DescribeDirectConnectGatewayAssociationsRequest = (input, context) => {
3356
- return {
3357
- ...(input.associatedGatewayId != null && { associatedGatewayId: input.associatedGatewayId }),
3358
- ...(input.associationId != null && { associationId: input.associationId }),
3359
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3360
- ...(input.maxResults != null && { maxResults: input.maxResults }),
3361
- ...(input.nextToken != null && { nextToken: input.nextToken }),
3362
- ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }),
3363
- };
3364
- };
3365
- const se_DescribeDirectConnectGatewayAttachmentsRequest = (input, context) => {
3366
- return {
3367
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3368
- ...(input.maxResults != null && { maxResults: input.maxResults }),
3369
- ...(input.nextToken != null && { nextToken: input.nextToken }),
3370
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3371
- };
3372
- };
3373
- const se_DescribeDirectConnectGatewaysRequest = (input, context) => {
3374
- return {
3375
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3376
- ...(input.maxResults != null && { maxResults: input.maxResults }),
3377
- ...(input.nextToken != null && { nextToken: input.nextToken }),
3378
- };
3379
- };
3380
- const se_DescribeHostedConnectionsRequest = (input, context) => {
3381
- return {
3382
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3383
- };
3384
- };
3385
- const se_DescribeInterconnectLoaRequest = (input, context) => {
3386
- return {
3387
- ...(input.interconnectId != null && { interconnectId: input.interconnectId }),
3388
- ...(input.loaContentType != null && { loaContentType: input.loaContentType }),
3389
- ...(input.providerName != null && { providerName: input.providerName }),
3390
- };
3391
- };
3392
- const se_DescribeInterconnectsRequest = (input, context) => {
3393
- return {
3394
- ...(input.interconnectId != null && { interconnectId: input.interconnectId }),
3395
- };
3396
- };
3397
- const se_DescribeLagsRequest = (input, context) => {
3398
- return {
3399
- ...(input.lagId != null && { lagId: input.lagId }),
3400
- };
3401
- };
3402
- const se_DescribeLoaRequest = (input, context) => {
3403
- return {
3404
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3405
- ...(input.loaContentType != null && { loaContentType: input.loaContentType }),
3406
- ...(input.providerName != null && { providerName: input.providerName }),
3407
- };
3408
- };
3409
- const se_DescribeRouterConfigurationRequest = (input, context) => {
3410
- return {
3411
- ...(input.routerTypeIdentifier != null && { routerTypeIdentifier: input.routerTypeIdentifier }),
3412
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3413
- };
3414
- };
3415
- const se_DescribeTagsRequest = (input, context) => {
3416
- return {
3417
- ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }),
3418
- };
3419
- };
3420
- const se_DescribeVirtualInterfacesRequest = (input, context) => {
3421
- return {
3422
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3423
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3424
- };
3425
- };
3426
- const se_DisassociateConnectionFromLagRequest = (input, context) => {
3427
- return {
3428
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3429
- ...(input.lagId != null && { lagId: input.lagId }),
3430
- };
3431
- };
3432
- const se_DisassociateMacSecKeyRequest = (input, context) => {
3433
- return {
3434
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3435
- ...(input.secretARN != null && { secretARN: input.secretARN }),
3436
- };
3437
- };
3438
- const se_ListVirtualInterfaceTestHistoryRequest = (input, context) => {
3439
- return {
3440
- ...(input.bgpPeers != null && { bgpPeers: se_BGPPeerIdList(input.bgpPeers, context) }),
3441
- ...(input.maxResults != null && { maxResults: input.maxResults }),
3442
- ...(input.nextToken != null && { nextToken: input.nextToken }),
3443
- ...(input.status != null && { status: input.status }),
3444
- ...(input.testId != null && { testId: input.testId }),
3445
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3446
- };
3447
- };
3448
- const se_NewBGPPeer = (input, context) => {
3449
- return {
3450
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3451
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3452
- ...(input.asn != null && { asn: input.asn }),
3453
- ...(input.authKey != null && { authKey: input.authKey }),
3454
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3455
- };
3456
- };
3457
- const se_NewPrivateVirtualInterface = (input, context) => {
3458
- return {
3459
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3460
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3461
- ...(input.asn != null && { asn: input.asn }),
3462
- ...(input.authKey != null && { authKey: input.authKey }),
3463
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3464
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3465
- ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }),
3466
- ...(input.mtu != null && { mtu: input.mtu }),
3467
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3468
- ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }),
3469
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3470
- ...(input.vlan != null && { vlan: input.vlan }),
3471
- };
3472
- };
3473
- const se_NewPrivateVirtualInterfaceAllocation = (input, context) => {
3474
- return {
3475
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3476
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3477
- ...(input.asn != null && { asn: input.asn }),
3478
- ...(input.authKey != null && { authKey: input.authKey }),
3479
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3480
- ...(input.mtu != null && { mtu: input.mtu }),
3481
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3482
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3483
- ...(input.vlan != null && { vlan: input.vlan }),
3484
- };
3485
- };
3486
- const se_NewPublicVirtualInterface = (input, context) => {
3487
- return {
3488
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3489
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3490
- ...(input.asn != null && { asn: input.asn }),
3491
- ...(input.authKey != null && { authKey: input.authKey }),
3492
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3493
- ...(input.routeFilterPrefixes != null && {
3494
- routeFilterPrefixes: se_RouteFilterPrefixList(input.routeFilterPrefixes, context),
3495
- }),
3496
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3497
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3498
- ...(input.vlan != null && { vlan: input.vlan }),
3499
- };
3500
- };
3501
- const se_NewPublicVirtualInterfaceAllocation = (input, context) => {
3502
- return {
3503
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3504
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3505
- ...(input.asn != null && { asn: input.asn }),
3506
- ...(input.authKey != null && { authKey: input.authKey }),
3507
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3508
- ...(input.routeFilterPrefixes != null && {
3509
- routeFilterPrefixes: se_RouteFilterPrefixList(input.routeFilterPrefixes, context),
3510
- }),
3511
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3512
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3513
- ...(input.vlan != null && { vlan: input.vlan }),
3514
- };
3515
- };
3516
- const se_NewTransitVirtualInterface = (input, context) => {
3517
- return {
3518
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3519
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3520
- ...(input.asn != null && { asn: input.asn }),
3521
- ...(input.authKey != null && { authKey: input.authKey }),
3522
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3523
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3524
- ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }),
3525
- ...(input.mtu != null && { mtu: input.mtu }),
3526
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3527
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3528
- ...(input.vlan != null && { vlan: input.vlan }),
3529
- };
3530
- };
3531
- const se_NewTransitVirtualInterfaceAllocation = (input, context) => {
3532
- return {
3533
- ...(input.addressFamily != null && { addressFamily: input.addressFamily }),
3534
- ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }),
3535
- ...(input.asn != null && { asn: input.asn }),
3536
- ...(input.authKey != null && { authKey: input.authKey }),
3537
- ...(input.customerAddress != null && { customerAddress: input.customerAddress }),
3538
- ...(input.mtu != null && { mtu: input.mtu }),
3539
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3540
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3541
- ...(input.vlan != null && { vlan: input.vlan }),
3542
- };
3543
- };
3544
- const se_ResourceArnList = (input, context) => {
3545
- return input
3546
- .filter((e) => e != null)
3547
- .map((entry) => {
3548
- return entry;
3549
- });
3550
- };
3551
- const se_RouteFilterPrefix = (input, context) => {
3552
- return {
3553
- ...(input.cidr != null && { cidr: input.cidr }),
3554
- };
3555
- };
3556
- const se_RouteFilterPrefixList = (input, context) => {
3557
- return input
3558
- .filter((e) => e != null)
3559
- .map((entry) => {
3560
- return se_RouteFilterPrefix(entry, context);
3561
- });
3562
- };
3563
- const se_StartBgpFailoverTestRequest = (input, context) => {
3564
- return {
3565
- ...(input.bgpPeers != null && { bgpPeers: se_BGPPeerIdList(input.bgpPeers, context) }),
3566
- ...(input.testDurationInMinutes != null && { testDurationInMinutes: input.testDurationInMinutes }),
3567
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3568
- };
3569
- };
3570
- const se_StopBgpFailoverTestRequest = (input, context) => {
3571
- return {
3572
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3573
- };
3574
- };
3575
- const se_Tag = (input, context) => {
3576
- return {
3577
- ...(input.key != null && { key: input.key }),
3578
- ...(input.value != null && { value: input.value }),
3579
- };
3580
- };
3581
- const se_TagKeyList = (input, context) => {
3582
- return input
3583
- .filter((e) => e != null)
3584
- .map((entry) => {
3585
- return entry;
3586
- });
3587
- };
3588
- const se_TagList = (input, context) => {
3589
- return input
3590
- .filter((e) => e != null)
3591
- .map((entry) => {
3592
- return se_Tag(entry, context);
3593
- });
3594
- };
3595
- const se_TagResourceRequest = (input, context) => {
3596
- return {
3597
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
3598
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
3599
- };
3600
- };
3601
- const se_UntagResourceRequest = (input, context) => {
3602
- return {
3603
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
3604
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
3605
- };
3606
- };
3607
- const se_UpdateConnectionRequest = (input, context) => {
3608
- return {
3609
- ...(input.connectionId != null && { connectionId: input.connectionId }),
3610
- ...(input.connectionName != null && { connectionName: input.connectionName }),
3611
- ...(input.encryptionMode != null && { encryptionMode: input.encryptionMode }),
3612
- };
3613
- };
3614
- const se_UpdateDirectConnectGatewayAssociationRequest = (input, context) => {
3615
- return {
3616
- ...(input.addAllowedPrefixesToDirectConnectGateway != null && {
3617
- addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.addAllowedPrefixesToDirectConnectGateway, context),
3618
- }),
3619
- ...(input.associationId != null && { associationId: input.associationId }),
3620
- ...(input.removeAllowedPrefixesToDirectConnectGateway != null && {
3621
- removeAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList(input.removeAllowedPrefixesToDirectConnectGateway, context),
3622
- }),
3623
- };
3624
- };
3625
- const se_UpdateDirectConnectGatewayRequest = (input, context) => {
3626
- return {
3627
- ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }),
3628
- ...(input.newDirectConnectGatewayName != null && {
3629
- newDirectConnectGatewayName: input.newDirectConnectGatewayName,
3630
- }),
3631
- };
3632
- };
3633
- const se_UpdateLagRequest = (input, context) => {
3634
- return {
3635
- ...(input.encryptionMode != null && { encryptionMode: input.encryptionMode }),
3636
- ...(input.lagId != null && { lagId: input.lagId }),
3637
- ...(input.lagName != null && { lagName: input.lagName }),
3638
- ...(input.minimumLinks != null && { minimumLinks: input.minimumLinks }),
3639
- };
3640
- };
3641
- const se_UpdateVirtualInterfaceAttributesRequest = (input, context) => {
3642
- return {
3643
- ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }),
3644
- ...(input.mtu != null && { mtu: input.mtu }),
3645
- ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }),
3646
- ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }),
3647
- };
3648
- };
3649
- const de_AcceptDirectConnectGatewayAssociationProposalResult = (output, context) => {
3650
- return {
3651
- directConnectGatewayAssociation: output.directConnectGatewayAssociation != null
3652
- ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context)
3653
- : undefined,
3654
- };
3655
- };
3656
- const de_AgreementList = (output, context) => {
3657
- const retVal = (output || [])
3658
- .filter((e) => e != null)
3659
- .map((entry) => {
3660
- if (entry === null) {
3661
- return null;
3662
- }
3663
- return de_CustomerAgreement(entry, context);
3664
- });
3665
- return retVal;
3666
- };
3667
- const de_AllocateTransitVirtualInterfaceResult = (output, context) => {
3668
- return {
3669
- virtualInterface: output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined,
3670
- };
3671
- };
3672
- const de_AssociatedGateway = (output, context) => {
3673
- return {
3674
- id: (0, smithy_client_1.expectString)(output.id),
3675
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
3676
- region: (0, smithy_client_1.expectString)(output.region),
3677
- type: (0, smithy_client_1.expectString)(output.type),
3678
- };
3679
- };
3680
- const de_AssociateMacSecKeyResponse = (output, context) => {
3681
- return {
3682
- connectionId: (0, smithy_client_1.expectString)(output.connectionId),
3683
- macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined,
3684
- };
3685
- };
3686
- const de_AvailableMacSecPortSpeeds = (output, context) => {
3687
- const retVal = (output || [])
3688
- .filter((e) => e != null)
3689
- .map((entry) => {
3690
- if (entry === null) {
3691
- return null;
3692
- }
3693
- return (0, smithy_client_1.expectString)(entry);
3694
- });
3695
- return retVal;
3696
- };
3697
- const de_AvailablePortSpeeds = (output, context) => {
3698
- const retVal = (output || [])
3699
- .filter((e) => e != null)
3700
- .map((entry) => {
3701
- if (entry === null) {
3702
- return null;
3703
- }
3704
- return (0, smithy_client_1.expectString)(entry);
3705
- });
3706
- return retVal;
3707
- };
3708
- const de_BGPPeer = (output, context) => {
3709
- return {
3710
- addressFamily: (0, smithy_client_1.expectString)(output.addressFamily),
3711
- amazonAddress: (0, smithy_client_1.expectString)(output.amazonAddress),
3712
- asn: (0, smithy_client_1.expectInt32)(output.asn),
3713
- authKey: (0, smithy_client_1.expectString)(output.authKey),
3714
- awsDeviceV2: (0, smithy_client_1.expectString)(output.awsDeviceV2),
3715
- awsLogicalDeviceId: (0, smithy_client_1.expectString)(output.awsLogicalDeviceId),
3716
- bgpPeerId: (0, smithy_client_1.expectString)(output.bgpPeerId),
3717
- bgpPeerState: (0, smithy_client_1.expectString)(output.bgpPeerState),
3718
- bgpStatus: (0, smithy_client_1.expectString)(output.bgpStatus),
3719
- customerAddress: (0, smithy_client_1.expectString)(output.customerAddress),
3720
- };
3721
- };
3722
- const de_BGPPeerIdList = (output, context) => {
3723
- const retVal = (output || [])
3724
- .filter((e) => e != null)
3725
- .map((entry) => {
3726
- if (entry === null) {
3727
- return null;
3728
- }
3729
- return (0, smithy_client_1.expectString)(entry);
3730
- });
3731
- return retVal;
3732
- };
3733
- const de_BGPPeerList = (output, context) => {
3734
- const retVal = (output || [])
3735
- .filter((e) => e != null)
3736
- .map((entry) => {
3737
- if (entry === null) {
3738
- return null;
3739
- }
3740
- return de_BGPPeer(entry, context);
3741
- });
3742
- return retVal;
3743
- };
3744
- const de_ConfirmConnectionResponse = (output, context) => {
3745
- return {
3746
- connectionState: (0, smithy_client_1.expectString)(output.connectionState),
3747
- };
3748
- };
3749
- const de_ConfirmCustomerAgreementResponse = (output, context) => {
3750
- return {
3751
- status: (0, smithy_client_1.expectString)(output.status),
3752
- };
3753
- };
3754
- const de_ConfirmPrivateVirtualInterfaceResponse = (output, context) => {
3755
- return {
3756
- virtualInterfaceState: (0, smithy_client_1.expectString)(output.virtualInterfaceState),
3757
- };
3758
- };
3759
- const de_ConfirmPublicVirtualInterfaceResponse = (output, context) => {
3760
- return {
3761
- virtualInterfaceState: (0, smithy_client_1.expectString)(output.virtualInterfaceState),
3762
- };
3763
- };
3764
- const de_ConfirmTransitVirtualInterfaceResponse = (output, context) => {
3765
- return {
3766
- virtualInterfaceState: (0, smithy_client_1.expectString)(output.virtualInterfaceState),
3767
- };
3768
- };
3769
- const de_Connection = (output, context) => {
3770
- return {
3771
- awsDevice: (0, smithy_client_1.expectString)(output.awsDevice),
3772
- awsDeviceV2: (0, smithy_client_1.expectString)(output.awsDeviceV2),
3773
- awsLogicalDeviceId: (0, smithy_client_1.expectString)(output.awsLogicalDeviceId),
3774
- bandwidth: (0, smithy_client_1.expectString)(output.bandwidth),
3775
- connectionId: (0, smithy_client_1.expectString)(output.connectionId),
3776
- connectionName: (0, smithy_client_1.expectString)(output.connectionName),
3777
- connectionState: (0, smithy_client_1.expectString)(output.connectionState),
3778
- encryptionMode: (0, smithy_client_1.expectString)(output.encryptionMode),
3779
- hasLogicalRedundancy: (0, smithy_client_1.expectString)(output.hasLogicalRedundancy),
3780
- jumboFrameCapable: (0, smithy_client_1.expectBoolean)(output.jumboFrameCapable),
3781
- lagId: (0, smithy_client_1.expectString)(output.lagId),
3782
- loaIssueTime: output.loaIssueTime != null
3783
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.loaIssueTime)))
3784
- : undefined,
3785
- location: (0, smithy_client_1.expectString)(output.location),
3786
- macSecCapable: (0, smithy_client_1.expectBoolean)(output.macSecCapable),
3787
- macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined,
3788
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
3789
- partnerName: (0, smithy_client_1.expectString)(output.partnerName),
3790
- portEncryptionStatus: (0, smithy_client_1.expectString)(output.portEncryptionStatus),
3791
- providerName: (0, smithy_client_1.expectString)(output.providerName),
3792
- region: (0, smithy_client_1.expectString)(output.region),
3793
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
3794
- vlan: (0, smithy_client_1.expectInt32)(output.vlan),
3795
- };
3796
- };
3797
- const de_ConnectionList = (output, context) => {
3798
- const retVal = (output || [])
3799
- .filter((e) => e != null)
3800
- .map((entry) => {
3801
- if (entry === null) {
3802
- return null;
3803
- }
3804
- return de_Connection(entry, context);
3805
- });
3806
- return retVal;
3807
- };
3808
- const de_Connections = (output, context) => {
3809
- return {
3810
- connections: output.connections != null ? de_ConnectionList(output.connections, context) : undefined,
3811
- };
3812
- };
3813
- const de_CreateBGPPeerResponse = (output, context) => {
3814
- return {
3815
- virtualInterface: output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined,
3816
- };
3817
- };
3818
- const de_CreateDirectConnectGatewayAssociationProposalResult = (output, context) => {
3819
- return {
3820
- directConnectGatewayAssociationProposal: output.directConnectGatewayAssociationProposal != null
3821
- ? de_DirectConnectGatewayAssociationProposal(output.directConnectGatewayAssociationProposal, context)
3822
- : undefined,
3823
- };
3824
- };
3825
- const de_CreateDirectConnectGatewayAssociationResult = (output, context) => {
3826
- return {
3827
- directConnectGatewayAssociation: output.directConnectGatewayAssociation != null
3828
- ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context)
3829
- : undefined,
3830
- };
3831
- };
3832
- const de_CreateDirectConnectGatewayResult = (output, context) => {
3833
- return {
3834
- directConnectGateway: output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined,
3835
- };
3836
- };
3837
- const de_CreateTransitVirtualInterfaceResult = (output, context) => {
3838
- return {
3839
- virtualInterface: output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined,
3840
- };
3841
- };
3842
- const de_CustomerAgreement = (output, context) => {
3843
- return {
3844
- agreementName: (0, smithy_client_1.expectString)(output.agreementName),
3845
- status: (0, smithy_client_1.expectString)(output.status),
3846
- };
3847
- };
3848
- const de_DeleteBGPPeerResponse = (output, context) => {
3849
- return {
3850
- virtualInterface: output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined,
3851
- };
3852
- };
3853
- const de_DeleteDirectConnectGatewayAssociationProposalResult = (output, context) => {
3854
- return {
3855
- directConnectGatewayAssociationProposal: output.directConnectGatewayAssociationProposal != null
3856
- ? de_DirectConnectGatewayAssociationProposal(output.directConnectGatewayAssociationProposal, context)
3857
- : undefined,
3858
- };
3859
- };
3860
- const de_DeleteDirectConnectGatewayAssociationResult = (output, context) => {
3861
- return {
3862
- directConnectGatewayAssociation: output.directConnectGatewayAssociation != null
3863
- ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context)
3864
- : undefined,
3865
- };
3866
- };
3867
- const de_DeleteDirectConnectGatewayResult = (output, context) => {
3868
- return {
3869
- directConnectGateway: output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined,
3870
- };
3871
- };
3872
- const de_DeleteInterconnectResponse = (output, context) => {
3873
- return {
3874
- interconnectState: (0, smithy_client_1.expectString)(output.interconnectState),
3875
- };
3876
- };
3877
- const de_DeleteVirtualInterfaceResponse = (output, context) => {
3878
- return {
3879
- virtualInterfaceState: (0, smithy_client_1.expectString)(output.virtualInterfaceState),
3880
- };
3881
- };
3882
- const de_DescribeConnectionLoaResponse = (output, context) => {
3883
- return {
3884
- loa: output.loa != null ? de_Loa(output.loa, context) : undefined,
3885
- };
3886
- };
3887
- const de_DescribeCustomerMetadataResponse = (output, context) => {
3888
- return {
3889
- agreements: output.agreements != null ? de_AgreementList(output.agreements, context) : undefined,
3890
- nniPartnerType: (0, smithy_client_1.expectString)(output.nniPartnerType),
3891
- };
3892
- };
3893
- const de_DescribeDirectConnectGatewayAssociationProposalsResult = (output, context) => {
3894
- return {
3895
- directConnectGatewayAssociationProposals: output.directConnectGatewayAssociationProposals != null
3896
- ? de_DirectConnectGatewayAssociationProposalList(output.directConnectGatewayAssociationProposals, context)
3897
- : undefined,
3898
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
3899
- };
3900
- };
3901
- const de_DescribeDirectConnectGatewayAssociationsResult = (output, context) => {
3902
- return {
3903
- directConnectGatewayAssociations: output.directConnectGatewayAssociations != null
3904
- ? de_DirectConnectGatewayAssociationList(output.directConnectGatewayAssociations, context)
3905
- : undefined,
3906
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
3907
- };
3908
- };
3909
- const de_DescribeDirectConnectGatewayAttachmentsResult = (output, context) => {
3910
- return {
3911
- directConnectGatewayAttachments: output.directConnectGatewayAttachments != null
3912
- ? de_DirectConnectGatewayAttachmentList(output.directConnectGatewayAttachments, context)
3913
- : undefined,
3914
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
3915
- };
3916
- };
3917
- const de_DescribeDirectConnectGatewaysResult = (output, context) => {
3918
- return {
3919
- directConnectGateways: output.directConnectGateways != null
3920
- ? de_DirectConnectGatewayList(output.directConnectGateways, context)
3921
- : undefined,
3922
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
3923
- };
3924
- };
3925
- const de_DescribeInterconnectLoaResponse = (output, context) => {
3926
- return {
3927
- loa: output.loa != null ? de_Loa(output.loa, context) : undefined,
3928
- };
3929
- };
3930
- const de_DescribeRouterConfigurationResponse = (output, context) => {
3931
- return {
3932
- customerRouterConfig: (0, smithy_client_1.expectString)(output.customerRouterConfig),
3933
- router: output.router != null ? de_RouterType(output.router, context) : undefined,
3934
- virtualInterfaceId: (0, smithy_client_1.expectString)(output.virtualInterfaceId),
3935
- virtualInterfaceName: (0, smithy_client_1.expectString)(output.virtualInterfaceName),
3936
- };
3937
- };
3938
- const de_DescribeTagsResponse = (output, context) => {
3939
- return {
3940
- resourceTags: output.resourceTags != null ? de_ResourceTagList(output.resourceTags, context) : undefined,
3941
- };
3942
- };
3943
- const de_DirectConnectClientException = (output, context) => {
3944
- return {
3945
- message: (0, smithy_client_1.expectString)(output.message),
3946
- };
3947
- };
3948
- const de_DirectConnectGateway = (output, context) => {
3949
- return {
3950
- amazonSideAsn: (0, smithy_client_1.expectLong)(output.amazonSideAsn),
3951
- directConnectGatewayId: (0, smithy_client_1.expectString)(output.directConnectGatewayId),
3952
- directConnectGatewayName: (0, smithy_client_1.expectString)(output.directConnectGatewayName),
3953
- directConnectGatewayState: (0, smithy_client_1.expectString)(output.directConnectGatewayState),
3954
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
3955
- stateChangeError: (0, smithy_client_1.expectString)(output.stateChangeError),
3956
- };
3957
- };
3958
- const de_DirectConnectGatewayAssociation = (output, context) => {
3959
- return {
3960
- allowedPrefixesToDirectConnectGateway: output.allowedPrefixesToDirectConnectGateway != null
3961
- ? de_RouteFilterPrefixList(output.allowedPrefixesToDirectConnectGateway, context)
3962
- : undefined,
3963
- associatedGateway: output.associatedGateway != null ? de_AssociatedGateway(output.associatedGateway, context) : undefined,
3964
- associationId: (0, smithy_client_1.expectString)(output.associationId),
3965
- associationState: (0, smithy_client_1.expectString)(output.associationState),
3966
- directConnectGatewayId: (0, smithy_client_1.expectString)(output.directConnectGatewayId),
3967
- directConnectGatewayOwnerAccount: (0, smithy_client_1.expectString)(output.directConnectGatewayOwnerAccount),
3968
- stateChangeError: (0, smithy_client_1.expectString)(output.stateChangeError),
3969
- virtualGatewayId: (0, smithy_client_1.expectString)(output.virtualGatewayId),
3970
- virtualGatewayOwnerAccount: (0, smithy_client_1.expectString)(output.virtualGatewayOwnerAccount),
3971
- virtualGatewayRegion: (0, smithy_client_1.expectString)(output.virtualGatewayRegion),
3972
- };
3973
- };
3974
- const de_DirectConnectGatewayAssociationList = (output, context) => {
3975
- const retVal = (output || [])
3976
- .filter((e) => e != null)
3977
- .map((entry) => {
3978
- if (entry === null) {
3979
- return null;
3980
- }
3981
- return de_DirectConnectGatewayAssociation(entry, context);
3982
- });
3983
- return retVal;
3984
- };
3985
- const de_DirectConnectGatewayAssociationProposal = (output, context) => {
3986
- return {
3987
- associatedGateway: output.associatedGateway != null ? de_AssociatedGateway(output.associatedGateway, context) : undefined,
3988
- directConnectGatewayId: (0, smithy_client_1.expectString)(output.directConnectGatewayId),
3989
- directConnectGatewayOwnerAccount: (0, smithy_client_1.expectString)(output.directConnectGatewayOwnerAccount),
3990
- existingAllowedPrefixesToDirectConnectGateway: output.existingAllowedPrefixesToDirectConnectGateway != null
3991
- ? de_RouteFilterPrefixList(output.existingAllowedPrefixesToDirectConnectGateway, context)
3992
- : undefined,
3993
- proposalId: (0, smithy_client_1.expectString)(output.proposalId),
3994
- proposalState: (0, smithy_client_1.expectString)(output.proposalState),
3995
- requestedAllowedPrefixesToDirectConnectGateway: output.requestedAllowedPrefixesToDirectConnectGateway != null
3996
- ? de_RouteFilterPrefixList(output.requestedAllowedPrefixesToDirectConnectGateway, context)
3997
- : undefined,
3998
- };
3999
- };
4000
- const de_DirectConnectGatewayAssociationProposalList = (output, context) => {
4001
- const retVal = (output || [])
4002
- .filter((e) => e != null)
4003
- .map((entry) => {
4004
- if (entry === null) {
4005
- return null;
4006
- }
4007
- return de_DirectConnectGatewayAssociationProposal(entry, context);
4008
- });
4009
- return retVal;
4010
- };
4011
- const de_DirectConnectGatewayAttachment = (output, context) => {
4012
- return {
4013
- attachmentState: (0, smithy_client_1.expectString)(output.attachmentState),
4014
- attachmentType: (0, smithy_client_1.expectString)(output.attachmentType),
4015
- directConnectGatewayId: (0, smithy_client_1.expectString)(output.directConnectGatewayId),
4016
- stateChangeError: (0, smithy_client_1.expectString)(output.stateChangeError),
4017
- virtualInterfaceId: (0, smithy_client_1.expectString)(output.virtualInterfaceId),
4018
- virtualInterfaceOwnerAccount: (0, smithy_client_1.expectString)(output.virtualInterfaceOwnerAccount),
4019
- virtualInterfaceRegion: (0, smithy_client_1.expectString)(output.virtualInterfaceRegion),
4020
- };
4021
- };
4022
- const de_DirectConnectGatewayAttachmentList = (output, context) => {
4023
- const retVal = (output || [])
4024
- .filter((e) => e != null)
4025
- .map((entry) => {
4026
- if (entry === null) {
4027
- return null;
4028
- }
4029
- return de_DirectConnectGatewayAttachment(entry, context);
4030
- });
4031
- return retVal;
4032
- };
4033
- const de_DirectConnectGatewayList = (output, context) => {
4034
- const retVal = (output || [])
4035
- .filter((e) => e != null)
4036
- .map((entry) => {
4037
- if (entry === null) {
4038
- return null;
4039
- }
4040
- return de_DirectConnectGateway(entry, context);
4041
- });
4042
- return retVal;
4043
- };
4044
- const de_DirectConnectServerException = (output, context) => {
4045
- return {
4046
- message: (0, smithy_client_1.expectString)(output.message),
4047
- };
4048
- };
4049
- const de_DisassociateMacSecKeyResponse = (output, context) => {
4050
- return {
4051
- connectionId: (0, smithy_client_1.expectString)(output.connectionId),
4052
- macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined,
4053
- };
4054
- };
4055
- const de_DuplicateTagKeysException = (output, context) => {
4056
- return {
4057
- message: (0, smithy_client_1.expectString)(output.message),
4058
- };
4059
- };
4060
- const de_Interconnect = (output, context) => {
4061
- return {
4062
- awsDevice: (0, smithy_client_1.expectString)(output.awsDevice),
4063
- awsDeviceV2: (0, smithy_client_1.expectString)(output.awsDeviceV2),
4064
- awsLogicalDeviceId: (0, smithy_client_1.expectString)(output.awsLogicalDeviceId),
4065
- bandwidth: (0, smithy_client_1.expectString)(output.bandwidth),
4066
- hasLogicalRedundancy: (0, smithy_client_1.expectString)(output.hasLogicalRedundancy),
4067
- interconnectId: (0, smithy_client_1.expectString)(output.interconnectId),
4068
- interconnectName: (0, smithy_client_1.expectString)(output.interconnectName),
4069
- interconnectState: (0, smithy_client_1.expectString)(output.interconnectState),
4070
- jumboFrameCapable: (0, smithy_client_1.expectBoolean)(output.jumboFrameCapable),
4071
- lagId: (0, smithy_client_1.expectString)(output.lagId),
4072
- loaIssueTime: output.loaIssueTime != null
4073
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.loaIssueTime)))
4074
- : undefined,
4075
- location: (0, smithy_client_1.expectString)(output.location),
4076
- providerName: (0, smithy_client_1.expectString)(output.providerName),
4077
- region: (0, smithy_client_1.expectString)(output.region),
4078
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
4079
- };
4080
- };
4081
- const de_InterconnectList = (output, context) => {
4082
- const retVal = (output || [])
4083
- .filter((e) => e != null)
4084
- .map((entry) => {
4085
- if (entry === null) {
4086
- return null;
4087
- }
4088
- return de_Interconnect(entry, context);
4089
- });
4090
- return retVal;
4091
- };
4092
- const de_Interconnects = (output, context) => {
4093
- return {
4094
- interconnects: output.interconnects != null ? de_InterconnectList(output.interconnects, context) : undefined,
4095
- };
4096
- };
4097
- const de_Lag = (output, context) => {
4098
- return {
4099
- allowsHostedConnections: (0, smithy_client_1.expectBoolean)(output.allowsHostedConnections),
4100
- awsDevice: (0, smithy_client_1.expectString)(output.awsDevice),
4101
- awsDeviceV2: (0, smithy_client_1.expectString)(output.awsDeviceV2),
4102
- awsLogicalDeviceId: (0, smithy_client_1.expectString)(output.awsLogicalDeviceId),
4103
- connections: output.connections != null ? de_ConnectionList(output.connections, context) : undefined,
4104
- connectionsBandwidth: (0, smithy_client_1.expectString)(output.connectionsBandwidth),
4105
- encryptionMode: (0, smithy_client_1.expectString)(output.encryptionMode),
4106
- hasLogicalRedundancy: (0, smithy_client_1.expectString)(output.hasLogicalRedundancy),
4107
- jumboFrameCapable: (0, smithy_client_1.expectBoolean)(output.jumboFrameCapable),
4108
- lagId: (0, smithy_client_1.expectString)(output.lagId),
4109
- lagName: (0, smithy_client_1.expectString)(output.lagName),
4110
- lagState: (0, smithy_client_1.expectString)(output.lagState),
4111
- location: (0, smithy_client_1.expectString)(output.location),
4112
- macSecCapable: (0, smithy_client_1.expectBoolean)(output.macSecCapable),
4113
- macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined,
4114
- minimumLinks: (0, smithy_client_1.expectInt32)(output.minimumLinks),
4115
- numberOfConnections: (0, smithy_client_1.expectInt32)(output.numberOfConnections),
4116
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
4117
- providerName: (0, smithy_client_1.expectString)(output.providerName),
4118
- region: (0, smithy_client_1.expectString)(output.region),
4119
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
4120
- };
4121
- };
4122
- const de_LagList = (output, context) => {
4123
- const retVal = (output || [])
4124
- .filter((e) => e != null)
4125
- .map((entry) => {
4126
- if (entry === null) {
4127
- return null;
4128
- }
4129
- return de_Lag(entry, context);
4130
- });
4131
- return retVal;
4132
- };
4133
- const de_Lags = (output, context) => {
4134
- return {
4135
- lags: output.lags != null ? de_LagList(output.lags, context) : undefined,
4136
- };
4137
- };
4138
- const de_ListVirtualInterfaceTestHistoryResponse = (output, context) => {
4139
- return {
4140
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
4141
- virtualInterfaceTestHistory: output.virtualInterfaceTestHistory != null
4142
- ? de_VirtualInterfaceTestHistoryList(output.virtualInterfaceTestHistory, context)
4143
- : undefined,
4144
- };
4145
- };
4146
- const de_Loa = (output, context) => {
4147
- return {
4148
- loaContent: output.loaContent != null ? context.base64Decoder(output.loaContent) : undefined,
4149
- loaContentType: (0, smithy_client_1.expectString)(output.loaContentType),
4150
- };
4151
- };
4152
- const de_Location = (output, context) => {
4153
- return {
4154
- availableMacSecPortSpeeds: output.availableMacSecPortSpeeds != null
4155
- ? de_AvailableMacSecPortSpeeds(output.availableMacSecPortSpeeds, context)
4156
- : undefined,
4157
- availablePortSpeeds: output.availablePortSpeeds != null ? de_AvailablePortSpeeds(output.availablePortSpeeds, context) : undefined,
4158
- availableProviders: output.availableProviders != null ? de_ProviderList(output.availableProviders, context) : undefined,
4159
- locationCode: (0, smithy_client_1.expectString)(output.locationCode),
4160
- locationName: (0, smithy_client_1.expectString)(output.locationName),
4161
- region: (0, smithy_client_1.expectString)(output.region),
4162
- };
4163
- };
4164
- const de_LocationList = (output, context) => {
4165
- const retVal = (output || [])
4166
- .filter((e) => e != null)
4167
- .map((entry) => {
4168
- if (entry === null) {
4169
- return null;
4170
- }
4171
- return de_Location(entry, context);
4172
- });
4173
- return retVal;
4174
- };
4175
- const de_Locations = (output, context) => {
4176
- return {
4177
- locations: output.locations != null ? de_LocationList(output.locations, context) : undefined,
4178
- };
4179
- };
4180
- const de_MacSecKey = (output, context) => {
4181
- return {
4182
- ckn: (0, smithy_client_1.expectString)(output.ckn),
4183
- secretARN: (0, smithy_client_1.expectString)(output.secretARN),
4184
- startOn: (0, smithy_client_1.expectString)(output.startOn),
4185
- state: (0, smithy_client_1.expectString)(output.state),
4186
- };
4187
- };
4188
- const de_MacSecKeyList = (output, context) => {
4189
- const retVal = (output || [])
4190
- .filter((e) => e != null)
4191
- .map((entry) => {
4192
- if (entry === null) {
4193
- return null;
4194
- }
4195
- return de_MacSecKey(entry, context);
4196
- });
4197
- return retVal;
4198
- };
4199
- const de_ProviderList = (output, context) => {
4200
- const retVal = (output || [])
4201
- .filter((e) => e != null)
4202
- .map((entry) => {
4203
- if (entry === null) {
4204
- return null;
4205
- }
4206
- return (0, smithy_client_1.expectString)(entry);
4207
- });
4208
- return retVal;
4209
- };
4210
- const de_ResourceTag = (output, context) => {
4211
- return {
4212
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
4213
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
4214
- };
4215
- };
4216
- const de_ResourceTagList = (output, context) => {
4217
- const retVal = (output || [])
4218
- .filter((e) => e != null)
4219
- .map((entry) => {
4220
- if (entry === null) {
4221
- return null;
4222
- }
4223
- return de_ResourceTag(entry, context);
4224
- });
4225
- return retVal;
4226
- };
4227
- const de_RouteFilterPrefix = (output, context) => {
4228
- return {
4229
- cidr: (0, smithy_client_1.expectString)(output.cidr),
4230
- };
4231
- };
4232
- const de_RouteFilterPrefixList = (output, context) => {
4233
- const retVal = (output || [])
4234
- .filter((e) => e != null)
4235
- .map((entry) => {
4236
- if (entry === null) {
4237
- return null;
4238
- }
4239
- return de_RouteFilterPrefix(entry, context);
4240
- });
4241
- return retVal;
4242
- };
4243
- const de_RouterType = (output, context) => {
4244
- return {
4245
- platform: (0, smithy_client_1.expectString)(output.platform),
4246
- routerTypeIdentifier: (0, smithy_client_1.expectString)(output.routerTypeIdentifier),
4247
- software: (0, smithy_client_1.expectString)(output.software),
4248
- vendor: (0, smithy_client_1.expectString)(output.vendor),
4249
- xsltTemplateName: (0, smithy_client_1.expectString)(output.xsltTemplateName),
4250
- xsltTemplateNameForMacSec: (0, smithy_client_1.expectString)(output.xsltTemplateNameForMacSec),
4251
- };
4252
- };
4253
- const de_StartBgpFailoverTestResponse = (output, context) => {
4254
- return {
4255
- virtualInterfaceTest: output.virtualInterfaceTest != null
4256
- ? de_VirtualInterfaceTestHistory(output.virtualInterfaceTest, context)
4257
- : undefined,
4258
- };
4259
- };
4260
- const de_StopBgpFailoverTestResponse = (output, context) => {
4261
- return {
4262
- virtualInterfaceTest: output.virtualInterfaceTest != null
4263
- ? de_VirtualInterfaceTestHistory(output.virtualInterfaceTest, context)
4264
- : undefined,
4265
- };
4266
- };
4267
- const de_Tag = (output, context) => {
4268
- return {
4269
- key: (0, smithy_client_1.expectString)(output.key),
4270
- value: (0, smithy_client_1.expectString)(output.value),
4271
- };
4272
- };
4273
- const de_TagList = (output, context) => {
4274
- const retVal = (output || [])
4275
- .filter((e) => e != null)
4276
- .map((entry) => {
4277
- if (entry === null) {
4278
- return null;
4279
- }
4280
- return de_Tag(entry, context);
4281
- });
4282
- return retVal;
4283
- };
4284
- const de_TagResourceResponse = (output, context) => {
4285
- return {};
4286
- };
4287
- const de_TooManyTagsException = (output, context) => {
4288
- return {
4289
- message: (0, smithy_client_1.expectString)(output.message),
4290
- };
4291
- };
4292
- const de_UntagResourceResponse = (output, context) => {
4293
- return {};
4294
- };
4295
- const de_UpdateDirectConnectGatewayAssociationResult = (output, context) => {
4296
- return {
4297
- directConnectGatewayAssociation: output.directConnectGatewayAssociation != null
4298
- ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context)
4299
- : undefined,
4300
- };
4301
- };
4302
- const de_UpdateDirectConnectGatewayResponse = (output, context) => {
4303
- return {
4304
- directConnectGateway: output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined,
4305
- };
4306
- };
4307
- const de_VirtualGateway = (output, context) => {
4308
- return {
4309
- virtualGatewayId: (0, smithy_client_1.expectString)(output.virtualGatewayId),
4310
- virtualGatewayState: (0, smithy_client_1.expectString)(output.virtualGatewayState),
4311
- };
4312
- };
4313
- const de_VirtualGatewayList = (output, context) => {
4314
- const retVal = (output || [])
4315
- .filter((e) => e != null)
4316
- .map((entry) => {
4317
- if (entry === null) {
4318
- return null;
4319
- }
4320
- return de_VirtualGateway(entry, context);
4321
- });
4322
- return retVal;
4323
- };
4324
- const de_VirtualGateways = (output, context) => {
4325
- return {
4326
- virtualGateways: output.virtualGateways != null ? de_VirtualGatewayList(output.virtualGateways, context) : undefined,
4327
- };
4328
- };
4329
- const de_VirtualInterface = (output, context) => {
4330
- return {
4331
- addressFamily: (0, smithy_client_1.expectString)(output.addressFamily),
4332
- amazonAddress: (0, smithy_client_1.expectString)(output.amazonAddress),
4333
- amazonSideAsn: (0, smithy_client_1.expectLong)(output.amazonSideAsn),
4334
- asn: (0, smithy_client_1.expectInt32)(output.asn),
4335
- authKey: (0, smithy_client_1.expectString)(output.authKey),
4336
- awsDeviceV2: (0, smithy_client_1.expectString)(output.awsDeviceV2),
4337
- awsLogicalDeviceId: (0, smithy_client_1.expectString)(output.awsLogicalDeviceId),
4338
- bgpPeers: output.bgpPeers != null ? de_BGPPeerList(output.bgpPeers, context) : undefined,
4339
- connectionId: (0, smithy_client_1.expectString)(output.connectionId),
4340
- customerAddress: (0, smithy_client_1.expectString)(output.customerAddress),
4341
- customerRouterConfig: (0, smithy_client_1.expectString)(output.customerRouterConfig),
4342
- directConnectGatewayId: (0, smithy_client_1.expectString)(output.directConnectGatewayId),
4343
- jumboFrameCapable: (0, smithy_client_1.expectBoolean)(output.jumboFrameCapable),
4344
- location: (0, smithy_client_1.expectString)(output.location),
4345
- mtu: (0, smithy_client_1.expectInt32)(output.mtu),
4346
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
4347
- region: (0, smithy_client_1.expectString)(output.region),
4348
- routeFilterPrefixes: output.routeFilterPrefixes != null ? de_RouteFilterPrefixList(output.routeFilterPrefixes, context) : undefined,
4349
- siteLinkEnabled: (0, smithy_client_1.expectBoolean)(output.siteLinkEnabled),
4350
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
4351
- virtualGatewayId: (0, smithy_client_1.expectString)(output.virtualGatewayId),
4352
- virtualInterfaceId: (0, smithy_client_1.expectString)(output.virtualInterfaceId),
4353
- virtualInterfaceName: (0, smithy_client_1.expectString)(output.virtualInterfaceName),
4354
- virtualInterfaceState: (0, smithy_client_1.expectString)(output.virtualInterfaceState),
4355
- virtualInterfaceType: (0, smithy_client_1.expectString)(output.virtualInterfaceType),
4356
- vlan: (0, smithy_client_1.expectInt32)(output.vlan),
4357
- };
4358
- };
4359
- const de_VirtualInterfaceList = (output, context) => {
4360
- const retVal = (output || [])
4361
- .filter((e) => e != null)
4362
- .map((entry) => {
4363
- if (entry === null) {
4364
- return null;
4365
- }
4366
- return de_VirtualInterface(entry, context);
4367
- });
4368
- return retVal;
4369
- };
4370
- const de_VirtualInterfaces = (output, context) => {
4371
- return {
4372
- virtualInterfaces: output.virtualInterfaces != null ? de_VirtualInterfaceList(output.virtualInterfaces, context) : undefined,
4373
- };
4374
- };
4375
- const de_VirtualInterfaceTestHistory = (output, context) => {
4376
- return {
4377
- bgpPeers: output.bgpPeers != null ? de_BGPPeerIdList(output.bgpPeers, context) : undefined,
4378
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
4379
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
4380
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
4381
- status: (0, smithy_client_1.expectString)(output.status),
4382
- testDurationInMinutes: (0, smithy_client_1.expectInt32)(output.testDurationInMinutes),
4383
- testId: (0, smithy_client_1.expectString)(output.testId),
4384
- virtualInterfaceId: (0, smithy_client_1.expectString)(output.virtualInterfaceId),
4385
- };
4386
- };
4387
- const de_VirtualInterfaceTestHistoryList = (output, context) => {
4388
- const retVal = (output || [])
4389
- .filter((e) => e != null)
4390
- .map((entry) => {
4391
- if (entry === null) {
4392
- return null;
4393
- }
4394
- return de_VirtualInterfaceTestHistory(entry, context);
4395
- });
4396
- return retVal;
4397
- };
4398
- const deserializeMetadata = (output) => ({
4399
- httpStatusCode: output.statusCode,
4400
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4401
- extendedRequestId: output.headers["x-amz-id-2"],
4402
- cfId: output.headers["x-amz-cf-id"],
4403
- });
4404
- const collectBody = (streamBody = new Uint8Array(), context) => {
4405
- if (streamBody instanceof Uint8Array) {
4406
- return Promise.resolve(streamBody);
4407
- }
4408
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4409
- };
4410
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4411
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
4412
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4413
- const contents = {
4414
- protocol,
4415
- hostname,
4416
- port,
4417
- method: "POST",
4418
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
4419
- headers,
4420
- };
4421
- if (resolvedHostname !== undefined) {
4422
- contents.hostname = resolvedHostname;
4423
- }
4424
- if (body !== undefined) {
4425
- contents.body = body;
4426
- }
4427
- return new protocol_http_1.HttpRequest(contents);
4428
- };
3016
+ }
4429
3017
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4430
3018
  if (encoded.length) {
4431
3019
  return JSON.parse(encoded);