@aws-sdk/client-iotsitewise 3.42.0 → 3.46.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist-cjs/IoTSiteWise.js +75 -0
  3. package/dist-cjs/commands/AssociateTimeSeriesToAssetPropertyCommand.js +36 -0
  4. package/dist-cjs/commands/DeleteTimeSeriesCommand.js +36 -0
  5. package/dist-cjs/commands/DescribeTimeSeriesCommand.js +36 -0
  6. package/dist-cjs/commands/DisassociateTimeSeriesFromAssetPropertyCommand.js +36 -0
  7. package/dist-cjs/commands/ListTimeSeriesCommand.js +36 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/endpoints.js +1 -0
  10. package/dist-cjs/models/models_0.js +68 -4
  11. package/dist-cjs/pagination/ListTimeSeriesPaginator.js +35 -0
  12. package/dist-cjs/pagination/index.js +1 -0
  13. package/dist-cjs/protocols/Aws_restJson1.js +634 -5
  14. package/dist-cjs/runtimeConfig.js +0 -2
  15. package/dist-es/IoTSiteWise.js +75 -0
  16. package/dist-es/commands/AssociateTimeSeriesToAssetPropertyCommand.js +39 -0
  17. package/dist-es/commands/DeleteTimeSeriesCommand.js +39 -0
  18. package/dist-es/commands/DescribeTimeSeriesCommand.js +39 -0
  19. package/dist-es/commands/DisassociateTimeSeriesFromAssetPropertyCommand.js +39 -0
  20. package/dist-es/commands/ListTimeSeriesCommand.js +39 -0
  21. package/dist-es/commands/index.js +5 -0
  22. package/dist-es/endpoints.js +1 -0
  23. package/dist-es/models/models_0.js +46 -0
  24. package/dist-es/pagination/ListTimeSeriesPaginator.js +74 -0
  25. package/dist-es/pagination/index.js +1 -0
  26. package/dist-es/protocols/Aws_restJson1.js +807 -106
  27. package/dist-es/runtimeConfig.js +0 -2
  28. package/dist-types/IoTSiteWise.d.ts +81 -2
  29. package/dist-types/IoTSiteWiseClient.d.ts +7 -2
  30. package/dist-types/commands/AssociateTimeSeriesToAssetPropertyCommand.d.ts +35 -0
  31. package/dist-types/commands/CreateProjectCommand.d.ts +4 -0
  32. package/dist-types/commands/DeleteTimeSeriesCommand.d.ts +56 -0
  33. package/dist-types/commands/DescribeTimeSeriesCommand.d.ts +54 -0
  34. package/dist-types/commands/DisassociateTimeSeriesFromAssetPropertyCommand.d.ts +35 -0
  35. package/dist-types/commands/GetInterpolatedAssetPropertyValuesCommand.d.ts +2 -2
  36. package/dist-types/commands/ListTimeSeriesCommand.d.ts +35 -0
  37. package/dist-types/commands/index.d.ts +5 -0
  38. package/dist-types/models/models_0.d.ts +451 -83
  39. package/dist-types/pagination/ListTimeSeriesPaginator.d.ts +4 -0
  40. package/dist-types/pagination/index.d.ts +1 -0
  41. package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
  42. package/dist-types/ts3.4/IoTSiteWise.d.ts +25 -0
  43. package/dist-types/ts3.4/IoTSiteWiseClient.d.ts +7 -2
  44. package/dist-types/ts3.4/commands/AssociateTimeSeriesToAssetPropertyCommand.d.ts +17 -0
  45. package/dist-types/ts3.4/commands/DeleteTimeSeriesCommand.d.ts +17 -0
  46. package/dist-types/ts3.4/commands/DescribeTimeSeriesCommand.d.ts +17 -0
  47. package/dist-types/ts3.4/commands/DisassociateTimeSeriesFromAssetPropertyCommand.d.ts +17 -0
  48. package/dist-types/ts3.4/commands/ListTimeSeriesCommand.d.ts +17 -0
  49. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  50. package/dist-types/ts3.4/models/models_0.d.ts +156 -0
  51. package/dist-types/ts3.4/pagination/ListTimeSeriesPaginator.d.ts +4 -0
  52. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  53. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +15 -0
  54. package/package.json +37 -44
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutStorageConfigurationCommand = exports.serializeAws_restJson1PutLoggingOptionsCommand = exports.serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListProjectsCommand = exports.serializeAws_restJson1ListProjectAssetsCommand = exports.serializeAws_restJson1ListPortalsCommand = exports.serializeAws_restJson1ListGatewaysCommand = exports.serializeAws_restJson1ListDashboardsCommand = exports.serializeAws_restJson1ListAssociatedAssetsCommand = exports.serializeAws_restJson1ListAssetsCommand = exports.serializeAws_restJson1ListAssetRelationshipsCommand = exports.serializeAws_restJson1ListAssetModelsCommand = exports.serializeAws_restJson1ListAccessPoliciesCommand = exports.serializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.serializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.serializeAws_restJson1GetAssetPropertyValueCommand = exports.serializeAws_restJson1GetAssetPropertyAggregatesCommand = exports.serializeAws_restJson1DisassociateAssetsCommand = exports.serializeAws_restJson1DescribeStorageConfigurationCommand = exports.serializeAws_restJson1DescribeProjectCommand = exports.serializeAws_restJson1DescribePortalCommand = exports.serializeAws_restJson1DescribeLoggingOptionsCommand = exports.serializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1DescribeGatewayCommand = exports.serializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1DescribeDashboardCommand = exports.serializeAws_restJson1DescribeAssetPropertyCommand = exports.serializeAws_restJson1DescribeAssetModelCommand = exports.serializeAws_restJson1DescribeAssetCommand = exports.serializeAws_restJson1DescribeAccessPolicyCommand = exports.serializeAws_restJson1DeleteProjectCommand = exports.serializeAws_restJson1DeletePortalCommand = exports.serializeAws_restJson1DeleteGatewayCommand = exports.serializeAws_restJson1DeleteDashboardCommand = exports.serializeAws_restJson1DeleteAssetModelCommand = exports.serializeAws_restJson1DeleteAssetCommand = exports.serializeAws_restJson1DeleteAccessPolicyCommand = exports.serializeAws_restJson1CreateProjectCommand = exports.serializeAws_restJson1CreatePortalCommand = exports.serializeAws_restJson1CreateGatewayCommand = exports.serializeAws_restJson1CreateDashboardCommand = exports.serializeAws_restJson1CreateAssetModelCommand = exports.serializeAws_restJson1CreateAssetCommand = exports.serializeAws_restJson1CreateAccessPolicyCommand = exports.serializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.serializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.serializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.serializeAws_restJson1AssociateAssetsCommand = void 0;
4
- exports.deserializeAws_restJson1ListAssociatedAssetsCommand = exports.deserializeAws_restJson1ListAssetsCommand = exports.deserializeAws_restJson1ListAssetRelationshipsCommand = exports.deserializeAws_restJson1ListAssetModelsCommand = exports.deserializeAws_restJson1ListAccessPoliciesCommand = exports.deserializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.deserializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.deserializeAws_restJson1GetAssetPropertyValueCommand = exports.deserializeAws_restJson1GetAssetPropertyAggregatesCommand = exports.deserializeAws_restJson1DisassociateAssetsCommand = exports.deserializeAws_restJson1DescribeStorageConfigurationCommand = exports.deserializeAws_restJson1DescribeProjectCommand = exports.deserializeAws_restJson1DescribePortalCommand = exports.deserializeAws_restJson1DescribeLoggingOptionsCommand = exports.deserializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1DescribeGatewayCommand = exports.deserializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1DescribeDashboardCommand = exports.deserializeAws_restJson1DescribeAssetPropertyCommand = exports.deserializeAws_restJson1DescribeAssetModelCommand = exports.deserializeAws_restJson1DescribeAssetCommand = exports.deserializeAws_restJson1DescribeAccessPolicyCommand = exports.deserializeAws_restJson1DeleteProjectCommand = exports.deserializeAws_restJson1DeletePortalCommand = exports.deserializeAws_restJson1DeleteGatewayCommand = exports.deserializeAws_restJson1DeleteDashboardCommand = exports.deserializeAws_restJson1DeleteAssetModelCommand = exports.deserializeAws_restJson1DeleteAssetCommand = exports.deserializeAws_restJson1DeleteAccessPolicyCommand = exports.deserializeAws_restJson1CreateProjectCommand = exports.deserializeAws_restJson1CreatePortalCommand = exports.deserializeAws_restJson1CreateGatewayCommand = exports.deserializeAws_restJson1CreateDashboardCommand = exports.deserializeAws_restJson1CreateAssetModelCommand = exports.deserializeAws_restJson1CreateAssetCommand = exports.deserializeAws_restJson1CreateAccessPolicyCommand = exports.deserializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.deserializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.deserializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.deserializeAws_restJson1AssociateAssetsCommand = exports.serializeAws_restJson1UpdateProjectCommand = exports.serializeAws_restJson1UpdatePortalCommand = exports.serializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1UpdateGatewayCommand = exports.serializeAws_restJson1UpdateDashboardCommand = exports.serializeAws_restJson1UpdateAssetPropertyCommand = exports.serializeAws_restJson1UpdateAssetModelCommand = exports.serializeAws_restJson1UpdateAssetCommand = exports.serializeAws_restJson1UpdateAccessPolicyCommand = exports.serializeAws_restJson1UntagResourceCommand = void 0;
5
- exports.deserializeAws_restJson1UpdateProjectCommand = exports.deserializeAws_restJson1UpdatePortalCommand = exports.deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1UpdateGatewayCommand = exports.deserializeAws_restJson1UpdateDashboardCommand = exports.deserializeAws_restJson1UpdateAssetPropertyCommand = exports.deserializeAws_restJson1UpdateAssetModelCommand = exports.deserializeAws_restJson1UpdateAssetCommand = exports.deserializeAws_restJson1UpdateAccessPolicyCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutStorageConfigurationCommand = exports.deserializeAws_restJson1PutLoggingOptionsCommand = exports.deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProjectsCommand = exports.deserializeAws_restJson1ListProjectAssetsCommand = exports.deserializeAws_restJson1ListPortalsCommand = exports.deserializeAws_restJson1ListGatewaysCommand = exports.deserializeAws_restJson1ListDashboardsCommand = void 0;
3
+ exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListProjectsCommand = exports.serializeAws_restJson1ListProjectAssetsCommand = exports.serializeAws_restJson1ListPortalsCommand = exports.serializeAws_restJson1ListGatewaysCommand = exports.serializeAws_restJson1ListDashboardsCommand = exports.serializeAws_restJson1ListAssociatedAssetsCommand = exports.serializeAws_restJson1ListAssetsCommand = exports.serializeAws_restJson1ListAssetRelationshipsCommand = exports.serializeAws_restJson1ListAssetModelsCommand = exports.serializeAws_restJson1ListAccessPoliciesCommand = exports.serializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.serializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.serializeAws_restJson1GetAssetPropertyValueCommand = exports.serializeAws_restJson1GetAssetPropertyAggregatesCommand = exports.serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = exports.serializeAws_restJson1DisassociateAssetsCommand = exports.serializeAws_restJson1DescribeTimeSeriesCommand = exports.serializeAws_restJson1DescribeStorageConfigurationCommand = exports.serializeAws_restJson1DescribeProjectCommand = exports.serializeAws_restJson1DescribePortalCommand = exports.serializeAws_restJson1DescribeLoggingOptionsCommand = exports.serializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1DescribeGatewayCommand = exports.serializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1DescribeDashboardCommand = exports.serializeAws_restJson1DescribeAssetPropertyCommand = exports.serializeAws_restJson1DescribeAssetModelCommand = exports.serializeAws_restJson1DescribeAssetCommand = exports.serializeAws_restJson1DescribeAccessPolicyCommand = exports.serializeAws_restJson1DeleteTimeSeriesCommand = exports.serializeAws_restJson1DeleteProjectCommand = exports.serializeAws_restJson1DeletePortalCommand = exports.serializeAws_restJson1DeleteGatewayCommand = exports.serializeAws_restJson1DeleteDashboardCommand = exports.serializeAws_restJson1DeleteAssetModelCommand = exports.serializeAws_restJson1DeleteAssetCommand = exports.serializeAws_restJson1DeleteAccessPolicyCommand = exports.serializeAws_restJson1CreateProjectCommand = exports.serializeAws_restJson1CreatePortalCommand = exports.serializeAws_restJson1CreateGatewayCommand = exports.serializeAws_restJson1CreateDashboardCommand = exports.serializeAws_restJson1CreateAssetModelCommand = exports.serializeAws_restJson1CreateAssetCommand = exports.serializeAws_restJson1CreateAccessPolicyCommand = exports.serializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.serializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.serializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = exports.serializeAws_restJson1AssociateAssetsCommand = void 0;
4
+ exports.deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = exports.deserializeAws_restJson1DisassociateAssetsCommand = exports.deserializeAws_restJson1DescribeTimeSeriesCommand = exports.deserializeAws_restJson1DescribeStorageConfigurationCommand = exports.deserializeAws_restJson1DescribeProjectCommand = exports.deserializeAws_restJson1DescribePortalCommand = exports.deserializeAws_restJson1DescribeLoggingOptionsCommand = exports.deserializeAws_restJson1DescribeGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1DescribeGatewayCommand = exports.deserializeAws_restJson1DescribeDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1DescribeDashboardCommand = exports.deserializeAws_restJson1DescribeAssetPropertyCommand = exports.deserializeAws_restJson1DescribeAssetModelCommand = exports.deserializeAws_restJson1DescribeAssetCommand = exports.deserializeAws_restJson1DescribeAccessPolicyCommand = exports.deserializeAws_restJson1DeleteTimeSeriesCommand = exports.deserializeAws_restJson1DeleteProjectCommand = exports.deserializeAws_restJson1DeletePortalCommand = exports.deserializeAws_restJson1DeleteGatewayCommand = exports.deserializeAws_restJson1DeleteDashboardCommand = exports.deserializeAws_restJson1DeleteAssetModelCommand = exports.deserializeAws_restJson1DeleteAssetCommand = exports.deserializeAws_restJson1DeleteAccessPolicyCommand = exports.deserializeAws_restJson1CreateProjectCommand = exports.deserializeAws_restJson1CreatePortalCommand = exports.deserializeAws_restJson1CreateGatewayCommand = exports.deserializeAws_restJson1CreateDashboardCommand = exports.deserializeAws_restJson1CreateAssetModelCommand = exports.deserializeAws_restJson1CreateAssetCommand = exports.deserializeAws_restJson1CreateAccessPolicyCommand = exports.deserializeAws_restJson1BatchPutAssetPropertyValueCommand = exports.deserializeAws_restJson1BatchDisassociateProjectAssetsCommand = exports.deserializeAws_restJson1BatchAssociateProjectAssetsCommand = exports.deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = exports.deserializeAws_restJson1AssociateAssetsCommand = exports.serializeAws_restJson1UpdateProjectCommand = exports.serializeAws_restJson1UpdatePortalCommand = exports.serializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.serializeAws_restJson1UpdateGatewayCommand = exports.serializeAws_restJson1UpdateDashboardCommand = exports.serializeAws_restJson1UpdateAssetPropertyCommand = exports.serializeAws_restJson1UpdateAssetModelCommand = exports.serializeAws_restJson1UpdateAssetCommand = exports.serializeAws_restJson1UpdateAccessPolicyCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutStorageConfigurationCommand = exports.serializeAws_restJson1PutLoggingOptionsCommand = exports.serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.serializeAws_restJson1ListTimeSeriesCommand = void 0;
5
+ exports.deserializeAws_restJson1UpdateProjectCommand = exports.deserializeAws_restJson1UpdatePortalCommand = exports.deserializeAws_restJson1UpdateGatewayCapabilityConfigurationCommand = exports.deserializeAws_restJson1UpdateGatewayCommand = exports.deserializeAws_restJson1UpdateDashboardCommand = exports.deserializeAws_restJson1UpdateAssetPropertyCommand = exports.deserializeAws_restJson1UpdateAssetModelCommand = exports.deserializeAws_restJson1UpdateAssetCommand = exports.deserializeAws_restJson1UpdateAccessPolicyCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutStorageConfigurationCommand = exports.deserializeAws_restJson1PutLoggingOptionsCommand = exports.deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = exports.deserializeAws_restJson1ListTimeSeriesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListProjectsCommand = exports.deserializeAws_restJson1ListProjectAssetsCommand = exports.deserializeAws_restJson1ListPortalsCommand = exports.deserializeAws_restJson1ListGatewaysCommand = exports.deserializeAws_restJson1ListDashboardsCommand = exports.deserializeAws_restJson1ListAssociatedAssetsCommand = exports.deserializeAws_restJson1ListAssetsCommand = exports.deserializeAws_restJson1ListAssetRelationshipsCommand = exports.deserializeAws_restJson1ListAssetModelsCommand = exports.deserializeAws_restJson1ListAccessPoliciesCommand = exports.deserializeAws_restJson1GetInterpolatedAssetPropertyValuesCommand = exports.deserializeAws_restJson1GetAssetPropertyValueHistoryCommand = exports.deserializeAws_restJson1GetAssetPropertyValueCommand = exports.deserializeAws_restJson1GetAssetPropertyAggregatesCommand = void 0;
6
6
  const protocol_http_1 = require("@aws-sdk/protocol-http");
7
7
  const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const uuid_1 = require("uuid");
@@ -47,6 +47,41 @@ const serializeAws_restJson1AssociateAssetsCommand = async (input, context) => {
47
47
  });
48
48
  };
49
49
  exports.serializeAws_restJson1AssociateAssetsCommand = serializeAws_restJson1AssociateAssetsCommand;
50
+ const serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = async (input, context) => {
51
+ var _a;
52
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const headers = {
54
+ "content-type": "application/json",
55
+ };
56
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/associate";
57
+ const query = {
58
+ ...(input.alias !== undefined && { alias: input.alias }),
59
+ ...(input.assetId !== undefined && { assetId: input.assetId }),
60
+ ...(input.propertyId !== undefined && { propertyId: input.propertyId }),
61
+ };
62
+ let body;
63
+ body = JSON.stringify({
64
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
65
+ });
66
+ let { hostname: resolvedHostname } = await context.endpoint();
67
+ if (context.disableHostPrefix !== true) {
68
+ resolvedHostname = "api." + resolvedHostname;
69
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
70
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
71
+ }
72
+ }
73
+ return new protocol_http_1.HttpRequest({
74
+ protocol,
75
+ hostname: resolvedHostname,
76
+ port,
77
+ method: "POST",
78
+ headers,
79
+ path: resolvedPath,
80
+ query,
81
+ body,
82
+ });
83
+ };
84
+ exports.serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = serializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand;
50
85
  const serializeAws_restJson1BatchAssociateProjectAssetsCommand = async (input, context) => {
51
86
  var _a;
52
87
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -682,6 +717,41 @@ const serializeAws_restJson1DeleteProjectCommand = async (input, context) => {
682
717
  });
683
718
  };
684
719
  exports.serializeAws_restJson1DeleteProjectCommand = serializeAws_restJson1DeleteProjectCommand;
720
+ const serializeAws_restJson1DeleteTimeSeriesCommand = async (input, context) => {
721
+ var _a;
722
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
723
+ const headers = {
724
+ "content-type": "application/json",
725
+ };
726
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/delete";
727
+ const query = {
728
+ ...(input.alias !== undefined && { alias: input.alias }),
729
+ ...(input.assetId !== undefined && { assetId: input.assetId }),
730
+ ...(input.propertyId !== undefined && { propertyId: input.propertyId }),
731
+ };
732
+ let body;
733
+ body = JSON.stringify({
734
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
735
+ });
736
+ let { hostname: resolvedHostname } = await context.endpoint();
737
+ if (context.disableHostPrefix !== true) {
738
+ resolvedHostname = "api." + resolvedHostname;
739
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
740
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
741
+ }
742
+ }
743
+ return new protocol_http_1.HttpRequest({
744
+ protocol,
745
+ hostname: resolvedHostname,
746
+ port,
747
+ method: "POST",
748
+ headers,
749
+ path: resolvedPath,
750
+ query,
751
+ body,
752
+ });
753
+ };
754
+ exports.serializeAws_restJson1DeleteTimeSeriesCommand = serializeAws_restJson1DeleteTimeSeriesCommand;
685
755
  const serializeAws_restJson1DescribeAccessPolicyCommand = async (input, context) => {
686
756
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
687
757
  const headers = {};
@@ -1078,6 +1148,35 @@ const serializeAws_restJson1DescribeStorageConfigurationCommand = async (input,
1078
1148
  });
1079
1149
  };
1080
1150
  exports.serializeAws_restJson1DescribeStorageConfigurationCommand = serializeAws_restJson1DescribeStorageConfigurationCommand;
1151
+ const serializeAws_restJson1DescribeTimeSeriesCommand = async (input, context) => {
1152
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1153
+ const headers = {};
1154
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/describe";
1155
+ const query = {
1156
+ ...(input.alias !== undefined && { alias: input.alias }),
1157
+ ...(input.assetId !== undefined && { assetId: input.assetId }),
1158
+ ...(input.propertyId !== undefined && { propertyId: input.propertyId }),
1159
+ };
1160
+ let body;
1161
+ let { hostname: resolvedHostname } = await context.endpoint();
1162
+ if (context.disableHostPrefix !== true) {
1163
+ resolvedHostname = "api." + resolvedHostname;
1164
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
1165
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1166
+ }
1167
+ }
1168
+ return new protocol_http_1.HttpRequest({
1169
+ protocol,
1170
+ hostname: resolvedHostname,
1171
+ port,
1172
+ method: "GET",
1173
+ headers,
1174
+ path: resolvedPath,
1175
+ query,
1176
+ body,
1177
+ });
1178
+ };
1179
+ exports.serializeAws_restJson1DescribeTimeSeriesCommand = serializeAws_restJson1DescribeTimeSeriesCommand;
1081
1180
  const serializeAws_restJson1DisassociateAssetsCommand = async (input, context) => {
1082
1181
  var _a;
1083
1182
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1119,6 +1218,41 @@ const serializeAws_restJson1DisassociateAssetsCommand = async (input, context) =
1119
1218
  });
1120
1219
  };
1121
1220
  exports.serializeAws_restJson1DisassociateAssetsCommand = serializeAws_restJson1DisassociateAssetsCommand;
1221
+ const serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = async (input, context) => {
1222
+ var _a;
1223
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1224
+ const headers = {
1225
+ "content-type": "application/json",
1226
+ };
1227
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries/disassociate";
1228
+ const query = {
1229
+ ...(input.alias !== undefined && { alias: input.alias }),
1230
+ ...(input.assetId !== undefined && { assetId: input.assetId }),
1231
+ ...(input.propertyId !== undefined && { propertyId: input.propertyId }),
1232
+ };
1233
+ let body;
1234
+ body = JSON.stringify({
1235
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
1236
+ });
1237
+ let { hostname: resolvedHostname } = await context.endpoint();
1238
+ if (context.disableHostPrefix !== true) {
1239
+ resolvedHostname = "api." + resolvedHostname;
1240
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
1241
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1242
+ }
1243
+ }
1244
+ return new protocol_http_1.HttpRequest({
1245
+ protocol,
1246
+ hostname: resolvedHostname,
1247
+ port,
1248
+ method: "POST",
1249
+ headers,
1250
+ path: resolvedPath,
1251
+ query,
1252
+ body,
1253
+ });
1254
+ };
1255
+ exports.serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = serializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand;
1122
1256
  const serializeAws_restJson1GetAssetPropertyAggregatesCommand = async (input, context) => {
1123
1257
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1124
1258
  const headers = {};
@@ -1614,6 +1748,37 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
1614
1748
  });
1615
1749
  };
1616
1750
  exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
1751
+ const serializeAws_restJson1ListTimeSeriesCommand = async (input, context) => {
1752
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1753
+ const headers = {};
1754
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/timeseries";
1755
+ const query = {
1756
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
1757
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
1758
+ ...(input.assetId !== undefined && { assetId: input.assetId }),
1759
+ ...(input.aliasPrefix !== undefined && { aliasPrefix: input.aliasPrefix }),
1760
+ ...(input.timeSeriesType !== undefined && { timeSeriesType: input.timeSeriesType }),
1761
+ };
1762
+ let body;
1763
+ let { hostname: resolvedHostname } = await context.endpoint();
1764
+ if (context.disableHostPrefix !== true) {
1765
+ resolvedHostname = "api." + resolvedHostname;
1766
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
1767
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1768
+ }
1769
+ }
1770
+ return new protocol_http_1.HttpRequest({
1771
+ protocol,
1772
+ hostname: resolvedHostname,
1773
+ port,
1774
+ method: "GET",
1775
+ headers,
1776
+ path: resolvedPath,
1777
+ query,
1778
+ body,
1779
+ });
1780
+ };
1781
+ exports.serializeAws_restJson1ListTimeSeriesCommand = serializeAws_restJson1ListTimeSeriesCommand;
1617
1782
  const serializeAws_restJson1PutDefaultEncryptionConfigurationCommand = async (input, context) => {
1618
1783
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1619
1784
  const headers = {
@@ -1683,10 +1848,16 @@ const serializeAws_restJson1PutStorageConfigurationCommand = async (input, conte
1683
1848
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/storage";
1684
1849
  let body;
1685
1850
  body = JSON.stringify({
1851
+ ...(input.disassociatedDataStorage !== undefined &&
1852
+ input.disassociatedDataStorage !== null && { disassociatedDataStorage: input.disassociatedDataStorage }),
1686
1853
  ...(input.multiLayerStorage !== undefined &&
1687
1854
  input.multiLayerStorage !== null && {
1688
1855
  multiLayerStorage: serializeAws_restJson1MultiLayerStorage(input.multiLayerStorage, context),
1689
1856
  }),
1857
+ ...(input.retentionPeriod !== undefined &&
1858
+ input.retentionPeriod !== null && {
1859
+ retentionPeriod: serializeAws_restJson1RetentionPeriod(input.retentionPeriod, context),
1860
+ }),
1690
1861
  ...(input.storageType !== undefined && input.storageType !== null && { storageType: input.storageType }),
1691
1862
  });
1692
1863
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -2265,6 +2436,82 @@ const deserializeAws_restJson1AssociateAssetsCommandError = async (output, conte
2265
2436
  delete response.Message;
2266
2437
  return Promise.reject(Object.assign(new Error(message), response));
2267
2438
  };
2439
+ const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = async (output, context) => {
2440
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2441
+ return deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError(output, context);
2442
+ }
2443
+ const contents = {
2444
+ $metadata: deserializeMetadata(output),
2445
+ };
2446
+ await collectBody(output.body, context);
2447
+ return Promise.resolve(contents);
2448
+ };
2449
+ exports.deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand = deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommand;
2450
+ const deserializeAws_restJson1AssociateTimeSeriesToAssetPropertyCommandError = async (output, context) => {
2451
+ const parsedOutput = {
2452
+ ...output,
2453
+ body: await parseBody(output.body, context),
2454
+ };
2455
+ let response;
2456
+ let errorCode = "UnknownError";
2457
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2458
+ switch (errorCode) {
2459
+ case "ConflictingOperationException":
2460
+ case "com.amazonaws.iotsitewise#ConflictingOperationException":
2461
+ response = {
2462
+ ...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
2463
+ name: errorCode,
2464
+ $metadata: deserializeMetadata(output),
2465
+ };
2466
+ break;
2467
+ case "InternalFailureException":
2468
+ case "com.amazonaws.iotsitewise#InternalFailureException":
2469
+ response = {
2470
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
2471
+ name: errorCode,
2472
+ $metadata: deserializeMetadata(output),
2473
+ };
2474
+ break;
2475
+ case "InvalidRequestException":
2476
+ case "com.amazonaws.iotsitewise#InvalidRequestException":
2477
+ response = {
2478
+ ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
2479
+ name: errorCode,
2480
+ $metadata: deserializeMetadata(output),
2481
+ };
2482
+ break;
2483
+ case "ResourceNotFoundException":
2484
+ case "com.amazonaws.iotsitewise#ResourceNotFoundException":
2485
+ response = {
2486
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2487
+ name: errorCode,
2488
+ $metadata: deserializeMetadata(output),
2489
+ };
2490
+ break;
2491
+ case "ThrottlingException":
2492
+ case "com.amazonaws.iotsitewise#ThrottlingException":
2493
+ response = {
2494
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2495
+ name: errorCode,
2496
+ $metadata: deserializeMetadata(output),
2497
+ };
2498
+ break;
2499
+ default:
2500
+ const parsedBody = parsedOutput.body;
2501
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2502
+ response = {
2503
+ ...parsedBody,
2504
+ name: `${errorCode}`,
2505
+ message: parsedBody.message || parsedBody.Message || errorCode,
2506
+ $fault: "client",
2507
+ $metadata: deserializeMetadata(output),
2508
+ };
2509
+ }
2510
+ const message = response.message || response.Message || errorCode;
2511
+ response.message = message;
2512
+ delete response.Message;
2513
+ return Promise.reject(Object.assign(new Error(message), response));
2514
+ };
2268
2515
  const deserializeAws_restJson1BatchAssociateProjectAssetsCommand = async (output, context) => {
2269
2516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2270
2517
  return deserializeAws_restJson1BatchAssociateProjectAssetsCommandError(output, context);
@@ -3607,8 +3854,76 @@ const deserializeAws_restJson1DeleteProjectCommand = async (output, context) =>
3607
3854
  await collectBody(output.body, context);
3608
3855
  return Promise.resolve(contents);
3609
3856
  };
3610
- exports.deserializeAws_restJson1DeleteProjectCommand = deserializeAws_restJson1DeleteProjectCommand;
3611
- const deserializeAws_restJson1DeleteProjectCommandError = async (output, context) => {
3857
+ exports.deserializeAws_restJson1DeleteProjectCommand = deserializeAws_restJson1DeleteProjectCommand;
3858
+ const deserializeAws_restJson1DeleteProjectCommandError = async (output, context) => {
3859
+ const parsedOutput = {
3860
+ ...output,
3861
+ body: await parseBody(output.body, context),
3862
+ };
3863
+ let response;
3864
+ let errorCode = "UnknownError";
3865
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3866
+ switch (errorCode) {
3867
+ case "InternalFailureException":
3868
+ case "com.amazonaws.iotsitewise#InternalFailureException":
3869
+ response = {
3870
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
3871
+ name: errorCode,
3872
+ $metadata: deserializeMetadata(output),
3873
+ };
3874
+ break;
3875
+ case "InvalidRequestException":
3876
+ case "com.amazonaws.iotsitewise#InvalidRequestException":
3877
+ response = {
3878
+ ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
3879
+ name: errorCode,
3880
+ $metadata: deserializeMetadata(output),
3881
+ };
3882
+ break;
3883
+ case "ResourceNotFoundException":
3884
+ case "com.amazonaws.iotsitewise#ResourceNotFoundException":
3885
+ response = {
3886
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3887
+ name: errorCode,
3888
+ $metadata: deserializeMetadata(output),
3889
+ };
3890
+ break;
3891
+ case "ThrottlingException":
3892
+ case "com.amazonaws.iotsitewise#ThrottlingException":
3893
+ response = {
3894
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3895
+ name: errorCode,
3896
+ $metadata: deserializeMetadata(output),
3897
+ };
3898
+ break;
3899
+ default:
3900
+ const parsedBody = parsedOutput.body;
3901
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3902
+ response = {
3903
+ ...parsedBody,
3904
+ name: `${errorCode}`,
3905
+ message: parsedBody.message || parsedBody.Message || errorCode,
3906
+ $fault: "client",
3907
+ $metadata: deserializeMetadata(output),
3908
+ };
3909
+ }
3910
+ const message = response.message || response.Message || errorCode;
3911
+ response.message = message;
3912
+ delete response.Message;
3913
+ return Promise.reject(Object.assign(new Error(message), response));
3914
+ };
3915
+ const deserializeAws_restJson1DeleteTimeSeriesCommand = async (output, context) => {
3916
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3917
+ return deserializeAws_restJson1DeleteTimeSeriesCommandError(output, context);
3918
+ }
3919
+ const contents = {
3920
+ $metadata: deserializeMetadata(output),
3921
+ };
3922
+ await collectBody(output.body, context);
3923
+ return Promise.resolve(contents);
3924
+ };
3925
+ exports.deserializeAws_restJson1DeleteTimeSeriesCommand = deserializeAws_restJson1DeleteTimeSeriesCommand;
3926
+ const deserializeAws_restJson1DeleteTimeSeriesCommandError = async (output, context) => {
3612
3927
  const parsedOutput = {
3613
3928
  ...output,
3614
3929
  body: await parseBody(output.body, context),
@@ -3617,6 +3932,14 @@ const deserializeAws_restJson1DeleteProjectCommandError = async (output, context
3617
3932
  let errorCode = "UnknownError";
3618
3933
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3619
3934
  switch (errorCode) {
3935
+ case "ConflictingOperationException":
3936
+ case "com.amazonaws.iotsitewise#ConflictingOperationException":
3937
+ response = {
3938
+ ...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
3939
+ name: errorCode,
3940
+ $metadata: deserializeMetadata(output),
3941
+ };
3942
+ break;
3620
3943
  case "InternalFailureException":
3621
3944
  case "com.amazonaws.iotsitewise#InternalFailureException":
3622
3945
  response = {
@@ -4720,20 +5043,28 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommand = async (outpu
4720
5043
  const contents = {
4721
5044
  $metadata: deserializeMetadata(output),
4722
5045
  configurationStatus: undefined,
5046
+ disassociatedDataStorage: undefined,
4723
5047
  lastUpdateDate: undefined,
4724
5048
  multiLayerStorage: undefined,
5049
+ retentionPeriod: undefined,
4725
5050
  storageType: undefined,
4726
5051
  };
4727
5052
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
4728
5053
  if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
4729
5054
  contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
4730
5055
  }
5056
+ if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
5057
+ contents.disassociatedDataStorage = smithy_client_1.expectString(data.disassociatedDataStorage);
5058
+ }
4731
5059
  if (data.lastUpdateDate !== undefined && data.lastUpdateDate !== null) {
4732
5060
  contents.lastUpdateDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.lastUpdateDate)));
4733
5061
  }
4734
5062
  if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
4735
5063
  contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
4736
5064
  }
5065
+ if (data.retentionPeriod !== undefined && data.retentionPeriod !== null) {
5066
+ contents.retentionPeriod = deserializeAws_restJson1RetentionPeriod(data.retentionPeriod, context);
5067
+ }
4737
5068
  if (data.storageType !== undefined && data.storageType !== null) {
4738
5069
  contents.storageType = smithy_client_1.expectString(data.storageType);
4739
5070
  }
@@ -4813,6 +5144,106 @@ const deserializeAws_restJson1DescribeStorageConfigurationCommandError = async (
4813
5144
  delete response.Message;
4814
5145
  return Promise.reject(Object.assign(new Error(message), response));
4815
5146
  };
5147
+ const deserializeAws_restJson1DescribeTimeSeriesCommand = async (output, context) => {
5148
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5149
+ return deserializeAws_restJson1DescribeTimeSeriesCommandError(output, context);
5150
+ }
5151
+ const contents = {
5152
+ $metadata: deserializeMetadata(output),
5153
+ alias: undefined,
5154
+ assetId: undefined,
5155
+ dataType: undefined,
5156
+ dataTypeSpec: undefined,
5157
+ propertyId: undefined,
5158
+ timeSeriesCreationDate: undefined,
5159
+ timeSeriesId: undefined,
5160
+ timeSeriesLastUpdateDate: undefined,
5161
+ };
5162
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
5163
+ if (data.alias !== undefined && data.alias !== null) {
5164
+ contents.alias = smithy_client_1.expectString(data.alias);
5165
+ }
5166
+ if (data.assetId !== undefined && data.assetId !== null) {
5167
+ contents.assetId = smithy_client_1.expectString(data.assetId);
5168
+ }
5169
+ if (data.dataType !== undefined && data.dataType !== null) {
5170
+ contents.dataType = smithy_client_1.expectString(data.dataType);
5171
+ }
5172
+ if (data.dataTypeSpec !== undefined && data.dataTypeSpec !== null) {
5173
+ contents.dataTypeSpec = smithy_client_1.expectString(data.dataTypeSpec);
5174
+ }
5175
+ if (data.propertyId !== undefined && data.propertyId !== null) {
5176
+ contents.propertyId = smithy_client_1.expectString(data.propertyId);
5177
+ }
5178
+ if (data.timeSeriesCreationDate !== undefined && data.timeSeriesCreationDate !== null) {
5179
+ contents.timeSeriesCreationDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.timeSeriesCreationDate)));
5180
+ }
5181
+ if (data.timeSeriesId !== undefined && data.timeSeriesId !== null) {
5182
+ contents.timeSeriesId = smithy_client_1.expectString(data.timeSeriesId);
5183
+ }
5184
+ if (data.timeSeriesLastUpdateDate !== undefined && data.timeSeriesLastUpdateDate !== null) {
5185
+ contents.timeSeriesLastUpdateDate = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.timeSeriesLastUpdateDate)));
5186
+ }
5187
+ return Promise.resolve(contents);
5188
+ };
5189
+ exports.deserializeAws_restJson1DescribeTimeSeriesCommand = deserializeAws_restJson1DescribeTimeSeriesCommand;
5190
+ const deserializeAws_restJson1DescribeTimeSeriesCommandError = async (output, context) => {
5191
+ const parsedOutput = {
5192
+ ...output,
5193
+ body: await parseBody(output.body, context),
5194
+ };
5195
+ let response;
5196
+ let errorCode = "UnknownError";
5197
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5198
+ switch (errorCode) {
5199
+ case "InternalFailureException":
5200
+ case "com.amazonaws.iotsitewise#InternalFailureException":
5201
+ response = {
5202
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
5203
+ name: errorCode,
5204
+ $metadata: deserializeMetadata(output),
5205
+ };
5206
+ break;
5207
+ case "InvalidRequestException":
5208
+ case "com.amazonaws.iotsitewise#InvalidRequestException":
5209
+ response = {
5210
+ ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
5211
+ name: errorCode,
5212
+ $metadata: deserializeMetadata(output),
5213
+ };
5214
+ break;
5215
+ case "ResourceNotFoundException":
5216
+ case "com.amazonaws.iotsitewise#ResourceNotFoundException":
5217
+ response = {
5218
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
5219
+ name: errorCode,
5220
+ $metadata: deserializeMetadata(output),
5221
+ };
5222
+ break;
5223
+ case "ThrottlingException":
5224
+ case "com.amazonaws.iotsitewise#ThrottlingException":
5225
+ response = {
5226
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
5227
+ name: errorCode,
5228
+ $metadata: deserializeMetadata(output),
5229
+ };
5230
+ break;
5231
+ default:
5232
+ const parsedBody = parsedOutput.body;
5233
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
5234
+ response = {
5235
+ ...parsedBody,
5236
+ name: `${errorCode}`,
5237
+ message: parsedBody.message || parsedBody.Message || errorCode,
5238
+ $fault: "client",
5239
+ $metadata: deserializeMetadata(output),
5240
+ };
5241
+ }
5242
+ const message = response.message || response.Message || errorCode;
5243
+ response.message = message;
5244
+ delete response.Message;
5245
+ return Promise.reject(Object.assign(new Error(message), response));
5246
+ };
4816
5247
  const deserializeAws_restJson1DisassociateAssetsCommand = async (output, context) => {
4817
5248
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4818
5249
  return deserializeAws_restJson1DisassociateAssetsCommandError(output, context);
@@ -4889,6 +5320,82 @@ const deserializeAws_restJson1DisassociateAssetsCommandError = async (output, co
4889
5320
  delete response.Message;
4890
5321
  return Promise.reject(Object.assign(new Error(message), response));
4891
5322
  };
5323
+ const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = async (output, context) => {
5324
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5325
+ return deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError(output, context);
5326
+ }
5327
+ const contents = {
5328
+ $metadata: deserializeMetadata(output),
5329
+ };
5330
+ await collectBody(output.body, context);
5331
+ return Promise.resolve(contents);
5332
+ };
5333
+ exports.deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand = deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommand;
5334
+ const deserializeAws_restJson1DisassociateTimeSeriesFromAssetPropertyCommandError = async (output, context) => {
5335
+ const parsedOutput = {
5336
+ ...output,
5337
+ body: await parseBody(output.body, context),
5338
+ };
5339
+ let response;
5340
+ let errorCode = "UnknownError";
5341
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5342
+ switch (errorCode) {
5343
+ case "ConflictingOperationException":
5344
+ case "com.amazonaws.iotsitewise#ConflictingOperationException":
5345
+ response = {
5346
+ ...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
5347
+ name: errorCode,
5348
+ $metadata: deserializeMetadata(output),
5349
+ };
5350
+ break;
5351
+ case "InternalFailureException":
5352
+ case "com.amazonaws.iotsitewise#InternalFailureException":
5353
+ response = {
5354
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
5355
+ name: errorCode,
5356
+ $metadata: deserializeMetadata(output),
5357
+ };
5358
+ break;
5359
+ case "InvalidRequestException":
5360
+ case "com.amazonaws.iotsitewise#InvalidRequestException":
5361
+ response = {
5362
+ ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
5363
+ name: errorCode,
5364
+ $metadata: deserializeMetadata(output),
5365
+ };
5366
+ break;
5367
+ case "ResourceNotFoundException":
5368
+ case "com.amazonaws.iotsitewise#ResourceNotFoundException":
5369
+ response = {
5370
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
5371
+ name: errorCode,
5372
+ $metadata: deserializeMetadata(output),
5373
+ };
5374
+ break;
5375
+ case "ThrottlingException":
5376
+ case "com.amazonaws.iotsitewise#ThrottlingException":
5377
+ response = {
5378
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
5379
+ name: errorCode,
5380
+ $metadata: deserializeMetadata(output),
5381
+ };
5382
+ break;
5383
+ default:
5384
+ const parsedBody = parsedOutput.body;
5385
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
5386
+ response = {
5387
+ ...parsedBody,
5388
+ name: `${errorCode}`,
5389
+ message: parsedBody.message || parsedBody.Message || errorCode,
5390
+ $fault: "client",
5391
+ $metadata: deserializeMetadata(output),
5392
+ };
5393
+ }
5394
+ const message = response.message || response.Message || errorCode;
5395
+ response.message = message;
5396
+ delete response.Message;
5397
+ return Promise.reject(Object.assign(new Error(message), response));
5398
+ };
4892
5399
  const deserializeAws_restJson1GetAssetPropertyAggregatesCommand = async (output, context) => {
4893
5400
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4894
5401
  return deserializeAws_restJson1GetAssetPropertyAggregatesCommandError(output, context);
@@ -6021,6 +6528,82 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
6021
6528
  delete response.Message;
6022
6529
  return Promise.reject(Object.assign(new Error(message), response));
6023
6530
  };
6531
+ const deserializeAws_restJson1ListTimeSeriesCommand = async (output, context) => {
6532
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6533
+ return deserializeAws_restJson1ListTimeSeriesCommandError(output, context);
6534
+ }
6535
+ const contents = {
6536
+ $metadata: deserializeMetadata(output),
6537
+ TimeSeriesSummaries: undefined,
6538
+ nextToken: undefined,
6539
+ };
6540
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
6541
+ if (data.TimeSeriesSummaries !== undefined && data.TimeSeriesSummaries !== null) {
6542
+ contents.TimeSeriesSummaries = deserializeAws_restJson1TimeSeriesSummaries(data.TimeSeriesSummaries, context);
6543
+ }
6544
+ if (data.nextToken !== undefined && data.nextToken !== null) {
6545
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
6546
+ }
6547
+ return Promise.resolve(contents);
6548
+ };
6549
+ exports.deserializeAws_restJson1ListTimeSeriesCommand = deserializeAws_restJson1ListTimeSeriesCommand;
6550
+ const deserializeAws_restJson1ListTimeSeriesCommandError = async (output, context) => {
6551
+ const parsedOutput = {
6552
+ ...output,
6553
+ body: await parseBody(output.body, context),
6554
+ };
6555
+ let response;
6556
+ let errorCode = "UnknownError";
6557
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6558
+ switch (errorCode) {
6559
+ case "InternalFailureException":
6560
+ case "com.amazonaws.iotsitewise#InternalFailureException":
6561
+ response = {
6562
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
6563
+ name: errorCode,
6564
+ $metadata: deserializeMetadata(output),
6565
+ };
6566
+ break;
6567
+ case "InvalidRequestException":
6568
+ case "com.amazonaws.iotsitewise#InvalidRequestException":
6569
+ response = {
6570
+ ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
6571
+ name: errorCode,
6572
+ $metadata: deserializeMetadata(output),
6573
+ };
6574
+ break;
6575
+ case "ResourceNotFoundException":
6576
+ case "com.amazonaws.iotsitewise#ResourceNotFoundException":
6577
+ response = {
6578
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
6579
+ name: errorCode,
6580
+ $metadata: deserializeMetadata(output),
6581
+ };
6582
+ break;
6583
+ case "ThrottlingException":
6584
+ case "com.amazonaws.iotsitewise#ThrottlingException":
6585
+ response = {
6586
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
6587
+ name: errorCode,
6588
+ $metadata: deserializeMetadata(output),
6589
+ };
6590
+ break;
6591
+ default:
6592
+ const parsedBody = parsedOutput.body;
6593
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
6594
+ response = {
6595
+ ...parsedBody,
6596
+ name: `${errorCode}`,
6597
+ message: parsedBody.message || parsedBody.Message || errorCode,
6598
+ $fault: "client",
6599
+ $metadata: deserializeMetadata(output),
6600
+ };
6601
+ }
6602
+ const message = response.message || response.Message || errorCode;
6603
+ response.message = message;
6604
+ delete response.Message;
6605
+ return Promise.reject(Object.assign(new Error(message), response));
6606
+ };
6024
6607
  const deserializeAws_restJson1PutDefaultEncryptionConfigurationCommand = async (output, context) => {
6025
6608
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6026
6609
  return deserializeAws_restJson1PutDefaultEncryptionConfigurationCommandError(output, context);
@@ -6192,16 +6775,24 @@ const deserializeAws_restJson1PutStorageConfigurationCommand = async (output, co
6192
6775
  const contents = {
6193
6776
  $metadata: deserializeMetadata(output),
6194
6777
  configurationStatus: undefined,
6778
+ disassociatedDataStorage: undefined,
6195
6779
  multiLayerStorage: undefined,
6780
+ retentionPeriod: undefined,
6196
6781
  storageType: undefined,
6197
6782
  };
6198
6783
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
6199
6784
  if (data.configurationStatus !== undefined && data.configurationStatus !== null) {
6200
6785
  contents.configurationStatus = deserializeAws_restJson1ConfigurationStatus(data.configurationStatus, context);
6201
6786
  }
6787
+ if (data.disassociatedDataStorage !== undefined && data.disassociatedDataStorage !== null) {
6788
+ contents.disassociatedDataStorage = smithy_client_1.expectString(data.disassociatedDataStorage);
6789
+ }
6202
6790
  if (data.multiLayerStorage !== undefined && data.multiLayerStorage !== null) {
6203
6791
  contents.multiLayerStorage = deserializeAws_restJson1MultiLayerStorage(data.multiLayerStorage, context);
6204
6792
  }
6793
+ if (data.retentionPeriod !== undefined && data.retentionPeriod !== null) {
6794
+ contents.retentionPeriod = deserializeAws_restJson1RetentionPeriod(data.retentionPeriod, context);
6795
+ }
6205
6796
  if (data.storageType !== undefined && data.storageType !== null) {
6206
6797
  contents.storageType = smithy_client_1.expectString(data.storageType);
6207
6798
  }
@@ -7695,6 +8286,12 @@ const serializeAws_restJson1Resource = (input, context) => {
7695
8286
  input.project !== null && { project: serializeAws_restJson1ProjectResource(input.project, context) }),
7696
8287
  };
7697
8288
  };
8289
+ const serializeAws_restJson1RetentionPeriod = (input, context) => {
8290
+ return {
8291
+ ...(input.numberOfDays !== undefined && input.numberOfDays !== null && { numberOfDays: input.numberOfDays }),
8292
+ ...(input.unlimited !== undefined && input.unlimited !== null && { unlimited: input.unlimited }),
8293
+ };
8294
+ };
7698
8295
  const serializeAws_restJson1TagMap = (input, context) => {
7699
8296
  return Object.entries(input).reduce((acc, [key, value]) => {
7700
8297
  if (value === null) {
@@ -8564,6 +9161,12 @@ const deserializeAws_restJson1Resource = (output, context) => {
8564
9161
  : undefined,
8565
9162
  };
8566
9163
  };
9164
+ const deserializeAws_restJson1RetentionPeriod = (output, context) => {
9165
+ return {
9166
+ numberOfDays: smithy_client_1.expectInt32(output.numberOfDays),
9167
+ unlimited: smithy_client_1.expectBoolean(output.unlimited),
9168
+ };
9169
+ };
8567
9170
  const deserializeAws_restJson1TagMap = (output, context) => {
8568
9171
  return Object.entries(output).reduce((acc, [key, value]) => {
8569
9172
  if (value === null) {
@@ -8581,6 +9184,32 @@ const deserializeAws_restJson1TimeInNanos = (output, context) => {
8581
9184
  timeInSeconds: smithy_client_1.expectLong(output.timeInSeconds),
8582
9185
  };
8583
9186
  };
9187
+ const deserializeAws_restJson1TimeSeriesSummaries = (output, context) => {
9188
+ return (output || [])
9189
+ .filter((e) => e != null)
9190
+ .map((entry) => {
9191
+ if (entry === null) {
9192
+ return null;
9193
+ }
9194
+ return deserializeAws_restJson1TimeSeriesSummary(entry, context);
9195
+ });
9196
+ };
9197
+ const deserializeAws_restJson1TimeSeriesSummary = (output, context) => {
9198
+ return {
9199
+ alias: smithy_client_1.expectString(output.alias),
9200
+ assetId: smithy_client_1.expectString(output.assetId),
9201
+ dataType: smithy_client_1.expectString(output.dataType),
9202
+ dataTypeSpec: smithy_client_1.expectString(output.dataTypeSpec),
9203
+ propertyId: smithy_client_1.expectString(output.propertyId),
9204
+ timeSeriesCreationDate: output.timeSeriesCreationDate !== undefined && output.timeSeriesCreationDate !== null
9205
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.timeSeriesCreationDate)))
9206
+ : undefined,
9207
+ timeSeriesId: smithy_client_1.expectString(output.timeSeriesId),
9208
+ timeSeriesLastUpdateDate: output.timeSeriesLastUpdateDate !== undefined && output.timeSeriesLastUpdateDate !== null
9209
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.timeSeriesLastUpdateDate)))
9210
+ : undefined,
9211
+ };
9212
+ };
8584
9213
  const deserializeAws_restJson1Timestamps = (output, context) => {
8585
9214
  return (output || [])
8586
9215
  .filter((e) => e != null)