@aws-sdk/client-iotsitewise 3.118.1 → 3.128.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.
@@ -27,9 +27,9 @@ const serializeAws_restJson1AssociateAssetsCommand = async (input, context) => {
27
27
  }
28
28
  let body;
29
29
  body = JSON.stringify({
30
- ...(input.childAssetId !== undefined && input.childAssetId !== null && { childAssetId: input.childAssetId }),
30
+ ...(input.childAssetId != null && { childAssetId: input.childAssetId }),
31
31
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
32
- ...(input.hierarchyId !== undefined && input.hierarchyId !== null && { hierarchyId: input.hierarchyId }),
32
+ ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }),
33
33
  });
34
34
  let { hostname: resolvedHostname } = await context.endpoint();
35
35
  if (context.disableHostPrefix !== true) {
@@ -103,8 +103,7 @@ const serializeAws_restJson1BatchAssociateProjectAssetsCommand = async (input, c
103
103
  }
104
104
  let body;
105
105
  body = JSON.stringify({
106
- ...(input.assetIds !== undefined &&
107
- input.assetIds !== null && { assetIds: serializeAws_restJson1IDs(input.assetIds, context) }),
106
+ ...(input.assetIds != null && { assetIds: serializeAws_restJson1IDs(input.assetIds, context) }),
108
107
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
109
108
  });
110
109
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -144,8 +143,7 @@ const serializeAws_restJson1BatchDisassociateProjectAssetsCommand = async (input
144
143
  }
145
144
  let body;
146
145
  body = JSON.stringify({
147
- ...(input.assetIds !== undefined &&
148
- input.assetIds !== null && { assetIds: serializeAws_restJson1IDs(input.assetIds, context) }),
146
+ ...(input.assetIds != null && { assetIds: serializeAws_restJson1IDs(input.assetIds, context) }),
149
147
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
150
148
  });
151
149
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -174,12 +172,11 @@ const serializeAws_restJson1BatchGetAssetPropertyAggregatesCommand = async (inpu
174
172
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/aggregates";
175
173
  let body;
176
174
  body = JSON.stringify({
177
- ...(input.entries !== undefined &&
178
- input.entries !== null && {
175
+ ...(input.entries != null && {
179
176
  entries: serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries(input.entries, context),
180
177
  }),
181
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
182
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
178
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
179
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
183
180
  });
184
181
  let { hostname: resolvedHostname } = await context.endpoint();
185
182
  if (context.disableHostPrefix !== true) {
@@ -207,11 +204,10 @@ const serializeAws_restJson1BatchGetAssetPropertyValueCommand = async (input, co
207
204
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/latest";
208
205
  let body;
209
206
  body = JSON.stringify({
210
- ...(input.entries !== undefined &&
211
- input.entries !== null && {
207
+ ...(input.entries != null && {
212
208
  entries: serializeAws_restJson1BatchGetAssetPropertyValueEntries(input.entries, context),
213
209
  }),
214
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
210
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
215
211
  });
216
212
  let { hostname: resolvedHostname } = await context.endpoint();
217
213
  if (context.disableHostPrefix !== true) {
@@ -239,12 +235,11 @@ const serializeAws_restJson1BatchGetAssetPropertyValueHistoryCommand = async (in
239
235
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/history";
240
236
  let body;
241
237
  body = JSON.stringify({
242
- ...(input.entries !== undefined &&
243
- input.entries !== null && {
238
+ ...(input.entries != null && {
244
239
  entries: serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries(input.entries, context),
245
240
  }),
246
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
247
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
241
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
242
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
248
243
  });
249
244
  let { hostname: resolvedHostname } = await context.endpoint();
250
245
  if (context.disableHostPrefix !== true) {
@@ -272,8 +267,7 @@ const serializeAws_restJson1BatchPutAssetPropertyValueCommand = async (input, co
272
267
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/properties";
273
268
  let body;
274
269
  body = JSON.stringify({
275
- ...(input.entries !== undefined &&
276
- input.entries !== null && {
270
+ ...(input.entries != null && {
277
271
  entries: serializeAws_restJson1PutAssetPropertyValueEntries(input.entries, context),
278
272
  }),
279
273
  });
@@ -304,18 +298,15 @@ const serializeAws_restJson1CreateAccessPolicyCommand = async (input, context) =
304
298
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/access-policies";
305
299
  let body;
306
300
  body = JSON.stringify({
307
- ...(input.accessPolicyIdentity !== undefined &&
308
- input.accessPolicyIdentity !== null && {
301
+ ...(input.accessPolicyIdentity != null && {
309
302
  accessPolicyIdentity: serializeAws_restJson1Identity(input.accessPolicyIdentity, context),
310
303
  }),
311
- ...(input.accessPolicyPermission !== undefined &&
312
- input.accessPolicyPermission !== null && { accessPolicyPermission: input.accessPolicyPermission }),
313
- ...(input.accessPolicyResource !== undefined &&
314
- input.accessPolicyResource !== null && {
304
+ ...(input.accessPolicyPermission != null && { accessPolicyPermission: input.accessPolicyPermission }),
305
+ ...(input.accessPolicyResource != null && {
315
306
  accessPolicyResource: serializeAws_restJson1Resource(input.accessPolicyResource, context),
316
307
  }),
317
308
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
318
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
309
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
319
310
  });
320
311
  let { hostname: resolvedHostname } = await context.endpoint();
321
312
  if (context.disableHostPrefix !== true) {
@@ -344,12 +335,11 @@ const serializeAws_restJson1CreateAssetCommand = async (input, context) => {
344
335
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assets";
345
336
  let body;
346
337
  body = JSON.stringify({
347
- ...(input.assetDescription !== undefined &&
348
- input.assetDescription !== null && { assetDescription: input.assetDescription }),
349
- ...(input.assetModelId !== undefined && input.assetModelId !== null && { assetModelId: input.assetModelId }),
350
- ...(input.assetName !== undefined && input.assetName !== null && { assetName: input.assetName }),
338
+ ...(input.assetDescription != null && { assetDescription: input.assetDescription }),
339
+ ...(input.assetModelId != null && { assetModelId: input.assetModelId }),
340
+ ...(input.assetName != null && { assetName: input.assetName }),
351
341
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
352
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
342
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
353
343
  });
354
344
  let { hostname: resolvedHostname } = await context.endpoint();
355
345
  if (context.disableHostPrefix !== true) {
@@ -378,24 +368,19 @@ const serializeAws_restJson1CreateAssetModelCommand = async (input, context) =>
378
368
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/asset-models";
379
369
  let body;
380
370
  body = JSON.stringify({
381
- ...(input.assetModelCompositeModels !== undefined &&
382
- input.assetModelCompositeModels !== null && {
371
+ ...(input.assetModelCompositeModels != null && {
383
372
  assetModelCompositeModels: serializeAws_restJson1AssetModelCompositeModelDefinitions(input.assetModelCompositeModels, context),
384
373
  }),
385
- ...(input.assetModelDescription !== undefined &&
386
- input.assetModelDescription !== null && { assetModelDescription: input.assetModelDescription }),
387
- ...(input.assetModelHierarchies !== undefined &&
388
- input.assetModelHierarchies !== null && {
374
+ ...(input.assetModelDescription != null && { assetModelDescription: input.assetModelDescription }),
375
+ ...(input.assetModelHierarchies != null && {
389
376
  assetModelHierarchies: serializeAws_restJson1AssetModelHierarchyDefinitions(input.assetModelHierarchies, context),
390
377
  }),
391
- ...(input.assetModelName !== undefined &&
392
- input.assetModelName !== null && { assetModelName: input.assetModelName }),
393
- ...(input.assetModelProperties !== undefined &&
394
- input.assetModelProperties !== null && {
378
+ ...(input.assetModelName != null && { assetModelName: input.assetModelName }),
379
+ ...(input.assetModelProperties != null && {
395
380
  assetModelProperties: serializeAws_restJson1AssetModelPropertyDefinitions(input.assetModelProperties, context),
396
381
  }),
397
382
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
398
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
383
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
399
384
  });
400
385
  let { hostname: resolvedHostname } = await context.endpoint();
401
386
  if (context.disableHostPrefix !== true) {
@@ -425,13 +410,11 @@ const serializeAws_restJson1CreateDashboardCommand = async (input, context) => {
425
410
  let body;
426
411
  body = JSON.stringify({
427
412
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
428
- ...(input.dashboardDefinition !== undefined &&
429
- input.dashboardDefinition !== null && { dashboardDefinition: input.dashboardDefinition }),
430
- ...(input.dashboardDescription !== undefined &&
431
- input.dashboardDescription !== null && { dashboardDescription: input.dashboardDescription }),
432
- ...(input.dashboardName !== undefined && input.dashboardName !== null && { dashboardName: input.dashboardName }),
433
- ...(input.projectId !== undefined && input.projectId !== null && { projectId: input.projectId }),
434
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
413
+ ...(input.dashboardDefinition != null && { dashboardDefinition: input.dashboardDefinition }),
414
+ ...(input.dashboardDescription != null && { dashboardDescription: input.dashboardDescription }),
415
+ ...(input.dashboardName != null && { dashboardName: input.dashboardName }),
416
+ ...(input.projectId != null && { projectId: input.projectId }),
417
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
435
418
  });
436
419
  let { hostname: resolvedHostname } = await context.endpoint();
437
420
  if (context.disableHostPrefix !== true) {
@@ -459,12 +442,11 @@ const serializeAws_restJson1CreateGatewayCommand = async (input, context) => {
459
442
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/20200301/gateways";
460
443
  let body;
461
444
  body = JSON.stringify({
462
- ...(input.gatewayName !== undefined && input.gatewayName !== null && { gatewayName: input.gatewayName }),
463
- ...(input.gatewayPlatform !== undefined &&
464
- input.gatewayPlatform !== null && {
445
+ ...(input.gatewayName != null && { gatewayName: input.gatewayName }),
446
+ ...(input.gatewayPlatform != null && {
465
447
  gatewayPlatform: serializeAws_restJson1GatewayPlatform(input.gatewayPlatform, context),
466
448
  }),
467
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
449
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
468
450
  });
469
451
  let { hostname: resolvedHostname } = await context.endpoint();
470
452
  if (context.disableHostPrefix !== true) {
@@ -493,24 +475,18 @@ const serializeAws_restJson1CreatePortalCommand = async (input, context) => {
493
475
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/portals";
494
476
  let body;
495
477
  body = JSON.stringify({
496
- ...(input.alarms !== undefined &&
497
- input.alarms !== null && { alarms: serializeAws_restJson1Alarms(input.alarms, context) }),
478
+ ...(input.alarms != null && { alarms: serializeAws_restJson1Alarms(input.alarms, context) }),
498
479
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
499
- ...(input.notificationSenderEmail !== undefined &&
500
- input.notificationSenderEmail !== null && { notificationSenderEmail: input.notificationSenderEmail }),
501
- ...(input.portalAuthMode !== undefined &&
502
- input.portalAuthMode !== null && { portalAuthMode: input.portalAuthMode }),
503
- ...(input.portalContactEmail !== undefined &&
504
- input.portalContactEmail !== null && { portalContactEmail: input.portalContactEmail }),
505
- ...(input.portalDescription !== undefined &&
506
- input.portalDescription !== null && { portalDescription: input.portalDescription }),
507
- ...(input.portalLogoImageFile !== undefined &&
508
- input.portalLogoImageFile !== null && {
480
+ ...(input.notificationSenderEmail != null && { notificationSenderEmail: input.notificationSenderEmail }),
481
+ ...(input.portalAuthMode != null && { portalAuthMode: input.portalAuthMode }),
482
+ ...(input.portalContactEmail != null && { portalContactEmail: input.portalContactEmail }),
483
+ ...(input.portalDescription != null && { portalDescription: input.portalDescription }),
484
+ ...(input.portalLogoImageFile != null && {
509
485
  portalLogoImageFile: serializeAws_restJson1ImageFile(input.portalLogoImageFile, context),
510
486
  }),
511
- ...(input.portalName !== undefined && input.portalName !== null && { portalName: input.portalName }),
512
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
513
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
487
+ ...(input.portalName != null && { portalName: input.portalName }),
488
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
489
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
514
490
  });
515
491
  let { hostname: resolvedHostname } = await context.endpoint();
516
492
  if (context.disableHostPrefix !== true) {
@@ -540,11 +516,10 @@ const serializeAws_restJson1CreateProjectCommand = async (input, context) => {
540
516
  let body;
541
517
  body = JSON.stringify({
542
518
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
543
- ...(input.portalId !== undefined && input.portalId !== null && { portalId: input.portalId }),
544
- ...(input.projectDescription !== undefined &&
545
- input.projectDescription !== null && { projectDescription: input.projectDescription }),
546
- ...(input.projectName !== undefined && input.projectName !== null && { projectName: input.projectName }),
547
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
519
+ ...(input.portalId != null && { portalId: input.portalId }),
520
+ ...(input.projectDescription != null && { projectDescription: input.projectDescription }),
521
+ ...(input.projectName != null && { projectName: input.projectName }),
522
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
548
523
  });
549
524
  let { hostname: resolvedHostname } = await context.endpoint();
550
525
  if (context.disableHostPrefix !== true) {
@@ -1298,9 +1273,9 @@ const serializeAws_restJson1DisassociateAssetsCommand = async (input, context) =
1298
1273
  }
1299
1274
  let body;
1300
1275
  body = JSON.stringify({
1301
- ...(input.childAssetId !== undefined && input.childAssetId !== null && { childAssetId: input.childAssetId }),
1276
+ ...(input.childAssetId != null && { childAssetId: input.childAssetId }),
1302
1277
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1303
- ...(input.hierarchyId !== undefined && input.hierarchyId !== null && { hierarchyId: input.hierarchyId }),
1278
+ ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }),
1304
1279
  });
1305
1280
  let { hostname: resolvedHostname } = await context.endpoint();
1306
1281
  if (context.disableHostPrefix !== true) {
@@ -1889,9 +1864,8 @@ const serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = async (in
1889
1864
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/encryption";
1890
1865
  let body;
1891
1866
  body = JSON.stringify({
1892
- ...(input.encryptionType !== undefined &&
1893
- input.encryptionType !== null && { encryptionType: input.encryptionType }),
1894
- ...(input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId }),
1867
+ ...(input.encryptionType != null && { encryptionType: input.encryptionType }),
1868
+ ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
1895
1869
  });
1896
1870
  let { hostname: resolvedHostname } = await context.endpoint();
1897
1871
  if (context.disableHostPrefix !== true) {
@@ -1919,8 +1893,7 @@ const serializeAws_restJson1PutLoggingOptionsCommand = async (input, context) =>
1919
1893
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logging";
1920
1894
  let body;
1921
1895
  body = JSON.stringify({
1922
- ...(input.loggingOptions !== undefined &&
1923
- input.loggingOptions !== null && {
1896
+ ...(input.loggingOptions != null && {
1924
1897
  loggingOptions: serializeAws_restJson1LoggingOptions(input.loggingOptions, context),
1925
1898
  }),
1926
1899
  });
@@ -1950,17 +1923,14 @@ const serializeAws_restJson1PutStorageConfigurationCommand = async (input, conte
1950
1923
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/storage";
1951
1924
  let body;
1952
1925
  body = JSON.stringify({
1953
- ...(input.disassociatedDataStorage !== undefined &&
1954
- input.disassociatedDataStorage !== null && { disassociatedDataStorage: input.disassociatedDataStorage }),
1955
- ...(input.multiLayerStorage !== undefined &&
1956
- input.multiLayerStorage !== null && {
1926
+ ...(input.disassociatedDataStorage != null && { disassociatedDataStorage: input.disassociatedDataStorage }),
1927
+ ...(input.multiLayerStorage != null && {
1957
1928
  multiLayerStorage: serializeAws_restJson1MultiLayerStorage(input.multiLayerStorage, context),
1958
1929
  }),
1959
- ...(input.retentionPeriod !== undefined &&
1960
- input.retentionPeriod !== null && {
1930
+ ...(input.retentionPeriod != null && {
1961
1931
  retentionPeriod: serializeAws_restJson1RetentionPeriod(input.retentionPeriod, context),
1962
1932
  }),
1963
- ...(input.storageType !== undefined && input.storageType !== null && { storageType: input.storageType }),
1933
+ ...(input.storageType != null && { storageType: input.storageType }),
1964
1934
  });
1965
1935
  let { hostname: resolvedHostname } = await context.endpoint();
1966
1936
  if (context.disableHostPrefix !== true) {
@@ -1991,7 +1961,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1991
1961
  };
1992
1962
  let body;
1993
1963
  body = JSON.stringify({
1994
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
1964
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
1995
1965
  });
1996
1966
  let { hostname: resolvedHostname } = await context.endpoint();
1997
1967
  if (context.disableHostPrefix !== true) {
@@ -2059,14 +2029,11 @@ const serializeAws_restJson1UpdateAccessPolicyCommand = async (input, context) =
2059
2029
  }
2060
2030
  let body;
2061
2031
  body = JSON.stringify({
2062
- ...(input.accessPolicyIdentity !== undefined &&
2063
- input.accessPolicyIdentity !== null && {
2032
+ ...(input.accessPolicyIdentity != null && {
2064
2033
  accessPolicyIdentity: serializeAws_restJson1Identity(input.accessPolicyIdentity, context),
2065
2034
  }),
2066
- ...(input.accessPolicyPermission !== undefined &&
2067
- input.accessPolicyPermission !== null && { accessPolicyPermission: input.accessPolicyPermission }),
2068
- ...(input.accessPolicyResource !== undefined &&
2069
- input.accessPolicyResource !== null && {
2035
+ ...(input.accessPolicyPermission != null && { accessPolicyPermission: input.accessPolicyPermission }),
2036
+ ...(input.accessPolicyResource != null && {
2070
2037
  accessPolicyResource: serializeAws_restJson1Resource(input.accessPolicyResource, context),
2071
2038
  }),
2072
2039
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
@@ -2108,9 +2075,8 @@ const serializeAws_restJson1UpdateAssetCommand = async (input, context) => {
2108
2075
  }
2109
2076
  let body;
2110
2077
  body = JSON.stringify({
2111
- ...(input.assetDescription !== undefined &&
2112
- input.assetDescription !== null && { assetDescription: input.assetDescription }),
2113
- ...(input.assetName !== undefined && input.assetName !== null && { assetName: input.assetName }),
2078
+ ...(input.assetDescription != null && { assetDescription: input.assetDescription }),
2079
+ ...(input.assetName != null && { assetName: input.assetName }),
2114
2080
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2115
2081
  });
2116
2082
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2150,20 +2116,15 @@ const serializeAws_restJson1UpdateAssetModelCommand = async (input, context) =>
2150
2116
  }
2151
2117
  let body;
2152
2118
  body = JSON.stringify({
2153
- ...(input.assetModelCompositeModels !== undefined &&
2154
- input.assetModelCompositeModels !== null && {
2119
+ ...(input.assetModelCompositeModels != null && {
2155
2120
  assetModelCompositeModels: serializeAws_restJson1AssetModelCompositeModels(input.assetModelCompositeModels, context),
2156
2121
  }),
2157
- ...(input.assetModelDescription !== undefined &&
2158
- input.assetModelDescription !== null && { assetModelDescription: input.assetModelDescription }),
2159
- ...(input.assetModelHierarchies !== undefined &&
2160
- input.assetModelHierarchies !== null && {
2122
+ ...(input.assetModelDescription != null && { assetModelDescription: input.assetModelDescription }),
2123
+ ...(input.assetModelHierarchies != null && {
2161
2124
  assetModelHierarchies: serializeAws_restJson1AssetModelHierarchies(input.assetModelHierarchies, context),
2162
2125
  }),
2163
- ...(input.assetModelName !== undefined &&
2164
- input.assetModelName !== null && { assetModelName: input.assetModelName }),
2165
- ...(input.assetModelProperties !== undefined &&
2166
- input.assetModelProperties !== null && {
2126
+ ...(input.assetModelName != null && { assetModelName: input.assetModelName }),
2127
+ ...(input.assetModelProperties != null && {
2167
2128
  assetModelProperties: serializeAws_restJson1AssetModelProperties(input.assetModelProperties, context),
2168
2129
  }),
2169
2130
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
@@ -2216,9 +2177,8 @@ const serializeAws_restJson1UpdateAssetPropertyCommand = async (input, context)
2216
2177
  let body;
2217
2178
  body = JSON.stringify({
2218
2179
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2219
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
2220
- ...(input.propertyNotificationState !== undefined &&
2221
- input.propertyNotificationState !== null && { propertyNotificationState: input.propertyNotificationState }),
2180
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
2181
+ ...(input.propertyNotificationState != null && { propertyNotificationState: input.propertyNotificationState }),
2222
2182
  });
2223
2183
  let { hostname: resolvedHostname } = await context.endpoint();
2224
2184
  if (context.disableHostPrefix !== true) {
@@ -2258,11 +2218,9 @@ const serializeAws_restJson1UpdateDashboardCommand = async (input, context) => {
2258
2218
  let body;
2259
2219
  body = JSON.stringify({
2260
2220
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2261
- ...(input.dashboardDefinition !== undefined &&
2262
- input.dashboardDefinition !== null && { dashboardDefinition: input.dashboardDefinition }),
2263
- ...(input.dashboardDescription !== undefined &&
2264
- input.dashboardDescription !== null && { dashboardDescription: input.dashboardDescription }),
2265
- ...(input.dashboardName !== undefined && input.dashboardName !== null && { dashboardName: input.dashboardName }),
2221
+ ...(input.dashboardDefinition != null && { dashboardDefinition: input.dashboardDefinition }),
2222
+ ...(input.dashboardDescription != null && { dashboardDescription: input.dashboardDescription }),
2223
+ ...(input.dashboardName != null && { dashboardName: input.dashboardName }),
2266
2224
  });
2267
2225
  let { hostname: resolvedHostname } = await context.endpoint();
2268
2226
  if (context.disableHostPrefix !== true) {
@@ -2300,7 +2258,7 @@ const serializeAws_restJson1UpdateGatewayCommand = async (input, context) => {
2300
2258
  }
2301
2259
  let body;
2302
2260
  body = JSON.stringify({
2303
- ...(input.gatewayName !== undefined && input.gatewayName !== null && { gatewayName: input.gatewayName }),
2261
+ ...(input.gatewayName != null && { gatewayName: input.gatewayName }),
2304
2262
  });
2305
2263
  let { hostname: resolvedHostname } = await context.endpoint();
2306
2264
  if (context.disableHostPrefix !== true) {
@@ -2338,10 +2296,8 @@ const serializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = async
2338
2296
  }
2339
2297
  let body;
2340
2298
  body = JSON.stringify({
2341
- ...(input.capabilityConfiguration !== undefined &&
2342
- input.capabilityConfiguration !== null && { capabilityConfiguration: input.capabilityConfiguration }),
2343
- ...(input.capabilityNamespace !== undefined &&
2344
- input.capabilityNamespace !== null && { capabilityNamespace: input.capabilityNamespace }),
2299
+ ...(input.capabilityConfiguration != null && { capabilityConfiguration: input.capabilityConfiguration }),
2300
+ ...(input.capabilityNamespace != null && { capabilityNamespace: input.capabilityNamespace }),
2345
2301
  });
2346
2302
  let { hostname: resolvedHostname } = await context.endpoint();
2347
2303
  if (context.disableHostPrefix !== true) {
@@ -2380,21 +2336,16 @@ const serializeAws_restJson1UpdatePortalCommand = async (input, context) => {
2380
2336
  }
2381
2337
  let body;
2382
2338
  body = JSON.stringify({
2383
- ...(input.alarms !== undefined &&
2384
- input.alarms !== null && { alarms: serializeAws_restJson1Alarms(input.alarms, context) }),
2339
+ ...(input.alarms != null && { alarms: serializeAws_restJson1Alarms(input.alarms, context) }),
2385
2340
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2386
- ...(input.notificationSenderEmail !== undefined &&
2387
- input.notificationSenderEmail !== null && { notificationSenderEmail: input.notificationSenderEmail }),
2388
- ...(input.portalContactEmail !== undefined &&
2389
- input.portalContactEmail !== null && { portalContactEmail: input.portalContactEmail }),
2390
- ...(input.portalDescription !== undefined &&
2391
- input.portalDescription !== null && { portalDescription: input.portalDescription }),
2392
- ...(input.portalLogoImage !== undefined &&
2393
- input.portalLogoImage !== null && {
2341
+ ...(input.notificationSenderEmail != null && { notificationSenderEmail: input.notificationSenderEmail }),
2342
+ ...(input.portalContactEmail != null && { portalContactEmail: input.portalContactEmail }),
2343
+ ...(input.portalDescription != null && { portalDescription: input.portalDescription }),
2344
+ ...(input.portalLogoImage != null && {
2394
2345
  portalLogoImage: serializeAws_restJson1Image(input.portalLogoImage, context),
2395
2346
  }),
2396
- ...(input.portalName !== undefined && input.portalName !== null && { portalName: input.portalName }),
2397
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
2347
+ ...(input.portalName != null && { portalName: input.portalName }),
2348
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
2398
2349
  });
2399
2350
  let { hostname: resolvedHostname } = await context.endpoint();
2400
2351
  if (context.disableHostPrefix !== true) {
@@ -2434,9 +2385,8 @@ const serializeAws_restJson1UpdateProjectCommand = async (input, context) => {
2434
2385
  let body;
2435
2386
  body = JSON.stringify({
2436
2387
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2437
- ...(input.projectDescription !== undefined &&
2438
- input.projectDescription !== null && { projectDescription: input.projectDescription }),
2439
- ...(input.projectName !== undefined && input.projectName !== null && { projectName: input.projectName }),
2388
+ ...(input.projectDescription != null && { projectDescription: input.projectDescription }),
2389
+ ...(input.projectName != null && { projectName: input.projectName }),
2440
2390
  });
2441
2391
  let { hostname: resolvedHostname } = await context.endpoint();
2442
2392
  if (context.disableHostPrefix !== true) {
@@ -2473,8 +2423,7 @@ const deserializeAws_restJson1AssociateAssetsCommandError = async (output, conte
2473
2423
  body: await parseBody(output.body, context),
2474
2424
  };
2475
2425
  let response;
2476
- let errorCode = "UnknownError";
2477
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2426
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2478
2427
  switch (errorCode) {
2479
2428
  case "ConflictingOperationException":
2480
2429
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -2496,10 +2445,12 @@ const deserializeAws_restJson1AssociateAssetsCommandError = async (output, conte
2496
2445
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2497
2446
  default:
2498
2447
  const parsedBody = parsedOutput.body;
2448
+ const $metadata = deserializeMetadata(output);
2449
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2499
2450
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2500
- name: parsedBody.code || parsedBody.Code || errorCode,
2451
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2501
2452
  $fault: "client",
2502
- $metadata: deserializeMetadata(output),
2453
+ $metadata,
2503
2454
  });
2504
2455
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2505
2456
  }
@@ -2521,8 +2472,7 @@ const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = a
2521
2472
  body: await parseBody(output.body, context),
2522
2473
  };
2523
2474
  let response;
2524
- let errorCode = "UnknownError";
2525
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2475
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2526
2476
  switch (errorCode) {
2527
2477
  case "ConflictingOperationException":
2528
2478
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -2541,10 +2491,12 @@ const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = a
2541
2491
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2542
2492
  default:
2543
2493
  const parsedBody = parsedOutput.body;
2494
+ const $metadata = deserializeMetadata(output);
2495
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2544
2496
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2545
- name: parsedBody.code || parsedBody.Code || errorCode,
2497
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2546
2498
  $fault: "client",
2547
- $metadata: deserializeMetadata(output),
2499
+ $metadata,
2548
2500
  });
2549
2501
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2550
2502
  }
@@ -2570,8 +2522,7 @@ const deserializeAws_restJson1BatchAssociateProjectAssetsCommandError = async (o
2570
2522
  body: await parseBody(output.body, context),
2571
2523
  };
2572
2524
  let response;
2573
- let errorCode = "UnknownError";
2574
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2525
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2575
2526
  switch (errorCode) {
2576
2527
  case "InternalFailureException":
2577
2528
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2590,10 +2541,12 @@ const deserializeAws_restJson1BatchAssociateProjectAssetsCommandError = async (o
2590
2541
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2591
2542
  default:
2592
2543
  const parsedBody = parsedOutput.body;
2544
+ const $metadata = deserializeMetadata(output);
2545
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2593
2546
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2594
- name: parsedBody.code || parsedBody.Code || errorCode,
2547
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2595
2548
  $fault: "client",
2596
- $metadata: deserializeMetadata(output),
2549
+ $metadata,
2597
2550
  });
2598
2551
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2599
2552
  }
@@ -2619,8 +2572,7 @@ const deserializeAws_restJson1BatchDisassociateProjectAssetsCommandError = async
2619
2572
  body: await parseBody(output.body, context),
2620
2573
  };
2621
2574
  let response;
2622
- let errorCode = "UnknownError";
2623
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2575
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2624
2576
  switch (errorCode) {
2625
2577
  case "InternalFailureException":
2626
2578
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2636,10 +2588,12 @@ const deserializeAws_restJson1BatchDisassociateProjectAssetsCommandError = async
2636
2588
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2637
2589
  default:
2638
2590
  const parsedBody = parsedOutput.body;
2591
+ const $metadata = deserializeMetadata(output);
2592
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2639
2593
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2640
- name: parsedBody.code || parsedBody.Code || errorCode,
2594
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2641
2595
  $fault: "client",
2642
- $metadata: deserializeMetadata(output),
2596
+ $metadata,
2643
2597
  });
2644
2598
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2645
2599
  }
@@ -2677,8 +2631,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommandError = asyn
2677
2631
  body: await parseBody(output.body, context),
2678
2632
  };
2679
2633
  let response;
2680
- let errorCode = "UnknownError";
2681
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2634
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2682
2635
  switch (errorCode) {
2683
2636
  case "InternalFailureException":
2684
2637
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2694,10 +2647,12 @@ const deserializeAws_restJson1BatchGetAssetPropertyAggregatesCommandError = asyn
2694
2647
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2695
2648
  default:
2696
2649
  const parsedBody = parsedOutput.body;
2650
+ const $metadata = deserializeMetadata(output);
2651
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2697
2652
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2698
- name: parsedBody.code || parsedBody.Code || errorCode,
2653
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2699
2654
  $fault: "client",
2700
- $metadata: deserializeMetadata(output),
2655
+ $metadata,
2701
2656
  });
2702
2657
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2703
2658
  }
@@ -2735,8 +2690,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueCommandError = async (ou
2735
2690
  body: await parseBody(output.body, context),
2736
2691
  };
2737
2692
  let response;
2738
- let errorCode = "UnknownError";
2739
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2693
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2740
2694
  switch (errorCode) {
2741
2695
  case "InternalFailureException":
2742
2696
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2752,10 +2706,12 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueCommandError = async (ou
2752
2706
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2753
2707
  default:
2754
2708
  const parsedBody = parsedOutput.body;
2709
+ const $metadata = deserializeMetadata(output);
2710
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2755
2711
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2756
- name: parsedBody.code || parsedBody.Code || errorCode,
2712
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2757
2713
  $fault: "client",
2758
- $metadata: deserializeMetadata(output),
2714
+ $metadata,
2759
2715
  });
2760
2716
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2761
2717
  }
@@ -2793,8 +2749,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueHistoryCommandError = as
2793
2749
  body: await parseBody(output.body, context),
2794
2750
  };
2795
2751
  let response;
2796
- let errorCode = "UnknownError";
2797
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2752
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2798
2753
  switch (errorCode) {
2799
2754
  case "InternalFailureException":
2800
2755
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2810,10 +2765,12 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueHistoryCommandError = as
2810
2765
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2811
2766
  default:
2812
2767
  const parsedBody = parsedOutput.body;
2768
+ const $metadata = deserializeMetadata(output);
2769
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2813
2770
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2814
- name: parsedBody.code || parsedBody.Code || errorCode,
2771
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2815
2772
  $fault: "client",
2816
- $metadata: deserializeMetadata(output),
2773
+ $metadata,
2817
2774
  });
2818
2775
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2819
2776
  }
@@ -2839,8 +2796,7 @@ const deserializeAws_restJson1BatchPutAssetPropertyValueCommandError = async (ou
2839
2796
  body: await parseBody(output.body, context),
2840
2797
  };
2841
2798
  let response;
2842
- let errorCode = "UnknownError";
2843
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2799
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2844
2800
  switch (errorCode) {
2845
2801
  case "ConflictingOperationException":
2846
2802
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -2865,10 +2821,12 @@ const deserializeAws_restJson1BatchPutAssetPropertyValueCommandError = async (ou
2865
2821
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2866
2822
  default:
2867
2823
  const parsedBody = parsedOutput.body;
2824
+ const $metadata = deserializeMetadata(output);
2825
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2868
2826
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2869
- name: parsedBody.code || parsedBody.Code || errorCode,
2827
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2870
2828
  $fault: "client",
2871
- $metadata: deserializeMetadata(output),
2829
+ $metadata,
2872
2830
  });
2873
2831
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2874
2832
  }
@@ -2898,8 +2856,7 @@ const deserializeAws_restJson1CreateAccessPolicyCommandError = async (output, co
2898
2856
  body: await parseBody(output.body, context),
2899
2857
  };
2900
2858
  let response;
2901
- let errorCode = "UnknownError";
2902
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2859
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2903
2860
  switch (errorCode) {
2904
2861
  case "InternalFailureException":
2905
2862
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -2918,10 +2875,12 @@ const deserializeAws_restJson1CreateAccessPolicyCommandError = async (output, co
2918
2875
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2919
2876
  default:
2920
2877
  const parsedBody = parsedOutput.body;
2878
+ const $metadata = deserializeMetadata(output);
2879
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2921
2880
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2922
- name: parsedBody.code || parsedBody.Code || errorCode,
2881
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2923
2882
  $fault: "client",
2924
- $metadata: deserializeMetadata(output),
2883
+ $metadata,
2925
2884
  });
2926
2885
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2927
2886
  }
@@ -2955,8 +2914,7 @@ const deserializeAws_restJson1CreateAssetCommandError = async (output, context)
2955
2914
  body: await parseBody(output.body, context),
2956
2915
  };
2957
2916
  let response;
2958
- let errorCode = "UnknownError";
2959
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2917
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2960
2918
  switch (errorCode) {
2961
2919
  case "ConflictingOperationException":
2962
2920
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -2981,10 +2939,12 @@ const deserializeAws_restJson1CreateAssetCommandError = async (output, context)
2981
2939
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2982
2940
  default:
2983
2941
  const parsedBody = parsedOutput.body;
2942
+ const $metadata = deserializeMetadata(output);
2943
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2984
2944
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
2985
- name: parsedBody.code || parsedBody.Code || errorCode,
2945
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2986
2946
  $fault: "client",
2987
- $metadata: deserializeMetadata(output),
2947
+ $metadata,
2988
2948
  });
2989
2949
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2990
2950
  }
@@ -3018,8 +2978,7 @@ const deserializeAws_restJson1CreateAssetModelCommandError = async (output, cont
3018
2978
  body: await parseBody(output.body, context),
3019
2979
  };
3020
2980
  let response;
3021
- let errorCode = "UnknownError";
3022
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2981
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3023
2982
  switch (errorCode) {
3024
2983
  case "ConflictingOperationException":
3025
2984
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -3044,10 +3003,12 @@ const deserializeAws_restJson1CreateAssetModelCommandError = async (output, cont
3044
3003
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3045
3004
  default:
3046
3005
  const parsedBody = parsedOutput.body;
3006
+ const $metadata = deserializeMetadata(output);
3007
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3047
3008
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3048
- name: parsedBody.code || parsedBody.Code || errorCode,
3009
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3049
3010
  $fault: "client",
3050
- $metadata: deserializeMetadata(output),
3011
+ $metadata,
3051
3012
  });
3052
3013
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3053
3014
  }
@@ -3077,8 +3038,7 @@ const deserializeAws_restJson1CreateDashboardCommandError = async (output, conte
3077
3038
  body: await parseBody(output.body, context),
3078
3039
  };
3079
3040
  let response;
3080
- let errorCode = "UnknownError";
3081
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3041
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3082
3042
  switch (errorCode) {
3083
3043
  case "InternalFailureException":
3084
3044
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3097,10 +3057,12 @@ const deserializeAws_restJson1CreateDashboardCommandError = async (output, conte
3097
3057
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3098
3058
  default:
3099
3059
  const parsedBody = parsedOutput.body;
3060
+ const $metadata = deserializeMetadata(output);
3061
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3100
3062
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3101
- name: parsedBody.code || parsedBody.Code || errorCode,
3063
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3102
3064
  $fault: "client",
3103
- $metadata: deserializeMetadata(output),
3065
+ $metadata,
3104
3066
  });
3105
3067
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3106
3068
  }
@@ -3130,8 +3092,7 @@ const deserializeAws_restJson1CreateGatewayCommandError = async (output, context
3130
3092
  body: await parseBody(output.body, context),
3131
3093
  };
3132
3094
  let response;
3133
- let errorCode = "UnknownError";
3134
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3095
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3135
3096
  switch (errorCode) {
3136
3097
  case "InternalFailureException":
3137
3098
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3150,10 +3111,12 @@ const deserializeAws_restJson1CreateGatewayCommandError = async (output, context
3150
3111
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3151
3112
  default:
3152
3113
  const parsedBody = parsedOutput.body;
3114
+ const $metadata = deserializeMetadata(output);
3115
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3153
3116
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3154
- name: parsedBody.code || parsedBody.Code || errorCode,
3117
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3155
3118
  $fault: "client",
3156
- $metadata: deserializeMetadata(output),
3119
+ $metadata,
3157
3120
  });
3158
3121
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3159
3122
  }
@@ -3195,8 +3158,7 @@ const deserializeAws_restJson1CreatePortalCommandError = async (output, context)
3195
3158
  body: await parseBody(output.body, context),
3196
3159
  };
3197
3160
  let response;
3198
- let errorCode = "UnknownError";
3199
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3161
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3200
3162
  switch (errorCode) {
3201
3163
  case "InternalFailureException":
3202
3164
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3215,10 +3177,12 @@ const deserializeAws_restJson1CreatePortalCommandError = async (output, context)
3215
3177
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3216
3178
  default:
3217
3179
  const parsedBody = parsedOutput.body;
3180
+ const $metadata = deserializeMetadata(output);
3181
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3218
3182
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3219
- name: parsedBody.code || parsedBody.Code || errorCode,
3183
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3220
3184
  $fault: "client",
3221
- $metadata: deserializeMetadata(output),
3185
+ $metadata,
3222
3186
  });
3223
3187
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3224
3188
  }
@@ -3248,8 +3212,7 @@ const deserializeAws_restJson1CreateProjectCommandError = async (output, context
3248
3212
  body: await parseBody(output.body, context),
3249
3213
  };
3250
3214
  let response;
3251
- let errorCode = "UnknownError";
3252
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3215
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3253
3216
  switch (errorCode) {
3254
3217
  case "InternalFailureException":
3255
3218
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3268,10 +3231,12 @@ const deserializeAws_restJson1CreateProjectCommandError = async (output, context
3268
3231
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3269
3232
  default:
3270
3233
  const parsedBody = parsedOutput.body;
3234
+ const $metadata = deserializeMetadata(output);
3235
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3271
3236
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3272
- name: parsedBody.code || parsedBody.Code || errorCode,
3237
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3273
3238
  $fault: "client",
3274
- $metadata: deserializeMetadata(output),
3239
+ $metadata,
3275
3240
  });
3276
3241
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3277
3242
  }
@@ -3293,8 +3258,7 @@ const deserializeAws_restJson1DeleteAccessPolicyCommandError = async (output, co
3293
3258
  body: await parseBody(output.body, context),
3294
3259
  };
3295
3260
  let response;
3296
- let errorCode = "UnknownError";
3297
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3261
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3298
3262
  switch (errorCode) {
3299
3263
  case "InternalFailureException":
3300
3264
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3310,10 +3274,12 @@ const deserializeAws_restJson1DeleteAccessPolicyCommandError = async (output, co
3310
3274
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3311
3275
  default:
3312
3276
  const parsedBody = parsedOutput.body;
3277
+ const $metadata = deserializeMetadata(output);
3278
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3313
3279
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3314
- name: parsedBody.code || parsedBody.Code || errorCode,
3280
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3315
3281
  $fault: "client",
3316
- $metadata: deserializeMetadata(output),
3282
+ $metadata,
3317
3283
  });
3318
3284
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3319
3285
  }
@@ -3339,8 +3305,7 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
3339
3305
  body: await parseBody(output.body, context),
3340
3306
  };
3341
3307
  let response;
3342
- let errorCode = "UnknownError";
3343
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3308
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3344
3309
  switch (errorCode) {
3345
3310
  case "ConflictingOperationException":
3346
3311
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -3359,10 +3324,12 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
3359
3324
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3360
3325
  default:
3361
3326
  const parsedBody = parsedOutput.body;
3327
+ const $metadata = deserializeMetadata(output);
3328
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3362
3329
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3363
- name: parsedBody.code || parsedBody.Code || errorCode,
3330
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3364
3331
  $fault: "client",
3365
- $metadata: deserializeMetadata(output),
3332
+ $metadata,
3366
3333
  });
3367
3334
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3368
3335
  }
@@ -3388,8 +3355,7 @@ const deserializeAws_restJson1DeleteAssetModelCommandError = async (output, cont
3388
3355
  body: await parseBody(output.body, context),
3389
3356
  };
3390
3357
  let response;
3391
- let errorCode = "UnknownError";
3392
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3358
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3393
3359
  switch (errorCode) {
3394
3360
  case "ConflictingOperationException":
3395
3361
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -3408,10 +3374,12 @@ const deserializeAws_restJson1DeleteAssetModelCommandError = async (output, cont
3408
3374
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3409
3375
  default:
3410
3376
  const parsedBody = parsedOutput.body;
3377
+ const $metadata = deserializeMetadata(output);
3378
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3411
3379
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3412
- name: parsedBody.code || parsedBody.Code || errorCode,
3380
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3413
3381
  $fault: "client",
3414
- $metadata: deserializeMetadata(output),
3382
+ $metadata,
3415
3383
  });
3416
3384
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3417
3385
  }
@@ -3433,8 +3401,7 @@ const deserializeAws_restJson1DeleteDashboardCommandError = async (output, conte
3433
3401
  body: await parseBody(output.body, context),
3434
3402
  };
3435
3403
  let response;
3436
- let errorCode = "UnknownError";
3437
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3404
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3438
3405
  switch (errorCode) {
3439
3406
  case "InternalFailureException":
3440
3407
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3450,10 +3417,12 @@ const deserializeAws_restJson1DeleteDashboardCommandError = async (output, conte
3450
3417
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3451
3418
  default:
3452
3419
  const parsedBody = parsedOutput.body;
3420
+ const $metadata = deserializeMetadata(output);
3421
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3453
3422
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3454
- name: parsedBody.code || parsedBody.Code || errorCode,
3423
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3455
3424
  $fault: "client",
3456
- $metadata: deserializeMetadata(output),
3425
+ $metadata,
3457
3426
  });
3458
3427
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3459
3428
  }
@@ -3475,8 +3444,7 @@ const deserializeAws_restJson1DeleteGatewayCommandError = async (output, context
3475
3444
  body: await parseBody(output.body, context),
3476
3445
  };
3477
3446
  let response;
3478
- let errorCode = "UnknownError";
3479
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3447
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3480
3448
  switch (errorCode) {
3481
3449
  case "InternalFailureException":
3482
3450
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3492,10 +3460,12 @@ const deserializeAws_restJson1DeleteGatewayCommandError = async (output, context
3492
3460
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3493
3461
  default:
3494
3462
  const parsedBody = parsedOutput.body;
3463
+ const $metadata = deserializeMetadata(output);
3464
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3495
3465
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3496
- name: parsedBody.code || parsedBody.Code || errorCode,
3466
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3497
3467
  $fault: "client",
3498
- $metadata: deserializeMetadata(output),
3468
+ $metadata,
3499
3469
  });
3500
3470
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3501
3471
  }
@@ -3521,8 +3491,7 @@ const deserializeAws_restJson1DeletePortalCommandError = async (output, context)
3521
3491
  body: await parseBody(output.body, context),
3522
3492
  };
3523
3493
  let response;
3524
- let errorCode = "UnknownError";
3525
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3494
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3526
3495
  switch (errorCode) {
3527
3496
  case "ConflictingOperationException":
3528
3497
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -3541,10 +3510,12 @@ const deserializeAws_restJson1DeletePortalCommandError = async (output, context)
3541
3510
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3542
3511
  default:
3543
3512
  const parsedBody = parsedOutput.body;
3513
+ const $metadata = deserializeMetadata(output);
3514
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3544
3515
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3545
- name: parsedBody.code || parsedBody.Code || errorCode,
3516
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3546
3517
  $fault: "client",
3547
- $metadata: deserializeMetadata(output),
3518
+ $metadata,
3548
3519
  });
3549
3520
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3550
3521
  }
@@ -3566,8 +3537,7 @@ const deserializeAws_restJson1DeleteProjectCommandError = async (output, context
3566
3537
  body: await parseBody(output.body, context),
3567
3538
  };
3568
3539
  let response;
3569
- let errorCode = "UnknownError";
3570
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3540
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3571
3541
  switch (errorCode) {
3572
3542
  case "InternalFailureException":
3573
3543
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3583,10 +3553,12 @@ const deserializeAws_restJson1DeleteProjectCommandError = async (output, context
3583
3553
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3584
3554
  default:
3585
3555
  const parsedBody = parsedOutput.body;
3556
+ const $metadata = deserializeMetadata(output);
3557
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3586
3558
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3587
- name: parsedBody.code || parsedBody.Code || errorCode,
3559
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3588
3560
  $fault: "client",
3589
- $metadata: deserializeMetadata(output),
3561
+ $metadata,
3590
3562
  });
3591
3563
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3592
3564
  }
@@ -3608,8 +3580,7 @@ const deserializeAws_restJson1DeleteTimeSeriesCommandError = async (output, cont
3608
3580
  body: await parseBody(output.body, context),
3609
3581
  };
3610
3582
  let response;
3611
- let errorCode = "UnknownError";
3612
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3583
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3613
3584
  switch (errorCode) {
3614
3585
  case "ConflictingOperationException":
3615
3586
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -3628,10 +3599,12 @@ const deserializeAws_restJson1DeleteTimeSeriesCommandError = async (output, cont
3628
3599
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3629
3600
  default:
3630
3601
  const parsedBody = parsedOutput.body;
3602
+ const $metadata = deserializeMetadata(output);
3603
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3631
3604
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3632
- name: parsedBody.code || parsedBody.Code || errorCode,
3605
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3633
3606
  $fault: "client",
3634
- $metadata: deserializeMetadata(output),
3607
+ $metadata,
3635
3608
  });
3636
3609
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3637
3610
  }
@@ -3681,8 +3654,7 @@ const deserializeAws_restJson1DescribeAccessPolicyCommandError = async (output,
3681
3654
  body: await parseBody(output.body, context),
3682
3655
  };
3683
3656
  let response;
3684
- let errorCode = "UnknownError";
3685
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3657
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3686
3658
  switch (errorCode) {
3687
3659
  case "InternalFailureException":
3688
3660
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3698,10 +3670,12 @@ const deserializeAws_restJson1DescribeAccessPolicyCommandError = async (output,
3698
3670
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3699
3671
  default:
3700
3672
  const parsedBody = parsedOutput.body;
3673
+ const $metadata = deserializeMetadata(output);
3674
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3701
3675
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3702
- name: parsedBody.code || parsedBody.Code || errorCode,
3676
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3703
3677
  $fault: "client",
3704
- $metadata: deserializeMetadata(output),
3678
+ $metadata,
3705
3679
  });
3706
3680
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3707
3681
  }
@@ -3767,8 +3741,7 @@ const deserializeAws_restJson1DescribeAssetCommandError = async (output, context
3767
3741
  body: await parseBody(output.body, context),
3768
3742
  };
3769
3743
  let response;
3770
- let errorCode = "UnknownError";
3771
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3744
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3772
3745
  switch (errorCode) {
3773
3746
  case "InternalFailureException":
3774
3747
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3784,10 +3757,12 @@ const deserializeAws_restJson1DescribeAssetCommandError = async (output, context
3784
3757
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3785
3758
  default:
3786
3759
  const parsedBody = parsedOutput.body;
3760
+ const $metadata = deserializeMetadata(output);
3761
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3787
3762
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3788
- name: parsedBody.code || parsedBody.Code || errorCode,
3763
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3789
3764
  $fault: "client",
3790
- $metadata: deserializeMetadata(output),
3765
+ $metadata,
3791
3766
  });
3792
3767
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3793
3768
  }
@@ -3849,8 +3824,7 @@ const deserializeAws_restJson1DescribeAssetModelCommandError = async (output, co
3849
3824
  body: await parseBody(output.body, context),
3850
3825
  };
3851
3826
  let response;
3852
- let errorCode = "UnknownError";
3853
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3827
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3854
3828
  switch (errorCode) {
3855
3829
  case "InternalFailureException":
3856
3830
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3866,10 +3840,12 @@ const deserializeAws_restJson1DescribeAssetModelCommandError = async (output, co
3866
3840
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3867
3841
  default:
3868
3842
  const parsedBody = parsedOutput.body;
3843
+ const $metadata = deserializeMetadata(output);
3844
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3869
3845
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3870
- name: parsedBody.code || parsedBody.Code || errorCode,
3846
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3871
3847
  $fault: "client",
3872
- $metadata: deserializeMetadata(output),
3848
+ $metadata,
3873
3849
  });
3874
3850
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3875
3851
  }
@@ -3911,8 +3887,7 @@ const deserializeAws_restJson1DescribeAssetPropertyCommandError = async (output,
3911
3887
  body: await parseBody(output.body, context),
3912
3888
  };
3913
3889
  let response;
3914
- let errorCode = "UnknownError";
3915
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3890
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3916
3891
  switch (errorCode) {
3917
3892
  case "InternalFailureException":
3918
3893
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -3928,10 +3903,12 @@ const deserializeAws_restJson1DescribeAssetPropertyCommandError = async (output,
3928
3903
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3929
3904
  default:
3930
3905
  const parsedBody = parsedOutput.body;
3906
+ const $metadata = deserializeMetadata(output);
3907
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3931
3908
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
3932
- name: parsedBody.code || parsedBody.Code || errorCode,
3909
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3933
3910
  $fault: "client",
3934
- $metadata: deserializeMetadata(output),
3911
+ $metadata,
3935
3912
  });
3936
3913
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3937
3914
  }
@@ -3985,8 +3962,7 @@ const deserializeAws_restJson1DescribeDashboardCommandError = async (output, con
3985
3962
  body: await parseBody(output.body, context),
3986
3963
  };
3987
3964
  let response;
3988
- let errorCode = "UnknownError";
3989
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3965
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3990
3966
  switch (errorCode) {
3991
3967
  case "InternalFailureException":
3992
3968
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4002,10 +3978,12 @@ const deserializeAws_restJson1DescribeDashboardCommandError = async (output, con
4002
3978
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4003
3979
  default:
4004
3980
  const parsedBody = parsedOutput.body;
3981
+ const $metadata = deserializeMetadata(output);
3982
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4005
3983
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4006
- name: parsedBody.code || parsedBody.Code || errorCode,
3984
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4007
3985
  $fault: "client",
4008
- $metadata: deserializeMetadata(output),
3986
+ $metadata,
4009
3987
  });
4010
3988
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4011
3989
  }
@@ -4039,8 +4017,7 @@ const deserializeAws_restJson1DescribeDefaultEncryptionConfigurationCommandError
4039
4017
  body: await parseBody(output.body, context),
4040
4018
  };
4041
4019
  let response;
4042
- let errorCode = "UnknownError";
4043
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4020
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4044
4021
  switch (errorCode) {
4045
4022
  case "InternalFailureException":
4046
4023
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4053,10 +4030,12 @@ const deserializeAws_restJson1DescribeDefaultEncryptionConfigurationCommandError
4053
4030
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4054
4031
  default:
4055
4032
  const parsedBody = parsedOutput.body;
4033
+ const $metadata = deserializeMetadata(output);
4034
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4056
4035
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4057
- name: parsedBody.code || parsedBody.Code || errorCode,
4036
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4058
4037
  $fault: "client",
4059
- $metadata: deserializeMetadata(output),
4038
+ $metadata,
4060
4039
  });
4061
4040
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4062
4041
  }
@@ -4106,8 +4085,7 @@ const deserializeAws_restJson1DescribeGatewayCommandError = async (output, conte
4106
4085
  body: await parseBody(output.body, context),
4107
4086
  };
4108
4087
  let response;
4109
- let errorCode = "UnknownError";
4110
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4088
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4111
4089
  switch (errorCode) {
4112
4090
  case "InternalFailureException":
4113
4091
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4123,10 +4101,12 @@ const deserializeAws_restJson1DescribeGatewayCommandError = async (output, conte
4123
4101
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4124
4102
  default:
4125
4103
  const parsedBody = parsedOutput.body;
4104
+ const $metadata = deserializeMetadata(output);
4105
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4126
4106
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4127
- name: parsedBody.code || parsedBody.Code || errorCode,
4107
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4128
4108
  $fault: "client",
4129
- $metadata: deserializeMetadata(output),
4109
+ $metadata,
4130
4110
  });
4131
4111
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4132
4112
  }
@@ -4164,8 +4144,7 @@ const deserializeAws_restJson1DescribeGatewayCapabilityConfigurationCommandError
4164
4144
  body: await parseBody(output.body, context),
4165
4145
  };
4166
4146
  let response;
4167
- let errorCode = "UnknownError";
4168
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4147
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4169
4148
  switch (errorCode) {
4170
4149
  case "InternalFailureException":
4171
4150
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4181,10 +4160,12 @@ const deserializeAws_restJson1DescribeGatewayCapabilityConfigurationCommandError
4181
4160
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4182
4161
  default:
4183
4162
  const parsedBody = parsedOutput.body;
4163
+ const $metadata = deserializeMetadata(output);
4164
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4184
4165
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4185
- name: parsedBody.code || parsedBody.Code || errorCode,
4166
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4186
4167
  $fault: "client",
4187
- $metadata: deserializeMetadata(output),
4168
+ $metadata,
4188
4169
  });
4189
4170
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4190
4171
  }
@@ -4210,8 +4191,7 @@ const deserializeAws_restJson1DescribeLoggingOptionsCommandError = async (output
4210
4191
  body: await parseBody(output.body, context),
4211
4192
  };
4212
4193
  let response;
4213
- let errorCode = "UnknownError";
4214
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4194
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4215
4195
  switch (errorCode) {
4216
4196
  case "InternalFailureException":
4217
4197
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4227,10 +4207,12 @@ const deserializeAws_restJson1DescribeLoggingOptionsCommandError = async (output
4227
4207
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4228
4208
  default:
4229
4209
  const parsedBody = parsedOutput.body;
4210
+ const $metadata = deserializeMetadata(output);
4211
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4230
4212
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4231
- name: parsedBody.code || parsedBody.Code || errorCode,
4213
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4232
4214
  $fault: "client",
4233
- $metadata: deserializeMetadata(output),
4215
+ $metadata,
4234
4216
  });
4235
4217
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4236
4218
  }
@@ -4312,8 +4294,7 @@ const deserializeAws_restJson1DescribePortalCommandError = async (output, contex
4312
4294
  body: await parseBody(output.body, context),
4313
4295
  };
4314
4296
  let response;
4315
- let errorCode = "UnknownError";
4316
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4297
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4317
4298
  switch (errorCode) {
4318
4299
  case "InternalFailureException":
4319
4300
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4329,10 +4310,12 @@ const deserializeAws_restJson1DescribePortalCommandError = async (output, contex
4329
4310
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4330
4311
  default:
4331
4312
  const parsedBody = parsedOutput.body;
4313
+ const $metadata = deserializeMetadata(output);
4314
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4332
4315
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4333
- name: parsedBody.code || parsedBody.Code || errorCode,
4316
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4334
4317
  $fault: "client",
4335
- $metadata: deserializeMetadata(output),
4318
+ $metadata,
4336
4319
  });
4337
4320
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4338
4321
  }
@@ -4382,8 +4365,7 @@ const deserializeAws_restJson1DescribeProjectCommandError = async (output, conte
4382
4365
  body: await parseBody(output.body, context),
4383
4366
  };
4384
4367
  let response;
4385
- let errorCode = "UnknownError";
4386
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4368
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4387
4369
  switch (errorCode) {
4388
4370
  case "InternalFailureException":
4389
4371
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4399,10 +4381,12 @@ const deserializeAws_restJson1DescribeProjectCommandError = async (output, conte
4399
4381
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4400
4382
  default:
4401
4383
  const parsedBody = parsedOutput.body;
4384
+ const $metadata = deserializeMetadata(output);
4385
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4402
4386
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4403
- name: parsedBody.code || parsedBody.Code || errorCode,
4387
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4404
4388
  $fault: "client",
4405
- $metadata: deserializeMetadata(output),
4389
+ $metadata,
4406
4390
  });
4407
4391
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4408
4392
  }
@@ -4448,8 +4432,7 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommandError = async (
4448
4432
  body: await parseBody(output.body, context),
4449
4433
  };
4450
4434
  let response;
4451
- let errorCode = "UnknownError";
4452
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4435
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4453
4436
  switch (errorCode) {
4454
4437
  case "ConflictingOperationException":
4455
4438
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -4471,10 +4454,12 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommandError = async (
4471
4454
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4472
4455
  default:
4473
4456
  const parsedBody = parsedOutput.body;
4457
+ const $metadata = deserializeMetadata(output);
4458
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4474
4459
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4475
- name: parsedBody.code || parsedBody.Code || errorCode,
4460
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4476
4461
  $fault: "client",
4477
- $metadata: deserializeMetadata(output),
4462
+ $metadata,
4478
4463
  });
4479
4464
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4480
4465
  }
@@ -4528,8 +4513,7 @@ const deserializeAws_restJson1DescribeTimeSeriesCommandError = async (output, co
4528
4513
  body: await parseBody(output.body, context),
4529
4514
  };
4530
4515
  let response;
4531
- let errorCode = "UnknownError";
4532
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4516
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4533
4517
  switch (errorCode) {
4534
4518
  case "InternalFailureException":
4535
4519
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4545,10 +4529,12 @@ const deserializeAws_restJson1DescribeTimeSeriesCommandError = async (output, co
4545
4529
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4546
4530
  default:
4547
4531
  const parsedBody = parsedOutput.body;
4532
+ const $metadata = deserializeMetadata(output);
4533
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4548
4534
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4549
- name: parsedBody.code || parsedBody.Code || errorCode,
4535
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4550
4536
  $fault: "client",
4551
- $metadata: deserializeMetadata(output),
4537
+ $metadata,
4552
4538
  });
4553
4539
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4554
4540
  }
@@ -4570,8 +4556,7 @@ const deserializeAws_restJson1DisassociateAssetsCommandError = async (output, co
4570
4556
  body: await parseBody(output.body, context),
4571
4557
  };
4572
4558
  let response;
4573
- let errorCode = "UnknownError";
4574
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4559
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4575
4560
  switch (errorCode) {
4576
4561
  case "ConflictingOperationException":
4577
4562
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -4590,10 +4575,12 @@ const deserializeAws_restJson1DisassociateAssetsCommandError = async (output, co
4590
4575
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4591
4576
  default:
4592
4577
  const parsedBody = parsedOutput.body;
4578
+ const $metadata = deserializeMetadata(output);
4579
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4593
4580
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4594
- name: parsedBody.code || parsedBody.Code || errorCode,
4581
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4595
4582
  $fault: "client",
4596
- $metadata: deserializeMetadata(output),
4583
+ $metadata,
4597
4584
  });
4598
4585
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4599
4586
  }
@@ -4615,8 +4602,7 @@ const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandErro
4615
4602
  body: await parseBody(output.body, context),
4616
4603
  };
4617
4604
  let response;
4618
- let errorCode = "UnknownError";
4619
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4605
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4620
4606
  switch (errorCode) {
4621
4607
  case "ConflictingOperationException":
4622
4608
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -4635,10 +4621,12 @@ const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandErro
4635
4621
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4636
4622
  default:
4637
4623
  const parsedBody = parsedOutput.body;
4624
+ const $metadata = deserializeMetadata(output);
4625
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4638
4626
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4639
- name: parsedBody.code || parsedBody.Code || errorCode,
4627
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4640
4628
  $fault: "client",
4641
- $metadata: deserializeMetadata(output),
4629
+ $metadata,
4642
4630
  });
4643
4631
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4644
4632
  }
@@ -4668,8 +4656,7 @@ const deserializeAws_restJson1GetAssetPropertyAggregatesCommandError = async (ou
4668
4656
  body: await parseBody(output.body, context),
4669
4657
  };
4670
4658
  let response;
4671
- let errorCode = "UnknownError";
4672
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4659
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4673
4660
  switch (errorCode) {
4674
4661
  case "InternalFailureException":
4675
4662
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4688,10 +4675,12 @@ const deserializeAws_restJson1GetAssetPropertyAggregatesCommandError = async (ou
4688
4675
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4689
4676
  default:
4690
4677
  const parsedBody = parsedOutput.body;
4678
+ const $metadata = deserializeMetadata(output);
4679
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4691
4680
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4692
- name: parsedBody.code || parsedBody.Code || errorCode,
4681
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4693
4682
  $fault: "client",
4694
- $metadata: deserializeMetadata(output),
4683
+ $metadata,
4695
4684
  });
4696
4685
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4697
4686
  }
@@ -4717,8 +4706,7 @@ const deserializeAws_restJson1GetAssetPropertyValueCommandError = async (output,
4717
4706
  body: await parseBody(output.body, context),
4718
4707
  };
4719
4708
  let response;
4720
- let errorCode = "UnknownError";
4721
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4709
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4722
4710
  switch (errorCode) {
4723
4711
  case "InternalFailureException":
4724
4712
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4737,10 +4725,12 @@ const deserializeAws_restJson1GetAssetPropertyValueCommandError = async (output,
4737
4725
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4738
4726
  default:
4739
4727
  const parsedBody = parsedOutput.body;
4728
+ const $metadata = deserializeMetadata(output);
4729
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4740
4730
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4741
- name: parsedBody.code || parsedBody.Code || errorCode,
4731
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4742
4732
  $fault: "client",
4743
- $metadata: deserializeMetadata(output),
4733
+ $metadata,
4744
4734
  });
4745
4735
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4746
4736
  }
@@ -4770,8 +4760,7 @@ const deserializeAws_restJson1GetAssetPropertyValueHistoryCommandError = async (
4770
4760
  body: await parseBody(output.body, context),
4771
4761
  };
4772
4762
  let response;
4773
- let errorCode = "UnknownError";
4774
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4763
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4775
4764
  switch (errorCode) {
4776
4765
  case "InternalFailureException":
4777
4766
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4790,10 +4779,12 @@ const deserializeAws_restJson1GetAssetPropertyValueHistoryCommandError = async (
4790
4779
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4791
4780
  default:
4792
4781
  const parsedBody = parsedOutput.body;
4782
+ const $metadata = deserializeMetadata(output);
4783
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4793
4784
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4794
- name: parsedBody.code || parsedBody.Code || errorCode,
4785
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4795
4786
  $fault: "client",
4796
- $metadata: deserializeMetadata(output),
4787
+ $metadata,
4797
4788
  });
4798
4789
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4799
4790
  }
@@ -4823,8 +4814,7 @@ const deserializeAws_restJson1GetInterpolatedAssetPropertyValuesCommandError = a
4823
4814
  body: await parseBody(output.body, context),
4824
4815
  };
4825
4816
  let response;
4826
- let errorCode = "UnknownError";
4827
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4817
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4828
4818
  switch (errorCode) {
4829
4819
  case "InternalFailureException":
4830
4820
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4843,10 +4833,12 @@ const deserializeAws_restJson1GetInterpolatedAssetPropertyValuesCommandError = a
4843
4833
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4844
4834
  default:
4845
4835
  const parsedBody = parsedOutput.body;
4836
+ const $metadata = deserializeMetadata(output);
4837
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4846
4838
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4847
- name: parsedBody.code || parsedBody.Code || errorCode,
4839
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4848
4840
  $fault: "client",
4849
- $metadata: deserializeMetadata(output),
4841
+ $metadata,
4850
4842
  });
4851
4843
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4852
4844
  }
@@ -4876,8 +4868,7 @@ const deserializeAws_restJson1ListAccessPoliciesCommandError = async (output, co
4876
4868
  body: await parseBody(output.body, context),
4877
4869
  };
4878
4870
  let response;
4879
- let errorCode = "UnknownError";
4880
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4871
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4881
4872
  switch (errorCode) {
4882
4873
  case "InternalFailureException":
4883
4874
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4890,10 +4881,12 @@ const deserializeAws_restJson1ListAccessPoliciesCommandError = async (output, co
4890
4881
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4891
4882
  default:
4892
4883
  const parsedBody = parsedOutput.body;
4884
+ const $metadata = deserializeMetadata(output);
4885
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4893
4886
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4894
- name: parsedBody.code || parsedBody.Code || errorCode,
4887
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4895
4888
  $fault: "client",
4896
- $metadata: deserializeMetadata(output),
4889
+ $metadata,
4897
4890
  });
4898
4891
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4899
4892
  }
@@ -4923,8 +4916,7 @@ const deserializeAws_restJson1ListAssetModelsCommandError = async (output, conte
4923
4916
  body: await parseBody(output.body, context),
4924
4917
  };
4925
4918
  let response;
4926
- let errorCode = "UnknownError";
4927
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4919
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4928
4920
  switch (errorCode) {
4929
4921
  case "InternalFailureException":
4930
4922
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4937,10 +4929,12 @@ const deserializeAws_restJson1ListAssetModelsCommandError = async (output, conte
4937
4929
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4938
4930
  default:
4939
4931
  const parsedBody = parsedOutput.body;
4932
+ const $metadata = deserializeMetadata(output);
4933
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4940
4934
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4941
- name: parsedBody.code || parsedBody.Code || errorCode,
4935
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4942
4936
  $fault: "client",
4943
- $metadata: deserializeMetadata(output),
4937
+ $metadata,
4944
4938
  });
4945
4939
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4946
4940
  }
@@ -4970,8 +4964,7 @@ const deserializeAws_restJson1ListAssetRelationshipsCommandError = async (output
4970
4964
  body: await parseBody(output.body, context),
4971
4965
  };
4972
4966
  let response;
4973
- let errorCode = "UnknownError";
4974
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4967
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4975
4968
  switch (errorCode) {
4976
4969
  case "InternalFailureException":
4977
4970
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -4987,10 +4980,12 @@ const deserializeAws_restJson1ListAssetRelationshipsCommandError = async (output
4987
4980
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4988
4981
  default:
4989
4982
  const parsedBody = parsedOutput.body;
4983
+ const $metadata = deserializeMetadata(output);
4984
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4990
4985
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
4991
- name: parsedBody.code || parsedBody.Code || errorCode,
4986
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4992
4987
  $fault: "client",
4993
- $metadata: deserializeMetadata(output),
4988
+ $metadata,
4994
4989
  });
4995
4990
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4996
4991
  }
@@ -5020,8 +5015,7 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
5020
5015
  body: await parseBody(output.body, context),
5021
5016
  };
5022
5017
  let response;
5023
- let errorCode = "UnknownError";
5024
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5018
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5025
5019
  switch (errorCode) {
5026
5020
  case "InternalFailureException":
5027
5021
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5037,10 +5031,12 @@ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) =
5037
5031
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5038
5032
  default:
5039
5033
  const parsedBody = parsedOutput.body;
5034
+ const $metadata = deserializeMetadata(output);
5035
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5040
5036
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5041
- name: parsedBody.code || parsedBody.Code || errorCode,
5037
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5042
5038
  $fault: "client",
5043
- $metadata: deserializeMetadata(output),
5039
+ $metadata,
5044
5040
  });
5045
5041
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5046
5042
  }
@@ -5070,8 +5066,7 @@ const deserializeAws_restJson1ListAssociatedAssetsCommandError = async (output,
5070
5066
  body: await parseBody(output.body, context),
5071
5067
  };
5072
5068
  let response;
5073
- let errorCode = "UnknownError";
5074
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5069
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5075
5070
  switch (errorCode) {
5076
5071
  case "InternalFailureException":
5077
5072
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5087,10 +5082,12 @@ const deserializeAws_restJson1ListAssociatedAssetsCommandError = async (output,
5087
5082
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5088
5083
  default:
5089
5084
  const parsedBody = parsedOutput.body;
5085
+ const $metadata = deserializeMetadata(output);
5086
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5090
5087
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5091
- name: parsedBody.code || parsedBody.Code || errorCode,
5088
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5092
5089
  $fault: "client",
5093
- $metadata: deserializeMetadata(output),
5090
+ $metadata,
5094
5091
  });
5095
5092
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5096
5093
  }
@@ -5120,8 +5117,7 @@ const deserializeAws_restJson1ListDashboardsCommandError = async (output, contex
5120
5117
  body: await parseBody(output.body, context),
5121
5118
  };
5122
5119
  let response;
5123
- let errorCode = "UnknownError";
5124
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5120
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5125
5121
  switch (errorCode) {
5126
5122
  case "InternalFailureException":
5127
5123
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5134,10 +5130,12 @@ const deserializeAws_restJson1ListDashboardsCommandError = async (output, contex
5134
5130
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5135
5131
  default:
5136
5132
  const parsedBody = parsedOutput.body;
5133
+ const $metadata = deserializeMetadata(output);
5134
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5137
5135
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5138
- name: parsedBody.code || parsedBody.Code || errorCode,
5136
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5139
5137
  $fault: "client",
5140
- $metadata: deserializeMetadata(output),
5138
+ $metadata,
5141
5139
  });
5142
5140
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5143
5141
  }
@@ -5167,8 +5165,7 @@ const deserializeAws_restJson1ListGatewaysCommandError = async (output, context)
5167
5165
  body: await parseBody(output.body, context),
5168
5166
  };
5169
5167
  let response;
5170
- let errorCode = "UnknownError";
5171
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5168
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5172
5169
  switch (errorCode) {
5173
5170
  case "InternalFailureException":
5174
5171
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5181,10 +5178,12 @@ const deserializeAws_restJson1ListGatewaysCommandError = async (output, context)
5181
5178
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5182
5179
  default:
5183
5180
  const parsedBody = parsedOutput.body;
5181
+ const $metadata = deserializeMetadata(output);
5182
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5184
5183
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5185
- name: parsedBody.code || parsedBody.Code || errorCode,
5184
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5186
5185
  $fault: "client",
5187
- $metadata: deserializeMetadata(output),
5186
+ $metadata,
5188
5187
  });
5189
5188
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5190
5189
  }
@@ -5214,8 +5213,7 @@ const deserializeAws_restJson1ListPortalsCommandError = async (output, context)
5214
5213
  body: await parseBody(output.body, context),
5215
5214
  };
5216
5215
  let response;
5217
- let errorCode = "UnknownError";
5218
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5216
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5219
5217
  switch (errorCode) {
5220
5218
  case "InternalFailureException":
5221
5219
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5228,10 +5226,12 @@ const deserializeAws_restJson1ListPortalsCommandError = async (output, context)
5228
5226
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5229
5227
  default:
5230
5228
  const parsedBody = parsedOutput.body;
5229
+ const $metadata = deserializeMetadata(output);
5230
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5231
5231
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5232
- name: parsedBody.code || parsedBody.Code || errorCode,
5232
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5233
5233
  $fault: "client",
5234
- $metadata: deserializeMetadata(output),
5234
+ $metadata,
5235
5235
  });
5236
5236
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5237
5237
  }
@@ -5261,8 +5261,7 @@ const deserializeAws_restJson1ListProjectAssetsCommandError = async (output, con
5261
5261
  body: await parseBody(output.body, context),
5262
5262
  };
5263
5263
  let response;
5264
- let errorCode = "UnknownError";
5265
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5264
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5266
5265
  switch (errorCode) {
5267
5266
  case "InternalFailureException":
5268
5267
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5275,10 +5274,12 @@ const deserializeAws_restJson1ListProjectAssetsCommandError = async (output, con
5275
5274
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5276
5275
  default:
5277
5276
  const parsedBody = parsedOutput.body;
5277
+ const $metadata = deserializeMetadata(output);
5278
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5278
5279
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5279
- name: parsedBody.code || parsedBody.Code || errorCode,
5280
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5280
5281
  $fault: "client",
5281
- $metadata: deserializeMetadata(output),
5282
+ $metadata,
5282
5283
  });
5283
5284
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5284
5285
  }
@@ -5308,8 +5309,7 @@ const deserializeAws_restJson1ListProjectsCommandError = async (output, context)
5308
5309
  body: await parseBody(output.body, context),
5309
5310
  };
5310
5311
  let response;
5311
- let errorCode = "UnknownError";
5312
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5312
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5313
5313
  switch (errorCode) {
5314
5314
  case "InternalFailureException":
5315
5315
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5322,10 +5322,12 @@ const deserializeAws_restJson1ListProjectsCommandError = async (output, context)
5322
5322
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5323
5323
  default:
5324
5324
  const parsedBody = parsedOutput.body;
5325
+ const $metadata = deserializeMetadata(output);
5326
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5325
5327
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5326
- name: parsedBody.code || parsedBody.Code || errorCode,
5328
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5327
5329
  $fault: "client",
5328
- $metadata: deserializeMetadata(output),
5330
+ $metadata,
5329
5331
  });
5330
5332
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5331
5333
  }
@@ -5351,8 +5353,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
5351
5353
  body: await parseBody(output.body, context),
5352
5354
  };
5353
5355
  let response;
5354
- let errorCode = "UnknownError";
5355
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5356
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5356
5357
  switch (errorCode) {
5357
5358
  case "ConflictingOperationException":
5358
5359
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5377,10 +5378,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
5377
5378
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
5378
5379
  default:
5379
5380
  const parsedBody = parsedOutput.body;
5381
+ const $metadata = deserializeMetadata(output);
5382
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5380
5383
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5381
- name: parsedBody.code || parsedBody.Code || errorCode,
5384
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5382
5385
  $fault: "client",
5383
- $metadata: deserializeMetadata(output),
5386
+ $metadata,
5384
5387
  });
5385
5388
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5386
5389
  }
@@ -5410,8 +5413,7 @@ const deserializeAws_restJson1ListTimeSeriesCommandError = async (output, contex
5410
5413
  body: await parseBody(output.body, context),
5411
5414
  };
5412
5415
  let response;
5413
- let errorCode = "UnknownError";
5414
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5416
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5415
5417
  switch (errorCode) {
5416
5418
  case "InternalFailureException":
5417
5419
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5427,10 +5429,12 @@ const deserializeAws_restJson1ListTimeSeriesCommandError = async (output, contex
5427
5429
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5428
5430
  default:
5429
5431
  const parsedBody = parsedOutput.body;
5432
+ const $metadata = deserializeMetadata(output);
5433
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5430
5434
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5431
- name: parsedBody.code || parsedBody.Code || errorCode,
5435
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5432
5436
  $fault: "client",
5433
- $metadata: deserializeMetadata(output),
5437
+ $metadata,
5434
5438
  });
5435
5439
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5436
5440
  }
@@ -5464,8 +5468,7 @@ const deserializeAws_restJson1PutDefaultEncryptionConfigurationCommandError = as
5464
5468
  body: await parseBody(output.body, context),
5465
5469
  };
5466
5470
  let response;
5467
- let errorCode = "UnknownError";
5468
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5471
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5469
5472
  switch (errorCode) {
5470
5473
  case "ConflictingOperationException":
5471
5474
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5484,10 +5487,12 @@ const deserializeAws_restJson1PutDefaultEncryptionConfigurationCommandError = as
5484
5487
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5485
5488
  default:
5486
5489
  const parsedBody = parsedOutput.body;
5490
+ const $metadata = deserializeMetadata(output);
5491
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5487
5492
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5488
- name: parsedBody.code || parsedBody.Code || errorCode,
5493
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5489
5494
  $fault: "client",
5490
- $metadata: deserializeMetadata(output),
5495
+ $metadata,
5491
5496
  });
5492
5497
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5493
5498
  }
@@ -5509,8 +5514,7 @@ const deserializeAws_restJson1PutLoggingOptionsCommandError = async (output, con
5509
5514
  body: await parseBody(output.body, context),
5510
5515
  };
5511
5516
  let response;
5512
- let errorCode = "UnknownError";
5513
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5517
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5514
5518
  switch (errorCode) {
5515
5519
  case "ConflictingOperationException":
5516
5520
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5529,10 +5533,12 @@ const deserializeAws_restJson1PutLoggingOptionsCommandError = async (output, con
5529
5533
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5530
5534
  default:
5531
5535
  const parsedBody = parsedOutput.body;
5536
+ const $metadata = deserializeMetadata(output);
5537
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5532
5538
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5533
- name: parsedBody.code || parsedBody.Code || errorCode,
5539
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5534
5540
  $fault: "client",
5535
- $metadata: deserializeMetadata(output),
5541
+ $metadata,
5536
5542
  });
5537
5543
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5538
5544
  }
@@ -5574,8 +5580,7 @@ const deserializeAws_restJson1PutStorageConfigurationCommandError = async (outpu
5574
5580
  body: await parseBody(output.body, context),
5575
5581
  };
5576
5582
  let response;
5577
- let errorCode = "UnknownError";
5578
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5583
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5579
5584
  switch (errorCode) {
5580
5585
  case "ConflictingOperationException":
5581
5586
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5600,10 +5605,12 @@ const deserializeAws_restJson1PutStorageConfigurationCommandError = async (outpu
5600
5605
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5601
5606
  default:
5602
5607
  const parsedBody = parsedOutput.body;
5608
+ const $metadata = deserializeMetadata(output);
5609
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5603
5610
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5604
- name: parsedBody.code || parsedBody.Code || errorCode,
5611
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5605
5612
  $fault: "client",
5606
- $metadata: deserializeMetadata(output),
5613
+ $metadata,
5607
5614
  });
5608
5615
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5609
5616
  }
@@ -5625,8 +5632,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5625
5632
  body: await parseBody(output.body, context),
5626
5633
  };
5627
5634
  let response;
5628
- let errorCode = "UnknownError";
5629
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5635
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5630
5636
  switch (errorCode) {
5631
5637
  case "ConflictingOperationException":
5632
5638
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5654,10 +5660,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5654
5660
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
5655
5661
  default:
5656
5662
  const parsedBody = parsedOutput.body;
5663
+ const $metadata = deserializeMetadata(output);
5664
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5657
5665
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5658
- name: parsedBody.code || parsedBody.Code || errorCode,
5666
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5659
5667
  $fault: "client",
5660
- $metadata: deserializeMetadata(output),
5668
+ $metadata,
5661
5669
  });
5662
5670
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5663
5671
  }
@@ -5679,8 +5687,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5679
5687
  body: await parseBody(output.body, context),
5680
5688
  };
5681
5689
  let response;
5682
- let errorCode = "UnknownError";
5683
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5690
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5684
5691
  switch (errorCode) {
5685
5692
  case "ConflictingOperationException":
5686
5693
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5705,10 +5712,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5705
5712
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
5706
5713
  default:
5707
5714
  const parsedBody = parsedOutput.body;
5715
+ const $metadata = deserializeMetadata(output);
5716
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5708
5717
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5709
- name: parsedBody.code || parsedBody.Code || errorCode,
5718
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5710
5719
  $fault: "client",
5711
- $metadata: deserializeMetadata(output),
5720
+ $metadata,
5712
5721
  });
5713
5722
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5714
5723
  }
@@ -5730,8 +5739,7 @@ const deserializeAws_restJson1UpdateAccessPolicyCommandError = async (output, co
5730
5739
  body: await parseBody(output.body, context),
5731
5740
  };
5732
5741
  let response;
5733
- let errorCode = "UnknownError";
5734
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5742
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5735
5743
  switch (errorCode) {
5736
5744
  case "InternalFailureException":
5737
5745
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5747,10 +5755,12 @@ const deserializeAws_restJson1UpdateAccessPolicyCommandError = async (output, co
5747
5755
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5748
5756
  default:
5749
5757
  const parsedBody = parsedOutput.body;
5758
+ const $metadata = deserializeMetadata(output);
5759
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5750
5760
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5751
- name: parsedBody.code || parsedBody.Code || errorCode,
5761
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5752
5762
  $fault: "client",
5753
- $metadata: deserializeMetadata(output),
5763
+ $metadata,
5754
5764
  });
5755
5765
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5756
5766
  }
@@ -5776,8 +5786,7 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
5776
5786
  body: await parseBody(output.body, context),
5777
5787
  };
5778
5788
  let response;
5779
- let errorCode = "UnknownError";
5780
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5789
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5781
5790
  switch (errorCode) {
5782
5791
  case "ConflictingOperationException":
5783
5792
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5799,10 +5808,12 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
5799
5808
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5800
5809
  default:
5801
5810
  const parsedBody = parsedOutput.body;
5811
+ const $metadata = deserializeMetadata(output);
5812
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5802
5813
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5803
- name: parsedBody.code || parsedBody.Code || errorCode,
5814
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5804
5815
  $fault: "client",
5805
- $metadata: deserializeMetadata(output),
5816
+ $metadata,
5806
5817
  });
5807
5818
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5808
5819
  }
@@ -5828,8 +5839,7 @@ const deserializeAws_restJson1UpdateAssetModelCommandError = async (output, cont
5828
5839
  body: await parseBody(output.body, context),
5829
5840
  };
5830
5841
  let response;
5831
- let errorCode = "UnknownError";
5832
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5842
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5833
5843
  switch (errorCode) {
5834
5844
  case "ConflictingOperationException":
5835
5845
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5854,10 +5864,12 @@ const deserializeAws_restJson1UpdateAssetModelCommandError = async (output, cont
5854
5864
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5855
5865
  default:
5856
5866
  const parsedBody = parsedOutput.body;
5867
+ const $metadata = deserializeMetadata(output);
5868
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5857
5869
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5858
- name: parsedBody.code || parsedBody.Code || errorCode,
5870
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5859
5871
  $fault: "client",
5860
- $metadata: deserializeMetadata(output),
5872
+ $metadata,
5861
5873
  });
5862
5874
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5863
5875
  }
@@ -5879,8 +5891,7 @@ const deserializeAws_restJson1UpdateAssetPropertyCommandError = async (output, c
5879
5891
  body: await parseBody(output.body, context),
5880
5892
  };
5881
5893
  let response;
5882
- let errorCode = "UnknownError";
5883
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5894
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5884
5895
  switch (errorCode) {
5885
5896
  case "ConflictingOperationException":
5886
5897
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5899,10 +5910,12 @@ const deserializeAws_restJson1UpdateAssetPropertyCommandError = async (output, c
5899
5910
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5900
5911
  default:
5901
5912
  const parsedBody = parsedOutput.body;
5913
+ const $metadata = deserializeMetadata(output);
5914
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5902
5915
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5903
- name: parsedBody.code || parsedBody.Code || errorCode,
5916
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5904
5917
  $fault: "client",
5905
- $metadata: deserializeMetadata(output),
5918
+ $metadata,
5906
5919
  });
5907
5920
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5908
5921
  }
@@ -5924,8 +5937,7 @@ const deserializeAws_restJson1UpdateDashboardCommandError = async (output, conte
5924
5937
  body: await parseBody(output.body, context),
5925
5938
  };
5926
5939
  let response;
5927
- let errorCode = "UnknownError";
5928
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5940
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5929
5941
  switch (errorCode) {
5930
5942
  case "InternalFailureException":
5931
5943
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -5941,10 +5953,12 @@ const deserializeAws_restJson1UpdateDashboardCommandError = async (output, conte
5941
5953
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5942
5954
  default:
5943
5955
  const parsedBody = parsedOutput.body;
5956
+ const $metadata = deserializeMetadata(output);
5957
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5944
5958
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5945
- name: parsedBody.code || parsedBody.Code || errorCode,
5959
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5946
5960
  $fault: "client",
5947
- $metadata: deserializeMetadata(output),
5961
+ $metadata,
5948
5962
  });
5949
5963
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5950
5964
  }
@@ -5966,8 +5980,7 @@ const deserializeAws_restJson1UpdateGatewayCommandError = async (output, context
5966
5980
  body: await parseBody(output.body, context),
5967
5981
  };
5968
5982
  let response;
5969
- let errorCode = "UnknownError";
5970
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5983
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5971
5984
  switch (errorCode) {
5972
5985
  case "ConflictingOperationException":
5973
5986
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -5986,10 +5999,12 @@ const deserializeAws_restJson1UpdateGatewayCommandError = async (output, context
5986
5999
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5987
6000
  default:
5988
6001
  const parsedBody = parsedOutput.body;
6002
+ const $metadata = deserializeMetadata(output);
6003
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5989
6004
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
5990
- name: parsedBody.code || parsedBody.Code || errorCode,
6005
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5991
6006
  $fault: "client",
5992
- $metadata: deserializeMetadata(output),
6007
+ $metadata,
5993
6008
  });
5994
6009
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5995
6010
  }
@@ -6019,8 +6034,7 @@ const deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommandError =
6019
6034
  body: await parseBody(output.body, context),
6020
6035
  };
6021
6036
  let response;
6022
- let errorCode = "UnknownError";
6023
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6037
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6024
6038
  switch (errorCode) {
6025
6039
  case "ConflictingOperationException":
6026
6040
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -6042,10 +6056,12 @@ const deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommandError =
6042
6056
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
6043
6057
  default:
6044
6058
  const parsedBody = parsedOutput.body;
6059
+ const $metadata = deserializeMetadata(output);
6060
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6045
6061
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
6046
- name: parsedBody.code || parsedBody.Code || errorCode,
6062
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6047
6063
  $fault: "client",
6048
- $metadata: deserializeMetadata(output),
6064
+ $metadata,
6049
6065
  });
6050
6066
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6051
6067
  }
@@ -6071,8 +6087,7 @@ const deserializeAws_restJson1UpdatePortalCommandError = async (output, context)
6071
6087
  body: await parseBody(output.body, context),
6072
6088
  };
6073
6089
  let response;
6074
- let errorCode = "UnknownError";
6075
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6090
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6076
6091
  switch (errorCode) {
6077
6092
  case "ConflictingOperationException":
6078
6093
  case "com.amazonaws.iotsitewise#ConflictingOperationException":
@@ -6091,10 +6106,12 @@ const deserializeAws_restJson1UpdatePortalCommandError = async (output, context)
6091
6106
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
6092
6107
  default:
6093
6108
  const parsedBody = parsedOutput.body;
6109
+ const $metadata = deserializeMetadata(output);
6110
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6094
6111
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
6095
- name: parsedBody.code || parsedBody.Code || errorCode,
6112
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6096
6113
  $fault: "client",
6097
- $metadata: deserializeMetadata(output),
6114
+ $metadata,
6098
6115
  });
6099
6116
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6100
6117
  }
@@ -6116,8 +6133,7 @@ const deserializeAws_restJson1UpdateProjectCommandError = async (output, context
6116
6133
  body: await parseBody(output.body, context),
6117
6134
  };
6118
6135
  let response;
6119
- let errorCode = "UnknownError";
6120
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6136
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6121
6137
  switch (errorCode) {
6122
6138
  case "InternalFailureException":
6123
6139
  case "com.amazonaws.iotsitewise#InternalFailureException":
@@ -6133,10 +6149,12 @@ const deserializeAws_restJson1UpdateProjectCommandError = async (output, context
6133
6149
  throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
6134
6150
  default:
6135
6151
  const parsedBody = parsedOutput.body;
6152
+ const $metadata = deserializeMetadata(output);
6153
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6136
6154
  response = new IoTSiteWiseServiceException_1.IoTSiteWiseServiceException({
6137
- name: parsedBody.code || parsedBody.Code || errorCode,
6155
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6138
6156
  $fault: "client",
6139
- $metadata: deserializeMetadata(output),
6157
+ $metadata,
6140
6158
  });
6141
6159
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6142
6160
  }
@@ -6288,31 +6306,28 @@ const serializeAws_restJson1AggregateTypes = (input, context) => {
6288
6306
  };
6289
6307
  const serializeAws_restJson1Alarms = (input, context) => {
6290
6308
  return {
6291
- ...(input.alarmRoleArn !== undefined && input.alarmRoleArn !== null && { alarmRoleArn: input.alarmRoleArn }),
6292
- ...(input.notificationLambdaArn !== undefined &&
6293
- input.notificationLambdaArn !== null && { notificationLambdaArn: input.notificationLambdaArn }),
6309
+ ...(input.alarmRoleArn != null && { alarmRoleArn: input.alarmRoleArn }),
6310
+ ...(input.notificationLambdaArn != null && { notificationLambdaArn: input.notificationLambdaArn }),
6294
6311
  };
6295
6312
  };
6296
6313
  const serializeAws_restJson1AssetModelCompositeModel = (input, context) => {
6297
6314
  return {
6298
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
6299
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6300
- ...(input.properties !== undefined &&
6301
- input.properties !== null && {
6315
+ ...(input.description != null && { description: input.description }),
6316
+ ...(input.name != null && { name: input.name }),
6317
+ ...(input.properties != null && {
6302
6318
  properties: serializeAws_restJson1AssetModelProperties(input.properties, context),
6303
6319
  }),
6304
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
6320
+ ...(input.type != null && { type: input.type }),
6305
6321
  };
6306
6322
  };
6307
6323
  const serializeAws_restJson1AssetModelCompositeModelDefinition = (input, context) => {
6308
6324
  return {
6309
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
6310
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6311
- ...(input.properties !== undefined &&
6312
- input.properties !== null && {
6325
+ ...(input.description != null && { description: input.description }),
6326
+ ...(input.name != null && { name: input.name }),
6327
+ ...(input.properties != null && {
6313
6328
  properties: serializeAws_restJson1AssetModelPropertyDefinitions(input.properties, context),
6314
6329
  }),
6315
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
6330
+ ...(input.type != null && { type: input.type }),
6316
6331
  };
6317
6332
  };
6318
6333
  const serializeAws_restJson1AssetModelCompositeModelDefinitions = (input, context) => {
@@ -6347,17 +6362,15 @@ const serializeAws_restJson1AssetModelHierarchies = (input, context) => {
6347
6362
  };
6348
6363
  const serializeAws_restJson1AssetModelHierarchy = (input, context) => {
6349
6364
  return {
6350
- ...(input.childAssetModelId !== undefined &&
6351
- input.childAssetModelId !== null && { childAssetModelId: input.childAssetModelId }),
6352
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6353
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6365
+ ...(input.childAssetModelId != null && { childAssetModelId: input.childAssetModelId }),
6366
+ ...(input.id != null && { id: input.id }),
6367
+ ...(input.name != null && { name: input.name }),
6354
6368
  };
6355
6369
  };
6356
6370
  const serializeAws_restJson1AssetModelHierarchyDefinition = (input, context) => {
6357
6371
  return {
6358
- ...(input.childAssetModelId !== undefined &&
6359
- input.childAssetModelId !== null && { childAssetModelId: input.childAssetModelId }),
6360
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6372
+ ...(input.childAssetModelId != null && { childAssetModelId: input.childAssetModelId }),
6373
+ ...(input.name != null && { name: input.name }),
6361
6374
  };
6362
6375
  };
6363
6376
  const serializeAws_restJson1AssetModelHierarchyDefinitions = (input, context) => {
@@ -6382,23 +6395,21 @@ const serializeAws_restJson1AssetModelProperties = (input, context) => {
6382
6395
  };
6383
6396
  const serializeAws_restJson1AssetModelProperty = (input, context) => {
6384
6397
  return {
6385
- ...(input.dataType !== undefined && input.dataType !== null && { dataType: input.dataType }),
6386
- ...(input.dataTypeSpec !== undefined && input.dataTypeSpec !== null && { dataTypeSpec: input.dataTypeSpec }),
6387
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6388
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6389
- ...(input.type !== undefined &&
6390
- input.type !== null && { type: serializeAws_restJson1PropertyType(input.type, context) }),
6391
- ...(input.unit !== undefined && input.unit !== null && { unit: input.unit }),
6398
+ ...(input.dataType != null && { dataType: input.dataType }),
6399
+ ...(input.dataTypeSpec != null && { dataTypeSpec: input.dataTypeSpec }),
6400
+ ...(input.id != null && { id: input.id }),
6401
+ ...(input.name != null && { name: input.name }),
6402
+ ...(input.type != null && { type: serializeAws_restJson1PropertyType(input.type, context) }),
6403
+ ...(input.unit != null && { unit: input.unit }),
6392
6404
  };
6393
6405
  };
6394
6406
  const serializeAws_restJson1AssetModelPropertyDefinition = (input, context) => {
6395
6407
  return {
6396
- ...(input.dataType !== undefined && input.dataType !== null && { dataType: input.dataType }),
6397
- ...(input.dataTypeSpec !== undefined && input.dataTypeSpec !== null && { dataTypeSpec: input.dataTypeSpec }),
6398
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6399
- ...(input.type !== undefined &&
6400
- input.type !== null && { type: serializeAws_restJson1PropertyType(input.type, context) }),
6401
- ...(input.unit !== undefined && input.unit !== null && { unit: input.unit }),
6408
+ ...(input.dataType != null && { dataType: input.dataType }),
6409
+ ...(input.dataTypeSpec != null && { dataTypeSpec: input.dataTypeSpec }),
6410
+ ...(input.name != null && { name: input.name }),
6411
+ ...(input.type != null && { type: serializeAws_restJson1PropertyType(input.type, context) }),
6412
+ ...(input.unit != null && { unit: input.unit }),
6402
6413
  };
6403
6414
  };
6404
6415
  const serializeAws_restJson1AssetModelPropertyDefinitions = (input, context) => {
@@ -6413,11 +6424,9 @@ const serializeAws_restJson1AssetModelPropertyDefinitions = (input, context) =>
6413
6424
  };
6414
6425
  const serializeAws_restJson1AssetPropertyValue = (input, context) => {
6415
6426
  return {
6416
- ...(input.quality !== undefined && input.quality !== null && { quality: input.quality }),
6417
- ...(input.timestamp !== undefined &&
6418
- input.timestamp !== null && { timestamp: serializeAws_restJson1TimeInNanos(input.timestamp, context) }),
6419
- ...(input.value !== undefined &&
6420
- input.value !== null && { value: serializeAws_restJson1Variant(input.value, context) }),
6427
+ ...(input.quality != null && { quality: input.quality }),
6428
+ ...(input.timestamp != null && { timestamp: serializeAws_restJson1TimeInNanos(input.timestamp, context) }),
6429
+ ...(input.value != null && { value: serializeAws_restJson1Variant(input.value, context) }),
6421
6430
  };
6422
6431
  };
6423
6432
  const serializeAws_restJson1AssetPropertyValues = (input, context) => {
@@ -6432,7 +6441,7 @@ const serializeAws_restJson1AssetPropertyValues = (input, context) => {
6432
6441
  };
6433
6442
  const serializeAws_restJson1Attribute = (input, context) => {
6434
6443
  return {
6435
- ...(input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }),
6444
+ ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
6436
6445
  };
6437
6446
  };
6438
6447
  const serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries = (input, context) => {
@@ -6447,22 +6456,18 @@ const serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries = (input, con
6447
6456
  };
6448
6457
  const serializeAws_restJson1BatchGetAssetPropertyAggregatesEntry = (input, context) => {
6449
6458
  return {
6450
- ...(input.aggregateTypes !== undefined &&
6451
- input.aggregateTypes !== null && {
6459
+ ...(input.aggregateTypes != null && {
6452
6460
  aggregateTypes: serializeAws_restJson1AggregateTypes(input.aggregateTypes, context),
6453
6461
  }),
6454
- ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }),
6455
- ...(input.endDate !== undefined &&
6456
- input.endDate !== null && { endDate: Math.round(input.endDate.getTime() / 1000) }),
6457
- ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }),
6458
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
6459
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
6460
- ...(input.qualities !== undefined &&
6461
- input.qualities !== null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) }),
6462
- ...(input.resolution !== undefined && input.resolution !== null && { resolution: input.resolution }),
6463
- ...(input.startDate !== undefined &&
6464
- input.startDate !== null && { startDate: Math.round(input.startDate.getTime() / 1000) }),
6465
- ...(input.timeOrdering !== undefined && input.timeOrdering !== null && { timeOrdering: input.timeOrdering }),
6462
+ ...(input.assetId != null && { assetId: input.assetId }),
6463
+ ...(input.endDate != null && { endDate: Math.round(input.endDate.getTime() / 1000) }),
6464
+ ...(input.entryId != null && { entryId: input.entryId }),
6465
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
6466
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
6467
+ ...(input.qualities != null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) }),
6468
+ ...(input.resolution != null && { resolution: input.resolution }),
6469
+ ...(input.startDate != null && { startDate: Math.round(input.startDate.getTime() / 1000) }),
6470
+ ...(input.timeOrdering != null && { timeOrdering: input.timeOrdering }),
6466
6471
  };
6467
6472
  };
6468
6473
  const serializeAws_restJson1BatchGetAssetPropertyValueEntries = (input, context) => {
@@ -6477,10 +6482,10 @@ const serializeAws_restJson1BatchGetAssetPropertyValueEntries = (input, context)
6477
6482
  };
6478
6483
  const serializeAws_restJson1BatchGetAssetPropertyValueEntry = (input, context) => {
6479
6484
  return {
6480
- ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }),
6481
- ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }),
6482
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
6483
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
6485
+ ...(input.assetId != null && { assetId: input.assetId }),
6486
+ ...(input.entryId != null && { entryId: input.entryId }),
6487
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
6488
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
6484
6489
  };
6485
6490
  };
6486
6491
  const serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries = (input, context) => {
@@ -6495,30 +6500,26 @@ const serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries = (input, c
6495
6500
  };
6496
6501
  const serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntry = (input, context) => {
6497
6502
  return {
6498
- ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }),
6499
- ...(input.endDate !== undefined &&
6500
- input.endDate !== null && { endDate: Math.round(input.endDate.getTime() / 1000) }),
6501
- ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }),
6502
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
6503
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
6504
- ...(input.qualities !== undefined &&
6505
- input.qualities !== null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) }),
6506
- ...(input.startDate !== undefined &&
6507
- input.startDate !== null && { startDate: Math.round(input.startDate.getTime() / 1000) }),
6508
- ...(input.timeOrdering !== undefined && input.timeOrdering !== null && { timeOrdering: input.timeOrdering }),
6503
+ ...(input.assetId != null && { assetId: input.assetId }),
6504
+ ...(input.endDate != null && { endDate: Math.round(input.endDate.getTime() / 1000) }),
6505
+ ...(input.entryId != null && { entryId: input.entryId }),
6506
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
6507
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
6508
+ ...(input.qualities != null && { qualities: serializeAws_restJson1Qualities(input.qualities, context) }),
6509
+ ...(input.startDate != null && { startDate: Math.round(input.startDate.getTime() / 1000) }),
6510
+ ...(input.timeOrdering != null && { timeOrdering: input.timeOrdering }),
6509
6511
  };
6510
6512
  };
6511
6513
  const serializeAws_restJson1CustomerManagedS3Storage = (input, context) => {
6512
6514
  return {
6513
- ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
6514
- ...(input.s3ResourceArn !== undefined && input.s3ResourceArn !== null && { s3ResourceArn: input.s3ResourceArn }),
6515
+ ...(input.roleArn != null && { roleArn: input.roleArn }),
6516
+ ...(input.s3ResourceArn != null && { s3ResourceArn: input.s3ResourceArn }),
6515
6517
  };
6516
6518
  };
6517
6519
  const serializeAws_restJson1ExpressionVariable = (input, context) => {
6518
6520
  return {
6519
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
6520
- ...(input.value !== undefined &&
6521
- input.value !== null && { value: serializeAws_restJson1VariableValue(input.value, context) }),
6521
+ ...(input.name != null && { name: input.name }),
6522
+ ...(input.value != null && { value: serializeAws_restJson1VariableValue(input.value, context) }),
6522
6523
  };
6523
6524
  };
6524
6525
  const serializeAws_restJson1ExpressionVariables = (input, context) => {
@@ -6533,53 +6534,48 @@ const serializeAws_restJson1ExpressionVariables = (input, context) => {
6533
6534
  };
6534
6535
  const serializeAws_restJson1ForwardingConfig = (input, context) => {
6535
6536
  return {
6536
- ...(input.state !== undefined && input.state !== null && { state: input.state }),
6537
+ ...(input.state != null && { state: input.state }),
6537
6538
  };
6538
6539
  };
6539
6540
  const serializeAws_restJson1GatewayPlatform = (input, context) => {
6540
6541
  return {
6541
- ...(input.greengrass !== undefined &&
6542
- input.greengrass !== null && { greengrass: serializeAws_restJson1Greengrass(input.greengrass, context) }),
6543
- ...(input.greengrassV2 !== undefined &&
6544
- input.greengrassV2 !== null && { greengrassV2: serializeAws_restJson1GreengrassV2(input.greengrassV2, context) }),
6542
+ ...(input.greengrass != null && { greengrass: serializeAws_restJson1Greengrass(input.greengrass, context) }),
6543
+ ...(input.greengrassV2 != null && {
6544
+ greengrassV2: serializeAws_restJson1GreengrassV2(input.greengrassV2, context),
6545
+ }),
6545
6546
  };
6546
6547
  };
6547
6548
  const serializeAws_restJson1Greengrass = (input, context) => {
6548
6549
  return {
6549
- ...(input.groupArn !== undefined && input.groupArn !== null && { groupArn: input.groupArn }),
6550
+ ...(input.groupArn != null && { groupArn: input.groupArn }),
6550
6551
  };
6551
6552
  };
6552
6553
  const serializeAws_restJson1GreengrassV2 = (input, context) => {
6553
6554
  return {
6554
- ...(input.coreDeviceThingName !== undefined &&
6555
- input.coreDeviceThingName !== null && { coreDeviceThingName: input.coreDeviceThingName }),
6555
+ ...(input.coreDeviceThingName != null && { coreDeviceThingName: input.coreDeviceThingName }),
6556
6556
  };
6557
6557
  };
6558
6558
  const serializeAws_restJson1GroupIdentity = (input, context) => {
6559
6559
  return {
6560
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6560
+ ...(input.id != null && { id: input.id }),
6561
6561
  };
6562
6562
  };
6563
6563
  const serializeAws_restJson1IAMRoleIdentity = (input, context) => {
6564
6564
  return {
6565
- ...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
6565
+ ...(input.arn != null && { arn: input.arn }),
6566
6566
  };
6567
6567
  };
6568
6568
  const serializeAws_restJson1IAMUserIdentity = (input, context) => {
6569
6569
  return {
6570
- ...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
6570
+ ...(input.arn != null && { arn: input.arn }),
6571
6571
  };
6572
6572
  };
6573
6573
  const serializeAws_restJson1Identity = (input, context) => {
6574
6574
  return {
6575
- ...(input.group !== undefined &&
6576
- input.group !== null && { group: serializeAws_restJson1GroupIdentity(input.group, context) }),
6577
- ...(input.iamRole !== undefined &&
6578
- input.iamRole !== null && { iamRole: serializeAws_restJson1IAMRoleIdentity(input.iamRole, context) }),
6579
- ...(input.iamUser !== undefined &&
6580
- input.iamUser !== null && { iamUser: serializeAws_restJson1IAMUserIdentity(input.iamUser, context) }),
6581
- ...(input.user !== undefined &&
6582
- input.user !== null && { user: serializeAws_restJson1UserIdentity(input.user, context) }),
6575
+ ...(input.group != null && { group: serializeAws_restJson1GroupIdentity(input.group, context) }),
6576
+ ...(input.iamRole != null && { iamRole: serializeAws_restJson1IAMRoleIdentity(input.iamRole, context) }),
6577
+ ...(input.iamUser != null && { iamUser: serializeAws_restJson1IAMUserIdentity(input.iamUser, context) }),
6578
+ ...(input.user != null && { user: serializeAws_restJson1UserIdentity(input.user, context) }),
6583
6579
  };
6584
6580
  };
6585
6581
  const serializeAws_restJson1IDs = (input, context) => {
@@ -6594,91 +6590,78 @@ const serializeAws_restJson1IDs = (input, context) => {
6594
6590
  };
6595
6591
  const serializeAws_restJson1Image = (input, context) => {
6596
6592
  return {
6597
- ...(input.file !== undefined &&
6598
- input.file !== null && { file: serializeAws_restJson1ImageFile(input.file, context) }),
6599
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6593
+ ...(input.file != null && { file: serializeAws_restJson1ImageFile(input.file, context) }),
6594
+ ...(input.id != null && { id: input.id }),
6600
6595
  };
6601
6596
  };
6602
6597
  const serializeAws_restJson1ImageFile = (input, context) => {
6603
6598
  return {
6604
- ...(input.data !== undefined && input.data !== null && { data: context.base64Encoder(input.data) }),
6605
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
6599
+ ...(input.data != null && { data: context.base64Encoder(input.data) }),
6600
+ ...(input.type != null && { type: input.type }),
6606
6601
  };
6607
6602
  };
6608
6603
  const serializeAws_restJson1LoggingOptions = (input, context) => {
6609
6604
  return {
6610
- ...(input.level !== undefined && input.level !== null && { level: input.level }),
6605
+ ...(input.level != null && { level: input.level }),
6611
6606
  };
6612
6607
  };
6613
6608
  const serializeAws_restJson1Measurement = (input, context) => {
6614
6609
  return {
6615
- ...(input.processingConfig !== undefined &&
6616
- input.processingConfig !== null && {
6610
+ ...(input.processingConfig != null && {
6617
6611
  processingConfig: serializeAws_restJson1MeasurementProcessingConfig(input.processingConfig, context),
6618
6612
  }),
6619
6613
  };
6620
6614
  };
6621
6615
  const serializeAws_restJson1MeasurementProcessingConfig = (input, context) => {
6622
6616
  return {
6623
- ...(input.forwardingConfig !== undefined &&
6624
- input.forwardingConfig !== null && {
6617
+ ...(input.forwardingConfig != null && {
6625
6618
  forwardingConfig: serializeAws_restJson1ForwardingConfig(input.forwardingConfig, context),
6626
6619
  }),
6627
6620
  };
6628
6621
  };
6629
6622
  const serializeAws_restJson1Metric = (input, context) => {
6630
6623
  return {
6631
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
6632
- ...(input.processingConfig !== undefined &&
6633
- input.processingConfig !== null && {
6624
+ ...(input.expression != null && { expression: input.expression }),
6625
+ ...(input.processingConfig != null && {
6634
6626
  processingConfig: serializeAws_restJson1MetricProcessingConfig(input.processingConfig, context),
6635
6627
  }),
6636
- ...(input.variables !== undefined &&
6637
- input.variables !== null && { variables: serializeAws_restJson1ExpressionVariables(input.variables, context) }),
6638
- ...(input.window !== undefined &&
6639
- input.window !== null && { window: serializeAws_restJson1MetricWindow(input.window, context) }),
6628
+ ...(input.variables != null && { variables: serializeAws_restJson1ExpressionVariables(input.variables, context) }),
6629
+ ...(input.window != null && { window: serializeAws_restJson1MetricWindow(input.window, context) }),
6640
6630
  };
6641
6631
  };
6642
6632
  const serializeAws_restJson1MetricProcessingConfig = (input, context) => {
6643
6633
  return {
6644
- ...(input.computeLocation !== undefined &&
6645
- input.computeLocation !== null && { computeLocation: input.computeLocation }),
6634
+ ...(input.computeLocation != null && { computeLocation: input.computeLocation }),
6646
6635
  };
6647
6636
  };
6648
6637
  const serializeAws_restJson1MetricWindow = (input, context) => {
6649
6638
  return {
6650
- ...(input.tumbling !== undefined &&
6651
- input.tumbling !== null && { tumbling: serializeAws_restJson1TumblingWindow(input.tumbling, context) }),
6639
+ ...(input.tumbling != null && { tumbling: serializeAws_restJson1TumblingWindow(input.tumbling, context) }),
6652
6640
  };
6653
6641
  };
6654
6642
  const serializeAws_restJson1MultiLayerStorage = (input, context) => {
6655
6643
  return {
6656
- ...(input.customerManagedS3Storage !== undefined &&
6657
- input.customerManagedS3Storage !== null && {
6644
+ ...(input.customerManagedS3Storage != null && {
6658
6645
  customerManagedS3Storage: serializeAws_restJson1CustomerManagedS3Storage(input.customerManagedS3Storage, context),
6659
6646
  }),
6660
6647
  };
6661
6648
  };
6662
6649
  const serializeAws_restJson1PortalResource = (input, context) => {
6663
6650
  return {
6664
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6651
+ ...(input.id != null && { id: input.id }),
6665
6652
  };
6666
6653
  };
6667
6654
  const serializeAws_restJson1ProjectResource = (input, context) => {
6668
6655
  return {
6669
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6656
+ ...(input.id != null && { id: input.id }),
6670
6657
  };
6671
6658
  };
6672
6659
  const serializeAws_restJson1PropertyType = (input, context) => {
6673
6660
  return {
6674
- ...(input.attribute !== undefined &&
6675
- input.attribute !== null && { attribute: serializeAws_restJson1Attribute(input.attribute, context) }),
6676
- ...(input.measurement !== undefined &&
6677
- input.measurement !== null && { measurement: serializeAws_restJson1Measurement(input.measurement, context) }),
6678
- ...(input.metric !== undefined &&
6679
- input.metric !== null && { metric: serializeAws_restJson1Metric(input.metric, context) }),
6680
- ...(input.transform !== undefined &&
6681
- input.transform !== null && { transform: serializeAws_restJson1Transform(input.transform, context) }),
6661
+ ...(input.attribute != null && { attribute: serializeAws_restJson1Attribute(input.attribute, context) }),
6662
+ ...(input.measurement != null && { measurement: serializeAws_restJson1Measurement(input.measurement, context) }),
6663
+ ...(input.metric != null && { metric: serializeAws_restJson1Metric(input.metric, context) }),
6664
+ ...(input.transform != null && { transform: serializeAws_restJson1Transform(input.transform, context) }),
6682
6665
  };
6683
6666
  };
6684
6667
  const serializeAws_restJson1PutAssetPropertyValueEntries = (input, context) => {
@@ -6693,12 +6676,11 @@ const serializeAws_restJson1PutAssetPropertyValueEntries = (input, context) => {
6693
6676
  };
6694
6677
  const serializeAws_restJson1PutAssetPropertyValueEntry = (input, context) => {
6695
6678
  return {
6696
- ...(input.assetId !== undefined && input.assetId !== null && { assetId: input.assetId }),
6697
- ...(input.entryId !== undefined && input.entryId !== null && { entryId: input.entryId }),
6698
- ...(input.propertyAlias !== undefined && input.propertyAlias !== null && { propertyAlias: input.propertyAlias }),
6699
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
6700
- ...(input.propertyValues !== undefined &&
6701
- input.propertyValues !== null && {
6679
+ ...(input.assetId != null && { assetId: input.assetId }),
6680
+ ...(input.entryId != null && { entryId: input.entryId }),
6681
+ ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }),
6682
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
6683
+ ...(input.propertyValues != null && {
6702
6684
  propertyValues: serializeAws_restJson1AssetPropertyValues(input.propertyValues, context),
6703
6685
  }),
6704
6686
  };
@@ -6715,16 +6697,14 @@ const serializeAws_restJson1Qualities = (input, context) => {
6715
6697
  };
6716
6698
  const serializeAws_restJson1Resource = (input, context) => {
6717
6699
  return {
6718
- ...(input.portal !== undefined &&
6719
- input.portal !== null && { portal: serializeAws_restJson1PortalResource(input.portal, context) }),
6720
- ...(input.project !== undefined &&
6721
- input.project !== null && { project: serializeAws_restJson1ProjectResource(input.project, context) }),
6700
+ ...(input.portal != null && { portal: serializeAws_restJson1PortalResource(input.portal, context) }),
6701
+ ...(input.project != null && { project: serializeAws_restJson1ProjectResource(input.project, context) }),
6722
6702
  };
6723
6703
  };
6724
6704
  const serializeAws_restJson1RetentionPeriod = (input, context) => {
6725
6705
  return {
6726
- ...(input.numberOfDays !== undefined && input.numberOfDays !== null && { numberOfDays: input.numberOfDays }),
6727
- ...(input.unlimited !== undefined && input.unlimited !== null && { unlimited: input.unlimited }),
6706
+ ...(input.numberOfDays != null && { numberOfDays: input.numberOfDays }),
6707
+ ...(input.unlimited != null && { unlimited: input.unlimited }),
6728
6708
  };
6729
6709
  };
6730
6710
  const serializeAws_restJson1TagMap = (input, context) => {
@@ -6740,55 +6720,50 @@ const serializeAws_restJson1TagMap = (input, context) => {
6740
6720
  };
6741
6721
  const serializeAws_restJson1TimeInNanos = (input, context) => {
6742
6722
  return {
6743
- ...(input.offsetInNanos !== undefined && input.offsetInNanos !== null && { offsetInNanos: input.offsetInNanos }),
6744
- ...(input.timeInSeconds !== undefined && input.timeInSeconds !== null && { timeInSeconds: input.timeInSeconds }),
6723
+ ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }),
6724
+ ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }),
6745
6725
  };
6746
6726
  };
6747
6727
  const serializeAws_restJson1Transform = (input, context) => {
6748
6728
  return {
6749
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
6750
- ...(input.processingConfig !== undefined &&
6751
- input.processingConfig !== null && {
6729
+ ...(input.expression != null && { expression: input.expression }),
6730
+ ...(input.processingConfig != null && {
6752
6731
  processingConfig: serializeAws_restJson1TransformProcessingConfig(input.processingConfig, context),
6753
6732
  }),
6754
- ...(input.variables !== undefined &&
6755
- input.variables !== null && { variables: serializeAws_restJson1ExpressionVariables(input.variables, context) }),
6733
+ ...(input.variables != null && { variables: serializeAws_restJson1ExpressionVariables(input.variables, context) }),
6756
6734
  };
6757
6735
  };
6758
6736
  const serializeAws_restJson1TransformProcessingConfig = (input, context) => {
6759
6737
  return {
6760
- ...(input.computeLocation !== undefined &&
6761
- input.computeLocation !== null && { computeLocation: input.computeLocation }),
6762
- ...(input.forwardingConfig !== undefined &&
6763
- input.forwardingConfig !== null && {
6738
+ ...(input.computeLocation != null && { computeLocation: input.computeLocation }),
6739
+ ...(input.forwardingConfig != null && {
6764
6740
  forwardingConfig: serializeAws_restJson1ForwardingConfig(input.forwardingConfig, context),
6765
6741
  }),
6766
6742
  };
6767
6743
  };
6768
6744
  const serializeAws_restJson1TumblingWindow = (input, context) => {
6769
6745
  return {
6770
- ...(input.interval !== undefined && input.interval !== null && { interval: input.interval }),
6771
- ...(input.offset !== undefined && input.offset !== null && { offset: input.offset }),
6746
+ ...(input.interval != null && { interval: input.interval }),
6747
+ ...(input.offset != null && { offset: input.offset }),
6772
6748
  };
6773
6749
  };
6774
6750
  const serializeAws_restJson1UserIdentity = (input, context) => {
6775
6751
  return {
6776
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
6752
+ ...(input.id != null && { id: input.id }),
6777
6753
  };
6778
6754
  };
6779
6755
  const serializeAws_restJson1VariableValue = (input, context) => {
6780
6756
  return {
6781
- ...(input.hierarchyId !== undefined && input.hierarchyId !== null && { hierarchyId: input.hierarchyId }),
6782
- ...(input.propertyId !== undefined && input.propertyId !== null && { propertyId: input.propertyId }),
6757
+ ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }),
6758
+ ...(input.propertyId != null && { propertyId: input.propertyId }),
6783
6759
  };
6784
6760
  };
6785
6761
  const serializeAws_restJson1Variant = (input, context) => {
6786
6762
  return {
6787
- ...(input.booleanValue !== undefined && input.booleanValue !== null && { booleanValue: input.booleanValue }),
6788
- ...(input.doubleValue !== undefined &&
6789
- input.doubleValue !== null && { doubleValue: (0, smithy_client_1.serializeFloat)(input.doubleValue) }),
6790
- ...(input.integerValue !== undefined && input.integerValue !== null && { integerValue: input.integerValue }),
6791
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
6763
+ ...(input.booleanValue != null && { booleanValue: input.booleanValue }),
6764
+ ...(input.doubleValue != null && { doubleValue: (0, smithy_client_1.serializeFloat)(input.doubleValue) }),
6765
+ ...(input.integerValue != null && { integerValue: input.integerValue }),
6766
+ ...(input.stringValue != null && { stringValue: input.stringValue }),
6792
6767
  };
6793
6768
  };
6794
6769
  const deserializeAws_restJson1AccessPolicySummaries = (output, context) => {
@@ -6804,31 +6779,23 @@ const deserializeAws_restJson1AccessPolicySummaries = (output, context) => {
6804
6779
  };
6805
6780
  const deserializeAws_restJson1AccessPolicySummary = (output, context) => {
6806
6781
  return {
6807
- creationDate: output.creationDate !== undefined && output.creationDate !== null
6782
+ creationDate: output.creationDate != null
6808
6783
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
6809
6784
  : undefined,
6810
6785
  id: (0, smithy_client_1.expectString)(output.id),
6811
- identity: output.identity !== undefined && output.identity !== null
6812
- ? deserializeAws_restJson1Identity(output.identity, context)
6813
- : undefined,
6814
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
6786
+ identity: output.identity != null ? deserializeAws_restJson1Identity(output.identity, context) : undefined,
6787
+ lastUpdateDate: output.lastUpdateDate != null
6815
6788
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
6816
6789
  : undefined,
6817
6790
  permission: (0, smithy_client_1.expectString)(output.permission),
6818
- resource: output.resource !== undefined && output.resource !== null
6819
- ? deserializeAws_restJson1Resource(output.resource, context)
6820
- : undefined,
6791
+ resource: output.resource != null ? deserializeAws_restJson1Resource(output.resource, context) : undefined,
6821
6792
  };
6822
6793
  };
6823
6794
  const deserializeAws_restJson1AggregatedValue = (output, context) => {
6824
6795
  return {
6825
6796
  quality: (0, smithy_client_1.expectString)(output.quality),
6826
- timestamp: output.timestamp !== undefined && output.timestamp !== null
6827
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.timestamp)))
6828
- : undefined,
6829
- value: output.value !== undefined && output.value !== null
6830
- ? deserializeAws_restJson1Aggregates(output.value, context)
6831
- : undefined,
6797
+ timestamp: output.timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.timestamp))) : undefined,
6798
+ value: output.value != null ? deserializeAws_restJson1Aggregates(output.value, context) : undefined,
6832
6799
  };
6833
6800
  };
6834
6801
  const deserializeAws_restJson1AggregatedValues = (output, context) => {
@@ -6862,9 +6829,7 @@ const deserializeAws_restJson1AssetCompositeModel = (output, context) => {
6862
6829
  return {
6863
6830
  description: (0, smithy_client_1.expectString)(output.description),
6864
6831
  name: (0, smithy_client_1.expectString)(output.name),
6865
- properties: output.properties !== undefined && output.properties !== null
6866
- ? deserializeAws_restJson1AssetProperties(output.properties, context)
6867
- : undefined,
6832
+ properties: output.properties != null ? deserializeAws_restJson1AssetProperties(output.properties, context) : undefined,
6868
6833
  type: (0, smithy_client_1.expectString)(output.type),
6869
6834
  };
6870
6835
  };
@@ -6924,9 +6889,7 @@ const deserializeAws_restJson1AssetModelCompositeModel = (output, context) => {
6924
6889
  return {
6925
6890
  description: (0, smithy_client_1.expectString)(output.description),
6926
6891
  name: (0, smithy_client_1.expectString)(output.name),
6927
- properties: output.properties !== undefined && output.properties !== null
6928
- ? deserializeAws_restJson1AssetModelProperties(output.properties, context)
6929
- : undefined,
6892
+ properties: output.properties != null ? deserializeAws_restJson1AssetModelProperties(output.properties, context) : undefined,
6930
6893
  type: (0, smithy_client_1.expectString)(output.type),
6931
6894
  };
6932
6895
  };
@@ -6976,17 +6939,13 @@ const deserializeAws_restJson1AssetModelProperty = (output, context) => {
6976
6939
  dataTypeSpec: (0, smithy_client_1.expectString)(output.dataTypeSpec),
6977
6940
  id: (0, smithy_client_1.expectString)(output.id),
6978
6941
  name: (0, smithy_client_1.expectString)(output.name),
6979
- type: output.type !== undefined && output.type !== null
6980
- ? deserializeAws_restJson1PropertyType(output.type, context)
6981
- : undefined,
6942
+ type: output.type != null ? deserializeAws_restJson1PropertyType(output.type, context) : undefined,
6982
6943
  unit: (0, smithy_client_1.expectString)(output.unit),
6983
6944
  };
6984
6945
  };
6985
6946
  const deserializeAws_restJson1AssetModelStatus = (output, context) => {
6986
6947
  return {
6987
- error: output.error !== undefined && output.error !== null
6988
- ? deserializeAws_restJson1ErrorDetails(output.error, context)
6989
- : undefined,
6948
+ error: output.error != null ? deserializeAws_restJson1ErrorDetails(output.error, context) : undefined,
6990
6949
  state: (0, smithy_client_1.expectString)(output.state),
6991
6950
  };
6992
6951
  };
@@ -7004,18 +6963,16 @@ const deserializeAws_restJson1AssetModelSummaries = (output, context) => {
7004
6963
  const deserializeAws_restJson1AssetModelSummary = (output, context) => {
7005
6964
  return {
7006
6965
  arn: (0, smithy_client_1.expectString)(output.arn),
7007
- creationDate: output.creationDate !== undefined && output.creationDate !== null
6966
+ creationDate: output.creationDate != null
7008
6967
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7009
6968
  : undefined,
7010
6969
  description: (0, smithy_client_1.expectString)(output.description),
7011
6970
  id: (0, smithy_client_1.expectString)(output.id),
7012
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
6971
+ lastUpdateDate: output.lastUpdateDate != null
7013
6972
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7014
6973
  : undefined,
7015
6974
  name: (0, smithy_client_1.expectString)(output.name),
7016
- status: output.status !== undefined && output.status !== null
7017
- ? deserializeAws_restJson1AssetModelStatus(output.status, context)
7018
- : undefined,
6975
+ status: output.status != null ? deserializeAws_restJson1AssetModelStatus(output.status, context) : undefined,
7019
6976
  };
7020
6977
  };
7021
6978
  const deserializeAws_restJson1AssetProperties = (output, context) => {
@@ -7036,7 +6993,7 @@ const deserializeAws_restJson1AssetProperty = (output, context) => {
7036
6993
  dataTypeSpec: (0, smithy_client_1.expectString)(output.dataTypeSpec),
7037
6994
  id: (0, smithy_client_1.expectString)(output.id),
7038
6995
  name: (0, smithy_client_1.expectString)(output.name),
7039
- notification: output.notification !== undefined && output.notification !== null
6996
+ notification: output.notification != null
7040
6997
  ? deserializeAws_restJson1PropertyNotification(output.notification, context)
7041
6998
  : undefined,
7042
6999
  unit: (0, smithy_client_1.expectString)(output.unit),
@@ -7045,12 +7002,8 @@ const deserializeAws_restJson1AssetProperty = (output, context) => {
7045
7002
  const deserializeAws_restJson1AssetPropertyValue = (output, context) => {
7046
7003
  return {
7047
7004
  quality: (0, smithy_client_1.expectString)(output.quality),
7048
- timestamp: output.timestamp !== undefined && output.timestamp !== null
7049
- ? deserializeAws_restJson1TimeInNanos(output.timestamp, context)
7050
- : undefined,
7051
- value: output.value !== undefined && output.value !== null
7052
- ? deserializeAws_restJson1Variant(output.value, context)
7053
- : undefined,
7005
+ timestamp: output.timestamp != null ? deserializeAws_restJson1TimeInNanos(output.timestamp, context) : undefined,
7006
+ value: output.value != null ? deserializeAws_restJson1Variant(output.value, context) : undefined,
7054
7007
  };
7055
7008
  };
7056
7009
  const deserializeAws_restJson1AssetPropertyValueHistory = (output, context) => {
@@ -7077,7 +7030,7 @@ const deserializeAws_restJson1AssetRelationshipSummaries = (output, context) =>
7077
7030
  };
7078
7031
  const deserializeAws_restJson1AssetRelationshipSummary = (output, context) => {
7079
7032
  return {
7080
- hierarchyInfo: output.hierarchyInfo !== undefined && output.hierarchyInfo !== null
7033
+ hierarchyInfo: output.hierarchyInfo != null
7081
7034
  ? deserializeAws_restJson1AssetHierarchyInfo(output.hierarchyInfo, context)
7082
7035
  : undefined,
7083
7036
  relationshipType: (0, smithy_client_1.expectString)(output.relationshipType),
@@ -7085,9 +7038,7 @@ const deserializeAws_restJson1AssetRelationshipSummary = (output, context) => {
7085
7038
  };
7086
7039
  const deserializeAws_restJson1AssetStatus = (output, context) => {
7087
7040
  return {
7088
- error: output.error !== undefined && output.error !== null
7089
- ? deserializeAws_restJson1ErrorDetails(output.error, context)
7090
- : undefined,
7041
+ error: output.error != null ? deserializeAws_restJson1ErrorDetails(output.error, context) : undefined,
7091
7042
  state: (0, smithy_client_1.expectString)(output.state),
7092
7043
  };
7093
7044
  };
@@ -7106,21 +7057,17 @@ const deserializeAws_restJson1AssetSummary = (output, context) => {
7106
7057
  return {
7107
7058
  arn: (0, smithy_client_1.expectString)(output.arn),
7108
7059
  assetModelId: (0, smithy_client_1.expectString)(output.assetModelId),
7109
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7060
+ creationDate: output.creationDate != null
7110
7061
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7111
7062
  : undefined,
7112
7063
  description: (0, smithy_client_1.expectString)(output.description),
7113
- hierarchies: output.hierarchies !== undefined && output.hierarchies !== null
7114
- ? deserializeAws_restJson1AssetHierarchies(output.hierarchies, context)
7115
- : undefined,
7064
+ hierarchies: output.hierarchies != null ? deserializeAws_restJson1AssetHierarchies(output.hierarchies, context) : undefined,
7116
7065
  id: (0, smithy_client_1.expectString)(output.id),
7117
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7066
+ lastUpdateDate: output.lastUpdateDate != null
7118
7067
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7119
7068
  : undefined,
7120
7069
  name: (0, smithy_client_1.expectString)(output.name),
7121
- status: output.status !== undefined && output.status !== null
7122
- ? deserializeAws_restJson1AssetStatus(output.status, context)
7123
- : undefined,
7070
+ status: output.status != null ? deserializeAws_restJson1AssetStatus(output.status, context) : undefined,
7124
7071
  };
7125
7072
  };
7126
7073
  const deserializeAws_restJson1AssociatedAssetsSummaries = (output, context) => {
@@ -7138,21 +7085,17 @@ const deserializeAws_restJson1AssociatedAssetsSummary = (output, context) => {
7138
7085
  return {
7139
7086
  arn: (0, smithy_client_1.expectString)(output.arn),
7140
7087
  assetModelId: (0, smithy_client_1.expectString)(output.assetModelId),
7141
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7088
+ creationDate: output.creationDate != null
7142
7089
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7143
7090
  : undefined,
7144
7091
  description: (0, smithy_client_1.expectString)(output.description),
7145
- hierarchies: output.hierarchies !== undefined && output.hierarchies !== null
7146
- ? deserializeAws_restJson1AssetHierarchies(output.hierarchies, context)
7147
- : undefined,
7092
+ hierarchies: output.hierarchies != null ? deserializeAws_restJson1AssetHierarchies(output.hierarchies, context) : undefined,
7148
7093
  id: (0, smithy_client_1.expectString)(output.id),
7149
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7094
+ lastUpdateDate: output.lastUpdateDate != null
7150
7095
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7151
7096
  : undefined,
7152
7097
  name: (0, smithy_client_1.expectString)(output.name),
7153
- status: output.status !== undefined && output.status !== null
7154
- ? deserializeAws_restJson1AssetStatus(output.status, context)
7155
- : undefined,
7098
+ status: output.status != null ? deserializeAws_restJson1AssetStatus(output.status, context) : undefined,
7156
7099
  };
7157
7100
  };
7158
7101
  const deserializeAws_restJson1Attribute = (output, context) => {
@@ -7203,7 +7146,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntry = (outpu
7203
7146
  const deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorInfo = (output, context) => {
7204
7147
  return {
7205
7148
  errorCode: (0, smithy_client_1.expectString)(output.errorCode),
7206
- errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
7149
+ errorTimestamp: output.errorTimestamp != null
7207
7150
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.errorTimestamp)))
7208
7151
  : undefined,
7209
7152
  };
@@ -7223,7 +7166,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyAggregatesSkippedEntry = (out
7223
7166
  return {
7224
7167
  completionStatus: (0, smithy_client_1.expectString)(output.completionStatus),
7225
7168
  entryId: (0, smithy_client_1.expectString)(output.entryId),
7226
- errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
7169
+ errorInfo: output.errorInfo != null
7227
7170
  ? deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorInfo(output.errorInfo, context)
7228
7171
  : undefined,
7229
7172
  };
@@ -7241,7 +7184,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntries = (o
7241
7184
  };
7242
7185
  const deserializeAws_restJson1BatchGetAssetPropertyAggregatesSuccessEntry = (output, context) => {
7243
7186
  return {
7244
- aggregatedValues: output.aggregatedValues !== undefined && output.aggregatedValues !== null
7187
+ aggregatedValues: output.aggregatedValues != null
7245
7188
  ? deserializeAws_restJson1AggregatedValues(output.aggregatedValues, context)
7246
7189
  : undefined,
7247
7190
  entryId: (0, smithy_client_1.expectString)(output.entryId),
@@ -7268,7 +7211,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntry = (output, co
7268
7211
  const deserializeAws_restJson1BatchGetAssetPropertyValueErrorInfo = (output, context) => {
7269
7212
  return {
7270
7213
  errorCode: (0, smithy_client_1.expectString)(output.errorCode),
7271
- errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
7214
+ errorTimestamp: output.errorTimestamp != null
7272
7215
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.errorTimestamp)))
7273
7216
  : undefined,
7274
7217
  };
@@ -7294,7 +7237,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntry = (out
7294
7237
  const deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorInfo = (output, context) => {
7295
7238
  return {
7296
7239
  errorCode: (0, smithy_client_1.expectString)(output.errorCode),
7297
- errorTimestamp: output.errorTimestamp !== undefined && output.errorTimestamp !== null
7240
+ errorTimestamp: output.errorTimestamp != null
7298
7241
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.errorTimestamp)))
7299
7242
  : undefined,
7300
7243
  };
@@ -7314,7 +7257,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueHistorySkippedEntry = (o
7314
7257
  return {
7315
7258
  completionStatus: (0, smithy_client_1.expectString)(output.completionStatus),
7316
7259
  entryId: (0, smithy_client_1.expectString)(output.entryId),
7317
- errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
7260
+ errorInfo: output.errorInfo != null
7318
7261
  ? deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorInfo(output.errorInfo, context)
7319
7262
  : undefined,
7320
7263
  };
@@ -7332,7 +7275,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntries =
7332
7275
  };
7333
7276
  const deserializeAws_restJson1BatchGetAssetPropertyValueHistorySuccessEntry = (output, context) => {
7334
7277
  return {
7335
- assetPropertyValueHistory: output.assetPropertyValueHistory !== undefined && output.assetPropertyValueHistory !== null
7278
+ assetPropertyValueHistory: output.assetPropertyValueHistory != null
7336
7279
  ? deserializeAws_restJson1AssetPropertyValueHistory(output.assetPropertyValueHistory, context)
7337
7280
  : undefined,
7338
7281
  entryId: (0, smithy_client_1.expectString)(output.entryId),
@@ -7353,7 +7296,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueSkippedEntry = (output,
7353
7296
  return {
7354
7297
  completionStatus: (0, smithy_client_1.expectString)(output.completionStatus),
7355
7298
  entryId: (0, smithy_client_1.expectString)(output.entryId),
7356
- errorInfo: output.errorInfo !== undefined && output.errorInfo !== null
7299
+ errorInfo: output.errorInfo != null
7357
7300
  ? deserializeAws_restJson1BatchGetAssetPropertyValueErrorInfo(output.errorInfo, context)
7358
7301
  : undefined,
7359
7302
  };
@@ -7371,7 +7314,7 @@ const deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntries = (output
7371
7314
  };
7372
7315
  const deserializeAws_restJson1BatchGetAssetPropertyValueSuccessEntry = (output, context) => {
7373
7316
  return {
7374
- assetPropertyValue: output.assetPropertyValue !== undefined && output.assetPropertyValue !== null
7317
+ assetPropertyValue: output.assetPropertyValue != null
7375
7318
  ? deserializeAws_restJson1AssetPropertyValue(output.assetPropertyValue, context)
7376
7319
  : undefined,
7377
7320
  entryId: (0, smithy_client_1.expectString)(output.entryId),
@@ -7381,9 +7324,7 @@ const deserializeAws_restJson1BatchPutAssetPropertyError = (output, context) =>
7381
7324
  return {
7382
7325
  errorCode: (0, smithy_client_1.expectString)(output.errorCode),
7383
7326
  errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
7384
- timestamps: output.timestamps !== undefined && output.timestamps !== null
7385
- ? deserializeAws_restJson1Timestamps(output.timestamps, context)
7386
- : undefined,
7327
+ timestamps: output.timestamps != null ? deserializeAws_restJson1Timestamps(output.timestamps, context) : undefined,
7387
7328
  };
7388
7329
  };
7389
7330
  const deserializeAws_restJson1BatchPutAssetPropertyErrorEntries = (output, context) => {
@@ -7400,9 +7341,7 @@ const deserializeAws_restJson1BatchPutAssetPropertyErrorEntries = (output, conte
7400
7341
  const deserializeAws_restJson1BatchPutAssetPropertyErrorEntry = (output, context) => {
7401
7342
  return {
7402
7343
  entryId: (0, smithy_client_1.expectString)(output.entryId),
7403
- errors: output.errors !== undefined && output.errors !== null
7404
- ? deserializeAws_restJson1BatchPutAssetPropertyErrors(output.errors, context)
7405
- : undefined,
7344
+ errors: output.errors != null ? deserializeAws_restJson1BatchPutAssetPropertyErrors(output.errors, context) : undefined,
7406
7345
  };
7407
7346
  };
7408
7347
  const deserializeAws_restJson1BatchPutAssetPropertyErrors = (output, context) => {
@@ -7418,9 +7357,7 @@ const deserializeAws_restJson1BatchPutAssetPropertyErrors = (output, context) =>
7418
7357
  };
7419
7358
  const deserializeAws_restJson1CompositeModelProperty = (output, context) => {
7420
7359
  return {
7421
- assetProperty: output.assetProperty !== undefined && output.assetProperty !== null
7422
- ? deserializeAws_restJson1Property(output.assetProperty, context)
7423
- : undefined,
7360
+ assetProperty: output.assetProperty != null ? deserializeAws_restJson1Property(output.assetProperty, context) : undefined,
7424
7361
  name: (0, smithy_client_1.expectString)(output.name),
7425
7362
  type: (0, smithy_client_1.expectString)(output.type),
7426
7363
  };
@@ -7433,9 +7370,7 @@ const deserializeAws_restJson1ConfigurationErrorDetails = (output, context) => {
7433
7370
  };
7434
7371
  const deserializeAws_restJson1ConfigurationStatus = (output, context) => {
7435
7372
  return {
7436
- error: output.error !== undefined && output.error !== null
7437
- ? deserializeAws_restJson1ConfigurationErrorDetails(output.error, context)
7438
- : undefined,
7373
+ error: output.error != null ? deserializeAws_restJson1ConfigurationErrorDetails(output.error, context) : undefined,
7439
7374
  state: (0, smithy_client_1.expectString)(output.state),
7440
7375
  };
7441
7376
  };
@@ -7458,12 +7393,12 @@ const deserializeAws_restJson1DashboardSummaries = (output, context) => {
7458
7393
  };
7459
7394
  const deserializeAws_restJson1DashboardSummary = (output, context) => {
7460
7395
  return {
7461
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7396
+ creationDate: output.creationDate != null
7462
7397
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7463
7398
  : undefined,
7464
7399
  description: (0, smithy_client_1.expectString)(output.description),
7465
7400
  id: (0, smithy_client_1.expectString)(output.id),
7466
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7401
+ lastUpdateDate: output.lastUpdateDate != null
7467
7402
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7468
7403
  : undefined,
7469
7404
  name: (0, smithy_client_1.expectString)(output.name),
@@ -7489,18 +7424,14 @@ const deserializeAws_restJson1DetailedErrors = (output, context) => {
7489
7424
  const deserializeAws_restJson1ErrorDetails = (output, context) => {
7490
7425
  return {
7491
7426
  code: (0, smithy_client_1.expectString)(output.code),
7492
- details: output.details !== undefined && output.details !== null
7493
- ? deserializeAws_restJson1DetailedErrors(output.details, context)
7494
- : undefined,
7427
+ details: output.details != null ? deserializeAws_restJson1DetailedErrors(output.details, context) : undefined,
7495
7428
  message: (0, smithy_client_1.expectString)(output.message),
7496
7429
  };
7497
7430
  };
7498
7431
  const deserializeAws_restJson1ExpressionVariable = (output, context) => {
7499
7432
  return {
7500
7433
  name: (0, smithy_client_1.expectString)(output.name),
7501
- value: output.value !== undefined && output.value !== null
7502
- ? deserializeAws_restJson1VariableValue(output.value, context)
7503
- : undefined,
7434
+ value: output.value != null ? deserializeAws_restJson1VariableValue(output.value, context) : undefined,
7504
7435
  };
7505
7436
  };
7506
7437
  const deserializeAws_restJson1ExpressionVariables = (output, context) => {
@@ -7538,12 +7469,8 @@ const deserializeAws_restJson1GatewayCapabilitySummary = (output, context) => {
7538
7469
  };
7539
7470
  const deserializeAws_restJson1GatewayPlatform = (output, context) => {
7540
7471
  return {
7541
- greengrass: output.greengrass !== undefined && output.greengrass !== null
7542
- ? deserializeAws_restJson1Greengrass(output.greengrass, context)
7543
- : undefined,
7544
- greengrassV2: output.greengrassV2 !== undefined && output.greengrassV2 !== null
7545
- ? deserializeAws_restJson1GreengrassV2(output.greengrassV2, context)
7546
- : undefined,
7472
+ greengrass: output.greengrass != null ? deserializeAws_restJson1Greengrass(output.greengrass, context) : undefined,
7473
+ greengrassV2: output.greengrassV2 != null ? deserializeAws_restJson1GreengrassV2(output.greengrassV2, context) : undefined,
7547
7474
  };
7548
7475
  };
7549
7476
  const deserializeAws_restJson1GatewaySummaries = (output, context) => {
@@ -7559,18 +7486,18 @@ const deserializeAws_restJson1GatewaySummaries = (output, context) => {
7559
7486
  };
7560
7487
  const deserializeAws_restJson1GatewaySummary = (output, context) => {
7561
7488
  return {
7562
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7489
+ creationDate: output.creationDate != null
7563
7490
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7564
7491
  : undefined,
7565
- gatewayCapabilitySummaries: output.gatewayCapabilitySummaries !== undefined && output.gatewayCapabilitySummaries !== null
7492
+ gatewayCapabilitySummaries: output.gatewayCapabilitySummaries != null
7566
7493
  ? deserializeAws_restJson1GatewayCapabilitySummaries(output.gatewayCapabilitySummaries, context)
7567
7494
  : undefined,
7568
7495
  gatewayId: (0, smithy_client_1.expectString)(output.gatewayId),
7569
7496
  gatewayName: (0, smithy_client_1.expectString)(output.gatewayName),
7570
- gatewayPlatform: output.gatewayPlatform !== undefined && output.gatewayPlatform !== null
7497
+ gatewayPlatform: output.gatewayPlatform != null
7571
7498
  ? deserializeAws_restJson1GatewayPlatform(output.gatewayPlatform, context)
7572
7499
  : undefined,
7573
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7500
+ lastUpdateDate: output.lastUpdateDate != null
7574
7501
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7575
7502
  : undefined,
7576
7503
  };
@@ -7602,18 +7529,10 @@ const deserializeAws_restJson1IAMUserIdentity = (output, context) => {
7602
7529
  };
7603
7530
  const deserializeAws_restJson1Identity = (output, context) => {
7604
7531
  return {
7605
- group: output.group !== undefined && output.group !== null
7606
- ? deserializeAws_restJson1GroupIdentity(output.group, context)
7607
- : undefined,
7608
- iamRole: output.iamRole !== undefined && output.iamRole !== null
7609
- ? deserializeAws_restJson1IAMRoleIdentity(output.iamRole, context)
7610
- : undefined,
7611
- iamUser: output.iamUser !== undefined && output.iamUser !== null
7612
- ? deserializeAws_restJson1IAMUserIdentity(output.iamUser, context)
7613
- : undefined,
7614
- user: output.user !== undefined && output.user !== null
7615
- ? deserializeAws_restJson1UserIdentity(output.user, context)
7616
- : undefined,
7532
+ group: output.group != null ? deserializeAws_restJson1GroupIdentity(output.group, context) : undefined,
7533
+ iamRole: output.iamRole != null ? deserializeAws_restJson1IAMRoleIdentity(output.iamRole, context) : undefined,
7534
+ iamUser: output.iamUser != null ? deserializeAws_restJson1IAMUserIdentity(output.iamUser, context) : undefined,
7535
+ user: output.user != null ? deserializeAws_restJson1UserIdentity(output.user, context) : undefined,
7617
7536
  };
7618
7537
  };
7619
7538
  const deserializeAws_restJson1ImageLocation = (output, context) => {
@@ -7624,12 +7543,8 @@ const deserializeAws_restJson1ImageLocation = (output, context) => {
7624
7543
  };
7625
7544
  const deserializeAws_restJson1InterpolatedAssetPropertyValue = (output, context) => {
7626
7545
  return {
7627
- timestamp: output.timestamp !== undefined && output.timestamp !== null
7628
- ? deserializeAws_restJson1TimeInNanos(output.timestamp, context)
7629
- : undefined,
7630
- value: output.value !== undefined && output.value !== null
7631
- ? deserializeAws_restJson1Variant(output.value, context)
7632
- : undefined,
7546
+ timestamp: output.timestamp != null ? deserializeAws_restJson1TimeInNanos(output.timestamp, context) : undefined,
7547
+ value: output.value != null ? deserializeAws_restJson1Variant(output.value, context) : undefined,
7633
7548
  };
7634
7549
  };
7635
7550
  const deserializeAws_restJson1InterpolatedAssetPropertyValues = (output, context) => {
@@ -7650,14 +7565,14 @@ const deserializeAws_restJson1LoggingOptions = (output, context) => {
7650
7565
  };
7651
7566
  const deserializeAws_restJson1Measurement = (output, context) => {
7652
7567
  return {
7653
- processingConfig: output.processingConfig !== undefined && output.processingConfig !== null
7568
+ processingConfig: output.processingConfig != null
7654
7569
  ? deserializeAws_restJson1MeasurementProcessingConfig(output.processingConfig, context)
7655
7570
  : undefined,
7656
7571
  };
7657
7572
  };
7658
7573
  const deserializeAws_restJson1MeasurementProcessingConfig = (output, context) => {
7659
7574
  return {
7660
- forwardingConfig: output.forwardingConfig !== undefined && output.forwardingConfig !== null
7575
+ forwardingConfig: output.forwardingConfig != null
7661
7576
  ? deserializeAws_restJson1ForwardingConfig(output.forwardingConfig, context)
7662
7577
  : undefined,
7663
7578
  };
@@ -7665,15 +7580,11 @@ const deserializeAws_restJson1MeasurementProcessingConfig = (output, context) =>
7665
7580
  const deserializeAws_restJson1Metric = (output, context) => {
7666
7581
  return {
7667
7582
  expression: (0, smithy_client_1.expectString)(output.expression),
7668
- processingConfig: output.processingConfig !== undefined && output.processingConfig !== null
7583
+ processingConfig: output.processingConfig != null
7669
7584
  ? deserializeAws_restJson1MetricProcessingConfig(output.processingConfig, context)
7670
7585
  : undefined,
7671
- variables: output.variables !== undefined && output.variables !== null
7672
- ? deserializeAws_restJson1ExpressionVariables(output.variables, context)
7673
- : undefined,
7674
- window: output.window !== undefined && output.window !== null
7675
- ? deserializeAws_restJson1MetricWindow(output.window, context)
7676
- : undefined,
7586
+ variables: output.variables != null ? deserializeAws_restJson1ExpressionVariables(output.variables, context) : undefined,
7587
+ window: output.window != null ? deserializeAws_restJson1MetricWindow(output.window, context) : undefined,
7677
7588
  };
7678
7589
  };
7679
7590
  const deserializeAws_restJson1MetricProcessingConfig = (output, context) => {
@@ -7683,9 +7594,7 @@ const deserializeAws_restJson1MetricProcessingConfig = (output, context) => {
7683
7594
  };
7684
7595
  const deserializeAws_restJson1MetricWindow = (output, context) => {
7685
7596
  return {
7686
- tumbling: output.tumbling !== undefined && output.tumbling !== null
7687
- ? deserializeAws_restJson1TumblingWindow(output.tumbling, context)
7688
- : undefined,
7597
+ tumbling: output.tumbling != null ? deserializeAws_restJson1TumblingWindow(output.tumbling, context) : undefined,
7689
7598
  };
7690
7599
  };
7691
7600
  const deserializeAws_restJson1MonitorErrorDetails = (output, context) => {
@@ -7696,7 +7605,7 @@ const deserializeAws_restJson1MonitorErrorDetails = (output, context) => {
7696
7605
  };
7697
7606
  const deserializeAws_restJson1MultiLayerStorage = (output, context) => {
7698
7607
  return {
7699
- customerManagedS3Storage: output.customerManagedS3Storage !== undefined && output.customerManagedS3Storage !== null
7608
+ customerManagedS3Storage: output.customerManagedS3Storage != null
7700
7609
  ? deserializeAws_restJson1CustomerManagedS3Storage(output.customerManagedS3Storage, context)
7701
7610
  : undefined,
7702
7611
  };
@@ -7708,9 +7617,7 @@ const deserializeAws_restJson1PortalResource = (output, context) => {
7708
7617
  };
7709
7618
  const deserializeAws_restJson1PortalStatus = (output, context) => {
7710
7619
  return {
7711
- error: output.error !== undefined && output.error !== null
7712
- ? deserializeAws_restJson1MonitorErrorDetails(output.error, context)
7713
- : undefined,
7620
+ error: output.error != null ? deserializeAws_restJson1MonitorErrorDetails(output.error, context) : undefined,
7714
7621
  state: (0, smithy_client_1.expectString)(output.state),
7715
7622
  };
7716
7623
  };
@@ -7727,20 +7634,18 @@ const deserializeAws_restJson1PortalSummaries = (output, context) => {
7727
7634
  };
7728
7635
  const deserializeAws_restJson1PortalSummary = (output, context) => {
7729
7636
  return {
7730
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7637
+ creationDate: output.creationDate != null
7731
7638
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7732
7639
  : undefined,
7733
7640
  description: (0, smithy_client_1.expectString)(output.description),
7734
7641
  id: (0, smithy_client_1.expectString)(output.id),
7735
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7642
+ lastUpdateDate: output.lastUpdateDate != null
7736
7643
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7737
7644
  : undefined,
7738
7645
  name: (0, smithy_client_1.expectString)(output.name),
7739
7646
  roleArn: (0, smithy_client_1.expectString)(output.roleArn),
7740
7647
  startUrl: (0, smithy_client_1.expectString)(output.startUrl),
7741
- status: output.status !== undefined && output.status !== null
7742
- ? deserializeAws_restJson1PortalStatus(output.status, context)
7743
- : undefined,
7648
+ status: output.status != null ? deserializeAws_restJson1PortalStatus(output.status, context) : undefined,
7744
7649
  };
7745
7650
  };
7746
7651
  const deserializeAws_restJson1ProjectResource = (output, context) => {
@@ -7761,12 +7666,12 @@ const deserializeAws_restJson1ProjectSummaries = (output, context) => {
7761
7666
  };
7762
7667
  const deserializeAws_restJson1ProjectSummary = (output, context) => {
7763
7668
  return {
7764
- creationDate: output.creationDate !== undefined && output.creationDate !== null
7669
+ creationDate: output.creationDate != null
7765
7670
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationDate)))
7766
7671
  : undefined,
7767
7672
  description: (0, smithy_client_1.expectString)(output.description),
7768
7673
  id: (0, smithy_client_1.expectString)(output.id),
7769
- lastUpdateDate: output.lastUpdateDate !== undefined && output.lastUpdateDate !== null
7674
+ lastUpdateDate: output.lastUpdateDate != null
7770
7675
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateDate)))
7771
7676
  : undefined,
7772
7677
  name: (0, smithy_client_1.expectString)(output.name),
@@ -7778,12 +7683,10 @@ const deserializeAws_restJson1Property = (output, context) => {
7778
7683
  dataType: (0, smithy_client_1.expectString)(output.dataType),
7779
7684
  id: (0, smithy_client_1.expectString)(output.id),
7780
7685
  name: (0, smithy_client_1.expectString)(output.name),
7781
- notification: output.notification !== undefined && output.notification !== null
7686
+ notification: output.notification != null
7782
7687
  ? deserializeAws_restJson1PropertyNotification(output.notification, context)
7783
7688
  : undefined,
7784
- type: output.type !== undefined && output.type !== null
7785
- ? deserializeAws_restJson1PropertyType(output.type, context)
7786
- : undefined,
7689
+ type: output.type != null ? deserializeAws_restJson1PropertyType(output.type, context) : undefined,
7787
7690
  unit: (0, smithy_client_1.expectString)(output.unit),
7788
7691
  };
7789
7692
  };
@@ -7795,28 +7698,16 @@ const deserializeAws_restJson1PropertyNotification = (output, context) => {
7795
7698
  };
7796
7699
  const deserializeAws_restJson1PropertyType = (output, context) => {
7797
7700
  return {
7798
- attribute: output.attribute !== undefined && output.attribute !== null
7799
- ? deserializeAws_restJson1Attribute(output.attribute, context)
7800
- : undefined,
7801
- measurement: output.measurement !== undefined && output.measurement !== null
7802
- ? deserializeAws_restJson1Measurement(output.measurement, context)
7803
- : undefined,
7804
- metric: output.metric !== undefined && output.metric !== null
7805
- ? deserializeAws_restJson1Metric(output.metric, context)
7806
- : undefined,
7807
- transform: output.transform !== undefined && output.transform !== null
7808
- ? deserializeAws_restJson1Transform(output.transform, context)
7809
- : undefined,
7701
+ attribute: output.attribute != null ? deserializeAws_restJson1Attribute(output.attribute, context) : undefined,
7702
+ measurement: output.measurement != null ? deserializeAws_restJson1Measurement(output.measurement, context) : undefined,
7703
+ metric: output.metric != null ? deserializeAws_restJson1Metric(output.metric, context) : undefined,
7704
+ transform: output.transform != null ? deserializeAws_restJson1Transform(output.transform, context) : undefined,
7810
7705
  };
7811
7706
  };
7812
7707
  const deserializeAws_restJson1Resource = (output, context) => {
7813
7708
  return {
7814
- portal: output.portal !== undefined && output.portal !== null
7815
- ? deserializeAws_restJson1PortalResource(output.portal, context)
7816
- : undefined,
7817
- project: output.project !== undefined && output.project !== null
7818
- ? deserializeAws_restJson1ProjectResource(output.project, context)
7819
- : undefined,
7709
+ portal: output.portal != null ? deserializeAws_restJson1PortalResource(output.portal, context) : undefined,
7710
+ project: output.project != null ? deserializeAws_restJson1ProjectResource(output.project, context) : undefined,
7820
7711
  };
7821
7712
  };
7822
7713
  const deserializeAws_restJson1RetentionPeriod = (output, context) => {
@@ -7860,11 +7751,11 @@ const deserializeAws_restJson1TimeSeriesSummary = (output, context) => {
7860
7751
  dataType: (0, smithy_client_1.expectString)(output.dataType),
7861
7752
  dataTypeSpec: (0, smithy_client_1.expectString)(output.dataTypeSpec),
7862
7753
  propertyId: (0, smithy_client_1.expectString)(output.propertyId),
7863
- timeSeriesCreationDate: output.timeSeriesCreationDate !== undefined && output.timeSeriesCreationDate !== null
7754
+ timeSeriesCreationDate: output.timeSeriesCreationDate != null
7864
7755
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.timeSeriesCreationDate)))
7865
7756
  : undefined,
7866
7757
  timeSeriesId: (0, smithy_client_1.expectString)(output.timeSeriesId),
7867
- timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate !== undefined && output.timeSeriesLastUpdateDate !== null
7758
+ timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate != null
7868
7759
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.timeSeriesLastUpdateDate)))
7869
7760
  : undefined,
7870
7761
  };
@@ -7883,18 +7774,16 @@ const deserializeAws_restJson1Timestamps = (output, context) => {
7883
7774
  const deserializeAws_restJson1Transform = (output, context) => {
7884
7775
  return {
7885
7776
  expression: (0, smithy_client_1.expectString)(output.expression),
7886
- processingConfig: output.processingConfig !== undefined && output.processingConfig !== null
7777
+ processingConfig: output.processingConfig != null
7887
7778
  ? deserializeAws_restJson1TransformProcessingConfig(output.processingConfig, context)
7888
7779
  : undefined,
7889
- variables: output.variables !== undefined && output.variables !== null
7890
- ? deserializeAws_restJson1ExpressionVariables(output.variables, context)
7891
- : undefined,
7780
+ variables: output.variables != null ? deserializeAws_restJson1ExpressionVariables(output.variables, context) : undefined,
7892
7781
  };
7893
7782
  };
7894
7783
  const deserializeAws_restJson1TransformProcessingConfig = (output, context) => {
7895
7784
  return {
7896
7785
  computeLocation: (0, smithy_client_1.expectString)(output.computeLocation),
7897
- forwardingConfig: output.forwardingConfig !== undefined && output.forwardingConfig !== null
7786
+ forwardingConfig: output.forwardingConfig != null
7898
7787
  ? deserializeAws_restJson1ForwardingConfig(output.forwardingConfig, context)
7899
7788
  : undefined,
7900
7789
  };
@@ -7973,5 +7862,4 @@ const loadRestJsonErrorCode = (output, data) => {
7973
7862
  if (data["__type"] !== undefined) {
7974
7863
  return sanitizeErrorCode(data["__type"]);
7975
7864
  }
7976
- return "";
7977
7865
  };