@aws-sdk/client-iotsecuretunneling 3.312.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,56 +8,56 @@ const models_0_1 = require("../models/models_0");
8
8
  const se_CloseTunnelCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("CloseTunnel");
10
10
  let body;
11
- body = JSON.stringify(se_CloseTunnelRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_CloseTunnelCommand = se_CloseTunnelCommand;
15
15
  const se_DescribeTunnelCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("DescribeTunnel");
17
17
  let body;
18
- body = JSON.stringify(se_DescribeTunnelRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_DescribeTunnelCommand = se_DescribeTunnelCommand;
22
22
  const se_ListTagsForResourceCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("ListTagsForResource");
24
24
  let body;
25
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
27
  };
28
28
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
29
29
  const se_ListTunnelsCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("ListTunnels");
31
31
  let body;
32
- body = JSON.stringify(se_ListTunnelsRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  exports.se_ListTunnelsCommand = se_ListTunnelsCommand;
36
36
  const se_OpenTunnelCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("OpenTunnel");
38
38
  let body;
39
- body = JSON.stringify(se_OpenTunnelRequest(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  exports.se_OpenTunnelCommand = se_OpenTunnelCommand;
43
43
  const se_RotateTunnelAccessTokenCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("RotateTunnelAccessToken");
45
45
  let body;
46
- body = JSON.stringify(se_RotateTunnelAccessTokenRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_RotateTunnelAccessTokenCommand = se_RotateTunnelAccessTokenCommand;
50
50
  const se_TagResourceCommand = async (input, context) => {
51
51
  const headers = sharedHeaders("TagResource");
52
52
  let body;
53
- body = JSON.stringify(se_TagResourceRequest(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
54
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
55
  };
56
56
  exports.se_TagResourceCommand = se_TagResourceCommand;
57
57
  const se_UntagResourceCommand = async (input, context) => {
58
58
  const headers = sharedHeaders("UntagResource");
59
59
  let body;
60
- body = JSON.stringify(se_UntagResourceRequest(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
61
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
62
  };
63
63
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
@@ -67,12 +67,12 @@ const de_CloseTunnelCommand = async (output, context) => {
67
67
  }
68
68
  const data = await parseBody(output.body, context);
69
69
  let contents = {};
70
- contents = de_CloseTunnelResponse(data, context);
70
+ contents = (0, smithy_client_1._json)(data);
71
71
  const response = {
72
72
  $metadata: deserializeMetadata(output),
73
73
  ...contents,
74
74
  };
75
- return Promise.resolve(response);
75
+ return response;
76
76
  };
77
77
  exports.de_CloseTunnelCommand = de_CloseTunnelCommand;
78
78
  const de_CloseTunnelCommandError = async (output, context) => {
@@ -87,10 +87,9 @@ const de_CloseTunnelCommandError = async (output, context) => {
87
87
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
88
88
  default:
89
89
  const parsedBody = parsedOutput.body;
90
- (0, smithy_client_1.throwDefaultError)({
90
+ return throwDefaultError({
91
91
  output,
92
92
  parsedBody,
93
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
94
93
  errorCode,
95
94
  });
96
95
  }
@@ -106,7 +105,7 @@ const de_DescribeTunnelCommand = async (output, context) => {
106
105
  $metadata: deserializeMetadata(output),
107
106
  ...contents,
108
107
  };
109
- return Promise.resolve(response);
108
+ return response;
110
109
  };
111
110
  exports.de_DescribeTunnelCommand = de_DescribeTunnelCommand;
112
111
  const de_DescribeTunnelCommandError = async (output, context) => {
@@ -121,10 +120,9 @@ const de_DescribeTunnelCommandError = async (output, context) => {
121
120
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
122
121
  default:
123
122
  const parsedBody = parsedOutput.body;
124
- (0, smithy_client_1.throwDefaultError)({
123
+ return throwDefaultError({
125
124
  output,
126
125
  parsedBody,
127
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
128
126
  errorCode,
129
127
  });
130
128
  }
@@ -135,12 +133,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
135
133
  }
136
134
  const data = await parseBody(output.body, context);
137
135
  let contents = {};
138
- contents = de_ListTagsForResourceResponse(data, context);
136
+ contents = (0, smithy_client_1._json)(data);
139
137
  const response = {
140
138
  $metadata: deserializeMetadata(output),
141
139
  ...contents,
142
140
  };
143
- return Promise.resolve(response);
141
+ return response;
144
142
  };
145
143
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
146
144
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -155,10 +153,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
155
153
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
156
154
  default:
157
155
  const parsedBody = parsedOutput.body;
158
- (0, smithy_client_1.throwDefaultError)({
156
+ return throwDefaultError({
159
157
  output,
160
158
  parsedBody,
161
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
162
159
  errorCode,
163
160
  });
164
161
  }
@@ -174,7 +171,7 @@ const de_ListTunnelsCommand = async (output, context) => {
174
171
  $metadata: deserializeMetadata(output),
175
172
  ...contents,
176
173
  };
177
- return Promise.resolve(response);
174
+ return response;
178
175
  };
179
176
  exports.de_ListTunnelsCommand = de_ListTunnelsCommand;
180
177
  const de_ListTunnelsCommandError = async (output, context) => {
@@ -184,10 +181,9 @@ const de_ListTunnelsCommandError = async (output, context) => {
184
181
  };
185
182
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
186
183
  const parsedBody = parsedOutput.body;
187
- (0, smithy_client_1.throwDefaultError)({
184
+ return throwDefaultError({
188
185
  output,
189
186
  parsedBody,
190
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
191
187
  errorCode,
192
188
  });
193
189
  };
@@ -197,12 +193,12 @@ const de_OpenTunnelCommand = async (output, context) => {
197
193
  }
198
194
  const data = await parseBody(output.body, context);
199
195
  let contents = {};
200
- contents = de_OpenTunnelResponse(data, context);
196
+ contents = (0, smithy_client_1._json)(data);
201
197
  const response = {
202
198
  $metadata: deserializeMetadata(output),
203
199
  ...contents,
204
200
  };
205
- return Promise.resolve(response);
201
+ return response;
206
202
  };
207
203
  exports.de_OpenTunnelCommand = de_OpenTunnelCommand;
208
204
  const de_OpenTunnelCommandError = async (output, context) => {
@@ -217,10 +213,9 @@ const de_OpenTunnelCommandError = async (output, context) => {
217
213
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
218
214
  default:
219
215
  const parsedBody = parsedOutput.body;
220
- (0, smithy_client_1.throwDefaultError)({
216
+ return throwDefaultError({
221
217
  output,
222
218
  parsedBody,
223
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
224
219
  errorCode,
225
220
  });
226
221
  }
@@ -231,12 +226,12 @@ const de_RotateTunnelAccessTokenCommand = async (output, context) => {
231
226
  }
232
227
  const data = await parseBody(output.body, context);
233
228
  let contents = {};
234
- contents = de_RotateTunnelAccessTokenResponse(data, context);
229
+ contents = (0, smithy_client_1._json)(data);
235
230
  const response = {
236
231
  $metadata: deserializeMetadata(output),
237
232
  ...contents,
238
233
  };
239
- return Promise.resolve(response);
234
+ return response;
240
235
  };
241
236
  exports.de_RotateTunnelAccessTokenCommand = de_RotateTunnelAccessTokenCommand;
242
237
  const de_RotateTunnelAccessTokenCommandError = async (output, context) => {
@@ -251,10 +246,9 @@ const de_RotateTunnelAccessTokenCommandError = async (output, context) => {
251
246
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
252
247
  default:
253
248
  const parsedBody = parsedOutput.body;
254
- (0, smithy_client_1.throwDefaultError)({
249
+ return throwDefaultError({
255
250
  output,
256
251
  parsedBody,
257
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
258
252
  errorCode,
259
253
  });
260
254
  }
@@ -265,12 +259,12 @@ const de_TagResourceCommand = async (output, context) => {
265
259
  }
266
260
  const data = await parseBody(output.body, context);
267
261
  let contents = {};
268
- contents = de_TagResourceResponse(data, context);
262
+ contents = (0, smithy_client_1._json)(data);
269
263
  const response = {
270
264
  $metadata: deserializeMetadata(output),
271
265
  ...contents,
272
266
  };
273
- return Promise.resolve(response);
267
+ return response;
274
268
  };
275
269
  exports.de_TagResourceCommand = de_TagResourceCommand;
276
270
  const de_TagResourceCommandError = async (output, context) => {
@@ -285,10 +279,9 @@ const de_TagResourceCommandError = async (output, context) => {
285
279
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
286
280
  default:
287
281
  const parsedBody = parsedOutput.body;
288
- (0, smithy_client_1.throwDefaultError)({
282
+ return throwDefaultError({
289
283
  output,
290
284
  parsedBody,
291
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
292
285
  errorCode,
293
286
  });
294
287
  }
@@ -299,12 +292,12 @@ const de_UntagResourceCommand = async (output, context) => {
299
292
  }
300
293
  const data = await parseBody(output.body, context);
301
294
  let contents = {};
302
- contents = de_UntagResourceResponse(data, context);
295
+ contents = (0, smithy_client_1._json)(data);
303
296
  const response = {
304
297
  $metadata: deserializeMetadata(output),
305
298
  ...contents,
306
299
  };
307
- return Promise.resolve(response);
300
+ return response;
308
301
  };
309
302
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
310
303
  const de_UntagResourceCommandError = async (output, context) => {
@@ -319,17 +312,16 @@ const de_UntagResourceCommandError = async (output, context) => {
319
312
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
320
313
  default:
321
314
  const parsedBody = parsedOutput.body;
322
- (0, smithy_client_1.throwDefaultError)({
315
+ return throwDefaultError({
323
316
  output,
324
317
  parsedBody,
325
- exceptionCtor: IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException,
326
318
  errorCode,
327
319
  });
328
320
  }
329
321
  };
330
322
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
331
323
  const body = parsedOutput.body;
332
- const deserialized = de_LimitExceededException(body, context);
324
+ const deserialized = (0, smithy_client_1._json)(body);
333
325
  const exception = new models_0_1.LimitExceededException({
334
326
  $metadata: deserializeMetadata(parsedOutput),
335
327
  ...deserialized,
@@ -338,244 +330,63 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
338
330
  };
339
331
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
340
332
  const body = parsedOutput.body;
341
- const deserialized = de_ResourceNotFoundException(body, context);
333
+ const deserialized = (0, smithy_client_1._json)(body);
342
334
  const exception = new models_0_1.ResourceNotFoundException({
343
335
  $metadata: deserializeMetadata(parsedOutput),
344
336
  ...deserialized,
345
337
  });
346
338
  return (0, smithy_client_1.decorateServiceException)(exception, body);
347
339
  };
348
- const se_CloseTunnelRequest = (input, context) => {
349
- return {
350
- ...(input.delete != null && { delete: input.delete }),
351
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
352
- };
353
- };
354
- const se_DescribeTunnelRequest = (input, context) => {
355
- return {
356
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
357
- };
358
- };
359
- const se_DestinationConfig = (input, context) => {
360
- return {
361
- ...(input.services != null && { services: se_ServiceList(input.services, context) }),
362
- ...(input.thingName != null && { thingName: input.thingName }),
363
- };
364
- };
365
- const se_ListTagsForResourceRequest = (input, context) => {
366
- return {
367
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
368
- };
369
- };
370
- const se_ListTunnelsRequest = (input, context) => {
371
- return {
372
- ...(input.maxResults != null && { maxResults: input.maxResults }),
373
- ...(input.nextToken != null && { nextToken: input.nextToken }),
374
- ...(input.thingName != null && { thingName: input.thingName }),
375
- };
376
- };
377
- const se_OpenTunnelRequest = (input, context) => {
378
- return {
379
- ...(input.description != null && { description: input.description }),
380
- ...(input.destinationConfig != null && {
381
- destinationConfig: se_DestinationConfig(input.destinationConfig, context),
382
- }),
383
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
384
- ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }),
385
- };
386
- };
387
- const se_RotateTunnelAccessTokenRequest = (input, context) => {
388
- return {
389
- ...(input.clientMode != null && { clientMode: input.clientMode }),
390
- ...(input.destinationConfig != null && {
391
- destinationConfig: se_DestinationConfig(input.destinationConfig, context),
392
- }),
393
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
394
- };
395
- };
396
- const se_ServiceList = (input, context) => {
397
- return input
398
- .filter((e) => e != null)
399
- .map((entry) => {
400
- return entry;
401
- });
402
- };
403
- const se_Tag = (input, context) => {
404
- return {
405
- ...(input.key != null && { key: input.key }),
406
- ...(input.value != null && { value: input.value }),
407
- };
408
- };
409
- const se_TagKeyList = (input, context) => {
410
- return input
411
- .filter((e) => e != null)
412
- .map((entry) => {
413
- return entry;
414
- });
415
- };
416
- const se_TagList = (input, context) => {
417
- return input
418
- .filter((e) => e != null)
419
- .map((entry) => {
420
- return se_Tag(entry, context);
421
- });
422
- };
423
- const se_TagResourceRequest = (input, context) => {
424
- return {
425
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
426
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
427
- };
428
- };
429
- const se_TimeoutConfig = (input, context) => {
430
- return {
431
- ...(input.maxLifetimeTimeoutMinutes != null && { maxLifetimeTimeoutMinutes: input.maxLifetimeTimeoutMinutes }),
432
- };
433
- };
434
- const se_UntagResourceRequest = (input, context) => {
435
- return {
436
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
437
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
438
- };
439
- };
440
- const de_CloseTunnelResponse = (output, context) => {
441
- return {};
442
- };
443
340
  const de_ConnectionState = (output, context) => {
444
- return {
445
- lastUpdatedAt: output.lastUpdatedAt != null
446
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
447
- : undefined,
448
- status: (0, smithy_client_1.expectString)(output.status),
449
- };
341
+ return (0, smithy_client_1.take)(output, {
342
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
343
+ status: smithy_client_1.expectString,
344
+ });
450
345
  };
451
346
  const de_DescribeTunnelResponse = (output, context) => {
452
- return {
453
- tunnel: output.tunnel != null ? de_Tunnel(output.tunnel, context) : undefined,
454
- };
455
- };
456
- const de_DestinationConfig = (output, context) => {
457
- return {
458
- services: output.services != null ? de_ServiceList(output.services, context) : undefined,
459
- thingName: (0, smithy_client_1.expectString)(output.thingName),
460
- };
461
- };
462
- const de_LimitExceededException = (output, context) => {
463
- return {
464
- message: (0, smithy_client_1.expectString)(output.message),
465
- };
466
- };
467
- const de_ListTagsForResourceResponse = (output, context) => {
468
- return {
469
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
470
- };
471
- };
472
- const de_ListTunnelsResponse = (output, context) => {
473
- return {
474
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
475
- tunnelSummaries: output.tunnelSummaries != null ? de_TunnelSummaryList(output.tunnelSummaries, context) : undefined,
476
- };
477
- };
478
- const de_OpenTunnelResponse = (output, context) => {
479
- return {
480
- destinationAccessToken: (0, smithy_client_1.expectString)(output.destinationAccessToken),
481
- sourceAccessToken: (0, smithy_client_1.expectString)(output.sourceAccessToken),
482
- tunnelArn: (0, smithy_client_1.expectString)(output.tunnelArn),
483
- tunnelId: (0, smithy_client_1.expectString)(output.tunnelId),
484
- };
485
- };
486
- const de_ResourceNotFoundException = (output, context) => {
487
- return {
488
- message: (0, smithy_client_1.expectString)(output.message),
489
- };
490
- };
491
- const de_RotateTunnelAccessTokenResponse = (output, context) => {
492
- return {
493
- destinationAccessToken: (0, smithy_client_1.expectString)(output.destinationAccessToken),
494
- sourceAccessToken: (0, smithy_client_1.expectString)(output.sourceAccessToken),
495
- tunnelArn: (0, smithy_client_1.expectString)(output.tunnelArn),
496
- };
497
- };
498
- const de_ServiceList = (output, context) => {
499
- const retVal = (output || [])
500
- .filter((e) => e != null)
501
- .map((entry) => {
502
- if (entry === null) {
503
- return null;
504
- }
505
- return (0, smithy_client_1.expectString)(entry);
347
+ return (0, smithy_client_1.take)(output, {
348
+ tunnel: (_) => de_Tunnel(_, context),
506
349
  });
507
- return retVal;
508
350
  };
509
- const de_Tag = (output, context) => {
510
- return {
511
- key: (0, smithy_client_1.expectString)(output.key),
512
- value: (0, smithy_client_1.expectString)(output.value),
513
- };
514
- };
515
- const de_TagList = (output, context) => {
516
- const retVal = (output || [])
517
- .filter((e) => e != null)
518
- .map((entry) => {
519
- if (entry === null) {
520
- return null;
521
- }
522
- return de_Tag(entry, context);
351
+ const de_ListTunnelsResponse = (output, context) => {
352
+ return (0, smithy_client_1.take)(output, {
353
+ nextToken: smithy_client_1.expectString,
354
+ tunnelSummaries: (_) => de_TunnelSummaryList(_, context),
523
355
  });
524
- return retVal;
525
- };
526
- const de_TagResourceResponse = (output, context) => {
527
- return {};
528
- };
529
- const de_TimeoutConfig = (output, context) => {
530
- return {
531
- maxLifetimeTimeoutMinutes: (0, smithy_client_1.expectInt32)(output.maxLifetimeTimeoutMinutes),
532
- };
533
356
  };
534
357
  const de_Tunnel = (output, context) => {
535
- return {
536
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
537
- description: (0, smithy_client_1.expectString)(output.description),
538
- destinationConfig: output.destinationConfig != null ? de_DestinationConfig(output.destinationConfig, context) : undefined,
539
- destinationConnectionState: output.destinationConnectionState != null
540
- ? de_ConnectionState(output.destinationConnectionState, context)
541
- : undefined,
542
- lastUpdatedAt: output.lastUpdatedAt != null
543
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
544
- : undefined,
545
- sourceConnectionState: output.sourceConnectionState != null ? de_ConnectionState(output.sourceConnectionState, context) : undefined,
546
- status: (0, smithy_client_1.expectString)(output.status),
547
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
548
- timeoutConfig: output.timeoutConfig != null ? de_TimeoutConfig(output.timeoutConfig, context) : undefined,
549
- tunnelArn: (0, smithy_client_1.expectString)(output.tunnelArn),
550
- tunnelId: (0, smithy_client_1.expectString)(output.tunnelId),
551
- };
358
+ return (0, smithy_client_1.take)(output, {
359
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
360
+ description: smithy_client_1.expectString,
361
+ destinationConfig: smithy_client_1._json,
362
+ destinationConnectionState: (_) => de_ConnectionState(_, context),
363
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
364
+ sourceConnectionState: (_) => de_ConnectionState(_, context),
365
+ status: smithy_client_1.expectString,
366
+ tags: smithy_client_1._json,
367
+ timeoutConfig: smithy_client_1._json,
368
+ tunnelArn: smithy_client_1.expectString,
369
+ tunnelId: smithy_client_1.expectString,
370
+ });
552
371
  };
553
372
  const de_TunnelSummary = (output, context) => {
554
- return {
555
- createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
556
- description: (0, smithy_client_1.expectString)(output.description),
557
- lastUpdatedAt: output.lastUpdatedAt != null
558
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
559
- : undefined,
560
- status: (0, smithy_client_1.expectString)(output.status),
561
- tunnelArn: (0, smithy_client_1.expectString)(output.tunnelArn),
562
- tunnelId: (0, smithy_client_1.expectString)(output.tunnelId),
563
- };
373
+ return (0, smithy_client_1.take)(output, {
374
+ createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
375
+ description: smithy_client_1.expectString,
376
+ lastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
377
+ status: smithy_client_1.expectString,
378
+ tunnelArn: smithy_client_1.expectString,
379
+ tunnelId: smithy_client_1.expectString,
380
+ });
564
381
  };
565
382
  const de_TunnelSummaryList = (output, context) => {
566
383
  const retVal = (output || [])
567
384
  .filter((e) => e != null)
568
385
  .map((entry) => {
569
- if (entry === null) {
570
- return null;
571
- }
572
386
  return de_TunnelSummary(entry, context);
573
387
  });
574
388
  return retVal;
575
389
  };
576
- const de_UntagResourceResponse = (output, context) => {
577
- return {};
578
- };
579
390
  const deserializeMetadata = (output) => ({
580
391
  httpStatusCode: output.statusCode,
581
392
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -589,6 +400,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
589
400
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
590
401
  };
591
402
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
403
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(IoTSecureTunnelingServiceException_1.IoTSecureTunnelingServiceException);
592
404
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
593
405
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
594
406
  const contents = {
@@ -1,53 +1,53 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { IoTSecureTunnelingServiceException as __BaseException } from "../models/IoTSecureTunnelingServiceException";
4
4
  import { LimitExceededException, ResourceNotFoundException, } from "../models/models_0";
5
5
  export const se_CloseTunnelCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("CloseTunnel");
7
7
  let body;
8
- body = JSON.stringify(se_CloseTunnelRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_DescribeTunnelCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("DescribeTunnel");
13
13
  let body;
14
- body = JSON.stringify(se_DescribeTunnelRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_ListTagsForResourceCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("ListTagsForResource");
19
19
  let body;
20
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_ListTunnelsCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("ListTunnels");
25
25
  let body;
26
- body = JSON.stringify(se_ListTunnelsRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_OpenTunnelCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("OpenTunnel");
31
31
  let body;
32
- body = JSON.stringify(se_OpenTunnelRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_RotateTunnelAccessTokenCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("RotateTunnelAccessToken");
37
37
  let body;
38
- body = JSON.stringify(se_RotateTunnelAccessTokenRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_TagResourceCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("TagResource");
43
43
  let body;
44
- body = JSON.stringify(se_TagResourceRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_UntagResourceCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("UntagResource");
49
49
  let body;
50
- body = JSON.stringify(se_UntagResourceRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const de_CloseTunnelCommand = async (output, context) => {
@@ -56,12 +56,12 @@ export const de_CloseTunnelCommand = async (output, context) => {
56
56
  }
57
57
  const data = await parseBody(output.body, context);
58
58
  let contents = {};
59
- contents = de_CloseTunnelResponse(data, context);
59
+ contents = _json(data);
60
60
  const response = {
61
61
  $metadata: deserializeMetadata(output),
62
62
  ...contents,
63
63
  };
64
- return Promise.resolve(response);
64
+ return response;
65
65
  };
66
66
  const de_CloseTunnelCommandError = async (output, context) => {
67
67
  const parsedOutput = {
@@ -75,10 +75,9 @@ const de_CloseTunnelCommandError = async (output, context) => {
75
75
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
76
76
  default:
77
77
  const parsedBody = parsedOutput.body;
78
- throwDefaultError({
78
+ return throwDefaultError({
79
79
  output,
80
80
  parsedBody,
81
- exceptionCtor: __BaseException,
82
81
  errorCode,
83
82
  });
84
83
  }
@@ -94,7 +93,7 @@ export const de_DescribeTunnelCommand = async (output, context) => {
94
93
  $metadata: deserializeMetadata(output),
95
94
  ...contents,
96
95
  };
97
- return Promise.resolve(response);
96
+ return response;
98
97
  };
99
98
  const de_DescribeTunnelCommandError = async (output, context) => {
100
99
  const parsedOutput = {
@@ -108,10 +107,9 @@ const de_DescribeTunnelCommandError = async (output, context) => {
108
107
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
109
108
  default:
110
109
  const parsedBody = parsedOutput.body;
111
- throwDefaultError({
110
+ return throwDefaultError({
112
111
  output,
113
112
  parsedBody,
114
- exceptionCtor: __BaseException,
115
113
  errorCode,
116
114
  });
117
115
  }
@@ -122,12 +120,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
122
120
  }
123
121
  const data = await parseBody(output.body, context);
124
122
  let contents = {};
125
- contents = de_ListTagsForResourceResponse(data, context);
123
+ contents = _json(data);
126
124
  const response = {
127
125
  $metadata: deserializeMetadata(output),
128
126
  ...contents,
129
127
  };
130
- return Promise.resolve(response);
128
+ return response;
131
129
  };
132
130
  const de_ListTagsForResourceCommandError = async (output, context) => {
133
131
  const parsedOutput = {
@@ -141,10 +139,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
141
139
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
142
140
  default:
143
141
  const parsedBody = parsedOutput.body;
144
- throwDefaultError({
142
+ return throwDefaultError({
145
143
  output,
146
144
  parsedBody,
147
- exceptionCtor: __BaseException,
148
145
  errorCode,
149
146
  });
150
147
  }
@@ -160,7 +157,7 @@ export const de_ListTunnelsCommand = async (output, context) => {
160
157
  $metadata: deserializeMetadata(output),
161
158
  ...contents,
162
159
  };
163
- return Promise.resolve(response);
160
+ return response;
164
161
  };
165
162
  const de_ListTunnelsCommandError = async (output, context) => {
166
163
  const parsedOutput = {
@@ -169,10 +166,9 @@ const de_ListTunnelsCommandError = async (output, context) => {
169
166
  };
170
167
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
171
168
  const parsedBody = parsedOutput.body;
172
- throwDefaultError({
169
+ return throwDefaultError({
173
170
  output,
174
171
  parsedBody,
175
- exceptionCtor: __BaseException,
176
172
  errorCode,
177
173
  });
178
174
  };
@@ -182,12 +178,12 @@ export const de_OpenTunnelCommand = async (output, context) => {
182
178
  }
183
179
  const data = await parseBody(output.body, context);
184
180
  let contents = {};
185
- contents = de_OpenTunnelResponse(data, context);
181
+ contents = _json(data);
186
182
  const response = {
187
183
  $metadata: deserializeMetadata(output),
188
184
  ...contents,
189
185
  };
190
- return Promise.resolve(response);
186
+ return response;
191
187
  };
192
188
  const de_OpenTunnelCommandError = async (output, context) => {
193
189
  const parsedOutput = {
@@ -201,10 +197,9 @@ const de_OpenTunnelCommandError = async (output, context) => {
201
197
  throw await de_LimitExceededExceptionRes(parsedOutput, context);
202
198
  default:
203
199
  const parsedBody = parsedOutput.body;
204
- throwDefaultError({
200
+ return throwDefaultError({
205
201
  output,
206
202
  parsedBody,
207
- exceptionCtor: __BaseException,
208
203
  errorCode,
209
204
  });
210
205
  }
@@ -215,12 +210,12 @@ export const de_RotateTunnelAccessTokenCommand = async (output, context) => {
215
210
  }
216
211
  const data = await parseBody(output.body, context);
217
212
  let contents = {};
218
- contents = de_RotateTunnelAccessTokenResponse(data, context);
213
+ contents = _json(data);
219
214
  const response = {
220
215
  $metadata: deserializeMetadata(output),
221
216
  ...contents,
222
217
  };
223
- return Promise.resolve(response);
218
+ return response;
224
219
  };
225
220
  const de_RotateTunnelAccessTokenCommandError = async (output, context) => {
226
221
  const parsedOutput = {
@@ -234,10 +229,9 @@ const de_RotateTunnelAccessTokenCommandError = async (output, context) => {
234
229
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
235
230
  default:
236
231
  const parsedBody = parsedOutput.body;
237
- throwDefaultError({
232
+ return throwDefaultError({
238
233
  output,
239
234
  parsedBody,
240
- exceptionCtor: __BaseException,
241
235
  errorCode,
242
236
  });
243
237
  }
@@ -248,12 +242,12 @@ export const de_TagResourceCommand = async (output, context) => {
248
242
  }
249
243
  const data = await parseBody(output.body, context);
250
244
  let contents = {};
251
- contents = de_TagResourceResponse(data, context);
245
+ contents = _json(data);
252
246
  const response = {
253
247
  $metadata: deserializeMetadata(output),
254
248
  ...contents,
255
249
  };
256
- return Promise.resolve(response);
250
+ return response;
257
251
  };
258
252
  const de_TagResourceCommandError = async (output, context) => {
259
253
  const parsedOutput = {
@@ -267,10 +261,9 @@ const de_TagResourceCommandError = async (output, context) => {
267
261
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
268
262
  default:
269
263
  const parsedBody = parsedOutput.body;
270
- throwDefaultError({
264
+ return throwDefaultError({
271
265
  output,
272
266
  parsedBody,
273
- exceptionCtor: __BaseException,
274
267
  errorCode,
275
268
  });
276
269
  }
@@ -281,12 +274,12 @@ export const de_UntagResourceCommand = async (output, context) => {
281
274
  }
282
275
  const data = await parseBody(output.body, context);
283
276
  let contents = {};
284
- contents = de_UntagResourceResponse(data, context);
277
+ contents = _json(data);
285
278
  const response = {
286
279
  $metadata: deserializeMetadata(output),
287
280
  ...contents,
288
281
  };
289
- return Promise.resolve(response);
282
+ return response;
290
283
  };
291
284
  const de_UntagResourceCommandError = async (output, context) => {
292
285
  const parsedOutput = {
@@ -300,17 +293,16 @@ const de_UntagResourceCommandError = async (output, context) => {
300
293
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
301
294
  default:
302
295
  const parsedBody = parsedOutput.body;
303
- throwDefaultError({
296
+ return throwDefaultError({
304
297
  output,
305
298
  parsedBody,
306
- exceptionCtor: __BaseException,
307
299
  errorCode,
308
300
  });
309
301
  }
310
302
  };
311
303
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
312
304
  const body = parsedOutput.body;
313
- const deserialized = de_LimitExceededException(body, context);
305
+ const deserialized = _json(body);
314
306
  const exception = new LimitExceededException({
315
307
  $metadata: deserializeMetadata(parsedOutput),
316
308
  ...deserialized,
@@ -319,244 +311,63 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
319
311
  };
320
312
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
321
313
  const body = parsedOutput.body;
322
- const deserialized = de_ResourceNotFoundException(body, context);
314
+ const deserialized = _json(body);
323
315
  const exception = new ResourceNotFoundException({
324
316
  $metadata: deserializeMetadata(parsedOutput),
325
317
  ...deserialized,
326
318
  });
327
319
  return __decorateServiceException(exception, body);
328
320
  };
329
- const se_CloseTunnelRequest = (input, context) => {
330
- return {
331
- ...(input.delete != null && { delete: input.delete }),
332
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
333
- };
334
- };
335
- const se_DescribeTunnelRequest = (input, context) => {
336
- return {
337
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
338
- };
339
- };
340
- const se_DestinationConfig = (input, context) => {
341
- return {
342
- ...(input.services != null && { services: se_ServiceList(input.services, context) }),
343
- ...(input.thingName != null && { thingName: input.thingName }),
344
- };
345
- };
346
- const se_ListTagsForResourceRequest = (input, context) => {
347
- return {
348
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
349
- };
350
- };
351
- const se_ListTunnelsRequest = (input, context) => {
352
- return {
353
- ...(input.maxResults != null && { maxResults: input.maxResults }),
354
- ...(input.nextToken != null && { nextToken: input.nextToken }),
355
- ...(input.thingName != null && { thingName: input.thingName }),
356
- };
357
- };
358
- const se_OpenTunnelRequest = (input, context) => {
359
- return {
360
- ...(input.description != null && { description: input.description }),
361
- ...(input.destinationConfig != null && {
362
- destinationConfig: se_DestinationConfig(input.destinationConfig, context),
363
- }),
364
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
365
- ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }),
366
- };
367
- };
368
- const se_RotateTunnelAccessTokenRequest = (input, context) => {
369
- return {
370
- ...(input.clientMode != null && { clientMode: input.clientMode }),
371
- ...(input.destinationConfig != null && {
372
- destinationConfig: se_DestinationConfig(input.destinationConfig, context),
373
- }),
374
- ...(input.tunnelId != null && { tunnelId: input.tunnelId }),
375
- };
376
- };
377
- const se_ServiceList = (input, context) => {
378
- return input
379
- .filter((e) => e != null)
380
- .map((entry) => {
381
- return entry;
382
- });
383
- };
384
- const se_Tag = (input, context) => {
385
- return {
386
- ...(input.key != null && { key: input.key }),
387
- ...(input.value != null && { value: input.value }),
388
- };
389
- };
390
- const se_TagKeyList = (input, context) => {
391
- return input
392
- .filter((e) => e != null)
393
- .map((entry) => {
394
- return entry;
395
- });
396
- };
397
- const se_TagList = (input, context) => {
398
- return input
399
- .filter((e) => e != null)
400
- .map((entry) => {
401
- return se_Tag(entry, context);
402
- });
403
- };
404
- const se_TagResourceRequest = (input, context) => {
405
- return {
406
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
407
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
408
- };
409
- };
410
- const se_TimeoutConfig = (input, context) => {
411
- return {
412
- ...(input.maxLifetimeTimeoutMinutes != null && { maxLifetimeTimeoutMinutes: input.maxLifetimeTimeoutMinutes }),
413
- };
414
- };
415
- const se_UntagResourceRequest = (input, context) => {
416
- return {
417
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
418
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
419
- };
420
- };
421
- const de_CloseTunnelResponse = (output, context) => {
422
- return {};
423
- };
424
321
  const de_ConnectionState = (output, context) => {
425
- return {
426
- lastUpdatedAt: output.lastUpdatedAt != null
427
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt)))
428
- : undefined,
429
- status: __expectString(output.status),
430
- };
322
+ return take(output, {
323
+ lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
324
+ status: __expectString,
325
+ });
431
326
  };
432
327
  const de_DescribeTunnelResponse = (output, context) => {
433
- return {
434
- tunnel: output.tunnel != null ? de_Tunnel(output.tunnel, context) : undefined,
435
- };
436
- };
437
- const de_DestinationConfig = (output, context) => {
438
- return {
439
- services: output.services != null ? de_ServiceList(output.services, context) : undefined,
440
- thingName: __expectString(output.thingName),
441
- };
442
- };
443
- const de_LimitExceededException = (output, context) => {
444
- return {
445
- message: __expectString(output.message),
446
- };
447
- };
448
- const de_ListTagsForResourceResponse = (output, context) => {
449
- return {
450
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
451
- };
452
- };
453
- const de_ListTunnelsResponse = (output, context) => {
454
- return {
455
- nextToken: __expectString(output.nextToken),
456
- tunnelSummaries: output.tunnelSummaries != null ? de_TunnelSummaryList(output.tunnelSummaries, context) : undefined,
457
- };
458
- };
459
- const de_OpenTunnelResponse = (output, context) => {
460
- return {
461
- destinationAccessToken: __expectString(output.destinationAccessToken),
462
- sourceAccessToken: __expectString(output.sourceAccessToken),
463
- tunnelArn: __expectString(output.tunnelArn),
464
- tunnelId: __expectString(output.tunnelId),
465
- };
466
- };
467
- const de_ResourceNotFoundException = (output, context) => {
468
- return {
469
- message: __expectString(output.message),
470
- };
471
- };
472
- const de_RotateTunnelAccessTokenResponse = (output, context) => {
473
- return {
474
- destinationAccessToken: __expectString(output.destinationAccessToken),
475
- sourceAccessToken: __expectString(output.sourceAccessToken),
476
- tunnelArn: __expectString(output.tunnelArn),
477
- };
478
- };
479
- const de_ServiceList = (output, context) => {
480
- const retVal = (output || [])
481
- .filter((e) => e != null)
482
- .map((entry) => {
483
- if (entry === null) {
484
- return null;
485
- }
486
- return __expectString(entry);
328
+ return take(output, {
329
+ tunnel: (_) => de_Tunnel(_, context),
487
330
  });
488
- return retVal;
489
331
  };
490
- const de_Tag = (output, context) => {
491
- return {
492
- key: __expectString(output.key),
493
- value: __expectString(output.value),
494
- };
495
- };
496
- const de_TagList = (output, context) => {
497
- const retVal = (output || [])
498
- .filter((e) => e != null)
499
- .map((entry) => {
500
- if (entry === null) {
501
- return null;
502
- }
503
- return de_Tag(entry, context);
332
+ const de_ListTunnelsResponse = (output, context) => {
333
+ return take(output, {
334
+ nextToken: __expectString,
335
+ tunnelSummaries: (_) => de_TunnelSummaryList(_, context),
504
336
  });
505
- return retVal;
506
- };
507
- const de_TagResourceResponse = (output, context) => {
508
- return {};
509
- };
510
- const de_TimeoutConfig = (output, context) => {
511
- return {
512
- maxLifetimeTimeoutMinutes: __expectInt32(output.maxLifetimeTimeoutMinutes),
513
- };
514
337
  };
515
338
  const de_Tunnel = (output, context) => {
516
- return {
517
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
518
- description: __expectString(output.description),
519
- destinationConfig: output.destinationConfig != null ? de_DestinationConfig(output.destinationConfig, context) : undefined,
520
- destinationConnectionState: output.destinationConnectionState != null
521
- ? de_ConnectionState(output.destinationConnectionState, context)
522
- : undefined,
523
- lastUpdatedAt: output.lastUpdatedAt != null
524
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt)))
525
- : undefined,
526
- sourceConnectionState: output.sourceConnectionState != null ? de_ConnectionState(output.sourceConnectionState, context) : undefined,
527
- status: __expectString(output.status),
528
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
529
- timeoutConfig: output.timeoutConfig != null ? de_TimeoutConfig(output.timeoutConfig, context) : undefined,
530
- tunnelArn: __expectString(output.tunnelArn),
531
- tunnelId: __expectString(output.tunnelId),
532
- };
339
+ return take(output, {
340
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
341
+ description: __expectString,
342
+ destinationConfig: _json,
343
+ destinationConnectionState: (_) => de_ConnectionState(_, context),
344
+ lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
345
+ sourceConnectionState: (_) => de_ConnectionState(_, context),
346
+ status: __expectString,
347
+ tags: _json,
348
+ timeoutConfig: _json,
349
+ tunnelArn: __expectString,
350
+ tunnelId: __expectString,
351
+ });
533
352
  };
534
353
  const de_TunnelSummary = (output, context) => {
535
- return {
536
- createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
537
- description: __expectString(output.description),
538
- lastUpdatedAt: output.lastUpdatedAt != null
539
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt)))
540
- : undefined,
541
- status: __expectString(output.status),
542
- tunnelArn: __expectString(output.tunnelArn),
543
- tunnelId: __expectString(output.tunnelId),
544
- };
354
+ return take(output, {
355
+ createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
356
+ description: __expectString,
357
+ lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
358
+ status: __expectString,
359
+ tunnelArn: __expectString,
360
+ tunnelId: __expectString,
361
+ });
545
362
  };
546
363
  const de_TunnelSummaryList = (output, context) => {
547
364
  const retVal = (output || [])
548
365
  .filter((e) => e != null)
549
366
  .map((entry) => {
550
- if (entry === null) {
551
- return null;
552
- }
553
367
  return de_TunnelSummary(entry, context);
554
368
  });
555
369
  return retVal;
556
370
  };
557
- const de_UntagResourceResponse = (output, context) => {
558
- return {};
559
- };
560
371
  const deserializeMetadata = (output) => ({
561
372
  httpStatusCode: output.statusCode,
562
373
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -570,6 +381,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
570
381
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
571
382
  };
572
383
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
384
+ const throwDefaultError = withBaseException(__BaseException);
573
385
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
574
386
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
575
387
  const contents = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-iotsecuretunneling",
3
3
  "description": "AWS SDK for JavaScript Iotsecuretunneling Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.312.0",
24
+ "@aws-sdk/client-sts": "3.315.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.315.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.315.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",