@aws-sdk/client-iotsecuretunneling 3.312.0 → 3.316.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 = {