@aws-sdk/client-greengrass 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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { GreengrassServiceException as __BaseException } from "../models/GreengrassServiceException";
4
4
  import { BadRequestException, InternalServerErrorException, } from "../models/models_0";
5
5
  export const se_AssociateRoleToGroupCommand = async (input, context) => {
@@ -10,9 +10,9 @@ export const se_AssociateRoleToGroupCommand = async (input, context) => {
10
10
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/role";
11
11
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
12
12
  let body;
13
- body = JSON.stringify({
14
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
15
- });
13
+ body = JSON.stringify(take(input, {
14
+ RoleArn: [],
15
+ }));
16
16
  return new __HttpRequest({
17
17
  protocol,
18
18
  hostname,
@@ -30,9 +30,9 @@ export const se_AssociateServiceRoleToAccountCommand = async (input, context) =>
30
30
  };
31
31
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole";
32
32
  let body;
33
- body = JSON.stringify({
34
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
35
- });
33
+ body = JSON.stringify(take(input, {
34
+ RoleArn: [],
35
+ }));
36
36
  return new __HttpRequest({
37
37
  protocol,
38
38
  hostname,
@@ -51,13 +51,11 @@ export const se_CreateConnectorDefinitionCommand = async (input, context) => {
51
51
  });
52
52
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/connectors";
53
53
  let body;
54
- body = JSON.stringify({
55
- ...(input.InitialVersion != null && {
56
- InitialVersion: se_ConnectorDefinitionVersion(input.InitialVersion, context),
57
- }),
58
- ...(input.Name != null && { Name: input.Name }),
59
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
60
- });
54
+ body = JSON.stringify(take(input, {
55
+ InitialVersion: (_) => _json(_),
56
+ Name: [],
57
+ tags: (_) => _json(_),
58
+ }));
61
59
  return new __HttpRequest({
62
60
  protocol,
63
61
  hostname,
@@ -78,9 +76,9 @@ export const se_CreateConnectorDefinitionVersionCommand = async (input, context)
78
76
  "/greengrass/definition/connectors/{ConnectorDefinitionId}/versions";
79
77
  resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
80
78
  let body;
81
- body = JSON.stringify({
82
- ...(input.Connectors != null && { Connectors: se___listOfConnector(input.Connectors, context) }),
83
- });
79
+ body = JSON.stringify(take(input, {
80
+ Connectors: (_) => _json(_),
81
+ }));
84
82
  return new __HttpRequest({
85
83
  protocol,
86
84
  hostname,
@@ -99,11 +97,11 @@ export const se_CreateCoreDefinitionCommand = async (input, context) => {
99
97
  });
100
98
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/cores";
101
99
  let body;
102
- body = JSON.stringify({
103
- ...(input.InitialVersion != null && { InitialVersion: se_CoreDefinitionVersion(input.InitialVersion, context) }),
104
- ...(input.Name != null && { Name: input.Name }),
105
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
106
- });
100
+ body = JSON.stringify(take(input, {
101
+ InitialVersion: (_) => _json(_),
102
+ Name: [],
103
+ tags: (_) => _json(_),
104
+ }));
107
105
  return new __HttpRequest({
108
106
  protocol,
109
107
  hostname,
@@ -124,9 +122,9 @@ export const se_CreateCoreDefinitionVersionCommand = async (input, context) => {
124
122
  "/greengrass/definition/cores/{CoreDefinitionId}/versions";
125
123
  resolvedPath = __resolvedPath(resolvedPath, input, "CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
126
124
  let body;
127
- body = JSON.stringify({
128
- ...(input.Cores != null && { Cores: se___listOfCore(input.Cores, context) }),
129
- });
125
+ body = JSON.stringify(take(input, {
126
+ Cores: (_) => _json(_),
127
+ }));
130
128
  return new __HttpRequest({
131
129
  protocol,
132
130
  hostname,
@@ -146,11 +144,11 @@ export const se_CreateDeploymentCommand = async (input, context) => {
146
144
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/deployments";
147
145
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
148
146
  let body;
149
- body = JSON.stringify({
150
- ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }),
151
- ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }),
152
- ...(input.GroupVersionId != null && { GroupVersionId: input.GroupVersionId }),
153
- });
147
+ body = JSON.stringify(take(input, {
148
+ DeploymentId: [],
149
+ DeploymentType: [],
150
+ GroupVersionId: [],
151
+ }));
154
152
  return new __HttpRequest({
155
153
  protocol,
156
154
  hostname,
@@ -169,11 +167,11 @@ export const se_CreateDeviceDefinitionCommand = async (input, context) => {
169
167
  });
170
168
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/devices";
171
169
  let body;
172
- body = JSON.stringify({
173
- ...(input.InitialVersion != null && { InitialVersion: se_DeviceDefinitionVersion(input.InitialVersion, context) }),
174
- ...(input.Name != null && { Name: input.Name }),
175
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
176
- });
170
+ body = JSON.stringify(take(input, {
171
+ InitialVersion: (_) => _json(_),
172
+ Name: [],
173
+ tags: (_) => _json(_),
174
+ }));
177
175
  return new __HttpRequest({
178
176
  protocol,
179
177
  hostname,
@@ -194,9 +192,9 @@ export const se_CreateDeviceDefinitionVersionCommand = async (input, context) =>
194
192
  "/greengrass/definition/devices/{DeviceDefinitionId}/versions";
195
193
  resolvedPath = __resolvedPath(resolvedPath, input, "DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
196
194
  let body;
197
- body = JSON.stringify({
198
- ...(input.Devices != null && { Devices: se___listOfDevice(input.Devices, context) }),
199
- });
195
+ body = JSON.stringify(take(input, {
196
+ Devices: (_) => _json(_),
197
+ }));
200
198
  return new __HttpRequest({
201
199
  protocol,
202
200
  hostname,
@@ -215,13 +213,11 @@ export const se_CreateFunctionDefinitionCommand = async (input, context) => {
215
213
  });
216
214
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/functions";
217
215
  let body;
218
- body = JSON.stringify({
219
- ...(input.InitialVersion != null && {
220
- InitialVersion: se_FunctionDefinitionVersion(input.InitialVersion, context),
221
- }),
222
- ...(input.Name != null && { Name: input.Name }),
223
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
224
- });
216
+ body = JSON.stringify(take(input, {
217
+ InitialVersion: (_) => _json(_),
218
+ Name: [],
219
+ tags: (_) => _json(_),
220
+ }));
225
221
  return new __HttpRequest({
226
222
  protocol,
227
223
  hostname,
@@ -242,10 +238,10 @@ export const se_CreateFunctionDefinitionVersionCommand = async (input, context)
242
238
  "/greengrass/definition/functions/{FunctionDefinitionId}/versions";
243
239
  resolvedPath = __resolvedPath(resolvedPath, input, "FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
244
240
  let body;
245
- body = JSON.stringify({
246
- ...(input.DefaultConfig != null && { DefaultConfig: se_FunctionDefaultConfig(input.DefaultConfig, context) }),
247
- ...(input.Functions != null && { Functions: se___listOfFunction(input.Functions, context) }),
248
- });
241
+ body = JSON.stringify(take(input, {
242
+ DefaultConfig: (_) => _json(_),
243
+ Functions: (_) => _json(_),
244
+ }));
249
245
  return new __HttpRequest({
250
246
  protocol,
251
247
  hostname,
@@ -264,11 +260,11 @@ export const se_CreateGroupCommand = async (input, context) => {
264
260
  });
265
261
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups";
266
262
  let body;
267
- body = JSON.stringify({
268
- ...(input.InitialVersion != null && { InitialVersion: se_GroupVersion(input.InitialVersion, context) }),
269
- ...(input.Name != null && { Name: input.Name }),
270
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
271
- });
263
+ body = JSON.stringify(take(input, {
264
+ InitialVersion: (_) => _json(_),
265
+ Name: [],
266
+ tags: (_) => _json(_),
267
+ }));
272
268
  return new __HttpRequest({
273
269
  protocol,
274
270
  hostname,
@@ -307,23 +303,15 @@ export const se_CreateGroupVersionCommand = async (input, context) => {
307
303
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/versions";
308
304
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
309
305
  let body;
310
- body = JSON.stringify({
311
- ...(input.ConnectorDefinitionVersionArn != null && {
312
- ConnectorDefinitionVersionArn: input.ConnectorDefinitionVersionArn,
313
- }),
314
- ...(input.CoreDefinitionVersionArn != null && { CoreDefinitionVersionArn: input.CoreDefinitionVersionArn }),
315
- ...(input.DeviceDefinitionVersionArn != null && { DeviceDefinitionVersionArn: input.DeviceDefinitionVersionArn }),
316
- ...(input.FunctionDefinitionVersionArn != null && {
317
- FunctionDefinitionVersionArn: input.FunctionDefinitionVersionArn,
318
- }),
319
- ...(input.LoggerDefinitionVersionArn != null && { LoggerDefinitionVersionArn: input.LoggerDefinitionVersionArn }),
320
- ...(input.ResourceDefinitionVersionArn != null && {
321
- ResourceDefinitionVersionArn: input.ResourceDefinitionVersionArn,
322
- }),
323
- ...(input.SubscriptionDefinitionVersionArn != null && {
324
- SubscriptionDefinitionVersionArn: input.SubscriptionDefinitionVersionArn,
325
- }),
326
- });
306
+ body = JSON.stringify(take(input, {
307
+ ConnectorDefinitionVersionArn: [],
308
+ CoreDefinitionVersionArn: [],
309
+ DeviceDefinitionVersionArn: [],
310
+ FunctionDefinitionVersionArn: [],
311
+ LoggerDefinitionVersionArn: [],
312
+ ResourceDefinitionVersionArn: [],
313
+ SubscriptionDefinitionVersionArn: [],
314
+ }));
327
315
  return new __HttpRequest({
328
316
  protocol,
329
317
  hostname,
@@ -342,11 +330,11 @@ export const se_CreateLoggerDefinitionCommand = async (input, context) => {
342
330
  });
343
331
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/loggers";
344
332
  let body;
345
- body = JSON.stringify({
346
- ...(input.InitialVersion != null && { InitialVersion: se_LoggerDefinitionVersion(input.InitialVersion, context) }),
347
- ...(input.Name != null && { Name: input.Name }),
348
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
349
- });
333
+ body = JSON.stringify(take(input, {
334
+ InitialVersion: (_) => _json(_),
335
+ Name: [],
336
+ tags: (_) => _json(_),
337
+ }));
350
338
  return new __HttpRequest({
351
339
  protocol,
352
340
  hostname,
@@ -367,9 +355,9 @@ export const se_CreateLoggerDefinitionVersionCommand = async (input, context) =>
367
355
  "/greengrass/definition/loggers/{LoggerDefinitionId}/versions";
368
356
  resolvedPath = __resolvedPath(resolvedPath, input, "LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
369
357
  let body;
370
- body = JSON.stringify({
371
- ...(input.Loggers != null && { Loggers: se___listOfLogger(input.Loggers, context) }),
372
- });
358
+ body = JSON.stringify(take(input, {
359
+ Loggers: (_) => _json(_),
360
+ }));
373
361
  return new __HttpRequest({
374
362
  protocol,
375
363
  hostname,
@@ -388,13 +376,11 @@ export const se_CreateResourceDefinitionCommand = async (input, context) => {
388
376
  });
389
377
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/resources";
390
378
  let body;
391
- body = JSON.stringify({
392
- ...(input.InitialVersion != null && {
393
- InitialVersion: se_ResourceDefinitionVersion(input.InitialVersion, context),
394
- }),
395
- ...(input.Name != null && { Name: input.Name }),
396
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
397
- });
379
+ body = JSON.stringify(take(input, {
380
+ InitialVersion: (_) => _json(_),
381
+ Name: [],
382
+ tags: (_) => _json(_),
383
+ }));
398
384
  return new __HttpRequest({
399
385
  protocol,
400
386
  hostname,
@@ -415,9 +401,9 @@ export const se_CreateResourceDefinitionVersionCommand = async (input, context)
415
401
  "/greengrass/definition/resources/{ResourceDefinitionId}/versions";
416
402
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
417
403
  let body;
418
- body = JSON.stringify({
419
- ...(input.Resources != null && { Resources: se___listOfResource(input.Resources, context) }),
420
- });
404
+ body = JSON.stringify(take(input, {
405
+ Resources: (_) => _json(_),
406
+ }));
421
407
  return new __HttpRequest({
422
408
  protocol,
423
409
  hostname,
@@ -436,16 +422,14 @@ export const se_CreateSoftwareUpdateJobCommand = async (input, context) => {
436
422
  });
437
423
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/updates";
438
424
  let body;
439
- body = JSON.stringify({
440
- ...(input.S3UrlSignerRole != null && { S3UrlSignerRole: input.S3UrlSignerRole }),
441
- ...(input.SoftwareToUpdate != null && { SoftwareToUpdate: input.SoftwareToUpdate }),
442
- ...(input.UpdateAgentLogLevel != null && { UpdateAgentLogLevel: input.UpdateAgentLogLevel }),
443
- ...(input.UpdateTargets != null && { UpdateTargets: se_UpdateTargets(input.UpdateTargets, context) }),
444
- ...(input.UpdateTargetsArchitecture != null && { UpdateTargetsArchitecture: input.UpdateTargetsArchitecture }),
445
- ...(input.UpdateTargetsOperatingSystem != null && {
446
- UpdateTargetsOperatingSystem: input.UpdateTargetsOperatingSystem,
447
- }),
448
- });
425
+ body = JSON.stringify(take(input, {
426
+ S3UrlSignerRole: [],
427
+ SoftwareToUpdate: [],
428
+ UpdateAgentLogLevel: [],
429
+ UpdateTargets: (_) => _json(_),
430
+ UpdateTargetsArchitecture: [],
431
+ UpdateTargetsOperatingSystem: [],
432
+ }));
449
433
  return new __HttpRequest({
450
434
  protocol,
451
435
  hostname,
@@ -464,13 +448,11 @@ export const se_CreateSubscriptionDefinitionCommand = async (input, context) =>
464
448
  });
465
449
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/subscriptions";
466
450
  let body;
467
- body = JSON.stringify({
468
- ...(input.InitialVersion != null && {
469
- InitialVersion: se_SubscriptionDefinitionVersion(input.InitialVersion, context),
470
- }),
471
- ...(input.Name != null && { Name: input.Name }),
472
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
473
- });
451
+ body = JSON.stringify(take(input, {
452
+ InitialVersion: (_) => _json(_),
453
+ Name: [],
454
+ tags: (_) => _json(_),
455
+ }));
474
456
  return new __HttpRequest({
475
457
  protocol,
476
458
  hostname,
@@ -491,9 +473,9 @@ export const se_CreateSubscriptionDefinitionVersionCommand = async (input, conte
491
473
  "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}/versions";
492
474
  resolvedPath = __resolvedPath(resolvedPath, input, "SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
493
475
  let body;
494
- body = JSON.stringify({
495
- ...(input.Subscriptions != null && { Subscriptions: se___listOfSubscription(input.Subscriptions, context) }),
496
- });
476
+ body = JSON.stringify(take(input, {
477
+ Subscriptions: (_) => _json(_),
478
+ }));
497
479
  return new __HttpRequest({
498
480
  protocol,
499
481
  hostname,
@@ -1551,9 +1533,9 @@ export const se_ResetDeploymentsCommand = async (input, context) => {
1551
1533
  "/greengrass/groups/{GroupId}/deployments/$reset";
1552
1534
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
1553
1535
  let body;
1554
- body = JSON.stringify({
1555
- ...(input.Force != null && { Force: input.Force }),
1556
- });
1536
+ body = JSON.stringify(take(input, {
1537
+ Force: [],
1538
+ }));
1557
1539
  return new __HttpRequest({
1558
1540
  protocol,
1559
1541
  hostname,
@@ -1572,11 +1554,11 @@ export const se_StartBulkDeploymentCommand = async (input, context) => {
1572
1554
  });
1573
1555
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/bulk/deployments";
1574
1556
  let body;
1575
- body = JSON.stringify({
1576
- ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
1577
- ...(input.InputFileUri != null && { InputFileUri: input.InputFileUri }),
1578
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1579
- });
1557
+ body = JSON.stringify(take(input, {
1558
+ ExecutionRoleArn: [],
1559
+ InputFileUri: [],
1560
+ tags: (_) => _json(_),
1561
+ }));
1580
1562
  return new __HttpRequest({
1581
1563
  protocol,
1582
1564
  hostname,
@@ -1612,9 +1594,9 @@ export const se_TagResourceCommand = async (input, context) => {
1612
1594
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
1613
1595
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1614
1596
  let body;
1615
- body = JSON.stringify({
1616
- ...(input.tags != null && { tags: se_Tags(input.tags, context) }),
1617
- });
1597
+ body = JSON.stringify(take(input, {
1598
+ tags: (_) => _json(_),
1599
+ }));
1618
1600
  return new __HttpRequest({
1619
1601
  protocol,
1620
1602
  hostname,
@@ -1657,11 +1639,9 @@ export const se_UpdateConnectivityInfoCommand = async (input, context) => {
1657
1639
  "/greengrass/things/{ThingName}/connectivityInfo";
1658
1640
  resolvedPath = __resolvedPath(resolvedPath, input, "ThingName", () => input.ThingName, "{ThingName}", false);
1659
1641
  let body;
1660
- body = JSON.stringify({
1661
- ...(input.ConnectivityInfo != null && {
1662
- ConnectivityInfo: se___listOfConnectivityInfo(input.ConnectivityInfo, context),
1663
- }),
1664
- });
1642
+ body = JSON.stringify(take(input, {
1643
+ ConnectivityInfo: (_) => _json(_),
1644
+ }));
1665
1645
  return new __HttpRequest({
1666
1646
  protocol,
1667
1647
  hostname,
@@ -1681,9 +1661,9 @@ export const se_UpdateConnectorDefinitionCommand = async (input, context) => {
1681
1661
  "/greengrass/definition/connectors/{ConnectorDefinitionId}";
1682
1662
  resolvedPath = __resolvedPath(resolvedPath, input, "ConnectorDefinitionId", () => input.ConnectorDefinitionId, "{ConnectorDefinitionId}", false);
1683
1663
  let body;
1684
- body = JSON.stringify({
1685
- ...(input.Name != null && { Name: input.Name }),
1686
- });
1664
+ body = JSON.stringify(take(input, {
1665
+ Name: [],
1666
+ }));
1687
1667
  return new __HttpRequest({
1688
1668
  protocol,
1689
1669
  hostname,
@@ -1703,9 +1683,9 @@ export const se_UpdateCoreDefinitionCommand = async (input, context) => {
1703
1683
  "/greengrass/definition/cores/{CoreDefinitionId}";
1704
1684
  resolvedPath = __resolvedPath(resolvedPath, input, "CoreDefinitionId", () => input.CoreDefinitionId, "{CoreDefinitionId}", false);
1705
1685
  let body;
1706
- body = JSON.stringify({
1707
- ...(input.Name != null && { Name: input.Name }),
1708
- });
1686
+ body = JSON.stringify(take(input, {
1687
+ Name: [],
1688
+ }));
1709
1689
  return new __HttpRequest({
1710
1690
  protocol,
1711
1691
  hostname,
@@ -1725,9 +1705,9 @@ export const se_UpdateDeviceDefinitionCommand = async (input, context) => {
1725
1705
  "/greengrass/definition/devices/{DeviceDefinitionId}";
1726
1706
  resolvedPath = __resolvedPath(resolvedPath, input, "DeviceDefinitionId", () => input.DeviceDefinitionId, "{DeviceDefinitionId}", false);
1727
1707
  let body;
1728
- body = JSON.stringify({
1729
- ...(input.Name != null && { Name: input.Name }),
1730
- });
1708
+ body = JSON.stringify(take(input, {
1709
+ Name: [],
1710
+ }));
1731
1711
  return new __HttpRequest({
1732
1712
  protocol,
1733
1713
  hostname,
@@ -1747,9 +1727,9 @@ export const se_UpdateFunctionDefinitionCommand = async (input, context) => {
1747
1727
  "/greengrass/definition/functions/{FunctionDefinitionId}";
1748
1728
  resolvedPath = __resolvedPath(resolvedPath, input, "FunctionDefinitionId", () => input.FunctionDefinitionId, "{FunctionDefinitionId}", false);
1749
1729
  let body;
1750
- body = JSON.stringify({
1751
- ...(input.Name != null && { Name: input.Name }),
1752
- });
1730
+ body = JSON.stringify(take(input, {
1731
+ Name: [],
1732
+ }));
1753
1733
  return new __HttpRequest({
1754
1734
  protocol,
1755
1735
  hostname,
@@ -1768,9 +1748,9 @@ export const se_UpdateGroupCommand = async (input, context) => {
1768
1748
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}";
1769
1749
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
1770
1750
  let body;
1771
- body = JSON.stringify({
1772
- ...(input.Name != null && { Name: input.Name }),
1773
- });
1751
+ body = JSON.stringify(take(input, {
1752
+ Name: [],
1753
+ }));
1774
1754
  return new __HttpRequest({
1775
1755
  protocol,
1776
1756
  hostname,
@@ -1790,11 +1770,9 @@ export const se_UpdateGroupCertificateConfigurationCommand = async (input, conte
1790
1770
  "/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry";
1791
1771
  resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId, "{GroupId}", false);
1792
1772
  let body;
1793
- body = JSON.stringify({
1794
- ...(input.CertificateExpiryInMilliseconds != null && {
1795
- CertificateExpiryInMilliseconds: input.CertificateExpiryInMilliseconds,
1796
- }),
1797
- });
1773
+ body = JSON.stringify(take(input, {
1774
+ CertificateExpiryInMilliseconds: [],
1775
+ }));
1798
1776
  return new __HttpRequest({
1799
1777
  protocol,
1800
1778
  hostname,
@@ -1814,9 +1792,9 @@ export const se_UpdateLoggerDefinitionCommand = async (input, context) => {
1814
1792
  "/greengrass/definition/loggers/{LoggerDefinitionId}";
1815
1793
  resolvedPath = __resolvedPath(resolvedPath, input, "LoggerDefinitionId", () => input.LoggerDefinitionId, "{LoggerDefinitionId}", false);
1816
1794
  let body;
1817
- body = JSON.stringify({
1818
- ...(input.Name != null && { Name: input.Name }),
1819
- });
1795
+ body = JSON.stringify(take(input, {
1796
+ Name: [],
1797
+ }));
1820
1798
  return new __HttpRequest({
1821
1799
  protocol,
1822
1800
  hostname,
@@ -1836,9 +1814,9 @@ export const se_UpdateResourceDefinitionCommand = async (input, context) => {
1836
1814
  "/greengrass/definition/resources/{ResourceDefinitionId}";
1837
1815
  resolvedPath = __resolvedPath(resolvedPath, input, "ResourceDefinitionId", () => input.ResourceDefinitionId, "{ResourceDefinitionId}", false);
1838
1816
  let body;
1839
- body = JSON.stringify({
1840
- ...(input.Name != null && { Name: input.Name }),
1841
- });
1817
+ body = JSON.stringify(take(input, {
1818
+ Name: [],
1819
+ }));
1842
1820
  return new __HttpRequest({
1843
1821
  protocol,
1844
1822
  hostname,
@@ -1858,9 +1836,9 @@ export const se_UpdateSubscriptionDefinitionCommand = async (input, context) =>
1858
1836
  "/greengrass/definition/subscriptions/{SubscriptionDefinitionId}";
1859
1837
  resolvedPath = __resolvedPath(resolvedPath, input, "SubscriptionDefinitionId", () => input.SubscriptionDefinitionId, "{SubscriptionDefinitionId}", false);
1860
1838
  let body;
1861
- body = JSON.stringify({
1862
- ...(input.Name != null && { Name: input.Name }),
1863
- });
1839
+ body = JSON.stringify(take(input, {
1840
+ Name: [],
1841
+ }));
1864
1842
  return new __HttpRequest({
1865
1843
  protocol,
1866
1844
  hostname,
@@ -1880,11 +1858,9 @@ export const se_UpdateThingRuntimeConfigurationCommand = async (input, context)
1880
1858
  "/greengrass/things/{ThingName}/runtimeconfig";
1881
1859
  resolvedPath = __resolvedPath(resolvedPath, input, "ThingName", () => input.ThingName, "{ThingName}", false);
1882
1860
  let body;
1883
- body = JSON.stringify({
1884
- ...(input.TelemetryConfiguration != null && {
1885
- TelemetryConfiguration: se_TelemetryConfigurationUpdate(input.TelemetryConfiguration, context),
1886
- }),
1887
- });
1861
+ body = JSON.stringify(take(input, {
1862
+ TelemetryConfiguration: (_) => _json(_),
1863
+ }));
1888
1864
  return new __HttpRequest({
1889
1865
  protocol,
1890
1866
  hostname,
@@ -1903,9 +1879,10 @@ export const de_AssociateRoleToGroupCommand = async (output, context) => {
1903
1879
  $metadata: deserializeMetadata(output),
1904
1880
  });
1905
1881
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1906
- if (data.AssociatedAt != null) {
1907
- contents.AssociatedAt = __expectString(data.AssociatedAt);
1908
- }
1882
+ const doc = take(data, {
1883
+ AssociatedAt: __expectString,
1884
+ });
1885
+ Object.assign(contents, doc);
1909
1886
  return contents;
1910
1887
  };
1911
1888
  const de_AssociateRoleToGroupCommandError = async (output, context) => {
@@ -1923,10 +1900,9 @@ const de_AssociateRoleToGroupCommandError = async (output, context) => {
1923
1900
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1924
1901
  default:
1925
1902
  const parsedBody = parsedOutput.body;
1926
- throwDefaultError({
1903
+ return throwDefaultError({
1927
1904
  output,
1928
1905
  parsedBody,
1929
- exceptionCtor: __BaseException,
1930
1906
  errorCode,
1931
1907
  });
1932
1908
  }
@@ -1939,9 +1915,10 @@ export const de_AssociateServiceRoleToAccountCommand = async (output, context) =
1939
1915
  $metadata: deserializeMetadata(output),
1940
1916
  });
1941
1917
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1942
- if (data.AssociatedAt != null) {
1943
- contents.AssociatedAt = __expectString(data.AssociatedAt);
1944
- }
1918
+ const doc = take(data, {
1919
+ AssociatedAt: __expectString,
1920
+ });
1921
+ Object.assign(contents, doc);
1945
1922
  return contents;
1946
1923
  };
1947
1924
  const de_AssociateServiceRoleToAccountCommandError = async (output, context) => {
@@ -1959,10 +1936,9 @@ const de_AssociateServiceRoleToAccountCommandError = async (output, context) =>
1959
1936
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1960
1937
  default:
1961
1938
  const parsedBody = parsedOutput.body;
1962
- throwDefaultError({
1939
+ return throwDefaultError({
1963
1940
  output,
1964
1941
  parsedBody,
1965
- exceptionCtor: __BaseException,
1966
1942
  errorCode,
1967
1943
  });
1968
1944
  }
@@ -1975,27 +1951,16 @@ export const de_CreateConnectorDefinitionCommand = async (output, context) => {
1975
1951
  $metadata: deserializeMetadata(output),
1976
1952
  });
1977
1953
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1978
- if (data.Arn != null) {
1979
- contents.Arn = __expectString(data.Arn);
1980
- }
1981
- if (data.CreationTimestamp != null) {
1982
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
1983
- }
1984
- if (data.Id != null) {
1985
- contents.Id = __expectString(data.Id);
1986
- }
1987
- if (data.LastUpdatedTimestamp != null) {
1988
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
1989
- }
1990
- if (data.LatestVersion != null) {
1991
- contents.LatestVersion = __expectString(data.LatestVersion);
1992
- }
1993
- if (data.LatestVersionArn != null) {
1994
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
1995
- }
1996
- if (data.Name != null) {
1997
- contents.Name = __expectString(data.Name);
1998
- }
1954
+ const doc = take(data, {
1955
+ Arn: __expectString,
1956
+ CreationTimestamp: __expectString,
1957
+ Id: __expectString,
1958
+ LastUpdatedTimestamp: __expectString,
1959
+ LatestVersion: __expectString,
1960
+ LatestVersionArn: __expectString,
1961
+ Name: __expectString,
1962
+ });
1963
+ Object.assign(contents, doc);
1999
1964
  return contents;
2000
1965
  };
2001
1966
  const de_CreateConnectorDefinitionCommandError = async (output, context) => {
@@ -2010,10 +1975,9 @@ const de_CreateConnectorDefinitionCommandError = async (output, context) => {
2010
1975
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2011
1976
  default:
2012
1977
  const parsedBody = parsedOutput.body;
2013
- throwDefaultError({
1978
+ return throwDefaultError({
2014
1979
  output,
2015
1980
  parsedBody,
2016
- exceptionCtor: __BaseException,
2017
1981
  errorCode,
2018
1982
  });
2019
1983
  }
@@ -2026,18 +1990,13 @@ export const de_CreateConnectorDefinitionVersionCommand = async (output, context
2026
1990
  $metadata: deserializeMetadata(output),
2027
1991
  });
2028
1992
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2029
- if (data.Arn != null) {
2030
- contents.Arn = __expectString(data.Arn);
2031
- }
2032
- if (data.CreationTimestamp != null) {
2033
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2034
- }
2035
- if (data.Id != null) {
2036
- contents.Id = __expectString(data.Id);
2037
- }
2038
- if (data.Version != null) {
2039
- contents.Version = __expectString(data.Version);
2040
- }
1993
+ const doc = take(data, {
1994
+ Arn: __expectString,
1995
+ CreationTimestamp: __expectString,
1996
+ Id: __expectString,
1997
+ Version: __expectString,
1998
+ });
1999
+ Object.assign(contents, doc);
2041
2000
  return contents;
2042
2001
  };
2043
2002
  const de_CreateConnectorDefinitionVersionCommandError = async (output, context) => {
@@ -2052,10 +2011,9 @@ const de_CreateConnectorDefinitionVersionCommandError = async (output, context)
2052
2011
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2053
2012
  default:
2054
2013
  const parsedBody = parsedOutput.body;
2055
- throwDefaultError({
2014
+ return throwDefaultError({
2056
2015
  output,
2057
2016
  parsedBody,
2058
- exceptionCtor: __BaseException,
2059
2017
  errorCode,
2060
2018
  });
2061
2019
  }
@@ -2068,27 +2026,16 @@ export const de_CreateCoreDefinitionCommand = async (output, context) => {
2068
2026
  $metadata: deserializeMetadata(output),
2069
2027
  });
2070
2028
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2071
- if (data.Arn != null) {
2072
- contents.Arn = __expectString(data.Arn);
2073
- }
2074
- if (data.CreationTimestamp != null) {
2075
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2076
- }
2077
- if (data.Id != null) {
2078
- contents.Id = __expectString(data.Id);
2079
- }
2080
- if (data.LastUpdatedTimestamp != null) {
2081
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2082
- }
2083
- if (data.LatestVersion != null) {
2084
- contents.LatestVersion = __expectString(data.LatestVersion);
2085
- }
2086
- if (data.LatestVersionArn != null) {
2087
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2088
- }
2089
- if (data.Name != null) {
2090
- contents.Name = __expectString(data.Name);
2091
- }
2029
+ const doc = take(data, {
2030
+ Arn: __expectString,
2031
+ CreationTimestamp: __expectString,
2032
+ Id: __expectString,
2033
+ LastUpdatedTimestamp: __expectString,
2034
+ LatestVersion: __expectString,
2035
+ LatestVersionArn: __expectString,
2036
+ Name: __expectString,
2037
+ });
2038
+ Object.assign(contents, doc);
2092
2039
  return contents;
2093
2040
  };
2094
2041
  const de_CreateCoreDefinitionCommandError = async (output, context) => {
@@ -2103,10 +2050,9 @@ const de_CreateCoreDefinitionCommandError = async (output, context) => {
2103
2050
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2104
2051
  default:
2105
2052
  const parsedBody = parsedOutput.body;
2106
- throwDefaultError({
2053
+ return throwDefaultError({
2107
2054
  output,
2108
2055
  parsedBody,
2109
- exceptionCtor: __BaseException,
2110
2056
  errorCode,
2111
2057
  });
2112
2058
  }
@@ -2119,18 +2065,13 @@ export const de_CreateCoreDefinitionVersionCommand = async (output, context) =>
2119
2065
  $metadata: deserializeMetadata(output),
2120
2066
  });
2121
2067
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2122
- if (data.Arn != null) {
2123
- contents.Arn = __expectString(data.Arn);
2124
- }
2125
- if (data.CreationTimestamp != null) {
2126
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2127
- }
2128
- if (data.Id != null) {
2129
- contents.Id = __expectString(data.Id);
2130
- }
2131
- if (data.Version != null) {
2132
- contents.Version = __expectString(data.Version);
2133
- }
2068
+ const doc = take(data, {
2069
+ Arn: __expectString,
2070
+ CreationTimestamp: __expectString,
2071
+ Id: __expectString,
2072
+ Version: __expectString,
2073
+ });
2074
+ Object.assign(contents, doc);
2134
2075
  return contents;
2135
2076
  };
2136
2077
  const de_CreateCoreDefinitionVersionCommandError = async (output, context) => {
@@ -2145,10 +2086,9 @@ const de_CreateCoreDefinitionVersionCommandError = async (output, context) => {
2145
2086
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2146
2087
  default:
2147
2088
  const parsedBody = parsedOutput.body;
2148
- throwDefaultError({
2089
+ return throwDefaultError({
2149
2090
  output,
2150
2091
  parsedBody,
2151
- exceptionCtor: __BaseException,
2152
2092
  errorCode,
2153
2093
  });
2154
2094
  }
@@ -2161,12 +2101,11 @@ export const de_CreateDeploymentCommand = async (output, context) => {
2161
2101
  $metadata: deserializeMetadata(output),
2162
2102
  });
2163
2103
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2164
- if (data.DeploymentArn != null) {
2165
- contents.DeploymentArn = __expectString(data.DeploymentArn);
2166
- }
2167
- if (data.DeploymentId != null) {
2168
- contents.DeploymentId = __expectString(data.DeploymentId);
2169
- }
2104
+ const doc = take(data, {
2105
+ DeploymentArn: __expectString,
2106
+ DeploymentId: __expectString,
2107
+ });
2108
+ Object.assign(contents, doc);
2170
2109
  return contents;
2171
2110
  };
2172
2111
  const de_CreateDeploymentCommandError = async (output, context) => {
@@ -2181,10 +2120,9 @@ const de_CreateDeploymentCommandError = async (output, context) => {
2181
2120
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2182
2121
  default:
2183
2122
  const parsedBody = parsedOutput.body;
2184
- throwDefaultError({
2123
+ return throwDefaultError({
2185
2124
  output,
2186
2125
  parsedBody,
2187
- exceptionCtor: __BaseException,
2188
2126
  errorCode,
2189
2127
  });
2190
2128
  }
@@ -2197,27 +2135,16 @@ export const de_CreateDeviceDefinitionCommand = async (output, context) => {
2197
2135
  $metadata: deserializeMetadata(output),
2198
2136
  });
2199
2137
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2200
- if (data.Arn != null) {
2201
- contents.Arn = __expectString(data.Arn);
2202
- }
2203
- if (data.CreationTimestamp != null) {
2204
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2205
- }
2206
- if (data.Id != null) {
2207
- contents.Id = __expectString(data.Id);
2208
- }
2209
- if (data.LastUpdatedTimestamp != null) {
2210
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2211
- }
2212
- if (data.LatestVersion != null) {
2213
- contents.LatestVersion = __expectString(data.LatestVersion);
2214
- }
2215
- if (data.LatestVersionArn != null) {
2216
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2217
- }
2218
- if (data.Name != null) {
2219
- contents.Name = __expectString(data.Name);
2220
- }
2138
+ const doc = take(data, {
2139
+ Arn: __expectString,
2140
+ CreationTimestamp: __expectString,
2141
+ Id: __expectString,
2142
+ LastUpdatedTimestamp: __expectString,
2143
+ LatestVersion: __expectString,
2144
+ LatestVersionArn: __expectString,
2145
+ Name: __expectString,
2146
+ });
2147
+ Object.assign(contents, doc);
2221
2148
  return contents;
2222
2149
  };
2223
2150
  const de_CreateDeviceDefinitionCommandError = async (output, context) => {
@@ -2232,10 +2159,9 @@ const de_CreateDeviceDefinitionCommandError = async (output, context) => {
2232
2159
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2233
2160
  default:
2234
2161
  const parsedBody = parsedOutput.body;
2235
- throwDefaultError({
2162
+ return throwDefaultError({
2236
2163
  output,
2237
2164
  parsedBody,
2238
- exceptionCtor: __BaseException,
2239
2165
  errorCode,
2240
2166
  });
2241
2167
  }
@@ -2248,18 +2174,13 @@ export const de_CreateDeviceDefinitionVersionCommand = async (output, context) =
2248
2174
  $metadata: deserializeMetadata(output),
2249
2175
  });
2250
2176
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2251
- if (data.Arn != null) {
2252
- contents.Arn = __expectString(data.Arn);
2253
- }
2254
- if (data.CreationTimestamp != null) {
2255
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2256
- }
2257
- if (data.Id != null) {
2258
- contents.Id = __expectString(data.Id);
2259
- }
2260
- if (data.Version != null) {
2261
- contents.Version = __expectString(data.Version);
2262
- }
2177
+ const doc = take(data, {
2178
+ Arn: __expectString,
2179
+ CreationTimestamp: __expectString,
2180
+ Id: __expectString,
2181
+ Version: __expectString,
2182
+ });
2183
+ Object.assign(contents, doc);
2263
2184
  return contents;
2264
2185
  };
2265
2186
  const de_CreateDeviceDefinitionVersionCommandError = async (output, context) => {
@@ -2274,10 +2195,9 @@ const de_CreateDeviceDefinitionVersionCommandError = async (output, context) =>
2274
2195
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2275
2196
  default:
2276
2197
  const parsedBody = parsedOutput.body;
2277
- throwDefaultError({
2198
+ return throwDefaultError({
2278
2199
  output,
2279
2200
  parsedBody,
2280
- exceptionCtor: __BaseException,
2281
2201
  errorCode,
2282
2202
  });
2283
2203
  }
@@ -2290,27 +2210,16 @@ export const de_CreateFunctionDefinitionCommand = async (output, context) => {
2290
2210
  $metadata: deserializeMetadata(output),
2291
2211
  });
2292
2212
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2293
- if (data.Arn != null) {
2294
- contents.Arn = __expectString(data.Arn);
2295
- }
2296
- if (data.CreationTimestamp != null) {
2297
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2298
- }
2299
- if (data.Id != null) {
2300
- contents.Id = __expectString(data.Id);
2301
- }
2302
- if (data.LastUpdatedTimestamp != null) {
2303
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2304
- }
2305
- if (data.LatestVersion != null) {
2306
- contents.LatestVersion = __expectString(data.LatestVersion);
2307
- }
2308
- if (data.LatestVersionArn != null) {
2309
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2310
- }
2311
- if (data.Name != null) {
2312
- contents.Name = __expectString(data.Name);
2313
- }
2213
+ const doc = take(data, {
2214
+ Arn: __expectString,
2215
+ CreationTimestamp: __expectString,
2216
+ Id: __expectString,
2217
+ LastUpdatedTimestamp: __expectString,
2218
+ LatestVersion: __expectString,
2219
+ LatestVersionArn: __expectString,
2220
+ Name: __expectString,
2221
+ });
2222
+ Object.assign(contents, doc);
2314
2223
  return contents;
2315
2224
  };
2316
2225
  const de_CreateFunctionDefinitionCommandError = async (output, context) => {
@@ -2325,10 +2234,9 @@ const de_CreateFunctionDefinitionCommandError = async (output, context) => {
2325
2234
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2326
2235
  default:
2327
2236
  const parsedBody = parsedOutput.body;
2328
- throwDefaultError({
2237
+ return throwDefaultError({
2329
2238
  output,
2330
2239
  parsedBody,
2331
- exceptionCtor: __BaseException,
2332
2240
  errorCode,
2333
2241
  });
2334
2242
  }
@@ -2341,18 +2249,13 @@ export const de_CreateFunctionDefinitionVersionCommand = async (output, context)
2341
2249
  $metadata: deserializeMetadata(output),
2342
2250
  });
2343
2251
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2344
- if (data.Arn != null) {
2345
- contents.Arn = __expectString(data.Arn);
2346
- }
2347
- if (data.CreationTimestamp != null) {
2348
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2349
- }
2350
- if (data.Id != null) {
2351
- contents.Id = __expectString(data.Id);
2352
- }
2353
- if (data.Version != null) {
2354
- contents.Version = __expectString(data.Version);
2355
- }
2252
+ const doc = take(data, {
2253
+ Arn: __expectString,
2254
+ CreationTimestamp: __expectString,
2255
+ Id: __expectString,
2256
+ Version: __expectString,
2257
+ });
2258
+ Object.assign(contents, doc);
2356
2259
  return contents;
2357
2260
  };
2358
2261
  const de_CreateFunctionDefinitionVersionCommandError = async (output, context) => {
@@ -2367,10 +2270,9 @@ const de_CreateFunctionDefinitionVersionCommandError = async (output, context) =
2367
2270
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2368
2271
  default:
2369
2272
  const parsedBody = parsedOutput.body;
2370
- throwDefaultError({
2273
+ return throwDefaultError({
2371
2274
  output,
2372
2275
  parsedBody,
2373
- exceptionCtor: __BaseException,
2374
2276
  errorCode,
2375
2277
  });
2376
2278
  }
@@ -2383,27 +2285,16 @@ export const de_CreateGroupCommand = async (output, context) => {
2383
2285
  $metadata: deserializeMetadata(output),
2384
2286
  });
2385
2287
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2386
- if (data.Arn != null) {
2387
- contents.Arn = __expectString(data.Arn);
2388
- }
2389
- if (data.CreationTimestamp != null) {
2390
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2391
- }
2392
- if (data.Id != null) {
2393
- contents.Id = __expectString(data.Id);
2394
- }
2395
- if (data.LastUpdatedTimestamp != null) {
2396
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2397
- }
2398
- if (data.LatestVersion != null) {
2399
- contents.LatestVersion = __expectString(data.LatestVersion);
2400
- }
2401
- if (data.LatestVersionArn != null) {
2402
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2403
- }
2404
- if (data.Name != null) {
2405
- contents.Name = __expectString(data.Name);
2406
- }
2288
+ const doc = take(data, {
2289
+ Arn: __expectString,
2290
+ CreationTimestamp: __expectString,
2291
+ Id: __expectString,
2292
+ LastUpdatedTimestamp: __expectString,
2293
+ LatestVersion: __expectString,
2294
+ LatestVersionArn: __expectString,
2295
+ Name: __expectString,
2296
+ });
2297
+ Object.assign(contents, doc);
2407
2298
  return contents;
2408
2299
  };
2409
2300
  const de_CreateGroupCommandError = async (output, context) => {
@@ -2418,10 +2309,9 @@ const de_CreateGroupCommandError = async (output, context) => {
2418
2309
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2419
2310
  default:
2420
2311
  const parsedBody = parsedOutput.body;
2421
- throwDefaultError({
2312
+ return throwDefaultError({
2422
2313
  output,
2423
2314
  parsedBody,
2424
- exceptionCtor: __BaseException,
2425
2315
  errorCode,
2426
2316
  });
2427
2317
  }
@@ -2434,9 +2324,10 @@ export const de_CreateGroupCertificateAuthorityCommand = async (output, context)
2434
2324
  $metadata: deserializeMetadata(output),
2435
2325
  });
2436
2326
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2437
- if (data.GroupCertificateAuthorityArn != null) {
2438
- contents.GroupCertificateAuthorityArn = __expectString(data.GroupCertificateAuthorityArn);
2439
- }
2327
+ const doc = take(data, {
2328
+ GroupCertificateAuthorityArn: __expectString,
2329
+ });
2330
+ Object.assign(contents, doc);
2440
2331
  return contents;
2441
2332
  };
2442
2333
  const de_CreateGroupCertificateAuthorityCommandError = async (output, context) => {
@@ -2454,10 +2345,9 @@ const de_CreateGroupCertificateAuthorityCommandError = async (output, context) =
2454
2345
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2455
2346
  default:
2456
2347
  const parsedBody = parsedOutput.body;
2457
- throwDefaultError({
2348
+ return throwDefaultError({
2458
2349
  output,
2459
2350
  parsedBody,
2460
- exceptionCtor: __BaseException,
2461
2351
  errorCode,
2462
2352
  });
2463
2353
  }
@@ -2470,18 +2360,13 @@ export const de_CreateGroupVersionCommand = async (output, context) => {
2470
2360
  $metadata: deserializeMetadata(output),
2471
2361
  });
2472
2362
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2473
- if (data.Arn != null) {
2474
- contents.Arn = __expectString(data.Arn);
2475
- }
2476
- if (data.CreationTimestamp != null) {
2477
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2478
- }
2479
- if (data.Id != null) {
2480
- contents.Id = __expectString(data.Id);
2481
- }
2482
- if (data.Version != null) {
2483
- contents.Version = __expectString(data.Version);
2484
- }
2363
+ const doc = take(data, {
2364
+ Arn: __expectString,
2365
+ CreationTimestamp: __expectString,
2366
+ Id: __expectString,
2367
+ Version: __expectString,
2368
+ });
2369
+ Object.assign(contents, doc);
2485
2370
  return contents;
2486
2371
  };
2487
2372
  const de_CreateGroupVersionCommandError = async (output, context) => {
@@ -2496,10 +2381,9 @@ const de_CreateGroupVersionCommandError = async (output, context) => {
2496
2381
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2497
2382
  default:
2498
2383
  const parsedBody = parsedOutput.body;
2499
- throwDefaultError({
2384
+ return throwDefaultError({
2500
2385
  output,
2501
2386
  parsedBody,
2502
- exceptionCtor: __BaseException,
2503
2387
  errorCode,
2504
2388
  });
2505
2389
  }
@@ -2512,27 +2396,16 @@ export const de_CreateLoggerDefinitionCommand = async (output, context) => {
2512
2396
  $metadata: deserializeMetadata(output),
2513
2397
  });
2514
2398
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2515
- if (data.Arn != null) {
2516
- contents.Arn = __expectString(data.Arn);
2517
- }
2518
- if (data.CreationTimestamp != null) {
2519
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2520
- }
2521
- if (data.Id != null) {
2522
- contents.Id = __expectString(data.Id);
2523
- }
2524
- if (data.LastUpdatedTimestamp != null) {
2525
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2526
- }
2527
- if (data.LatestVersion != null) {
2528
- contents.LatestVersion = __expectString(data.LatestVersion);
2529
- }
2530
- if (data.LatestVersionArn != null) {
2531
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2532
- }
2533
- if (data.Name != null) {
2534
- contents.Name = __expectString(data.Name);
2535
- }
2399
+ const doc = take(data, {
2400
+ Arn: __expectString,
2401
+ CreationTimestamp: __expectString,
2402
+ Id: __expectString,
2403
+ LastUpdatedTimestamp: __expectString,
2404
+ LatestVersion: __expectString,
2405
+ LatestVersionArn: __expectString,
2406
+ Name: __expectString,
2407
+ });
2408
+ Object.assign(contents, doc);
2536
2409
  return contents;
2537
2410
  };
2538
2411
  const de_CreateLoggerDefinitionCommandError = async (output, context) => {
@@ -2547,10 +2420,9 @@ const de_CreateLoggerDefinitionCommandError = async (output, context) => {
2547
2420
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2548
2421
  default:
2549
2422
  const parsedBody = parsedOutput.body;
2550
- throwDefaultError({
2423
+ return throwDefaultError({
2551
2424
  output,
2552
2425
  parsedBody,
2553
- exceptionCtor: __BaseException,
2554
2426
  errorCode,
2555
2427
  });
2556
2428
  }
@@ -2563,18 +2435,13 @@ export const de_CreateLoggerDefinitionVersionCommand = async (output, context) =
2563
2435
  $metadata: deserializeMetadata(output),
2564
2436
  });
2565
2437
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2566
- if (data.Arn != null) {
2567
- contents.Arn = __expectString(data.Arn);
2568
- }
2569
- if (data.CreationTimestamp != null) {
2570
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2571
- }
2572
- if (data.Id != null) {
2573
- contents.Id = __expectString(data.Id);
2574
- }
2575
- if (data.Version != null) {
2576
- contents.Version = __expectString(data.Version);
2577
- }
2438
+ const doc = take(data, {
2439
+ Arn: __expectString,
2440
+ CreationTimestamp: __expectString,
2441
+ Id: __expectString,
2442
+ Version: __expectString,
2443
+ });
2444
+ Object.assign(contents, doc);
2578
2445
  return contents;
2579
2446
  };
2580
2447
  const de_CreateLoggerDefinitionVersionCommandError = async (output, context) => {
@@ -2589,10 +2456,9 @@ const de_CreateLoggerDefinitionVersionCommandError = async (output, context) =>
2589
2456
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2590
2457
  default:
2591
2458
  const parsedBody = parsedOutput.body;
2592
- throwDefaultError({
2459
+ return throwDefaultError({
2593
2460
  output,
2594
2461
  parsedBody,
2595
- exceptionCtor: __BaseException,
2596
2462
  errorCode,
2597
2463
  });
2598
2464
  }
@@ -2605,27 +2471,16 @@ export const de_CreateResourceDefinitionCommand = async (output, context) => {
2605
2471
  $metadata: deserializeMetadata(output),
2606
2472
  });
2607
2473
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2608
- if (data.Arn != null) {
2609
- contents.Arn = __expectString(data.Arn);
2610
- }
2611
- if (data.CreationTimestamp != null) {
2612
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2613
- }
2614
- if (data.Id != null) {
2615
- contents.Id = __expectString(data.Id);
2616
- }
2617
- if (data.LastUpdatedTimestamp != null) {
2618
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2619
- }
2620
- if (data.LatestVersion != null) {
2621
- contents.LatestVersion = __expectString(data.LatestVersion);
2622
- }
2623
- if (data.LatestVersionArn != null) {
2624
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2625
- }
2626
- if (data.Name != null) {
2627
- contents.Name = __expectString(data.Name);
2628
- }
2474
+ const doc = take(data, {
2475
+ Arn: __expectString,
2476
+ CreationTimestamp: __expectString,
2477
+ Id: __expectString,
2478
+ LastUpdatedTimestamp: __expectString,
2479
+ LatestVersion: __expectString,
2480
+ LatestVersionArn: __expectString,
2481
+ Name: __expectString,
2482
+ });
2483
+ Object.assign(contents, doc);
2629
2484
  return contents;
2630
2485
  };
2631
2486
  const de_CreateResourceDefinitionCommandError = async (output, context) => {
@@ -2640,10 +2495,9 @@ const de_CreateResourceDefinitionCommandError = async (output, context) => {
2640
2495
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2641
2496
  default:
2642
2497
  const parsedBody = parsedOutput.body;
2643
- throwDefaultError({
2498
+ return throwDefaultError({
2644
2499
  output,
2645
2500
  parsedBody,
2646
- exceptionCtor: __BaseException,
2647
2501
  errorCode,
2648
2502
  });
2649
2503
  }
@@ -2656,18 +2510,13 @@ export const de_CreateResourceDefinitionVersionCommand = async (output, context)
2656
2510
  $metadata: deserializeMetadata(output),
2657
2511
  });
2658
2512
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2659
- if (data.Arn != null) {
2660
- contents.Arn = __expectString(data.Arn);
2661
- }
2662
- if (data.CreationTimestamp != null) {
2663
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2664
- }
2665
- if (data.Id != null) {
2666
- contents.Id = __expectString(data.Id);
2667
- }
2668
- if (data.Version != null) {
2669
- contents.Version = __expectString(data.Version);
2670
- }
2513
+ const doc = take(data, {
2514
+ Arn: __expectString,
2515
+ CreationTimestamp: __expectString,
2516
+ Id: __expectString,
2517
+ Version: __expectString,
2518
+ });
2519
+ Object.assign(contents, doc);
2671
2520
  return contents;
2672
2521
  };
2673
2522
  const de_CreateResourceDefinitionVersionCommandError = async (output, context) => {
@@ -2682,10 +2531,9 @@ const de_CreateResourceDefinitionVersionCommandError = async (output, context) =
2682
2531
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2683
2532
  default:
2684
2533
  const parsedBody = parsedOutput.body;
2685
- throwDefaultError({
2534
+ return throwDefaultError({
2686
2535
  output,
2687
2536
  parsedBody,
2688
- exceptionCtor: __BaseException,
2689
2537
  errorCode,
2690
2538
  });
2691
2539
  }
@@ -2698,15 +2546,12 @@ export const de_CreateSoftwareUpdateJobCommand = async (output, context) => {
2698
2546
  $metadata: deserializeMetadata(output),
2699
2547
  });
2700
2548
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2701
- if (data.IotJobArn != null) {
2702
- contents.IotJobArn = __expectString(data.IotJobArn);
2703
- }
2704
- if (data.IotJobId != null) {
2705
- contents.IotJobId = __expectString(data.IotJobId);
2706
- }
2707
- if (data.PlatformSoftwareVersion != null) {
2708
- contents.PlatformSoftwareVersion = __expectString(data.PlatformSoftwareVersion);
2709
- }
2549
+ const doc = take(data, {
2550
+ IotJobArn: __expectString,
2551
+ IotJobId: __expectString,
2552
+ PlatformSoftwareVersion: __expectString,
2553
+ });
2554
+ Object.assign(contents, doc);
2710
2555
  return contents;
2711
2556
  };
2712
2557
  const de_CreateSoftwareUpdateJobCommandError = async (output, context) => {
@@ -2724,10 +2569,9 @@ const de_CreateSoftwareUpdateJobCommandError = async (output, context) => {
2724
2569
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2725
2570
  default:
2726
2571
  const parsedBody = parsedOutput.body;
2727
- throwDefaultError({
2572
+ return throwDefaultError({
2728
2573
  output,
2729
2574
  parsedBody,
2730
- exceptionCtor: __BaseException,
2731
2575
  errorCode,
2732
2576
  });
2733
2577
  }
@@ -2740,27 +2584,16 @@ export const de_CreateSubscriptionDefinitionCommand = async (output, context) =>
2740
2584
  $metadata: deserializeMetadata(output),
2741
2585
  });
2742
2586
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2743
- if (data.Arn != null) {
2744
- contents.Arn = __expectString(data.Arn);
2745
- }
2746
- if (data.CreationTimestamp != null) {
2747
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2748
- }
2749
- if (data.Id != null) {
2750
- contents.Id = __expectString(data.Id);
2751
- }
2752
- if (data.LastUpdatedTimestamp != null) {
2753
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
2754
- }
2755
- if (data.LatestVersion != null) {
2756
- contents.LatestVersion = __expectString(data.LatestVersion);
2757
- }
2758
- if (data.LatestVersionArn != null) {
2759
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
2760
- }
2761
- if (data.Name != null) {
2762
- contents.Name = __expectString(data.Name);
2763
- }
2587
+ const doc = take(data, {
2588
+ Arn: __expectString,
2589
+ CreationTimestamp: __expectString,
2590
+ Id: __expectString,
2591
+ LastUpdatedTimestamp: __expectString,
2592
+ LatestVersion: __expectString,
2593
+ LatestVersionArn: __expectString,
2594
+ Name: __expectString,
2595
+ });
2596
+ Object.assign(contents, doc);
2764
2597
  return contents;
2765
2598
  };
2766
2599
  const de_CreateSubscriptionDefinitionCommandError = async (output, context) => {
@@ -2775,10 +2608,9 @@ const de_CreateSubscriptionDefinitionCommandError = async (output, context) => {
2775
2608
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2776
2609
  default:
2777
2610
  const parsedBody = parsedOutput.body;
2778
- throwDefaultError({
2611
+ return throwDefaultError({
2779
2612
  output,
2780
2613
  parsedBody,
2781
- exceptionCtor: __BaseException,
2782
2614
  errorCode,
2783
2615
  });
2784
2616
  }
@@ -2791,18 +2623,13 @@ export const de_CreateSubscriptionDefinitionVersionCommand = async (output, cont
2791
2623
  $metadata: deserializeMetadata(output),
2792
2624
  });
2793
2625
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2794
- if (data.Arn != null) {
2795
- contents.Arn = __expectString(data.Arn);
2796
- }
2797
- if (data.CreationTimestamp != null) {
2798
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
2799
- }
2800
- if (data.Id != null) {
2801
- contents.Id = __expectString(data.Id);
2802
- }
2803
- if (data.Version != null) {
2804
- contents.Version = __expectString(data.Version);
2805
- }
2626
+ const doc = take(data, {
2627
+ Arn: __expectString,
2628
+ CreationTimestamp: __expectString,
2629
+ Id: __expectString,
2630
+ Version: __expectString,
2631
+ });
2632
+ Object.assign(contents, doc);
2806
2633
  return contents;
2807
2634
  };
2808
2635
  const de_CreateSubscriptionDefinitionVersionCommandError = async (output, context) => {
@@ -2817,10 +2644,9 @@ const de_CreateSubscriptionDefinitionVersionCommandError = async (output, contex
2817
2644
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2818
2645
  default:
2819
2646
  const parsedBody = parsedOutput.body;
2820
- throwDefaultError({
2647
+ return throwDefaultError({
2821
2648
  output,
2822
2649
  parsedBody,
2823
- exceptionCtor: __BaseException,
2824
2650
  errorCode,
2825
2651
  });
2826
2652
  }
@@ -2847,10 +2673,9 @@ const de_DeleteConnectorDefinitionCommandError = async (output, context) => {
2847
2673
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2848
2674
  default:
2849
2675
  const parsedBody = parsedOutput.body;
2850
- throwDefaultError({
2676
+ return throwDefaultError({
2851
2677
  output,
2852
2678
  parsedBody,
2853
- exceptionCtor: __BaseException,
2854
2679
  errorCode,
2855
2680
  });
2856
2681
  }
@@ -2877,10 +2702,9 @@ const de_DeleteCoreDefinitionCommandError = async (output, context) => {
2877
2702
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2878
2703
  default:
2879
2704
  const parsedBody = parsedOutput.body;
2880
- throwDefaultError({
2705
+ return throwDefaultError({
2881
2706
  output,
2882
2707
  parsedBody,
2883
- exceptionCtor: __BaseException,
2884
2708
  errorCode,
2885
2709
  });
2886
2710
  }
@@ -2907,10 +2731,9 @@ const de_DeleteDeviceDefinitionCommandError = async (output, context) => {
2907
2731
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2908
2732
  default:
2909
2733
  const parsedBody = parsedOutput.body;
2910
- throwDefaultError({
2734
+ return throwDefaultError({
2911
2735
  output,
2912
2736
  parsedBody,
2913
- exceptionCtor: __BaseException,
2914
2737
  errorCode,
2915
2738
  });
2916
2739
  }
@@ -2937,10 +2760,9 @@ const de_DeleteFunctionDefinitionCommandError = async (output, context) => {
2937
2760
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2938
2761
  default:
2939
2762
  const parsedBody = parsedOutput.body;
2940
- throwDefaultError({
2763
+ return throwDefaultError({
2941
2764
  output,
2942
2765
  parsedBody,
2943
- exceptionCtor: __BaseException,
2944
2766
  errorCode,
2945
2767
  });
2946
2768
  }
@@ -2967,10 +2789,9 @@ const de_DeleteGroupCommandError = async (output, context) => {
2967
2789
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2968
2790
  default:
2969
2791
  const parsedBody = parsedOutput.body;
2970
- throwDefaultError({
2792
+ return throwDefaultError({
2971
2793
  output,
2972
2794
  parsedBody,
2973
- exceptionCtor: __BaseException,
2974
2795
  errorCode,
2975
2796
  });
2976
2797
  }
@@ -2997,10 +2818,9 @@ const de_DeleteLoggerDefinitionCommandError = async (output, context) => {
2997
2818
  throw await de_BadRequestExceptionRes(parsedOutput, context);
2998
2819
  default:
2999
2820
  const parsedBody = parsedOutput.body;
3000
- throwDefaultError({
2821
+ return throwDefaultError({
3001
2822
  output,
3002
2823
  parsedBody,
3003
- exceptionCtor: __BaseException,
3004
2824
  errorCode,
3005
2825
  });
3006
2826
  }
@@ -3027,10 +2847,9 @@ const de_DeleteResourceDefinitionCommandError = async (output, context) => {
3027
2847
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3028
2848
  default:
3029
2849
  const parsedBody = parsedOutput.body;
3030
- throwDefaultError({
2850
+ return throwDefaultError({
3031
2851
  output,
3032
2852
  parsedBody,
3033
- exceptionCtor: __BaseException,
3034
2853
  errorCode,
3035
2854
  });
3036
2855
  }
@@ -3057,10 +2876,9 @@ const de_DeleteSubscriptionDefinitionCommandError = async (output, context) => {
3057
2876
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3058
2877
  default:
3059
2878
  const parsedBody = parsedOutput.body;
3060
- throwDefaultError({
2879
+ return throwDefaultError({
3061
2880
  output,
3062
2881
  parsedBody,
3063
- exceptionCtor: __BaseException,
3064
2882
  errorCode,
3065
2883
  });
3066
2884
  }
@@ -3073,9 +2891,10 @@ export const de_DisassociateRoleFromGroupCommand = async (output, context) => {
3073
2891
  $metadata: deserializeMetadata(output),
3074
2892
  });
3075
2893
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3076
- if (data.DisassociatedAt != null) {
3077
- contents.DisassociatedAt = __expectString(data.DisassociatedAt);
3078
- }
2894
+ const doc = take(data, {
2895
+ DisassociatedAt: __expectString,
2896
+ });
2897
+ Object.assign(contents, doc);
3079
2898
  return contents;
3080
2899
  };
3081
2900
  const de_DisassociateRoleFromGroupCommandError = async (output, context) => {
@@ -3093,10 +2912,9 @@ const de_DisassociateRoleFromGroupCommandError = async (output, context) => {
3093
2912
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3094
2913
  default:
3095
2914
  const parsedBody = parsedOutput.body;
3096
- throwDefaultError({
2915
+ return throwDefaultError({
3097
2916
  output,
3098
2917
  parsedBody,
3099
- exceptionCtor: __BaseException,
3100
2918
  errorCode,
3101
2919
  });
3102
2920
  }
@@ -3109,9 +2927,10 @@ export const de_DisassociateServiceRoleFromAccountCommand = async (output, conte
3109
2927
  $metadata: deserializeMetadata(output),
3110
2928
  });
3111
2929
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3112
- if (data.DisassociatedAt != null) {
3113
- contents.DisassociatedAt = __expectString(data.DisassociatedAt);
3114
- }
2930
+ const doc = take(data, {
2931
+ DisassociatedAt: __expectString,
2932
+ });
2933
+ Object.assign(contents, doc);
3115
2934
  return contents;
3116
2935
  };
3117
2936
  const de_DisassociateServiceRoleFromAccountCommandError = async (output, context) => {
@@ -3126,10 +2945,9 @@ const de_DisassociateServiceRoleFromAccountCommandError = async (output, context
3126
2945
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3127
2946
  default:
3128
2947
  const parsedBody = parsedOutput.body;
3129
- throwDefaultError({
2948
+ return throwDefaultError({
3130
2949
  output,
3131
2950
  parsedBody,
3132
- exceptionCtor: __BaseException,
3133
2951
  errorCode,
3134
2952
  });
3135
2953
  }
@@ -3142,12 +2960,11 @@ export const de_GetAssociatedRoleCommand = async (output, context) => {
3142
2960
  $metadata: deserializeMetadata(output),
3143
2961
  });
3144
2962
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3145
- if (data.AssociatedAt != null) {
3146
- contents.AssociatedAt = __expectString(data.AssociatedAt);
3147
- }
3148
- if (data.RoleArn != null) {
3149
- contents.RoleArn = __expectString(data.RoleArn);
3150
- }
2963
+ const doc = take(data, {
2964
+ AssociatedAt: __expectString,
2965
+ RoleArn: __expectString,
2966
+ });
2967
+ Object.assign(contents, doc);
3151
2968
  return contents;
3152
2969
  };
3153
2970
  const de_GetAssociatedRoleCommandError = async (output, context) => {
@@ -3165,10 +2982,9 @@ const de_GetAssociatedRoleCommandError = async (output, context) => {
3165
2982
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3166
2983
  default:
3167
2984
  const parsedBody = parsedOutput.body;
3168
- throwDefaultError({
2985
+ return throwDefaultError({
3169
2986
  output,
3170
2987
  parsedBody,
3171
- exceptionCtor: __BaseException,
3172
2988
  errorCode,
3173
2989
  });
3174
2990
  }
@@ -3181,24 +2997,15 @@ export const de_GetBulkDeploymentStatusCommand = async (output, context) => {
3181
2997
  $metadata: deserializeMetadata(output),
3182
2998
  });
3183
2999
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3184
- if (data.BulkDeploymentMetrics != null) {
3185
- contents.BulkDeploymentMetrics = de_BulkDeploymentMetrics(data.BulkDeploymentMetrics, context);
3186
- }
3187
- if (data.BulkDeploymentStatus != null) {
3188
- contents.BulkDeploymentStatus = __expectString(data.BulkDeploymentStatus);
3189
- }
3190
- if (data.CreatedAt != null) {
3191
- contents.CreatedAt = __expectString(data.CreatedAt);
3192
- }
3193
- if (data.ErrorDetails != null) {
3194
- contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context);
3195
- }
3196
- if (data.ErrorMessage != null) {
3197
- contents.ErrorMessage = __expectString(data.ErrorMessage);
3198
- }
3199
- if (data.tags != null) {
3200
- contents.tags = de_Tags(data.tags, context);
3201
- }
3000
+ const doc = take(data, {
3001
+ BulkDeploymentMetrics: _json,
3002
+ BulkDeploymentStatus: __expectString,
3003
+ CreatedAt: __expectString,
3004
+ ErrorDetails: _json,
3005
+ ErrorMessage: __expectString,
3006
+ tags: _json,
3007
+ });
3008
+ Object.assign(contents, doc);
3202
3009
  return contents;
3203
3010
  };
3204
3011
  const de_GetBulkDeploymentStatusCommandError = async (output, context) => {
@@ -3213,10 +3020,9 @@ const de_GetBulkDeploymentStatusCommandError = async (output, context) => {
3213
3020
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3214
3021
  default:
3215
3022
  const parsedBody = parsedOutput.body;
3216
- throwDefaultError({
3023
+ return throwDefaultError({
3217
3024
  output,
3218
3025
  parsedBody,
3219
- exceptionCtor: __BaseException,
3220
3026
  errorCode,
3221
3027
  });
3222
3028
  }
@@ -3229,12 +3035,11 @@ export const de_GetConnectivityInfoCommand = async (output, context) => {
3229
3035
  $metadata: deserializeMetadata(output),
3230
3036
  });
3231
3037
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3232
- if (data.ConnectivityInfo != null) {
3233
- contents.ConnectivityInfo = de___listOfConnectivityInfo(data.ConnectivityInfo, context);
3234
- }
3235
- if (data.message != null) {
3236
- contents.Message = __expectString(data.message);
3237
- }
3038
+ const doc = take(data, {
3039
+ ConnectivityInfo: _json,
3040
+ Message: [, __expectString, `message`],
3041
+ });
3042
+ Object.assign(contents, doc);
3238
3043
  return contents;
3239
3044
  };
3240
3045
  const de_GetConnectivityInfoCommandError = async (output, context) => {
@@ -3252,10 +3057,9 @@ const de_GetConnectivityInfoCommandError = async (output, context) => {
3252
3057
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3253
3058
  default:
3254
3059
  const parsedBody = parsedOutput.body;
3255
- throwDefaultError({
3060
+ return throwDefaultError({
3256
3061
  output,
3257
3062
  parsedBody,
3258
- exceptionCtor: __BaseException,
3259
3063
  errorCode,
3260
3064
  });
3261
3065
  }
@@ -3268,30 +3072,17 @@ export const de_GetConnectorDefinitionCommand = async (output, context) => {
3268
3072
  $metadata: deserializeMetadata(output),
3269
3073
  });
3270
3074
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3271
- if (data.Arn != null) {
3272
- contents.Arn = __expectString(data.Arn);
3273
- }
3274
- if (data.CreationTimestamp != null) {
3275
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3276
- }
3277
- if (data.Id != null) {
3278
- contents.Id = __expectString(data.Id);
3279
- }
3280
- if (data.LastUpdatedTimestamp != null) {
3281
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3282
- }
3283
- if (data.LatestVersion != null) {
3284
- contents.LatestVersion = __expectString(data.LatestVersion);
3285
- }
3286
- if (data.LatestVersionArn != null) {
3287
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3288
- }
3289
- if (data.Name != null) {
3290
- contents.Name = __expectString(data.Name);
3291
- }
3292
- if (data.tags != null) {
3293
- contents.tags = de_Tags(data.tags, context);
3294
- }
3075
+ const doc = take(data, {
3076
+ Arn: __expectString,
3077
+ CreationTimestamp: __expectString,
3078
+ Id: __expectString,
3079
+ LastUpdatedTimestamp: __expectString,
3080
+ LatestVersion: __expectString,
3081
+ LatestVersionArn: __expectString,
3082
+ Name: __expectString,
3083
+ tags: _json,
3084
+ });
3085
+ Object.assign(contents, doc);
3295
3086
  return contents;
3296
3087
  };
3297
3088
  const de_GetConnectorDefinitionCommandError = async (output, context) => {
@@ -3306,10 +3097,9 @@ const de_GetConnectorDefinitionCommandError = async (output, context) => {
3306
3097
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3307
3098
  default:
3308
3099
  const parsedBody = parsedOutput.body;
3309
- throwDefaultError({
3100
+ return throwDefaultError({
3310
3101
  output,
3311
3102
  parsedBody,
3312
- exceptionCtor: __BaseException,
3313
3103
  errorCode,
3314
3104
  });
3315
3105
  }
@@ -3322,24 +3112,15 @@ export const de_GetConnectorDefinitionVersionCommand = async (output, context) =
3322
3112
  $metadata: deserializeMetadata(output),
3323
3113
  });
3324
3114
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3325
- if (data.Arn != null) {
3326
- contents.Arn = __expectString(data.Arn);
3327
- }
3328
- if (data.CreationTimestamp != null) {
3329
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3330
- }
3331
- if (data.Definition != null) {
3332
- contents.Definition = de_ConnectorDefinitionVersion(data.Definition, context);
3333
- }
3334
- if (data.Id != null) {
3335
- contents.Id = __expectString(data.Id);
3336
- }
3337
- if (data.NextToken != null) {
3338
- contents.NextToken = __expectString(data.NextToken);
3339
- }
3340
- if (data.Version != null) {
3341
- contents.Version = __expectString(data.Version);
3342
- }
3115
+ const doc = take(data, {
3116
+ Arn: __expectString,
3117
+ CreationTimestamp: __expectString,
3118
+ Definition: _json,
3119
+ Id: __expectString,
3120
+ NextToken: __expectString,
3121
+ Version: __expectString,
3122
+ });
3123
+ Object.assign(contents, doc);
3343
3124
  return contents;
3344
3125
  };
3345
3126
  const de_GetConnectorDefinitionVersionCommandError = async (output, context) => {
@@ -3354,10 +3135,9 @@ const de_GetConnectorDefinitionVersionCommandError = async (output, context) =>
3354
3135
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3355
3136
  default:
3356
3137
  const parsedBody = parsedOutput.body;
3357
- throwDefaultError({
3138
+ return throwDefaultError({
3358
3139
  output,
3359
3140
  parsedBody,
3360
- exceptionCtor: __BaseException,
3361
3141
  errorCode,
3362
3142
  });
3363
3143
  }
@@ -3370,30 +3150,17 @@ export const de_GetCoreDefinitionCommand = async (output, context) => {
3370
3150
  $metadata: deserializeMetadata(output),
3371
3151
  });
3372
3152
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3373
- if (data.Arn != null) {
3374
- contents.Arn = __expectString(data.Arn);
3375
- }
3376
- if (data.CreationTimestamp != null) {
3377
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3378
- }
3379
- if (data.Id != null) {
3380
- contents.Id = __expectString(data.Id);
3381
- }
3382
- if (data.LastUpdatedTimestamp != null) {
3383
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3384
- }
3385
- if (data.LatestVersion != null) {
3386
- contents.LatestVersion = __expectString(data.LatestVersion);
3387
- }
3388
- if (data.LatestVersionArn != null) {
3389
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3390
- }
3391
- if (data.Name != null) {
3392
- contents.Name = __expectString(data.Name);
3393
- }
3394
- if (data.tags != null) {
3395
- contents.tags = de_Tags(data.tags, context);
3396
- }
3153
+ const doc = take(data, {
3154
+ Arn: __expectString,
3155
+ CreationTimestamp: __expectString,
3156
+ Id: __expectString,
3157
+ LastUpdatedTimestamp: __expectString,
3158
+ LatestVersion: __expectString,
3159
+ LatestVersionArn: __expectString,
3160
+ Name: __expectString,
3161
+ tags: _json,
3162
+ });
3163
+ Object.assign(contents, doc);
3397
3164
  return contents;
3398
3165
  };
3399
3166
  const de_GetCoreDefinitionCommandError = async (output, context) => {
@@ -3408,10 +3175,9 @@ const de_GetCoreDefinitionCommandError = async (output, context) => {
3408
3175
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3409
3176
  default:
3410
3177
  const parsedBody = parsedOutput.body;
3411
- throwDefaultError({
3178
+ return throwDefaultError({
3412
3179
  output,
3413
3180
  parsedBody,
3414
- exceptionCtor: __BaseException,
3415
3181
  errorCode,
3416
3182
  });
3417
3183
  }
@@ -3424,24 +3190,15 @@ export const de_GetCoreDefinitionVersionCommand = async (output, context) => {
3424
3190
  $metadata: deserializeMetadata(output),
3425
3191
  });
3426
3192
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3427
- if (data.Arn != null) {
3428
- contents.Arn = __expectString(data.Arn);
3429
- }
3430
- if (data.CreationTimestamp != null) {
3431
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3432
- }
3433
- if (data.Definition != null) {
3434
- contents.Definition = de_CoreDefinitionVersion(data.Definition, context);
3435
- }
3436
- if (data.Id != null) {
3437
- contents.Id = __expectString(data.Id);
3438
- }
3439
- if (data.NextToken != null) {
3440
- contents.NextToken = __expectString(data.NextToken);
3441
- }
3442
- if (data.Version != null) {
3443
- contents.Version = __expectString(data.Version);
3444
- }
3193
+ const doc = take(data, {
3194
+ Arn: __expectString,
3195
+ CreationTimestamp: __expectString,
3196
+ Definition: _json,
3197
+ Id: __expectString,
3198
+ NextToken: __expectString,
3199
+ Version: __expectString,
3200
+ });
3201
+ Object.assign(contents, doc);
3445
3202
  return contents;
3446
3203
  };
3447
3204
  const de_GetCoreDefinitionVersionCommandError = async (output, context) => {
@@ -3456,10 +3213,9 @@ const de_GetCoreDefinitionVersionCommandError = async (output, context) => {
3456
3213
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3457
3214
  default:
3458
3215
  const parsedBody = parsedOutput.body;
3459
- throwDefaultError({
3216
+ return throwDefaultError({
3460
3217
  output,
3461
3218
  parsedBody,
3462
- exceptionCtor: __BaseException,
3463
3219
  errorCode,
3464
3220
  });
3465
3221
  }
@@ -3472,21 +3228,14 @@ export const de_GetDeploymentStatusCommand = async (output, context) => {
3472
3228
  $metadata: deserializeMetadata(output),
3473
3229
  });
3474
3230
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3475
- if (data.DeploymentStatus != null) {
3476
- contents.DeploymentStatus = __expectString(data.DeploymentStatus);
3477
- }
3478
- if (data.DeploymentType != null) {
3479
- contents.DeploymentType = __expectString(data.DeploymentType);
3480
- }
3481
- if (data.ErrorDetails != null) {
3482
- contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context);
3483
- }
3484
- if (data.ErrorMessage != null) {
3485
- contents.ErrorMessage = __expectString(data.ErrorMessage);
3486
- }
3487
- if (data.UpdatedAt != null) {
3488
- contents.UpdatedAt = __expectString(data.UpdatedAt);
3489
- }
3231
+ const doc = take(data, {
3232
+ DeploymentStatus: __expectString,
3233
+ DeploymentType: __expectString,
3234
+ ErrorDetails: _json,
3235
+ ErrorMessage: __expectString,
3236
+ UpdatedAt: __expectString,
3237
+ });
3238
+ Object.assign(contents, doc);
3490
3239
  return contents;
3491
3240
  };
3492
3241
  const de_GetDeploymentStatusCommandError = async (output, context) => {
@@ -3501,10 +3250,9 @@ const de_GetDeploymentStatusCommandError = async (output, context) => {
3501
3250
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3502
3251
  default:
3503
3252
  const parsedBody = parsedOutput.body;
3504
- throwDefaultError({
3253
+ return throwDefaultError({
3505
3254
  output,
3506
3255
  parsedBody,
3507
- exceptionCtor: __BaseException,
3508
3256
  errorCode,
3509
3257
  });
3510
3258
  }
@@ -3517,30 +3265,17 @@ export const de_GetDeviceDefinitionCommand = async (output, context) => {
3517
3265
  $metadata: deserializeMetadata(output),
3518
3266
  });
3519
3267
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3520
- if (data.Arn != null) {
3521
- contents.Arn = __expectString(data.Arn);
3522
- }
3523
- if (data.CreationTimestamp != null) {
3524
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3525
- }
3526
- if (data.Id != null) {
3527
- contents.Id = __expectString(data.Id);
3528
- }
3529
- if (data.LastUpdatedTimestamp != null) {
3530
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3531
- }
3532
- if (data.LatestVersion != null) {
3533
- contents.LatestVersion = __expectString(data.LatestVersion);
3534
- }
3535
- if (data.LatestVersionArn != null) {
3536
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3537
- }
3538
- if (data.Name != null) {
3539
- contents.Name = __expectString(data.Name);
3540
- }
3541
- if (data.tags != null) {
3542
- contents.tags = de_Tags(data.tags, context);
3543
- }
3268
+ const doc = take(data, {
3269
+ Arn: __expectString,
3270
+ CreationTimestamp: __expectString,
3271
+ Id: __expectString,
3272
+ LastUpdatedTimestamp: __expectString,
3273
+ LatestVersion: __expectString,
3274
+ LatestVersionArn: __expectString,
3275
+ Name: __expectString,
3276
+ tags: _json,
3277
+ });
3278
+ Object.assign(contents, doc);
3544
3279
  return contents;
3545
3280
  };
3546
3281
  const de_GetDeviceDefinitionCommandError = async (output, context) => {
@@ -3555,10 +3290,9 @@ const de_GetDeviceDefinitionCommandError = async (output, context) => {
3555
3290
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3556
3291
  default:
3557
3292
  const parsedBody = parsedOutput.body;
3558
- throwDefaultError({
3293
+ return throwDefaultError({
3559
3294
  output,
3560
3295
  parsedBody,
3561
- exceptionCtor: __BaseException,
3562
3296
  errorCode,
3563
3297
  });
3564
3298
  }
@@ -3571,24 +3305,15 @@ export const de_GetDeviceDefinitionVersionCommand = async (output, context) => {
3571
3305
  $metadata: deserializeMetadata(output),
3572
3306
  });
3573
3307
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3574
- if (data.Arn != null) {
3575
- contents.Arn = __expectString(data.Arn);
3576
- }
3577
- if (data.CreationTimestamp != null) {
3578
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3579
- }
3580
- if (data.Definition != null) {
3581
- contents.Definition = de_DeviceDefinitionVersion(data.Definition, context);
3582
- }
3583
- if (data.Id != null) {
3584
- contents.Id = __expectString(data.Id);
3585
- }
3586
- if (data.NextToken != null) {
3587
- contents.NextToken = __expectString(data.NextToken);
3588
- }
3589
- if (data.Version != null) {
3590
- contents.Version = __expectString(data.Version);
3591
- }
3308
+ const doc = take(data, {
3309
+ Arn: __expectString,
3310
+ CreationTimestamp: __expectString,
3311
+ Definition: _json,
3312
+ Id: __expectString,
3313
+ NextToken: __expectString,
3314
+ Version: __expectString,
3315
+ });
3316
+ Object.assign(contents, doc);
3592
3317
  return contents;
3593
3318
  };
3594
3319
  const de_GetDeviceDefinitionVersionCommandError = async (output, context) => {
@@ -3603,10 +3328,9 @@ const de_GetDeviceDefinitionVersionCommandError = async (output, context) => {
3603
3328
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3604
3329
  default:
3605
3330
  const parsedBody = parsedOutput.body;
3606
- throwDefaultError({
3331
+ return throwDefaultError({
3607
3332
  output,
3608
3333
  parsedBody,
3609
- exceptionCtor: __BaseException,
3610
3334
  errorCode,
3611
3335
  });
3612
3336
  }
@@ -3619,30 +3343,17 @@ export const de_GetFunctionDefinitionCommand = async (output, context) => {
3619
3343
  $metadata: deserializeMetadata(output),
3620
3344
  });
3621
3345
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3622
- if (data.Arn != null) {
3623
- contents.Arn = __expectString(data.Arn);
3624
- }
3625
- if (data.CreationTimestamp != null) {
3626
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3627
- }
3628
- if (data.Id != null) {
3629
- contents.Id = __expectString(data.Id);
3630
- }
3631
- if (data.LastUpdatedTimestamp != null) {
3632
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3633
- }
3634
- if (data.LatestVersion != null) {
3635
- contents.LatestVersion = __expectString(data.LatestVersion);
3636
- }
3637
- if (data.LatestVersionArn != null) {
3638
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3639
- }
3640
- if (data.Name != null) {
3641
- contents.Name = __expectString(data.Name);
3642
- }
3643
- if (data.tags != null) {
3644
- contents.tags = de_Tags(data.tags, context);
3645
- }
3346
+ const doc = take(data, {
3347
+ Arn: __expectString,
3348
+ CreationTimestamp: __expectString,
3349
+ Id: __expectString,
3350
+ LastUpdatedTimestamp: __expectString,
3351
+ LatestVersion: __expectString,
3352
+ LatestVersionArn: __expectString,
3353
+ Name: __expectString,
3354
+ tags: _json,
3355
+ });
3356
+ Object.assign(contents, doc);
3646
3357
  return contents;
3647
3358
  };
3648
3359
  const de_GetFunctionDefinitionCommandError = async (output, context) => {
@@ -3657,10 +3368,9 @@ const de_GetFunctionDefinitionCommandError = async (output, context) => {
3657
3368
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3658
3369
  default:
3659
3370
  const parsedBody = parsedOutput.body;
3660
- throwDefaultError({
3371
+ return throwDefaultError({
3661
3372
  output,
3662
3373
  parsedBody,
3663
- exceptionCtor: __BaseException,
3664
3374
  errorCode,
3665
3375
  });
3666
3376
  }
@@ -3673,24 +3383,15 @@ export const de_GetFunctionDefinitionVersionCommand = async (output, context) =>
3673
3383
  $metadata: deserializeMetadata(output),
3674
3384
  });
3675
3385
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3676
- if (data.Arn != null) {
3677
- contents.Arn = __expectString(data.Arn);
3678
- }
3679
- if (data.CreationTimestamp != null) {
3680
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3681
- }
3682
- if (data.Definition != null) {
3683
- contents.Definition = de_FunctionDefinitionVersion(data.Definition, context);
3684
- }
3685
- if (data.Id != null) {
3686
- contents.Id = __expectString(data.Id);
3687
- }
3688
- if (data.NextToken != null) {
3689
- contents.NextToken = __expectString(data.NextToken);
3690
- }
3691
- if (data.Version != null) {
3692
- contents.Version = __expectString(data.Version);
3693
- }
3386
+ const doc = take(data, {
3387
+ Arn: __expectString,
3388
+ CreationTimestamp: __expectString,
3389
+ Definition: _json,
3390
+ Id: __expectString,
3391
+ NextToken: __expectString,
3392
+ Version: __expectString,
3393
+ });
3394
+ Object.assign(contents, doc);
3694
3395
  return contents;
3695
3396
  };
3696
3397
  const de_GetFunctionDefinitionVersionCommandError = async (output, context) => {
@@ -3705,10 +3406,9 @@ const de_GetFunctionDefinitionVersionCommandError = async (output, context) => {
3705
3406
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3706
3407
  default:
3707
3408
  const parsedBody = parsedOutput.body;
3708
- throwDefaultError({
3409
+ return throwDefaultError({
3709
3410
  output,
3710
3411
  parsedBody,
3711
- exceptionCtor: __BaseException,
3712
3412
  errorCode,
3713
3413
  });
3714
3414
  }
@@ -3721,30 +3421,17 @@ export const de_GetGroupCommand = async (output, context) => {
3721
3421
  $metadata: deserializeMetadata(output),
3722
3422
  });
3723
3423
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3724
- if (data.Arn != null) {
3725
- contents.Arn = __expectString(data.Arn);
3726
- }
3727
- if (data.CreationTimestamp != null) {
3728
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3729
- }
3730
- if (data.Id != null) {
3731
- contents.Id = __expectString(data.Id);
3732
- }
3733
- if (data.LastUpdatedTimestamp != null) {
3734
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3735
- }
3736
- if (data.LatestVersion != null) {
3737
- contents.LatestVersion = __expectString(data.LatestVersion);
3738
- }
3739
- if (data.LatestVersionArn != null) {
3740
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3741
- }
3742
- if (data.Name != null) {
3743
- contents.Name = __expectString(data.Name);
3744
- }
3745
- if (data.tags != null) {
3746
- contents.tags = de_Tags(data.tags, context);
3747
- }
3424
+ const doc = take(data, {
3425
+ Arn: __expectString,
3426
+ CreationTimestamp: __expectString,
3427
+ Id: __expectString,
3428
+ LastUpdatedTimestamp: __expectString,
3429
+ LatestVersion: __expectString,
3430
+ LatestVersionArn: __expectString,
3431
+ Name: __expectString,
3432
+ tags: _json,
3433
+ });
3434
+ Object.assign(contents, doc);
3748
3435
  return contents;
3749
3436
  };
3750
3437
  const de_GetGroupCommandError = async (output, context) => {
@@ -3759,10 +3446,9 @@ const de_GetGroupCommandError = async (output, context) => {
3759
3446
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3760
3447
  default:
3761
3448
  const parsedBody = parsedOutput.body;
3762
- throwDefaultError({
3449
+ return throwDefaultError({
3763
3450
  output,
3764
3451
  parsedBody,
3765
- exceptionCtor: __BaseException,
3766
3452
  errorCode,
3767
3453
  });
3768
3454
  }
@@ -3775,15 +3461,12 @@ export const de_GetGroupCertificateAuthorityCommand = async (output, context) =>
3775
3461
  $metadata: deserializeMetadata(output),
3776
3462
  });
3777
3463
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3778
- if (data.GroupCertificateAuthorityArn != null) {
3779
- contents.GroupCertificateAuthorityArn = __expectString(data.GroupCertificateAuthorityArn);
3780
- }
3781
- if (data.GroupCertificateAuthorityId != null) {
3782
- contents.GroupCertificateAuthorityId = __expectString(data.GroupCertificateAuthorityId);
3783
- }
3784
- if (data.PemEncodedCertificate != null) {
3785
- contents.PemEncodedCertificate = __expectString(data.PemEncodedCertificate);
3786
- }
3464
+ const doc = take(data, {
3465
+ GroupCertificateAuthorityArn: __expectString,
3466
+ GroupCertificateAuthorityId: __expectString,
3467
+ PemEncodedCertificate: __expectString,
3468
+ });
3469
+ Object.assign(contents, doc);
3787
3470
  return contents;
3788
3471
  };
3789
3472
  const de_GetGroupCertificateAuthorityCommandError = async (output, context) => {
@@ -3801,10 +3484,9 @@ const de_GetGroupCertificateAuthorityCommandError = async (output, context) => {
3801
3484
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3802
3485
  default:
3803
3486
  const parsedBody = parsedOutput.body;
3804
- throwDefaultError({
3487
+ return throwDefaultError({
3805
3488
  output,
3806
3489
  parsedBody,
3807
- exceptionCtor: __BaseException,
3808
3490
  errorCode,
3809
3491
  });
3810
3492
  }
@@ -3817,15 +3499,12 @@ export const de_GetGroupCertificateConfigurationCommand = async (output, context
3817
3499
  $metadata: deserializeMetadata(output),
3818
3500
  });
3819
3501
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3820
- if (data.CertificateAuthorityExpiryInMilliseconds != null) {
3821
- contents.CertificateAuthorityExpiryInMilliseconds = __expectString(data.CertificateAuthorityExpiryInMilliseconds);
3822
- }
3823
- if (data.CertificateExpiryInMilliseconds != null) {
3824
- contents.CertificateExpiryInMilliseconds = __expectString(data.CertificateExpiryInMilliseconds);
3825
- }
3826
- if (data.GroupId != null) {
3827
- contents.GroupId = __expectString(data.GroupId);
3828
- }
3502
+ const doc = take(data, {
3503
+ CertificateAuthorityExpiryInMilliseconds: __expectString,
3504
+ CertificateExpiryInMilliseconds: __expectString,
3505
+ GroupId: __expectString,
3506
+ });
3507
+ Object.assign(contents, doc);
3829
3508
  return contents;
3830
3509
  };
3831
3510
  const de_GetGroupCertificateConfigurationCommandError = async (output, context) => {
@@ -3843,10 +3522,9 @@ const de_GetGroupCertificateConfigurationCommandError = async (output, context)
3843
3522
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3844
3523
  default:
3845
3524
  const parsedBody = parsedOutput.body;
3846
- throwDefaultError({
3525
+ return throwDefaultError({
3847
3526
  output,
3848
3527
  parsedBody,
3849
- exceptionCtor: __BaseException,
3850
3528
  errorCode,
3851
3529
  });
3852
3530
  }
@@ -3859,21 +3537,14 @@ export const de_GetGroupVersionCommand = async (output, context) => {
3859
3537
  $metadata: deserializeMetadata(output),
3860
3538
  });
3861
3539
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3862
- if (data.Arn != null) {
3863
- contents.Arn = __expectString(data.Arn);
3864
- }
3865
- if (data.CreationTimestamp != null) {
3866
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3867
- }
3868
- if (data.Definition != null) {
3869
- contents.Definition = de_GroupVersion(data.Definition, context);
3870
- }
3871
- if (data.Id != null) {
3872
- contents.Id = __expectString(data.Id);
3873
- }
3874
- if (data.Version != null) {
3875
- contents.Version = __expectString(data.Version);
3876
- }
3540
+ const doc = take(data, {
3541
+ Arn: __expectString,
3542
+ CreationTimestamp: __expectString,
3543
+ Definition: _json,
3544
+ Id: __expectString,
3545
+ Version: __expectString,
3546
+ });
3547
+ Object.assign(contents, doc);
3877
3548
  return contents;
3878
3549
  };
3879
3550
  const de_GetGroupVersionCommandError = async (output, context) => {
@@ -3888,10 +3559,9 @@ const de_GetGroupVersionCommandError = async (output, context) => {
3888
3559
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3889
3560
  default:
3890
3561
  const parsedBody = parsedOutput.body;
3891
- throwDefaultError({
3562
+ return throwDefaultError({
3892
3563
  output,
3893
3564
  parsedBody,
3894
- exceptionCtor: __BaseException,
3895
3565
  errorCode,
3896
3566
  });
3897
3567
  }
@@ -3904,30 +3574,17 @@ export const de_GetLoggerDefinitionCommand = async (output, context) => {
3904
3574
  $metadata: deserializeMetadata(output),
3905
3575
  });
3906
3576
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3907
- if (data.Arn != null) {
3908
- contents.Arn = __expectString(data.Arn);
3909
- }
3910
- if (data.CreationTimestamp != null) {
3911
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3912
- }
3913
- if (data.Id != null) {
3914
- contents.Id = __expectString(data.Id);
3915
- }
3916
- if (data.LastUpdatedTimestamp != null) {
3917
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
3918
- }
3919
- if (data.LatestVersion != null) {
3920
- contents.LatestVersion = __expectString(data.LatestVersion);
3921
- }
3922
- if (data.LatestVersionArn != null) {
3923
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
3924
- }
3925
- if (data.Name != null) {
3926
- contents.Name = __expectString(data.Name);
3927
- }
3928
- if (data.tags != null) {
3929
- contents.tags = de_Tags(data.tags, context);
3930
- }
3577
+ const doc = take(data, {
3578
+ Arn: __expectString,
3579
+ CreationTimestamp: __expectString,
3580
+ Id: __expectString,
3581
+ LastUpdatedTimestamp: __expectString,
3582
+ LatestVersion: __expectString,
3583
+ LatestVersionArn: __expectString,
3584
+ Name: __expectString,
3585
+ tags: _json,
3586
+ });
3587
+ Object.assign(contents, doc);
3931
3588
  return contents;
3932
3589
  };
3933
3590
  const de_GetLoggerDefinitionCommandError = async (output, context) => {
@@ -3942,10 +3599,9 @@ const de_GetLoggerDefinitionCommandError = async (output, context) => {
3942
3599
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3943
3600
  default:
3944
3601
  const parsedBody = parsedOutput.body;
3945
- throwDefaultError({
3602
+ return throwDefaultError({
3946
3603
  output,
3947
3604
  parsedBody,
3948
- exceptionCtor: __BaseException,
3949
3605
  errorCode,
3950
3606
  });
3951
3607
  }
@@ -3958,21 +3614,14 @@ export const de_GetLoggerDefinitionVersionCommand = async (output, context) => {
3958
3614
  $metadata: deserializeMetadata(output),
3959
3615
  });
3960
3616
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3961
- if (data.Arn != null) {
3962
- contents.Arn = __expectString(data.Arn);
3963
- }
3964
- if (data.CreationTimestamp != null) {
3965
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
3966
- }
3967
- if (data.Definition != null) {
3968
- contents.Definition = de_LoggerDefinitionVersion(data.Definition, context);
3969
- }
3970
- if (data.Id != null) {
3971
- contents.Id = __expectString(data.Id);
3972
- }
3973
- if (data.Version != null) {
3974
- contents.Version = __expectString(data.Version);
3975
- }
3617
+ const doc = take(data, {
3618
+ Arn: __expectString,
3619
+ CreationTimestamp: __expectString,
3620
+ Definition: _json,
3621
+ Id: __expectString,
3622
+ Version: __expectString,
3623
+ });
3624
+ Object.assign(contents, doc);
3976
3625
  return contents;
3977
3626
  };
3978
3627
  const de_GetLoggerDefinitionVersionCommandError = async (output, context) => {
@@ -3987,10 +3636,9 @@ const de_GetLoggerDefinitionVersionCommandError = async (output, context) => {
3987
3636
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3988
3637
  default:
3989
3638
  const parsedBody = parsedOutput.body;
3990
- throwDefaultError({
3639
+ return throwDefaultError({
3991
3640
  output,
3992
3641
  parsedBody,
3993
- exceptionCtor: __BaseException,
3994
3642
  errorCode,
3995
3643
  });
3996
3644
  }
@@ -4003,30 +3651,17 @@ export const de_GetResourceDefinitionCommand = async (output, context) => {
4003
3651
  $metadata: deserializeMetadata(output),
4004
3652
  });
4005
3653
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4006
- if (data.Arn != null) {
4007
- contents.Arn = __expectString(data.Arn);
4008
- }
4009
- if (data.CreationTimestamp != null) {
4010
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
4011
- }
4012
- if (data.Id != null) {
4013
- contents.Id = __expectString(data.Id);
4014
- }
4015
- if (data.LastUpdatedTimestamp != null) {
4016
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
4017
- }
4018
- if (data.LatestVersion != null) {
4019
- contents.LatestVersion = __expectString(data.LatestVersion);
4020
- }
4021
- if (data.LatestVersionArn != null) {
4022
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
4023
- }
4024
- if (data.Name != null) {
4025
- contents.Name = __expectString(data.Name);
4026
- }
4027
- if (data.tags != null) {
4028
- contents.tags = de_Tags(data.tags, context);
4029
- }
3654
+ const doc = take(data, {
3655
+ Arn: __expectString,
3656
+ CreationTimestamp: __expectString,
3657
+ Id: __expectString,
3658
+ LastUpdatedTimestamp: __expectString,
3659
+ LatestVersion: __expectString,
3660
+ LatestVersionArn: __expectString,
3661
+ Name: __expectString,
3662
+ tags: _json,
3663
+ });
3664
+ Object.assign(contents, doc);
4030
3665
  return contents;
4031
3666
  };
4032
3667
  const de_GetResourceDefinitionCommandError = async (output, context) => {
@@ -4041,10 +3676,9 @@ const de_GetResourceDefinitionCommandError = async (output, context) => {
4041
3676
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4042
3677
  default:
4043
3678
  const parsedBody = parsedOutput.body;
4044
- throwDefaultError({
3679
+ return throwDefaultError({
4045
3680
  output,
4046
3681
  parsedBody,
4047
- exceptionCtor: __BaseException,
4048
3682
  errorCode,
4049
3683
  });
4050
3684
  }
@@ -4057,21 +3691,14 @@ export const de_GetResourceDefinitionVersionCommand = async (output, context) =>
4057
3691
  $metadata: deserializeMetadata(output),
4058
3692
  });
4059
3693
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4060
- if (data.Arn != null) {
4061
- contents.Arn = __expectString(data.Arn);
4062
- }
4063
- if (data.CreationTimestamp != null) {
4064
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
4065
- }
4066
- if (data.Definition != null) {
4067
- contents.Definition = de_ResourceDefinitionVersion(data.Definition, context);
4068
- }
4069
- if (data.Id != null) {
4070
- contents.Id = __expectString(data.Id);
4071
- }
4072
- if (data.Version != null) {
4073
- contents.Version = __expectString(data.Version);
4074
- }
3694
+ const doc = take(data, {
3695
+ Arn: __expectString,
3696
+ CreationTimestamp: __expectString,
3697
+ Definition: _json,
3698
+ Id: __expectString,
3699
+ Version: __expectString,
3700
+ });
3701
+ Object.assign(contents, doc);
4075
3702
  return contents;
4076
3703
  };
4077
3704
  const de_GetResourceDefinitionVersionCommandError = async (output, context) => {
@@ -4086,10 +3713,9 @@ const de_GetResourceDefinitionVersionCommandError = async (output, context) => {
4086
3713
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4087
3714
  default:
4088
3715
  const parsedBody = parsedOutput.body;
4089
- throwDefaultError({
3716
+ return throwDefaultError({
4090
3717
  output,
4091
3718
  parsedBody,
4092
- exceptionCtor: __BaseException,
4093
3719
  errorCode,
4094
3720
  });
4095
3721
  }
@@ -4102,12 +3728,11 @@ export const de_GetServiceRoleForAccountCommand = async (output, context) => {
4102
3728
  $metadata: deserializeMetadata(output),
4103
3729
  });
4104
3730
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4105
- if (data.AssociatedAt != null) {
4106
- contents.AssociatedAt = __expectString(data.AssociatedAt);
4107
- }
4108
- if (data.RoleArn != null) {
4109
- contents.RoleArn = __expectString(data.RoleArn);
4110
- }
3731
+ const doc = take(data, {
3732
+ AssociatedAt: __expectString,
3733
+ RoleArn: __expectString,
3734
+ });
3735
+ Object.assign(contents, doc);
4111
3736
  return contents;
4112
3737
  };
4113
3738
  const de_GetServiceRoleForAccountCommandError = async (output, context) => {
@@ -4122,10 +3747,9 @@ const de_GetServiceRoleForAccountCommandError = async (output, context) => {
4122
3747
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4123
3748
  default:
4124
3749
  const parsedBody = parsedOutput.body;
4125
- throwDefaultError({
3750
+ return throwDefaultError({
4126
3751
  output,
4127
3752
  parsedBody,
4128
- exceptionCtor: __BaseException,
4129
3753
  errorCode,
4130
3754
  });
4131
3755
  }
@@ -4138,30 +3762,17 @@ export const de_GetSubscriptionDefinitionCommand = async (output, context) => {
4138
3762
  $metadata: deserializeMetadata(output),
4139
3763
  });
4140
3764
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4141
- if (data.Arn != null) {
4142
- contents.Arn = __expectString(data.Arn);
4143
- }
4144
- if (data.CreationTimestamp != null) {
4145
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
4146
- }
4147
- if (data.Id != null) {
4148
- contents.Id = __expectString(data.Id);
4149
- }
4150
- if (data.LastUpdatedTimestamp != null) {
4151
- contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp);
4152
- }
4153
- if (data.LatestVersion != null) {
4154
- contents.LatestVersion = __expectString(data.LatestVersion);
4155
- }
4156
- if (data.LatestVersionArn != null) {
4157
- contents.LatestVersionArn = __expectString(data.LatestVersionArn);
4158
- }
4159
- if (data.Name != null) {
4160
- contents.Name = __expectString(data.Name);
4161
- }
4162
- if (data.tags != null) {
4163
- contents.tags = de_Tags(data.tags, context);
4164
- }
3765
+ const doc = take(data, {
3766
+ Arn: __expectString,
3767
+ CreationTimestamp: __expectString,
3768
+ Id: __expectString,
3769
+ LastUpdatedTimestamp: __expectString,
3770
+ LatestVersion: __expectString,
3771
+ LatestVersionArn: __expectString,
3772
+ Name: __expectString,
3773
+ tags: _json,
3774
+ });
3775
+ Object.assign(contents, doc);
4165
3776
  return contents;
4166
3777
  };
4167
3778
  const de_GetSubscriptionDefinitionCommandError = async (output, context) => {
@@ -4176,10 +3787,9 @@ const de_GetSubscriptionDefinitionCommandError = async (output, context) => {
4176
3787
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4177
3788
  default:
4178
3789
  const parsedBody = parsedOutput.body;
4179
- throwDefaultError({
3790
+ return throwDefaultError({
4180
3791
  output,
4181
3792
  parsedBody,
4182
- exceptionCtor: __BaseException,
4183
3793
  errorCode,
4184
3794
  });
4185
3795
  }
@@ -4192,24 +3802,15 @@ export const de_GetSubscriptionDefinitionVersionCommand = async (output, context
4192
3802
  $metadata: deserializeMetadata(output),
4193
3803
  });
4194
3804
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4195
- if (data.Arn != null) {
4196
- contents.Arn = __expectString(data.Arn);
4197
- }
4198
- if (data.CreationTimestamp != null) {
4199
- contents.CreationTimestamp = __expectString(data.CreationTimestamp);
4200
- }
4201
- if (data.Definition != null) {
4202
- contents.Definition = de_SubscriptionDefinitionVersion(data.Definition, context);
4203
- }
4204
- if (data.Id != null) {
4205
- contents.Id = __expectString(data.Id);
4206
- }
4207
- if (data.NextToken != null) {
4208
- contents.NextToken = __expectString(data.NextToken);
4209
- }
4210
- if (data.Version != null) {
4211
- contents.Version = __expectString(data.Version);
4212
- }
3805
+ const doc = take(data, {
3806
+ Arn: __expectString,
3807
+ CreationTimestamp: __expectString,
3808
+ Definition: _json,
3809
+ Id: __expectString,
3810
+ NextToken: __expectString,
3811
+ Version: __expectString,
3812
+ });
3813
+ Object.assign(contents, doc);
4213
3814
  return contents;
4214
3815
  };
4215
3816
  const de_GetSubscriptionDefinitionVersionCommandError = async (output, context) => {
@@ -4224,10 +3825,9 @@ const de_GetSubscriptionDefinitionVersionCommandError = async (output, context)
4224
3825
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4225
3826
  default:
4226
3827
  const parsedBody = parsedOutput.body;
4227
- throwDefaultError({
3828
+ return throwDefaultError({
4228
3829
  output,
4229
3830
  parsedBody,
4230
- exceptionCtor: __BaseException,
4231
3831
  errorCode,
4232
3832
  });
4233
3833
  }
@@ -4240,9 +3840,10 @@ export const de_GetThingRuntimeConfigurationCommand = async (output, context) =>
4240
3840
  $metadata: deserializeMetadata(output),
4241
3841
  });
4242
3842
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4243
- if (data.RuntimeConfiguration != null) {
4244
- contents.RuntimeConfiguration = de_RuntimeConfiguration(data.RuntimeConfiguration, context);
4245
- }
3843
+ const doc = take(data, {
3844
+ RuntimeConfiguration: _json,
3845
+ });
3846
+ Object.assign(contents, doc);
4246
3847
  return contents;
4247
3848
  };
4248
3849
  const de_GetThingRuntimeConfigurationCommandError = async (output, context) => {
@@ -4260,10 +3861,9 @@ const de_GetThingRuntimeConfigurationCommandError = async (output, context) => {
4260
3861
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4261
3862
  default:
4262
3863
  const parsedBody = parsedOutput.body;
4263
- throwDefaultError({
3864
+ return throwDefaultError({
4264
3865
  output,
4265
3866
  parsedBody,
4266
- exceptionCtor: __BaseException,
4267
3867
  errorCode,
4268
3868
  });
4269
3869
  }
@@ -4276,12 +3876,11 @@ export const de_ListBulkDeploymentDetailedReportsCommand = async (output, contex
4276
3876
  $metadata: deserializeMetadata(output),
4277
3877
  });
4278
3878
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4279
- if (data.Deployments != null) {
4280
- contents.Deployments = de_BulkDeploymentResults(data.Deployments, context);
4281
- }
4282
- if (data.NextToken != null) {
4283
- contents.NextToken = __expectString(data.NextToken);
4284
- }
3879
+ const doc = take(data, {
3880
+ Deployments: _json,
3881
+ NextToken: __expectString,
3882
+ });
3883
+ Object.assign(contents, doc);
4285
3884
  return contents;
4286
3885
  };
4287
3886
  const de_ListBulkDeploymentDetailedReportsCommandError = async (output, context) => {
@@ -4296,10 +3895,9 @@ const de_ListBulkDeploymentDetailedReportsCommandError = async (output, context)
4296
3895
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4297
3896
  default:
4298
3897
  const parsedBody = parsedOutput.body;
4299
- throwDefaultError({
3898
+ return throwDefaultError({
4300
3899
  output,
4301
3900
  parsedBody,
4302
- exceptionCtor: __BaseException,
4303
3901
  errorCode,
4304
3902
  });
4305
3903
  }
@@ -4312,12 +3910,11 @@ export const de_ListBulkDeploymentsCommand = async (output, context) => {
4312
3910
  $metadata: deserializeMetadata(output),
4313
3911
  });
4314
3912
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4315
- if (data.BulkDeployments != null) {
4316
- contents.BulkDeployments = de_BulkDeployments(data.BulkDeployments, context);
4317
- }
4318
- if (data.NextToken != null) {
4319
- contents.NextToken = __expectString(data.NextToken);
4320
- }
3913
+ const doc = take(data, {
3914
+ BulkDeployments: _json,
3915
+ NextToken: __expectString,
3916
+ });
3917
+ Object.assign(contents, doc);
4321
3918
  return contents;
4322
3919
  };
4323
3920
  const de_ListBulkDeploymentsCommandError = async (output, context) => {
@@ -4332,10 +3929,9 @@ const de_ListBulkDeploymentsCommandError = async (output, context) => {
4332
3929
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4333
3930
  default:
4334
3931
  const parsedBody = parsedOutput.body;
4335
- throwDefaultError({
3932
+ return throwDefaultError({
4336
3933
  output,
4337
3934
  parsedBody,
4338
- exceptionCtor: __BaseException,
4339
3935
  errorCode,
4340
3936
  });
4341
3937
  }
@@ -4348,12 +3944,11 @@ export const de_ListConnectorDefinitionsCommand = async (output, context) => {
4348
3944
  $metadata: deserializeMetadata(output),
4349
3945
  });
4350
3946
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4351
- if (data.Definitions != null) {
4352
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4353
- }
4354
- if (data.NextToken != null) {
4355
- contents.NextToken = __expectString(data.NextToken);
4356
- }
3947
+ const doc = take(data, {
3948
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
3949
+ NextToken: __expectString,
3950
+ });
3951
+ Object.assign(contents, doc);
4357
3952
  return contents;
4358
3953
  };
4359
3954
  const de_ListConnectorDefinitionsCommandError = async (output, context) => {
@@ -4363,10 +3958,9 @@ const de_ListConnectorDefinitionsCommandError = async (output, context) => {
4363
3958
  };
4364
3959
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4365
3960
  const parsedBody = parsedOutput.body;
4366
- throwDefaultError({
3961
+ return throwDefaultError({
4367
3962
  output,
4368
3963
  parsedBody,
4369
- exceptionCtor: __BaseException,
4370
3964
  errorCode,
4371
3965
  });
4372
3966
  };
@@ -4378,12 +3972,11 @@ export const de_ListConnectorDefinitionVersionsCommand = async (output, context)
4378
3972
  $metadata: deserializeMetadata(output),
4379
3973
  });
4380
3974
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4381
- if (data.NextToken != null) {
4382
- contents.NextToken = __expectString(data.NextToken);
4383
- }
4384
- if (data.Versions != null) {
4385
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4386
- }
3975
+ const doc = take(data, {
3976
+ NextToken: __expectString,
3977
+ Versions: _json,
3978
+ });
3979
+ Object.assign(contents, doc);
4387
3980
  return contents;
4388
3981
  };
4389
3982
  const de_ListConnectorDefinitionVersionsCommandError = async (output, context) => {
@@ -4398,10 +3991,9 @@ const de_ListConnectorDefinitionVersionsCommandError = async (output, context) =
4398
3991
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4399
3992
  default:
4400
3993
  const parsedBody = parsedOutput.body;
4401
- throwDefaultError({
3994
+ return throwDefaultError({
4402
3995
  output,
4403
3996
  parsedBody,
4404
- exceptionCtor: __BaseException,
4405
3997
  errorCode,
4406
3998
  });
4407
3999
  }
@@ -4414,12 +4006,11 @@ export const de_ListCoreDefinitionsCommand = async (output, context) => {
4414
4006
  $metadata: deserializeMetadata(output),
4415
4007
  });
4416
4008
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4417
- if (data.Definitions != null) {
4418
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4419
- }
4420
- if (data.NextToken != null) {
4421
- contents.NextToken = __expectString(data.NextToken);
4422
- }
4009
+ const doc = take(data, {
4010
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4011
+ NextToken: __expectString,
4012
+ });
4013
+ Object.assign(contents, doc);
4423
4014
  return contents;
4424
4015
  };
4425
4016
  const de_ListCoreDefinitionsCommandError = async (output, context) => {
@@ -4429,10 +4020,9 @@ const de_ListCoreDefinitionsCommandError = async (output, context) => {
4429
4020
  };
4430
4021
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4431
4022
  const parsedBody = parsedOutput.body;
4432
- throwDefaultError({
4023
+ return throwDefaultError({
4433
4024
  output,
4434
4025
  parsedBody,
4435
- exceptionCtor: __BaseException,
4436
4026
  errorCode,
4437
4027
  });
4438
4028
  };
@@ -4444,12 +4034,11 @@ export const de_ListCoreDefinitionVersionsCommand = async (output, context) => {
4444
4034
  $metadata: deserializeMetadata(output),
4445
4035
  });
4446
4036
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4447
- if (data.NextToken != null) {
4448
- contents.NextToken = __expectString(data.NextToken);
4449
- }
4450
- if (data.Versions != null) {
4451
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4452
- }
4037
+ const doc = take(data, {
4038
+ NextToken: __expectString,
4039
+ Versions: _json,
4040
+ });
4041
+ Object.assign(contents, doc);
4453
4042
  return contents;
4454
4043
  };
4455
4044
  const de_ListCoreDefinitionVersionsCommandError = async (output, context) => {
@@ -4464,10 +4053,9 @@ const de_ListCoreDefinitionVersionsCommandError = async (output, context) => {
4464
4053
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4465
4054
  default:
4466
4055
  const parsedBody = parsedOutput.body;
4467
- throwDefaultError({
4056
+ return throwDefaultError({
4468
4057
  output,
4469
4058
  parsedBody,
4470
- exceptionCtor: __BaseException,
4471
4059
  errorCode,
4472
4060
  });
4473
4061
  }
@@ -4480,12 +4068,11 @@ export const de_ListDeploymentsCommand = async (output, context) => {
4480
4068
  $metadata: deserializeMetadata(output),
4481
4069
  });
4482
4070
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4483
- if (data.Deployments != null) {
4484
- contents.Deployments = de_Deployments(data.Deployments, context);
4485
- }
4486
- if (data.NextToken != null) {
4487
- contents.NextToken = __expectString(data.NextToken);
4488
- }
4071
+ const doc = take(data, {
4072
+ Deployments: _json,
4073
+ NextToken: __expectString,
4074
+ });
4075
+ Object.assign(contents, doc);
4489
4076
  return contents;
4490
4077
  };
4491
4078
  const de_ListDeploymentsCommandError = async (output, context) => {
@@ -4500,10 +4087,9 @@ const de_ListDeploymentsCommandError = async (output, context) => {
4500
4087
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4501
4088
  default:
4502
4089
  const parsedBody = parsedOutput.body;
4503
- throwDefaultError({
4090
+ return throwDefaultError({
4504
4091
  output,
4505
4092
  parsedBody,
4506
- exceptionCtor: __BaseException,
4507
4093
  errorCode,
4508
4094
  });
4509
4095
  }
@@ -4516,12 +4102,11 @@ export const de_ListDeviceDefinitionsCommand = async (output, context) => {
4516
4102
  $metadata: deserializeMetadata(output),
4517
4103
  });
4518
4104
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4519
- if (data.Definitions != null) {
4520
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4521
- }
4522
- if (data.NextToken != null) {
4523
- contents.NextToken = __expectString(data.NextToken);
4524
- }
4105
+ const doc = take(data, {
4106
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4107
+ NextToken: __expectString,
4108
+ });
4109
+ Object.assign(contents, doc);
4525
4110
  return contents;
4526
4111
  };
4527
4112
  const de_ListDeviceDefinitionsCommandError = async (output, context) => {
@@ -4531,10 +4116,9 @@ const de_ListDeviceDefinitionsCommandError = async (output, context) => {
4531
4116
  };
4532
4117
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4533
4118
  const parsedBody = parsedOutput.body;
4534
- throwDefaultError({
4119
+ return throwDefaultError({
4535
4120
  output,
4536
4121
  parsedBody,
4537
- exceptionCtor: __BaseException,
4538
4122
  errorCode,
4539
4123
  });
4540
4124
  };
@@ -4546,12 +4130,11 @@ export const de_ListDeviceDefinitionVersionsCommand = async (output, context) =>
4546
4130
  $metadata: deserializeMetadata(output),
4547
4131
  });
4548
4132
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4549
- if (data.NextToken != null) {
4550
- contents.NextToken = __expectString(data.NextToken);
4551
- }
4552
- if (data.Versions != null) {
4553
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4554
- }
4133
+ const doc = take(data, {
4134
+ NextToken: __expectString,
4135
+ Versions: _json,
4136
+ });
4137
+ Object.assign(contents, doc);
4555
4138
  return contents;
4556
4139
  };
4557
4140
  const de_ListDeviceDefinitionVersionsCommandError = async (output, context) => {
@@ -4566,10 +4149,9 @@ const de_ListDeviceDefinitionVersionsCommandError = async (output, context) => {
4566
4149
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4567
4150
  default:
4568
4151
  const parsedBody = parsedOutput.body;
4569
- throwDefaultError({
4152
+ return throwDefaultError({
4570
4153
  output,
4571
4154
  parsedBody,
4572
- exceptionCtor: __BaseException,
4573
4155
  errorCode,
4574
4156
  });
4575
4157
  }
@@ -4582,12 +4164,11 @@ export const de_ListFunctionDefinitionsCommand = async (output, context) => {
4582
4164
  $metadata: deserializeMetadata(output),
4583
4165
  });
4584
4166
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4585
- if (data.Definitions != null) {
4586
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4587
- }
4588
- if (data.NextToken != null) {
4589
- contents.NextToken = __expectString(data.NextToken);
4590
- }
4167
+ const doc = take(data, {
4168
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4169
+ NextToken: __expectString,
4170
+ });
4171
+ Object.assign(contents, doc);
4591
4172
  return contents;
4592
4173
  };
4593
4174
  const de_ListFunctionDefinitionsCommandError = async (output, context) => {
@@ -4597,10 +4178,9 @@ const de_ListFunctionDefinitionsCommandError = async (output, context) => {
4597
4178
  };
4598
4179
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4599
4180
  const parsedBody = parsedOutput.body;
4600
- throwDefaultError({
4181
+ return throwDefaultError({
4601
4182
  output,
4602
4183
  parsedBody,
4603
- exceptionCtor: __BaseException,
4604
4184
  errorCode,
4605
4185
  });
4606
4186
  };
@@ -4612,12 +4192,11 @@ export const de_ListFunctionDefinitionVersionsCommand = async (output, context)
4612
4192
  $metadata: deserializeMetadata(output),
4613
4193
  });
4614
4194
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4615
- if (data.NextToken != null) {
4616
- contents.NextToken = __expectString(data.NextToken);
4617
- }
4618
- if (data.Versions != null) {
4619
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4620
- }
4195
+ const doc = take(data, {
4196
+ NextToken: __expectString,
4197
+ Versions: _json,
4198
+ });
4199
+ Object.assign(contents, doc);
4621
4200
  return contents;
4622
4201
  };
4623
4202
  const de_ListFunctionDefinitionVersionsCommandError = async (output, context) => {
@@ -4632,10 +4211,9 @@ const de_ListFunctionDefinitionVersionsCommandError = async (output, context) =>
4632
4211
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4633
4212
  default:
4634
4213
  const parsedBody = parsedOutput.body;
4635
- throwDefaultError({
4214
+ return throwDefaultError({
4636
4215
  output,
4637
4216
  parsedBody,
4638
- exceptionCtor: __BaseException,
4639
4217
  errorCode,
4640
4218
  });
4641
4219
  }
@@ -4648,9 +4226,10 @@ export const de_ListGroupCertificateAuthoritiesCommand = async (output, context)
4648
4226
  $metadata: deserializeMetadata(output),
4649
4227
  });
4650
4228
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4651
- if (data.GroupCertificateAuthorities != null) {
4652
- contents.GroupCertificateAuthorities = de___listOfGroupCertificateAuthorityProperties(data.GroupCertificateAuthorities, context);
4653
- }
4229
+ const doc = take(data, {
4230
+ GroupCertificateAuthorities: _json,
4231
+ });
4232
+ Object.assign(contents, doc);
4654
4233
  return contents;
4655
4234
  };
4656
4235
  const de_ListGroupCertificateAuthoritiesCommandError = async (output, context) => {
@@ -4668,10 +4247,9 @@ const de_ListGroupCertificateAuthoritiesCommandError = async (output, context) =
4668
4247
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4669
4248
  default:
4670
4249
  const parsedBody = parsedOutput.body;
4671
- throwDefaultError({
4250
+ return throwDefaultError({
4672
4251
  output,
4673
4252
  parsedBody,
4674
- exceptionCtor: __BaseException,
4675
4253
  errorCode,
4676
4254
  });
4677
4255
  }
@@ -4684,12 +4262,11 @@ export const de_ListGroupsCommand = async (output, context) => {
4684
4262
  $metadata: deserializeMetadata(output),
4685
4263
  });
4686
4264
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4687
- if (data.Groups != null) {
4688
- contents.Groups = de___listOfGroupInformation(data.Groups, context);
4689
- }
4690
- if (data.NextToken != null) {
4691
- contents.NextToken = __expectString(data.NextToken);
4692
- }
4265
+ const doc = take(data, {
4266
+ Groups: _json,
4267
+ NextToken: __expectString,
4268
+ });
4269
+ Object.assign(contents, doc);
4693
4270
  return contents;
4694
4271
  };
4695
4272
  const de_ListGroupsCommandError = async (output, context) => {
@@ -4699,10 +4276,9 @@ const de_ListGroupsCommandError = async (output, context) => {
4699
4276
  };
4700
4277
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4701
4278
  const parsedBody = parsedOutput.body;
4702
- throwDefaultError({
4279
+ return throwDefaultError({
4703
4280
  output,
4704
4281
  parsedBody,
4705
- exceptionCtor: __BaseException,
4706
4282
  errorCode,
4707
4283
  });
4708
4284
  };
@@ -4714,12 +4290,11 @@ export const de_ListGroupVersionsCommand = async (output, context) => {
4714
4290
  $metadata: deserializeMetadata(output),
4715
4291
  });
4716
4292
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4717
- if (data.NextToken != null) {
4718
- contents.NextToken = __expectString(data.NextToken);
4719
- }
4720
- if (data.Versions != null) {
4721
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4722
- }
4293
+ const doc = take(data, {
4294
+ NextToken: __expectString,
4295
+ Versions: _json,
4296
+ });
4297
+ Object.assign(contents, doc);
4723
4298
  return contents;
4724
4299
  };
4725
4300
  const de_ListGroupVersionsCommandError = async (output, context) => {
@@ -4734,10 +4309,9 @@ const de_ListGroupVersionsCommandError = async (output, context) => {
4734
4309
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4735
4310
  default:
4736
4311
  const parsedBody = parsedOutput.body;
4737
- throwDefaultError({
4312
+ return throwDefaultError({
4738
4313
  output,
4739
4314
  parsedBody,
4740
- exceptionCtor: __BaseException,
4741
4315
  errorCode,
4742
4316
  });
4743
4317
  }
@@ -4750,12 +4324,11 @@ export const de_ListLoggerDefinitionsCommand = async (output, context) => {
4750
4324
  $metadata: deserializeMetadata(output),
4751
4325
  });
4752
4326
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4753
- if (data.Definitions != null) {
4754
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4755
- }
4756
- if (data.NextToken != null) {
4757
- contents.NextToken = __expectString(data.NextToken);
4758
- }
4327
+ const doc = take(data, {
4328
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4329
+ NextToken: __expectString,
4330
+ });
4331
+ Object.assign(contents, doc);
4759
4332
  return contents;
4760
4333
  };
4761
4334
  const de_ListLoggerDefinitionsCommandError = async (output, context) => {
@@ -4765,10 +4338,9 @@ const de_ListLoggerDefinitionsCommandError = async (output, context) => {
4765
4338
  };
4766
4339
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4767
4340
  const parsedBody = parsedOutput.body;
4768
- throwDefaultError({
4341
+ return throwDefaultError({
4769
4342
  output,
4770
4343
  parsedBody,
4771
- exceptionCtor: __BaseException,
4772
4344
  errorCode,
4773
4345
  });
4774
4346
  };
@@ -4780,12 +4352,11 @@ export const de_ListLoggerDefinitionVersionsCommand = async (output, context) =>
4780
4352
  $metadata: deserializeMetadata(output),
4781
4353
  });
4782
4354
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4783
- if (data.NextToken != null) {
4784
- contents.NextToken = __expectString(data.NextToken);
4785
- }
4786
- if (data.Versions != null) {
4787
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4788
- }
4355
+ const doc = take(data, {
4356
+ NextToken: __expectString,
4357
+ Versions: _json,
4358
+ });
4359
+ Object.assign(contents, doc);
4789
4360
  return contents;
4790
4361
  };
4791
4362
  const de_ListLoggerDefinitionVersionsCommandError = async (output, context) => {
@@ -4800,10 +4371,9 @@ const de_ListLoggerDefinitionVersionsCommandError = async (output, context) => {
4800
4371
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4801
4372
  default:
4802
4373
  const parsedBody = parsedOutput.body;
4803
- throwDefaultError({
4374
+ return throwDefaultError({
4804
4375
  output,
4805
4376
  parsedBody,
4806
- exceptionCtor: __BaseException,
4807
4377
  errorCode,
4808
4378
  });
4809
4379
  }
@@ -4816,12 +4386,11 @@ export const de_ListResourceDefinitionsCommand = async (output, context) => {
4816
4386
  $metadata: deserializeMetadata(output),
4817
4387
  });
4818
4388
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4819
- if (data.Definitions != null) {
4820
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4821
- }
4822
- if (data.NextToken != null) {
4823
- contents.NextToken = __expectString(data.NextToken);
4824
- }
4389
+ const doc = take(data, {
4390
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4391
+ NextToken: __expectString,
4392
+ });
4393
+ Object.assign(contents, doc);
4825
4394
  return contents;
4826
4395
  };
4827
4396
  const de_ListResourceDefinitionsCommandError = async (output, context) => {
@@ -4831,10 +4400,9 @@ const de_ListResourceDefinitionsCommandError = async (output, context) => {
4831
4400
  };
4832
4401
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4833
4402
  const parsedBody = parsedOutput.body;
4834
- throwDefaultError({
4403
+ return throwDefaultError({
4835
4404
  output,
4836
4405
  parsedBody,
4837
- exceptionCtor: __BaseException,
4838
4406
  errorCode,
4839
4407
  });
4840
4408
  };
@@ -4846,12 +4414,11 @@ export const de_ListResourceDefinitionVersionsCommand = async (output, context)
4846
4414
  $metadata: deserializeMetadata(output),
4847
4415
  });
4848
4416
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4849
- if (data.NextToken != null) {
4850
- contents.NextToken = __expectString(data.NextToken);
4851
- }
4852
- if (data.Versions != null) {
4853
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4854
- }
4417
+ const doc = take(data, {
4418
+ NextToken: __expectString,
4419
+ Versions: _json,
4420
+ });
4421
+ Object.assign(contents, doc);
4855
4422
  return contents;
4856
4423
  };
4857
4424
  const de_ListResourceDefinitionVersionsCommandError = async (output, context) => {
@@ -4866,10 +4433,9 @@ const de_ListResourceDefinitionVersionsCommandError = async (output, context) =>
4866
4433
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4867
4434
  default:
4868
4435
  const parsedBody = parsedOutput.body;
4869
- throwDefaultError({
4436
+ return throwDefaultError({
4870
4437
  output,
4871
4438
  parsedBody,
4872
- exceptionCtor: __BaseException,
4873
4439
  errorCode,
4874
4440
  });
4875
4441
  }
@@ -4882,12 +4448,11 @@ export const de_ListSubscriptionDefinitionsCommand = async (output, context) =>
4882
4448
  $metadata: deserializeMetadata(output),
4883
4449
  });
4884
4450
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4885
- if (data.Definitions != null) {
4886
- contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context);
4887
- }
4888
- if (data.NextToken != null) {
4889
- contents.NextToken = __expectString(data.NextToken);
4890
- }
4451
+ const doc = take(data, {
4452
+ Definitions: (_) => de___listOfDefinitionInformation(_, context),
4453
+ NextToken: __expectString,
4454
+ });
4455
+ Object.assign(contents, doc);
4891
4456
  return contents;
4892
4457
  };
4893
4458
  const de_ListSubscriptionDefinitionsCommandError = async (output, context) => {
@@ -4897,10 +4462,9 @@ const de_ListSubscriptionDefinitionsCommandError = async (output, context) => {
4897
4462
  };
4898
4463
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4899
4464
  const parsedBody = parsedOutput.body;
4900
- throwDefaultError({
4465
+ return throwDefaultError({
4901
4466
  output,
4902
4467
  parsedBody,
4903
- exceptionCtor: __BaseException,
4904
4468
  errorCode,
4905
4469
  });
4906
4470
  };
@@ -4912,12 +4476,11 @@ export const de_ListSubscriptionDefinitionVersionsCommand = async (output, conte
4912
4476
  $metadata: deserializeMetadata(output),
4913
4477
  });
4914
4478
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4915
- if (data.NextToken != null) {
4916
- contents.NextToken = __expectString(data.NextToken);
4917
- }
4918
- if (data.Versions != null) {
4919
- contents.Versions = de___listOfVersionInformation(data.Versions, context);
4920
- }
4479
+ const doc = take(data, {
4480
+ NextToken: __expectString,
4481
+ Versions: _json,
4482
+ });
4483
+ Object.assign(contents, doc);
4921
4484
  return contents;
4922
4485
  };
4923
4486
  const de_ListSubscriptionDefinitionVersionsCommandError = async (output, context) => {
@@ -4932,10 +4495,9 @@ const de_ListSubscriptionDefinitionVersionsCommandError = async (output, context
4932
4495
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4933
4496
  default:
4934
4497
  const parsedBody = parsedOutput.body;
4935
- throwDefaultError({
4498
+ return throwDefaultError({
4936
4499
  output,
4937
4500
  parsedBody,
4938
- exceptionCtor: __BaseException,
4939
4501
  errorCode,
4940
4502
  });
4941
4503
  }
@@ -4948,9 +4510,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
4948
4510
  $metadata: deserializeMetadata(output),
4949
4511
  });
4950
4512
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4951
- if (data.tags != null) {
4952
- contents.tags = de_Tags(data.tags, context);
4953
- }
4513
+ const doc = take(data, {
4514
+ tags: _json,
4515
+ });
4516
+ Object.assign(contents, doc);
4954
4517
  return contents;
4955
4518
  };
4956
4519
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -4965,10 +4528,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
4965
4528
  throw await de_BadRequestExceptionRes(parsedOutput, context);
4966
4529
  default:
4967
4530
  const parsedBody = parsedOutput.body;
4968
- throwDefaultError({
4531
+ return throwDefaultError({
4969
4532
  output,
4970
4533
  parsedBody,
4971
- exceptionCtor: __BaseException,
4972
4534
  errorCode,
4973
4535
  });
4974
4536
  }
@@ -4981,12 +4543,11 @@ export const de_ResetDeploymentsCommand = async (output, context) => {
4981
4543
  $metadata: deserializeMetadata(output),
4982
4544
  });
4983
4545
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4984
- if (data.DeploymentArn != null) {
4985
- contents.DeploymentArn = __expectString(data.DeploymentArn);
4986
- }
4987
- if (data.DeploymentId != null) {
4988
- contents.DeploymentId = __expectString(data.DeploymentId);
4989
- }
4546
+ const doc = take(data, {
4547
+ DeploymentArn: __expectString,
4548
+ DeploymentId: __expectString,
4549
+ });
4550
+ Object.assign(contents, doc);
4990
4551
  return contents;
4991
4552
  };
4992
4553
  const de_ResetDeploymentsCommandError = async (output, context) => {
@@ -5001,10 +4562,9 @@ const de_ResetDeploymentsCommandError = async (output, context) => {
5001
4562
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5002
4563
  default:
5003
4564
  const parsedBody = parsedOutput.body;
5004
- throwDefaultError({
4565
+ return throwDefaultError({
5005
4566
  output,
5006
4567
  parsedBody,
5007
- exceptionCtor: __BaseException,
5008
4568
  errorCode,
5009
4569
  });
5010
4570
  }
@@ -5017,12 +4577,11 @@ export const de_StartBulkDeploymentCommand = async (output, context) => {
5017
4577
  $metadata: deserializeMetadata(output),
5018
4578
  });
5019
4579
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5020
- if (data.BulkDeploymentArn != null) {
5021
- contents.BulkDeploymentArn = __expectString(data.BulkDeploymentArn);
5022
- }
5023
- if (data.BulkDeploymentId != null) {
5024
- contents.BulkDeploymentId = __expectString(data.BulkDeploymentId);
5025
- }
4580
+ const doc = take(data, {
4581
+ BulkDeploymentArn: __expectString,
4582
+ BulkDeploymentId: __expectString,
4583
+ });
4584
+ Object.assign(contents, doc);
5026
4585
  return contents;
5027
4586
  };
5028
4587
  const de_StartBulkDeploymentCommandError = async (output, context) => {
@@ -5037,10 +4596,9 @@ const de_StartBulkDeploymentCommandError = async (output, context) => {
5037
4596
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5038
4597
  default:
5039
4598
  const parsedBody = parsedOutput.body;
5040
- throwDefaultError({
4599
+ return throwDefaultError({
5041
4600
  output,
5042
4601
  parsedBody,
5043
- exceptionCtor: __BaseException,
5044
4602
  errorCode,
5045
4603
  });
5046
4604
  }
@@ -5067,10 +4625,9 @@ const de_StopBulkDeploymentCommandError = async (output, context) => {
5067
4625
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5068
4626
  default:
5069
4627
  const parsedBody = parsedOutput.body;
5070
- throwDefaultError({
4628
+ return throwDefaultError({
5071
4629
  output,
5072
4630
  parsedBody,
5073
- exceptionCtor: __BaseException,
5074
4631
  errorCode,
5075
4632
  });
5076
4633
  }
@@ -5097,10 +4654,9 @@ const de_TagResourceCommandError = async (output, context) => {
5097
4654
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5098
4655
  default:
5099
4656
  const parsedBody = parsedOutput.body;
5100
- throwDefaultError({
4657
+ return throwDefaultError({
5101
4658
  output,
5102
4659
  parsedBody,
5103
- exceptionCtor: __BaseException,
5104
4660
  errorCode,
5105
4661
  });
5106
4662
  }
@@ -5127,10 +4683,9 @@ const de_UntagResourceCommandError = async (output, context) => {
5127
4683
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5128
4684
  default:
5129
4685
  const parsedBody = parsedOutput.body;
5130
- throwDefaultError({
4686
+ return throwDefaultError({
5131
4687
  output,
5132
4688
  parsedBody,
5133
- exceptionCtor: __BaseException,
5134
4689
  errorCode,
5135
4690
  });
5136
4691
  }
@@ -5143,12 +4698,11 @@ export const de_UpdateConnectivityInfoCommand = async (output, context) => {
5143
4698
  $metadata: deserializeMetadata(output),
5144
4699
  });
5145
4700
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5146
- if (data.message != null) {
5147
- contents.Message = __expectString(data.message);
5148
- }
5149
- if (data.Version != null) {
5150
- contents.Version = __expectString(data.Version);
5151
- }
4701
+ const doc = take(data, {
4702
+ Message: [, __expectString, `message`],
4703
+ Version: __expectString,
4704
+ });
4705
+ Object.assign(contents, doc);
5152
4706
  return contents;
5153
4707
  };
5154
4708
  const de_UpdateConnectivityInfoCommandError = async (output, context) => {
@@ -5166,10 +4720,9 @@ const de_UpdateConnectivityInfoCommandError = async (output, context) => {
5166
4720
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
5167
4721
  default:
5168
4722
  const parsedBody = parsedOutput.body;
5169
- throwDefaultError({
4723
+ return throwDefaultError({
5170
4724
  output,
5171
4725
  parsedBody,
5172
- exceptionCtor: __BaseException,
5173
4726
  errorCode,
5174
4727
  });
5175
4728
  }
@@ -5196,10 +4749,9 @@ const de_UpdateConnectorDefinitionCommandError = async (output, context) => {
5196
4749
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5197
4750
  default:
5198
4751
  const parsedBody = parsedOutput.body;
5199
- throwDefaultError({
4752
+ return throwDefaultError({
5200
4753
  output,
5201
4754
  parsedBody,
5202
- exceptionCtor: __BaseException,
5203
4755
  errorCode,
5204
4756
  });
5205
4757
  }
@@ -5226,10 +4778,9 @@ const de_UpdateCoreDefinitionCommandError = async (output, context) => {
5226
4778
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5227
4779
  default:
5228
4780
  const parsedBody = parsedOutput.body;
5229
- throwDefaultError({
4781
+ return throwDefaultError({
5230
4782
  output,
5231
4783
  parsedBody,
5232
- exceptionCtor: __BaseException,
5233
4784
  errorCode,
5234
4785
  });
5235
4786
  }
@@ -5256,10 +4807,9 @@ const de_UpdateDeviceDefinitionCommandError = async (output, context) => {
5256
4807
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5257
4808
  default:
5258
4809
  const parsedBody = parsedOutput.body;
5259
- throwDefaultError({
4810
+ return throwDefaultError({
5260
4811
  output,
5261
4812
  parsedBody,
5262
- exceptionCtor: __BaseException,
5263
4813
  errorCode,
5264
4814
  });
5265
4815
  }
@@ -5286,10 +4836,9 @@ const de_UpdateFunctionDefinitionCommandError = async (output, context) => {
5286
4836
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5287
4837
  default:
5288
4838
  const parsedBody = parsedOutput.body;
5289
- throwDefaultError({
4839
+ return throwDefaultError({
5290
4840
  output,
5291
4841
  parsedBody,
5292
- exceptionCtor: __BaseException,
5293
4842
  errorCode,
5294
4843
  });
5295
4844
  }
@@ -5316,10 +4865,9 @@ const de_UpdateGroupCommandError = async (output, context) => {
5316
4865
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5317
4866
  default:
5318
4867
  const parsedBody = parsedOutput.body;
5319
- throwDefaultError({
4868
+ return throwDefaultError({
5320
4869
  output,
5321
4870
  parsedBody,
5322
- exceptionCtor: __BaseException,
5323
4871
  errorCode,
5324
4872
  });
5325
4873
  }
@@ -5332,15 +4880,12 @@ export const de_UpdateGroupCertificateConfigurationCommand = async (output, cont
5332
4880
  $metadata: deserializeMetadata(output),
5333
4881
  });
5334
4882
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
5335
- if (data.CertificateAuthorityExpiryInMilliseconds != null) {
5336
- contents.CertificateAuthorityExpiryInMilliseconds = __expectString(data.CertificateAuthorityExpiryInMilliseconds);
5337
- }
5338
- if (data.CertificateExpiryInMilliseconds != null) {
5339
- contents.CertificateExpiryInMilliseconds = __expectString(data.CertificateExpiryInMilliseconds);
5340
- }
5341
- if (data.GroupId != null) {
5342
- contents.GroupId = __expectString(data.GroupId);
5343
- }
4883
+ const doc = take(data, {
4884
+ CertificateAuthorityExpiryInMilliseconds: __expectString,
4885
+ CertificateExpiryInMilliseconds: __expectString,
4886
+ GroupId: __expectString,
4887
+ });
4888
+ Object.assign(contents, doc);
5344
4889
  return contents;
5345
4890
  };
5346
4891
  const de_UpdateGroupCertificateConfigurationCommandError = async (output, context) => {
@@ -5358,10 +4903,9 @@ const de_UpdateGroupCertificateConfigurationCommandError = async (output, contex
5358
4903
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
5359
4904
  default:
5360
4905
  const parsedBody = parsedOutput.body;
5361
- throwDefaultError({
4906
+ return throwDefaultError({
5362
4907
  output,
5363
4908
  parsedBody,
5364
- exceptionCtor: __BaseException,
5365
4909
  errorCode,
5366
4910
  });
5367
4911
  }
@@ -5388,10 +4932,9 @@ const de_UpdateLoggerDefinitionCommandError = async (output, context) => {
5388
4932
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5389
4933
  default:
5390
4934
  const parsedBody = parsedOutput.body;
5391
- throwDefaultError({
4935
+ return throwDefaultError({
5392
4936
  output,
5393
4937
  parsedBody,
5394
- exceptionCtor: __BaseException,
5395
4938
  errorCode,
5396
4939
  });
5397
4940
  }
@@ -5418,10 +4961,9 @@ const de_UpdateResourceDefinitionCommandError = async (output, context) => {
5418
4961
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5419
4962
  default:
5420
4963
  const parsedBody = parsedOutput.body;
5421
- throwDefaultError({
4964
+ return throwDefaultError({
5422
4965
  output,
5423
4966
  parsedBody,
5424
- exceptionCtor: __BaseException,
5425
4967
  errorCode,
5426
4968
  });
5427
4969
  }
@@ -5448,10 +4990,9 @@ const de_UpdateSubscriptionDefinitionCommandError = async (output, context) => {
5448
4990
  throw await de_BadRequestExceptionRes(parsedOutput, context);
5449
4991
  default:
5450
4992
  const parsedBody = parsedOutput.body;
5451
- throwDefaultError({
4993
+ return throwDefaultError({
5452
4994
  output,
5453
4995
  parsedBody,
5454
- exceptionCtor: __BaseException,
5455
4996
  errorCode,
5456
4997
  });
5457
4998
  }
@@ -5481,24 +5022,22 @@ const de_UpdateThingRuntimeConfigurationCommandError = async (output, context) =
5481
5022
  throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
5482
5023
  default:
5483
5024
  const parsedBody = parsedOutput.body;
5484
- throwDefaultError({
5025
+ return throwDefaultError({
5485
5026
  output,
5486
5027
  parsedBody,
5487
- exceptionCtor: __BaseException,
5488
5028
  errorCode,
5489
5029
  });
5490
5030
  }
5491
5031
  };
5492
- const map = __map;
5032
+ const throwDefaultError = withBaseException(__BaseException);
5493
5033
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
5494
5034
  const contents = map({});
5495
5035
  const data = parsedOutput.body;
5496
- if (data.ErrorDetails != null) {
5497
- contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context);
5498
- }
5499
- if (data.Message != null) {
5500
- contents.Message = __expectString(data.Message);
5501
- }
5036
+ const doc = take(data, {
5037
+ ErrorDetails: _json,
5038
+ Message: __expectString,
5039
+ });
5040
+ Object.assign(contents, doc);
5502
5041
  const exception = new BadRequestException({
5503
5042
  $metadata: deserializeMetadata(parsedOutput),
5504
5043
  ...contents,
@@ -5508,896 +5047,36 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
5508
5047
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
5509
5048
  const contents = map({});
5510
5049
  const data = parsedOutput.body;
5511
- if (data.ErrorDetails != null) {
5512
- contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context);
5513
- }
5514
- if (data.Message != null) {
5515
- contents.Message = __expectString(data.Message);
5516
- }
5050
+ const doc = take(data, {
5051
+ ErrorDetails: _json,
5052
+ Message: __expectString,
5053
+ });
5054
+ Object.assign(contents, doc);
5517
5055
  const exception = new InternalServerErrorException({
5518
5056
  $metadata: deserializeMetadata(parsedOutput),
5519
5057
  ...contents,
5520
5058
  });
5521
5059
  return __decorateServiceException(exception, parsedOutput.body);
5522
5060
  };
5523
- const se___listOf__string = (input, context) => {
5524
- return input
5525
- .filter((e) => e != null)
5526
- .map((entry) => {
5527
- return entry;
5528
- });
5529
- };
5530
- const se___listOfConnectivityInfo = (input, context) => {
5531
- return input
5532
- .filter((e) => e != null)
5533
- .map((entry) => {
5534
- return se_ConnectivityInfo(entry, context);
5535
- });
5536
- };
5537
- const se___listOfConnector = (input, context) => {
5538
- return input
5539
- .filter((e) => e != null)
5540
- .map((entry) => {
5541
- return se_Connector(entry, context);
5542
- });
5543
- };
5544
- const se___listOfCore = (input, context) => {
5545
- return input
5546
- .filter((e) => e != null)
5547
- .map((entry) => {
5548
- return se_Core(entry, context);
5549
- });
5550
- };
5551
- const se___listOfDevice = (input, context) => {
5552
- return input
5553
- .filter((e) => e != null)
5554
- .map((entry) => {
5555
- return se_Device(entry, context);
5556
- });
5557
- };
5558
- const se___listOfFunction = (input, context) => {
5559
- return input
5560
- .filter((e) => e != null)
5561
- .map((entry) => {
5562
- return se_Function(entry, context);
5563
- });
5564
- };
5565
- const se___listOfLogger = (input, context) => {
5566
- return input
5567
- .filter((e) => e != null)
5568
- .map((entry) => {
5569
- return se_Logger(entry, context);
5570
- });
5571
- };
5572
- const se___listOfResource = (input, context) => {
5573
- return input
5574
- .filter((e) => e != null)
5575
- .map((entry) => {
5576
- return se_Resource(entry, context);
5577
- });
5578
- };
5579
- const se___listOfResourceAccessPolicy = (input, context) => {
5580
- return input
5581
- .filter((e) => e != null)
5582
- .map((entry) => {
5583
- return se_ResourceAccessPolicy(entry, context);
5584
- });
5585
- };
5586
- const se___listOfSubscription = (input, context) => {
5587
- return input
5588
- .filter((e) => e != null)
5589
- .map((entry) => {
5590
- return se_Subscription(entry, context);
5591
- });
5592
- };
5593
- const se___mapOf__string = (input, context) => {
5594
- return Object.entries(input).reduce((acc, [key, value]) => {
5595
- if (value === null) {
5596
- return acc;
5597
- }
5598
- acc[key] = value;
5599
- return acc;
5600
- }, {});
5601
- };
5602
- const se_ConnectivityInfo = (input, context) => {
5603
- return {
5604
- ...(input.HostAddress != null && { HostAddress: input.HostAddress }),
5605
- ...(input.Id != null && { Id: input.Id }),
5606
- ...(input.Metadata != null && { Metadata: input.Metadata }),
5607
- ...(input.PortNumber != null && { PortNumber: input.PortNumber }),
5608
- };
5609
- };
5610
- const se_Connector = (input, context) => {
5611
- return {
5612
- ...(input.ConnectorArn != null && { ConnectorArn: input.ConnectorArn }),
5613
- ...(input.Id != null && { Id: input.Id }),
5614
- ...(input.Parameters != null && { Parameters: se___mapOf__string(input.Parameters, context) }),
5615
- };
5616
- };
5617
- const se_ConnectorDefinitionVersion = (input, context) => {
5618
- return {
5619
- ...(input.Connectors != null && { Connectors: se___listOfConnector(input.Connectors, context) }),
5620
- };
5621
- };
5622
- const se_Core = (input, context) => {
5623
- return {
5624
- ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
5625
- ...(input.Id != null && { Id: input.Id }),
5626
- ...(input.SyncShadow != null && { SyncShadow: input.SyncShadow }),
5627
- ...(input.ThingArn != null && { ThingArn: input.ThingArn }),
5628
- };
5629
- };
5630
- const se_CoreDefinitionVersion = (input, context) => {
5631
- return {
5632
- ...(input.Cores != null && { Cores: se___listOfCore(input.Cores, context) }),
5633
- };
5634
- };
5635
- const se_Device = (input, context) => {
5636
- return {
5637
- ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }),
5638
- ...(input.Id != null && { Id: input.Id }),
5639
- ...(input.SyncShadow != null && { SyncShadow: input.SyncShadow }),
5640
- ...(input.ThingArn != null && { ThingArn: input.ThingArn }),
5641
- };
5642
- };
5643
- const se_DeviceDefinitionVersion = (input, context) => {
5644
- return {
5645
- ...(input.Devices != null && { Devices: se___listOfDevice(input.Devices, context) }),
5646
- };
5647
- };
5648
- const se_Function = (input, context) => {
5649
- return {
5650
- ...(input.FunctionArn != null && { FunctionArn: input.FunctionArn }),
5651
- ...(input.FunctionConfiguration != null && {
5652
- FunctionConfiguration: se_FunctionConfiguration(input.FunctionConfiguration, context),
5653
- }),
5654
- ...(input.Id != null && { Id: input.Id }),
5655
- };
5656
- };
5657
- const se_FunctionConfiguration = (input, context) => {
5658
- return {
5659
- ...(input.EncodingType != null && { EncodingType: input.EncodingType }),
5660
- ...(input.Environment != null && { Environment: se_FunctionConfigurationEnvironment(input.Environment, context) }),
5661
- ...(input.ExecArgs != null && { ExecArgs: input.ExecArgs }),
5662
- ...(input.Executable != null && { Executable: input.Executable }),
5663
- ...(input.FunctionRuntimeOverride != null && { FunctionRuntimeOverride: input.FunctionRuntimeOverride }),
5664
- ...(input.MemorySize != null && { MemorySize: input.MemorySize }),
5665
- ...(input.Pinned != null && { Pinned: input.Pinned }),
5666
- ...(input.Timeout != null && { Timeout: input.Timeout }),
5667
- };
5668
- };
5669
- const se_FunctionConfigurationEnvironment = (input, context) => {
5670
- return {
5671
- ...(input.AccessSysfs != null && { AccessSysfs: input.AccessSysfs }),
5672
- ...(input.Execution != null && { Execution: se_FunctionExecutionConfig(input.Execution, context) }),
5673
- ...(input.ResourceAccessPolicies != null && {
5674
- ResourceAccessPolicies: se___listOfResourceAccessPolicy(input.ResourceAccessPolicies, context),
5675
- }),
5676
- ...(input.Variables != null && { Variables: se___mapOf__string(input.Variables, context) }),
5677
- };
5678
- };
5679
- const se_FunctionDefaultConfig = (input, context) => {
5680
- return {
5681
- ...(input.Execution != null && { Execution: se_FunctionDefaultExecutionConfig(input.Execution, context) }),
5682
- };
5683
- };
5684
- const se_FunctionDefaultExecutionConfig = (input, context) => {
5685
- return {
5686
- ...(input.IsolationMode != null && { IsolationMode: input.IsolationMode }),
5687
- ...(input.RunAs != null && { RunAs: se_FunctionRunAsConfig(input.RunAs, context) }),
5688
- };
5689
- };
5690
- const se_FunctionDefinitionVersion = (input, context) => {
5691
- return {
5692
- ...(input.DefaultConfig != null && { DefaultConfig: se_FunctionDefaultConfig(input.DefaultConfig, context) }),
5693
- ...(input.Functions != null && { Functions: se___listOfFunction(input.Functions, context) }),
5694
- };
5695
- };
5696
- const se_FunctionExecutionConfig = (input, context) => {
5697
- return {
5698
- ...(input.IsolationMode != null && { IsolationMode: input.IsolationMode }),
5699
- ...(input.RunAs != null && { RunAs: se_FunctionRunAsConfig(input.RunAs, context) }),
5700
- };
5701
- };
5702
- const se_FunctionRunAsConfig = (input, context) => {
5703
- return {
5704
- ...(input.Gid != null && { Gid: input.Gid }),
5705
- ...(input.Uid != null && { Uid: input.Uid }),
5706
- };
5707
- };
5708
- const se_GroupOwnerSetting = (input, context) => {
5709
- return {
5710
- ...(input.AutoAddGroupOwner != null && { AutoAddGroupOwner: input.AutoAddGroupOwner }),
5711
- ...(input.GroupOwner != null && { GroupOwner: input.GroupOwner }),
5712
- };
5713
- };
5714
- const se_GroupVersion = (input, context) => {
5715
- return {
5716
- ...(input.ConnectorDefinitionVersionArn != null && {
5717
- ConnectorDefinitionVersionArn: input.ConnectorDefinitionVersionArn,
5718
- }),
5719
- ...(input.CoreDefinitionVersionArn != null && { CoreDefinitionVersionArn: input.CoreDefinitionVersionArn }),
5720
- ...(input.DeviceDefinitionVersionArn != null && { DeviceDefinitionVersionArn: input.DeviceDefinitionVersionArn }),
5721
- ...(input.FunctionDefinitionVersionArn != null && {
5722
- FunctionDefinitionVersionArn: input.FunctionDefinitionVersionArn,
5723
- }),
5724
- ...(input.LoggerDefinitionVersionArn != null && { LoggerDefinitionVersionArn: input.LoggerDefinitionVersionArn }),
5725
- ...(input.ResourceDefinitionVersionArn != null && {
5726
- ResourceDefinitionVersionArn: input.ResourceDefinitionVersionArn,
5727
- }),
5728
- ...(input.SubscriptionDefinitionVersionArn != null && {
5729
- SubscriptionDefinitionVersionArn: input.SubscriptionDefinitionVersionArn,
5730
- }),
5731
- };
5732
- };
5733
- const se_LocalDeviceResourceData = (input, context) => {
5734
- return {
5735
- ...(input.GroupOwnerSetting != null && {
5736
- GroupOwnerSetting: se_GroupOwnerSetting(input.GroupOwnerSetting, context),
5737
- }),
5738
- ...(input.SourcePath != null && { SourcePath: input.SourcePath }),
5739
- };
5740
- };
5741
- const se_LocalVolumeResourceData = (input, context) => {
5742
- return {
5743
- ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }),
5744
- ...(input.GroupOwnerSetting != null && {
5745
- GroupOwnerSetting: se_GroupOwnerSetting(input.GroupOwnerSetting, context),
5746
- }),
5747
- ...(input.SourcePath != null && { SourcePath: input.SourcePath }),
5748
- };
5749
- };
5750
- const se_Logger = (input, context) => {
5751
- return {
5752
- ...(input.Component != null && { Component: input.Component }),
5753
- ...(input.Id != null && { Id: input.Id }),
5754
- ...(input.Level != null && { Level: input.Level }),
5755
- ...(input.Space != null && { Space: input.Space }),
5756
- ...(input.Type != null && { Type: input.Type }),
5757
- };
5758
- };
5759
- const se_LoggerDefinitionVersion = (input, context) => {
5760
- return {
5761
- ...(input.Loggers != null && { Loggers: se___listOfLogger(input.Loggers, context) }),
5762
- };
5763
- };
5764
- const se_Resource = (input, context) => {
5765
- return {
5766
- ...(input.Id != null && { Id: input.Id }),
5767
- ...(input.Name != null && { Name: input.Name }),
5768
- ...(input.ResourceDataContainer != null && {
5769
- ResourceDataContainer: se_ResourceDataContainer(input.ResourceDataContainer, context),
5770
- }),
5771
- };
5772
- };
5773
- const se_ResourceAccessPolicy = (input, context) => {
5774
- return {
5775
- ...(input.Permission != null && { Permission: input.Permission }),
5776
- ...(input.ResourceId != null && { ResourceId: input.ResourceId }),
5777
- };
5778
- };
5779
- const se_ResourceDataContainer = (input, context) => {
5780
- return {
5781
- ...(input.LocalDeviceResourceData != null && {
5782
- LocalDeviceResourceData: se_LocalDeviceResourceData(input.LocalDeviceResourceData, context),
5783
- }),
5784
- ...(input.LocalVolumeResourceData != null && {
5785
- LocalVolumeResourceData: se_LocalVolumeResourceData(input.LocalVolumeResourceData, context),
5786
- }),
5787
- ...(input.S3MachineLearningModelResourceData != null && {
5788
- S3MachineLearningModelResourceData: se_S3MachineLearningModelResourceData(input.S3MachineLearningModelResourceData, context),
5789
- }),
5790
- ...(input.SageMakerMachineLearningModelResourceData != null && {
5791
- SageMakerMachineLearningModelResourceData: se_SageMakerMachineLearningModelResourceData(input.SageMakerMachineLearningModelResourceData, context),
5792
- }),
5793
- ...(input.SecretsManagerSecretResourceData != null && {
5794
- SecretsManagerSecretResourceData: se_SecretsManagerSecretResourceData(input.SecretsManagerSecretResourceData, context),
5795
- }),
5796
- };
5797
- };
5798
- const se_ResourceDefinitionVersion = (input, context) => {
5799
- return {
5800
- ...(input.Resources != null && { Resources: se___listOfResource(input.Resources, context) }),
5801
- };
5802
- };
5803
- const se_ResourceDownloadOwnerSetting = (input, context) => {
5804
- return {
5805
- ...(input.GroupOwner != null && { GroupOwner: input.GroupOwner }),
5806
- ...(input.GroupPermission != null && { GroupPermission: input.GroupPermission }),
5807
- };
5808
- };
5809
- const se_S3MachineLearningModelResourceData = (input, context) => {
5810
- return {
5811
- ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }),
5812
- ...(input.OwnerSetting != null && { OwnerSetting: se_ResourceDownloadOwnerSetting(input.OwnerSetting, context) }),
5813
- ...(input.S3Uri != null && { S3Uri: input.S3Uri }),
5814
- };
5815
- };
5816
- const se_SageMakerMachineLearningModelResourceData = (input, context) => {
5817
- return {
5818
- ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }),
5819
- ...(input.OwnerSetting != null && { OwnerSetting: se_ResourceDownloadOwnerSetting(input.OwnerSetting, context) }),
5820
- ...(input.SageMakerJobArn != null && { SageMakerJobArn: input.SageMakerJobArn }),
5821
- };
5822
- };
5823
- const se_SecretsManagerSecretResourceData = (input, context) => {
5824
- return {
5825
- ...(input.ARN != null && { ARN: input.ARN }),
5826
- ...(input.AdditionalStagingLabelsToDownload != null && {
5827
- AdditionalStagingLabelsToDownload: se___listOf__string(input.AdditionalStagingLabelsToDownload, context),
5828
- }),
5829
- };
5830
- };
5831
- const se_Subscription = (input, context) => {
5832
- return {
5833
- ...(input.Id != null && { Id: input.Id }),
5834
- ...(input.Source != null && { Source: input.Source }),
5835
- ...(input.Subject != null && { Subject: input.Subject }),
5836
- ...(input.Target != null && { Target: input.Target }),
5837
- };
5838
- };
5839
- const se_SubscriptionDefinitionVersion = (input, context) => {
5840
- return {
5841
- ...(input.Subscriptions != null && { Subscriptions: se___listOfSubscription(input.Subscriptions, context) }),
5842
- };
5843
- };
5844
- const se_Tags = (input, context) => {
5845
- return Object.entries(input).reduce((acc, [key, value]) => {
5846
- if (value === null) {
5847
- return acc;
5848
- }
5849
- acc[key] = value;
5850
- return acc;
5851
- }, {});
5852
- };
5853
- const se_TelemetryConfigurationUpdate = (input, context) => {
5854
- return {
5855
- ...(input.Telemetry != null && { Telemetry: input.Telemetry }),
5856
- };
5857
- };
5858
- const se_UpdateTargets = (input, context) => {
5859
- return input
5860
- .filter((e) => e != null)
5861
- .map((entry) => {
5862
- return entry;
5863
- });
5864
- };
5865
- const de___listOf__string = (output, context) => {
5866
- const retVal = (output || [])
5867
- .filter((e) => e != null)
5868
- .map((entry) => {
5869
- if (entry === null) {
5870
- return null;
5871
- }
5872
- return __expectString(entry);
5873
- });
5874
- return retVal;
5875
- };
5876
- const de___listOfConnectivityInfo = (output, context) => {
5877
- const retVal = (output || [])
5878
- .filter((e) => e != null)
5879
- .map((entry) => {
5880
- if (entry === null) {
5881
- return null;
5882
- }
5883
- return de_ConnectivityInfo(entry, context);
5884
- });
5885
- return retVal;
5886
- };
5887
- const de___listOfConnector = (output, context) => {
5888
- const retVal = (output || [])
5889
- .filter((e) => e != null)
5890
- .map((entry) => {
5891
- if (entry === null) {
5892
- return null;
5893
- }
5894
- return de_Connector(entry, context);
5895
- });
5896
- return retVal;
5897
- };
5898
- const de___listOfCore = (output, context) => {
5899
- const retVal = (output || [])
5900
- .filter((e) => e != null)
5901
- .map((entry) => {
5902
- if (entry === null) {
5903
- return null;
5904
- }
5905
- return de_Core(entry, context);
5906
- });
5907
- return retVal;
5908
- };
5909
5061
  const de___listOfDefinitionInformation = (output, context) => {
5910
5062
  const retVal = (output || [])
5911
5063
  .filter((e) => e != null)
5912
5064
  .map((entry) => {
5913
- if (entry === null) {
5914
- return null;
5915
- }
5916
5065
  return de_DefinitionInformation(entry, context);
5917
5066
  });
5918
5067
  return retVal;
5919
5068
  };
5920
- const de___listOfDevice = (output, context) => {
5921
- const retVal = (output || [])
5922
- .filter((e) => e != null)
5923
- .map((entry) => {
5924
- if (entry === null) {
5925
- return null;
5926
- }
5927
- return de_Device(entry, context);
5928
- });
5929
- return retVal;
5930
- };
5931
- const de___listOfFunction = (output, context) => {
5932
- const retVal = (output || [])
5933
- .filter((e) => e != null)
5934
- .map((entry) => {
5935
- if (entry === null) {
5936
- return null;
5937
- }
5938
- return de_Function(entry, context);
5939
- });
5940
- return retVal;
5941
- };
5942
- const de___listOfGroupCertificateAuthorityProperties = (output, context) => {
5943
- const retVal = (output || [])
5944
- .filter((e) => e != null)
5945
- .map((entry) => {
5946
- if (entry === null) {
5947
- return null;
5948
- }
5949
- return de_GroupCertificateAuthorityProperties(entry, context);
5950
- });
5951
- return retVal;
5952
- };
5953
- const de___listOfGroupInformation = (output, context) => {
5954
- const retVal = (output || [])
5955
- .filter((e) => e != null)
5956
- .map((entry) => {
5957
- if (entry === null) {
5958
- return null;
5959
- }
5960
- return de_GroupInformation(entry, context);
5961
- });
5962
- return retVal;
5963
- };
5964
- const de___listOfLogger = (output, context) => {
5965
- const retVal = (output || [])
5966
- .filter((e) => e != null)
5967
- .map((entry) => {
5968
- if (entry === null) {
5969
- return null;
5970
- }
5971
- return de_Logger(entry, context);
5972
- });
5973
- return retVal;
5974
- };
5975
- const de___listOfResource = (output, context) => {
5976
- const retVal = (output || [])
5977
- .filter((e) => e != null)
5978
- .map((entry) => {
5979
- if (entry === null) {
5980
- return null;
5981
- }
5982
- return de_Resource(entry, context);
5983
- });
5984
- return retVal;
5985
- };
5986
- const de___listOfResourceAccessPolicy = (output, context) => {
5987
- const retVal = (output || [])
5988
- .filter((e) => e != null)
5989
- .map((entry) => {
5990
- if (entry === null) {
5991
- return null;
5992
- }
5993
- return de_ResourceAccessPolicy(entry, context);
5994
- });
5995
- return retVal;
5996
- };
5997
- const de___listOfSubscription = (output, context) => {
5998
- const retVal = (output || [])
5999
- .filter((e) => e != null)
6000
- .map((entry) => {
6001
- if (entry === null) {
6002
- return null;
6003
- }
6004
- return de_Subscription(entry, context);
6005
- });
6006
- return retVal;
6007
- };
6008
- const de___listOfVersionInformation = (output, context) => {
6009
- const retVal = (output || [])
6010
- .filter((e) => e != null)
6011
- .map((entry) => {
6012
- if (entry === null) {
6013
- return null;
6014
- }
6015
- return de_VersionInformation(entry, context);
6016
- });
6017
- return retVal;
6018
- };
6019
- const de___mapOf__string = (output, context) => {
6020
- return Object.entries(output).reduce((acc, [key, value]) => {
6021
- if (value === null) {
6022
- return acc;
6023
- }
6024
- acc[key] = __expectString(value);
6025
- return acc;
6026
- }, {});
6027
- };
6028
- const de_BulkDeployment = (output, context) => {
6029
- return {
6030
- BulkDeploymentArn: __expectString(output.BulkDeploymentArn),
6031
- BulkDeploymentId: __expectString(output.BulkDeploymentId),
6032
- CreatedAt: __expectString(output.CreatedAt),
6033
- };
6034
- };
6035
- const de_BulkDeploymentMetrics = (output, context) => {
6036
- return {
6037
- InvalidInputRecords: __expectInt32(output.InvalidInputRecords),
6038
- RecordsProcessed: __expectInt32(output.RecordsProcessed),
6039
- RetryAttempts: __expectInt32(output.RetryAttempts),
6040
- };
6041
- };
6042
- const de_BulkDeploymentResult = (output, context) => {
6043
- return {
6044
- CreatedAt: __expectString(output.CreatedAt),
6045
- DeploymentArn: __expectString(output.DeploymentArn),
6046
- DeploymentId: __expectString(output.DeploymentId),
6047
- DeploymentStatus: __expectString(output.DeploymentStatus),
6048
- DeploymentType: __expectString(output.DeploymentType),
6049
- ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined,
6050
- ErrorMessage: __expectString(output.ErrorMessage),
6051
- GroupArn: __expectString(output.GroupArn),
6052
- };
6053
- };
6054
- const de_BulkDeploymentResults = (output, context) => {
6055
- const retVal = (output || [])
6056
- .filter((e) => e != null)
6057
- .map((entry) => {
6058
- if (entry === null) {
6059
- return null;
6060
- }
6061
- return de_BulkDeploymentResult(entry, context);
6062
- });
6063
- return retVal;
6064
- };
6065
- const de_BulkDeployments = (output, context) => {
6066
- const retVal = (output || [])
6067
- .filter((e) => e != null)
6068
- .map((entry) => {
6069
- if (entry === null) {
6070
- return null;
6071
- }
6072
- return de_BulkDeployment(entry, context);
6073
- });
6074
- return retVal;
6075
- };
6076
- const de_ConnectivityInfo = (output, context) => {
6077
- return {
6078
- HostAddress: __expectString(output.HostAddress),
6079
- Id: __expectString(output.Id),
6080
- Metadata: __expectString(output.Metadata),
6081
- PortNumber: __expectInt32(output.PortNumber),
6082
- };
6083
- };
6084
- const de_Connector = (output, context) => {
6085
- return {
6086
- ConnectorArn: __expectString(output.ConnectorArn),
6087
- Id: __expectString(output.Id),
6088
- Parameters: output.Parameters != null ? de___mapOf__string(output.Parameters, context) : undefined,
6089
- };
6090
- };
6091
- const de_ConnectorDefinitionVersion = (output, context) => {
6092
- return {
6093
- Connectors: output.Connectors != null ? de___listOfConnector(output.Connectors, context) : undefined,
6094
- };
6095
- };
6096
- const de_Core = (output, context) => {
6097
- return {
6098
- CertificateArn: __expectString(output.CertificateArn),
6099
- Id: __expectString(output.Id),
6100
- SyncShadow: __expectBoolean(output.SyncShadow),
6101
- ThingArn: __expectString(output.ThingArn),
6102
- };
6103
- };
6104
- const de_CoreDefinitionVersion = (output, context) => {
6105
- return {
6106
- Cores: output.Cores != null ? de___listOfCore(output.Cores, context) : undefined,
6107
- };
6108
- };
6109
5069
  const de_DefinitionInformation = (output, context) => {
6110
- return {
6111
- Arn: __expectString(output.Arn),
6112
- CreationTimestamp: __expectString(output.CreationTimestamp),
6113
- Id: __expectString(output.Id),
6114
- LastUpdatedTimestamp: __expectString(output.LastUpdatedTimestamp),
6115
- LatestVersion: __expectString(output.LatestVersion),
6116
- LatestVersionArn: __expectString(output.LatestVersionArn),
6117
- Name: __expectString(output.Name),
6118
- Tags: output.tags != null ? de_Tags(output.tags, context) : undefined,
6119
- };
6120
- };
6121
- const de_Deployment = (output, context) => {
6122
- return {
6123
- CreatedAt: __expectString(output.CreatedAt),
6124
- DeploymentArn: __expectString(output.DeploymentArn),
6125
- DeploymentId: __expectString(output.DeploymentId),
6126
- DeploymentType: __expectString(output.DeploymentType),
6127
- GroupArn: __expectString(output.GroupArn),
6128
- };
6129
- };
6130
- const de_Deployments = (output, context) => {
6131
- const retVal = (output || [])
6132
- .filter((e) => e != null)
6133
- .map((entry) => {
6134
- if (entry === null) {
6135
- return null;
6136
- }
6137
- return de_Deployment(entry, context);
6138
- });
6139
- return retVal;
6140
- };
6141
- const de_Device = (output, context) => {
6142
- return {
6143
- CertificateArn: __expectString(output.CertificateArn),
6144
- Id: __expectString(output.Id),
6145
- SyncShadow: __expectBoolean(output.SyncShadow),
6146
- ThingArn: __expectString(output.ThingArn),
6147
- };
6148
- };
6149
- const de_DeviceDefinitionVersion = (output, context) => {
6150
- return {
6151
- Devices: output.Devices != null ? de___listOfDevice(output.Devices, context) : undefined,
6152
- };
6153
- };
6154
- const de_ErrorDetail = (output, context) => {
6155
- return {
6156
- DetailedErrorCode: __expectString(output.DetailedErrorCode),
6157
- DetailedErrorMessage: __expectString(output.DetailedErrorMessage),
6158
- };
6159
- };
6160
- const de_ErrorDetails = (output, context) => {
6161
- const retVal = (output || [])
6162
- .filter((e) => e != null)
6163
- .map((entry) => {
6164
- if (entry === null) {
6165
- return null;
6166
- }
6167
- return de_ErrorDetail(entry, context);
5070
+ return take(output, {
5071
+ Arn: __expectString,
5072
+ CreationTimestamp: __expectString,
5073
+ Id: __expectString,
5074
+ LastUpdatedTimestamp: __expectString,
5075
+ LatestVersion: __expectString,
5076
+ LatestVersionArn: __expectString,
5077
+ Name: __expectString,
5078
+ Tags: [, _json, `tags`],
6168
5079
  });
6169
- return retVal;
6170
- };
6171
- const de_Function = (output, context) => {
6172
- return {
6173
- FunctionArn: __expectString(output.FunctionArn),
6174
- FunctionConfiguration: output.FunctionConfiguration != null
6175
- ? de_FunctionConfiguration(output.FunctionConfiguration, context)
6176
- : undefined,
6177
- Id: __expectString(output.Id),
6178
- };
6179
- };
6180
- const de_FunctionConfiguration = (output, context) => {
6181
- return {
6182
- EncodingType: __expectString(output.EncodingType),
6183
- Environment: output.Environment != null ? de_FunctionConfigurationEnvironment(output.Environment, context) : undefined,
6184
- ExecArgs: __expectString(output.ExecArgs),
6185
- Executable: __expectString(output.Executable),
6186
- FunctionRuntimeOverride: __expectString(output.FunctionRuntimeOverride),
6187
- MemorySize: __expectInt32(output.MemorySize),
6188
- Pinned: __expectBoolean(output.Pinned),
6189
- Timeout: __expectInt32(output.Timeout),
6190
- };
6191
- };
6192
- const de_FunctionConfigurationEnvironment = (output, context) => {
6193
- return {
6194
- AccessSysfs: __expectBoolean(output.AccessSysfs),
6195
- Execution: output.Execution != null ? de_FunctionExecutionConfig(output.Execution, context) : undefined,
6196
- ResourceAccessPolicies: output.ResourceAccessPolicies != null
6197
- ? de___listOfResourceAccessPolicy(output.ResourceAccessPolicies, context)
6198
- : undefined,
6199
- Variables: output.Variables != null ? de___mapOf__string(output.Variables, context) : undefined,
6200
- };
6201
- };
6202
- const de_FunctionDefaultConfig = (output, context) => {
6203
- return {
6204
- Execution: output.Execution != null ? de_FunctionDefaultExecutionConfig(output.Execution, context) : undefined,
6205
- };
6206
- };
6207
- const de_FunctionDefaultExecutionConfig = (output, context) => {
6208
- return {
6209
- IsolationMode: __expectString(output.IsolationMode),
6210
- RunAs: output.RunAs != null ? de_FunctionRunAsConfig(output.RunAs, context) : undefined,
6211
- };
6212
- };
6213
- const de_FunctionDefinitionVersion = (output, context) => {
6214
- return {
6215
- DefaultConfig: output.DefaultConfig != null ? de_FunctionDefaultConfig(output.DefaultConfig, context) : undefined,
6216
- Functions: output.Functions != null ? de___listOfFunction(output.Functions, context) : undefined,
6217
- };
6218
- };
6219
- const de_FunctionExecutionConfig = (output, context) => {
6220
- return {
6221
- IsolationMode: __expectString(output.IsolationMode),
6222
- RunAs: output.RunAs != null ? de_FunctionRunAsConfig(output.RunAs, context) : undefined,
6223
- };
6224
- };
6225
- const de_FunctionRunAsConfig = (output, context) => {
6226
- return {
6227
- Gid: __expectInt32(output.Gid),
6228
- Uid: __expectInt32(output.Uid),
6229
- };
6230
- };
6231
- const de_GroupCertificateAuthorityProperties = (output, context) => {
6232
- return {
6233
- GroupCertificateAuthorityArn: __expectString(output.GroupCertificateAuthorityArn),
6234
- GroupCertificateAuthorityId: __expectString(output.GroupCertificateAuthorityId),
6235
- };
6236
- };
6237
- const de_GroupInformation = (output, context) => {
6238
- return {
6239
- Arn: __expectString(output.Arn),
6240
- CreationTimestamp: __expectString(output.CreationTimestamp),
6241
- Id: __expectString(output.Id),
6242
- LastUpdatedTimestamp: __expectString(output.LastUpdatedTimestamp),
6243
- LatestVersion: __expectString(output.LatestVersion),
6244
- LatestVersionArn: __expectString(output.LatestVersionArn),
6245
- Name: __expectString(output.Name),
6246
- };
6247
- };
6248
- const de_GroupOwnerSetting = (output, context) => {
6249
- return {
6250
- AutoAddGroupOwner: __expectBoolean(output.AutoAddGroupOwner),
6251
- GroupOwner: __expectString(output.GroupOwner),
6252
- };
6253
- };
6254
- const de_GroupVersion = (output, context) => {
6255
- return {
6256
- ConnectorDefinitionVersionArn: __expectString(output.ConnectorDefinitionVersionArn),
6257
- CoreDefinitionVersionArn: __expectString(output.CoreDefinitionVersionArn),
6258
- DeviceDefinitionVersionArn: __expectString(output.DeviceDefinitionVersionArn),
6259
- FunctionDefinitionVersionArn: __expectString(output.FunctionDefinitionVersionArn),
6260
- LoggerDefinitionVersionArn: __expectString(output.LoggerDefinitionVersionArn),
6261
- ResourceDefinitionVersionArn: __expectString(output.ResourceDefinitionVersionArn),
6262
- SubscriptionDefinitionVersionArn: __expectString(output.SubscriptionDefinitionVersionArn),
6263
- };
6264
- };
6265
- const de_LocalDeviceResourceData = (output, context) => {
6266
- return {
6267
- GroupOwnerSetting: output.GroupOwnerSetting != null ? de_GroupOwnerSetting(output.GroupOwnerSetting, context) : undefined,
6268
- SourcePath: __expectString(output.SourcePath),
6269
- };
6270
- };
6271
- const de_LocalVolumeResourceData = (output, context) => {
6272
- return {
6273
- DestinationPath: __expectString(output.DestinationPath),
6274
- GroupOwnerSetting: output.GroupOwnerSetting != null ? de_GroupOwnerSetting(output.GroupOwnerSetting, context) : undefined,
6275
- SourcePath: __expectString(output.SourcePath),
6276
- };
6277
- };
6278
- const de_Logger = (output, context) => {
6279
- return {
6280
- Component: __expectString(output.Component),
6281
- Id: __expectString(output.Id),
6282
- Level: __expectString(output.Level),
6283
- Space: __expectInt32(output.Space),
6284
- Type: __expectString(output.Type),
6285
- };
6286
- };
6287
- const de_LoggerDefinitionVersion = (output, context) => {
6288
- return {
6289
- Loggers: output.Loggers != null ? de___listOfLogger(output.Loggers, context) : undefined,
6290
- };
6291
- };
6292
- const de_Resource = (output, context) => {
6293
- return {
6294
- Id: __expectString(output.Id),
6295
- Name: __expectString(output.Name),
6296
- ResourceDataContainer: output.ResourceDataContainer != null
6297
- ? de_ResourceDataContainer(output.ResourceDataContainer, context)
6298
- : undefined,
6299
- };
6300
- };
6301
- const de_ResourceAccessPolicy = (output, context) => {
6302
- return {
6303
- Permission: __expectString(output.Permission),
6304
- ResourceId: __expectString(output.ResourceId),
6305
- };
6306
- };
6307
- const de_ResourceDataContainer = (output, context) => {
6308
- return {
6309
- LocalDeviceResourceData: output.LocalDeviceResourceData != null
6310
- ? de_LocalDeviceResourceData(output.LocalDeviceResourceData, context)
6311
- : undefined,
6312
- LocalVolumeResourceData: output.LocalVolumeResourceData != null
6313
- ? de_LocalVolumeResourceData(output.LocalVolumeResourceData, context)
6314
- : undefined,
6315
- S3MachineLearningModelResourceData: output.S3MachineLearningModelResourceData != null
6316
- ? de_S3MachineLearningModelResourceData(output.S3MachineLearningModelResourceData, context)
6317
- : undefined,
6318
- SageMakerMachineLearningModelResourceData: output.SageMakerMachineLearningModelResourceData != null
6319
- ? de_SageMakerMachineLearningModelResourceData(output.SageMakerMachineLearningModelResourceData, context)
6320
- : undefined,
6321
- SecretsManagerSecretResourceData: output.SecretsManagerSecretResourceData != null
6322
- ? de_SecretsManagerSecretResourceData(output.SecretsManagerSecretResourceData, context)
6323
- : undefined,
6324
- };
6325
- };
6326
- const de_ResourceDefinitionVersion = (output, context) => {
6327
- return {
6328
- Resources: output.Resources != null ? de___listOfResource(output.Resources, context) : undefined,
6329
- };
6330
- };
6331
- const de_ResourceDownloadOwnerSetting = (output, context) => {
6332
- return {
6333
- GroupOwner: __expectString(output.GroupOwner),
6334
- GroupPermission: __expectString(output.GroupPermission),
6335
- };
6336
- };
6337
- const de_RuntimeConfiguration = (output, context) => {
6338
- return {
6339
- TelemetryConfiguration: output.TelemetryConfiguration != null
6340
- ? de_TelemetryConfiguration(output.TelemetryConfiguration, context)
6341
- : undefined,
6342
- };
6343
- };
6344
- const de_S3MachineLearningModelResourceData = (output, context) => {
6345
- return {
6346
- DestinationPath: __expectString(output.DestinationPath),
6347
- OwnerSetting: output.OwnerSetting != null ? de_ResourceDownloadOwnerSetting(output.OwnerSetting, context) : undefined,
6348
- S3Uri: __expectString(output.S3Uri),
6349
- };
6350
- };
6351
- const de_SageMakerMachineLearningModelResourceData = (output, context) => {
6352
- return {
6353
- DestinationPath: __expectString(output.DestinationPath),
6354
- OwnerSetting: output.OwnerSetting != null ? de_ResourceDownloadOwnerSetting(output.OwnerSetting, context) : undefined,
6355
- SageMakerJobArn: __expectString(output.SageMakerJobArn),
6356
- };
6357
- };
6358
- const de_SecretsManagerSecretResourceData = (output, context) => {
6359
- return {
6360
- ARN: __expectString(output.ARN),
6361
- AdditionalStagingLabelsToDownload: output.AdditionalStagingLabelsToDownload != null
6362
- ? de___listOf__string(output.AdditionalStagingLabelsToDownload, context)
6363
- : undefined,
6364
- };
6365
- };
6366
- const de_Subscription = (output, context) => {
6367
- return {
6368
- Id: __expectString(output.Id),
6369
- Source: __expectString(output.Source),
6370
- Subject: __expectString(output.Subject),
6371
- Target: __expectString(output.Target),
6372
- };
6373
- };
6374
- const de_SubscriptionDefinitionVersion = (output, context) => {
6375
- return {
6376
- Subscriptions: output.Subscriptions != null ? de___listOfSubscription(output.Subscriptions, context) : undefined,
6377
- };
6378
- };
6379
- const de_Tags = (output, context) => {
6380
- return Object.entries(output).reduce((acc, [key, value]) => {
6381
- if (value === null) {
6382
- return acc;
6383
- }
6384
- acc[key] = __expectString(value);
6385
- return acc;
6386
- }, {});
6387
- };
6388
- const de_TelemetryConfiguration = (output, context) => {
6389
- return {
6390
- ConfigurationSyncStatus: __expectString(output.ConfigurationSyncStatus),
6391
- Telemetry: __expectString(output.Telemetry),
6392
- };
6393
- };
6394
- const de_VersionInformation = (output, context) => {
6395
- return {
6396
- Arn: __expectString(output.Arn),
6397
- CreationTimestamp: __expectString(output.CreationTimestamp),
6398
- Id: __expectString(output.Id),
6399
- Version: __expectString(output.Version),
6400
- };
6401
5080
  };
6402
5081
  const deserializeMetadata = (output) => ({
6403
5082
  httpStatusCode: output.statusCode,